Changeset 470 for trunk/blog.header.php
- Timestamp:
- 10/26/2003 05:25:26 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/blog.header.php
r404 r470 14 14 require_once ($curpath.$b2inc.'/xmlrpcs.inc'); 15 15 16 $b2varstoreset = array('m','p','posts','w','c', 'cat','withcomments','s','search','exact', 'sentence','poststart','postend','preview','debug', 'calendar','page','paged','more','tb', 'pb','author','order','orderby' );16 $b2varstoreset = array('m','p','posts','w','c', 'cat','withcomments','s','search','exact', 'sentence','poststart','postend','preview','debug', 'calendar','page','paged','more','tb', 'pb','author','order','orderby', 'monthnum'); 17 17 18 18 for ($i=0; $i<count($b2varstoreset); $i += 1) { … … 83 83 } 84 84 85 if ($year != '') { 86 $year = '' . intval($year); 87 $where .= ' AND YEAR(post_date)=' . $year; 88 } 89 90 if ($monthnum != '') { 91 $monthnum = '' . intval($monthnum); 92 $where .= ' AND MONTH(post_date)=' . $monthnum; 93 } 94 95 if ($day != '') { 96 $hay = '' . intval($day); 97 $where .= ' AND DAYOFMONTH(post_date)=' . $day; 98 } 99 100 if ($name != '') { 101 $name = preg_replace('/[^a-z0-9-]/', '', $name); 102 $where .= " AND post_name = '$name'"; 103 } 104 85 105 if ($w != '') { 86 106 $w = ''.intval($w); 87 $where .= ' AND WEEK(post_date, 1)='.$w;107 $where .= ' AND WEEK(post_date, 1)=' . $w; 88 108 } 89 109 … … 207 227 } 208 228 209 if ( !empty($postend) && ($postend > $poststart) && (!$m) && (!$w) && (!$whichcat) && (!$s) && (!$p)) {229 if ( !empty($postend) && ($postend > $poststart) && (!$m) && !$month && !$year && !$day &&(!$w) && (!$whichcat) && (!$s) && (!$p)) { 210 230 if ($what_to_show == 'posts' || ($what_to_show == 'paged' && (!$paged))) { 211 231 $poststart = intval($poststart); … … 244 264 } 245 265 } 246 elseif (($m) || ($p) || ($w) || ($s) || ($whichcat) || ($author) ) {266 elseif (($m) || ($p) || ($w) || ($s) || ($whichcat) || ($author) || $month || $year || $day) { 247 267 $limits = ''; 248 268 } … … 282 302 } 283 303 284 // error_log("$request");285 // echo $request;304 // error_log("$request"); 305 // echo $request; 286 306 $posts = $wpdb->get_results($request); 307 308 if (1 == count($posts)) { 309 $more = 1; $c = 1; $single = 1; 310 } 287 311 ?>
Note: See TracChangeset
for help on using the changeset viewer.