Ticket #24884: 24884.patch
File 24884.patch, 969 bytes (added by , 10 years ago) |
---|
-
wp-includes/query.php
1445 1445 $qv['monthnum'] = absint($qv['monthnum']); 1446 1446 $qv['day'] = absint($qv['day']); 1447 1447 $qv['w'] = absint($qv['w']); 1448 $qv['m'] = absint($qv['m']);1448 $qv['m'] = preg_replace( '|[^0-9]|', '', $qv['m'] ); 1449 1449 $qv['paged'] = absint($qv['paged']); 1450 1450 $qv['cat'] = preg_replace( '|[^0-9,-]|', '', $qv['cat'] ); // comma separated list of positive or negative integers 1451 1451 $qv['pagename'] = trim( $qv['pagename'] ); … … 2047 2047 2048 2048 // If a month is specified in the querystring, load that month 2049 2049 if ( $q['m'] ) { 2050 $q['m'] = '' . preg_replace('|[^0-9]|', '', $q['m']);2051 2050 $where .= " AND YEAR($wpdb->posts.post_date)=" . substr($q['m'], 0, 4); 2052 2051 if ( strlen($q['m']) > 5 ) 2053 2052 $where .= " AND MONTH($wpdb->posts.post_date)=" . substr($q['m'], 4, 2);