Changeset 1227 for trunk/wp-blog-header.php
- Timestamp:
- 05/05/2004 07:34:41 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/wp-blog-header.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-blog-header.php
r1186 r1227 51 51 } 52 52 53 $wpvarstoreset = array('m','p','posts','w', 'cat','withcomments','s','search','exact', 'sentence','poststart','postend','preview','debug', 'calendar','page','paged','more','tb', 'pb','author','order','orderby', 'year', 'monthnum', 'day', ' name', 'category_name', 'feed', 'author_name');53 $wpvarstoreset = array('m','p','posts','w', 'cat','withcomments','s','search','exact', 'sentence','poststart','postend','preview','debug', 'calendar','page','paged','more','tb', 'pb','author','order','orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'feed', 'author_name'); 54 54 55 55 for ($i=0; $i<count($wpvarstoreset); $i += 1) { … … 133 133 $wp_posts_post_date_field = "post_date"; // "DATE_ADD(post_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)"; 134 134 135 // if a month is specified in the querystring, load that month136 if ( $m != '') {137 $m = '' .intval($m);138 $where .= ' AND YEAR(post_date)=' .substr($m,0,4);135 // If a month is specified in the querystring, load that month 136 if ('' != $m) { 137 $m = '' . preg_replace('|[^0-9]|', '', $m); 138 $where .= ' AND YEAR(post_date)=' . substr($m, 0, 4); 139 139 if (strlen($m)>5) 140 $where .= ' AND MONTH(post_date)=' .substr($m,4,2);140 $where .= ' AND MONTH(post_date)=' . substr($m, 4, 2); 141 141 if (strlen($m)>7) 142 $where .= ' AND DAYOFMONTH(post_date)=' .substr($m,6,2);142 $where .= ' AND DAYOFMONTH(post_date)=' . substr($m, 6, 2); 143 143 if (strlen($m)>9) 144 $where .= ' AND HOUR(post_date .)='.substr($m,8,2);144 $where .= ' AND HOUR(post_date)=' . substr($m, 8, 2); 145 145 if (strlen($m)>11) 146 $where .= ' AND MINUTE(post_date)=' .substr($m,10,2);146 $where .= ' AND MINUTE(post_date)=' . substr($m, 10, 2); 147 147 if (strlen($m)>13) 148 $where .= ' AND SECOND(post_date)='.substr($m,12,2); 149 150 } 151 152 if ($year != '') { 148 $where .= ' AND SECOND(post_date)=' . substr($m, 12, 2); 149 } 150 151 if ('' != $hour) { 152 $hour = '' . intval($hour); 153 $where .= " AND HOUR(post_date)='$hour'"; 154 } 155 156 if ('' != $minute) { 157 $minute = '' . intval($minute); 158 $where .= " AND MINUTE(post_date)='$minute'"; 159 } 160 161 if ('' != $second) { 162 $second = '' . intval($second); 163 $where .= " AND SECOND(post_date)='$second'"; 164 } 165 166 if ('' != $year) { 153 167 $year = '' . intval($year); 154 168 $where .= " AND YEAR(post_date)='$year'"; 155 169 } 156 170 157 if ( $monthnum != '') {171 if ('' != $monthnum) { 158 172 $monthnum = '' . intval($monthnum); 159 173 $where .= " AND MONTH(post_date)='$monthnum'"; 160 174 } 161 175 162 if ( $day != '') {176 if ('' != $day) { 163 177 $day = '' . intval($day); 164 178 $where .= " AND DAYOFMONTH(post_date)='$day'"; 165 179 } 166 180 167 if ( $name != '') {181 if ('' != $name) { 168 182 $name = preg_replace('/[^a-z0-9-]/', '', $name); 169 183 $where .= " AND post_name = '$name'"; 170 184 } 171 185 172 if ( $w != '') {186 if ('' != $w) { 173 187 $w = ''.intval($w); 174 188 $where .= " AND WEEK(post_date, 1)='$w'";
Note: See TracChangeset
for help on using the changeset viewer.