Ticket #20193: 20193.diff
| File 20193.diff, 1.1 KB (added by , 15 years ago) |
|---|
-
wp-includes/post.php
1905 1905 * @return string The SQL AND clause for mime searching. 1906 1906 */ 1907 1907 function wp_post_mime_type_where($post_mime_types, $table_alias = '') { 1908 global $wpdb; 1909 1910 //always prefix table names in case a filter added a join 1911 // see: #20193 1912 if ( $table_alias == '' ) 1913 $table_alias = $wpdb->posts; 1914 1908 1915 $where = ''; 1909 1916 $wildcards = array('', '%', '%/%'); 1910 1917 if ( is_string($post_mime_types) ) … … 1932 1939 return ''; 1933 1940 1934 1941 if ( false !== strpos($mime_pattern, '%') ) 1935 $wheres[] = empty($table_alias) ? "post_mime_type LIKE '$mime_pattern'" :"$table_alias.post_mime_type LIKE '$mime_pattern'";1942 $wheres[] = "$table_alias.post_mime_type LIKE '$mime_pattern'"; 1936 1943 else 1937 $wheres[] = empty($table_alias) ? "post_mime_type = '$mime_pattern'" :"$table_alias.post_mime_type = '$mime_pattern'";1944 $wheres[] = "$table_alias.post_mime_type = '$mime_pattern'"; 1938 1945 } 1939 1946 if ( !empty($wheres) ) 1940 1947 $where = ' AND (' . join(' OR ', $wheres) . ') ';
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)