Changeset 2179
- Timestamp:
- 02/01/05 01:49:51 (4 years ago)
- Files:
-
- trunk/wp-admin/post.php (modified) (1 diff)
- trunk/wp-blog-header.php (modified) (1 diff)
- trunk/wp-includes/classes.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/post.php
r2172 r2179 2 2 require_once('admin.php'); 3 3 4 $wpvarstoreset = array('action', 'safe_mode', 'withcomments', 'posts', ' poststart', 'postend', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder' );4 $wpvarstoreset = array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder' ); 5 5 6 6 for ($i=0; $i<count($wpvarstoreset); $i += 1) { trunk/wp-blog-header.php
r2106 r2179 83 83 } 84 84 85 $wpvarstoreset = array('m','p','posts','w', 'cat','withcomments','s','search','exact', 'sentence','p oststart','postend','preview','debug', 'calendar','page','paged','more','tb', 'pb','author','order','orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error');85 $wpvarstoreset = array('m','p','posts','w', 'cat','withcomments','s','search','exact', 'sentence','preview','debug', 'calendar','page','paged','more','tb', 'pb','author','order','orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error'); 86 86 87 87 $wpvarstoreset = apply_filters('query_vars', $wpvarstoreset); trunk/wp-includes/classes.php
r2177 r2179 67 67 if ('' != $qv['name']) { 68 68 $this->is_single = true; 69 } elseif ( $qv['p'] && $qv['p'] != 'all') {69 } elseif ( $qv['p'] ) { 70 70 $this->is_single = true; 71 71 } elseif (('' != $qv['hour']) && ('' != $qv['minute']) &&('' != $qv['second']) && ('' != $qv['year']) && ('' != $qv['monthnum']) && ('' != $qv['day'])) { … … 134 134 } 135 135 136 if (empty($qv['cat']) || ($qv['cat'] == ' all') || ($qv['cat'] == '0')) {136 if (empty($qv['cat']) || ($qv['cat'] == '0')) { 137 137 $this->is_category = false; 138 138 } else { … … 148 148 } 149 149 150 if ((empty($qv['author'])) || ($qv['author'] == ' all') || ($qv['author'] == '0')) {150 if ((empty($qv['author'])) || ($qv['author'] == '0')) { 151 151 $this->is_author = false; 152 152 } else { … … 299 299 300 300 // If a post number is specified, load that post 301 if (($q['p'] != '') && ($q['p'] != 'all') &&intval($q['p']) != 0) {301 if (($q['p'] != '') && intval($q['p']) != 0) { 302 302 $q['p'] = (int) $q['p']; 303 303 $where = ' AND ID = ' . $q['p']; 304 304 } 305 305 306 if (($q['page_id'] != '') && ( $q['page_id'] != 'all')) {306 if (($q['page_id'] != '') && (intval($q['page_id']) != 0)) { 307 307 $q['page_id'] = intval($q['page_id']); 308 308 $q['p'] = $q['page_id']; … … 339 339 // Category stuff 340 340 341 if ((empty($q['cat'])) || ($q['cat'] == ' all') || ($q['cat'] == '0') ||341 if ((empty($q['cat'])) || ($q['cat'] == '0') || 342 342 // Bypass cat checks if fetching specific posts 343 343 ( … … 398 398 // Author/user stuff 399 399 400 if ((empty($q['author'])) || ($q['author'] == ' all') || ($q['author'] == '0')) {400 if ((empty($q['author'])) || ($q['author'] == '0')) { 401 401 $whichauthor=''; 402 402 } else { … … 465 465 } 466 466 467 if ($q['p'] == 'all') {468 $where = '';469 }470 471 467 $now = gmdate('Y-m-d H:i:59'); 472 468 473 469 if ($pagenow != 'post.php' && $pagenow != 'edit.php') { 474 if ((empty($q['poststart'])) || (empty($q['postend'])) || !($q['postend'] > $q['poststart'])) { 475 $where .= " AND post_date_gmt <= '$now'"; 476 } 477 470 $where .= " AND post_date_gmt <= '$now'"; 478 471 $distinct = 'DISTINCT'; 479 472 } … … 497 490 498 491 // Paging 499 if ( !empty($q['postend']) && ($q['postend'] > $q['poststart']) ) { 500 if ($q['what_to_show'] == 'posts') { 501 $q['poststart'] = intval($q['poststart']); 502 $q['postend'] = intval($q['postend']); 503 $limposts = $q['postend'] - $q['poststart']; 504 $limits = ' LIMIT '.$q['poststart'].','.$limposts; 505 } elseif ($q['what_to_show'] == 'days') { 506 $q['poststart'] = intval($q['poststart']); 507 $q['postend'] = intval($q['postend']); 508 $limposts = $q['postend'] - $q['poststart']; 509 $lastpostdate = get_lastpostdate(); 510 $lastpostdate = mysql2date('Y-m-d 00:00:00',$lastpostdate); 511 $lastpostdate = mysql2date('U',$lastpostdate); 512 $startdate = date('Y-m-d H:i:s', ($lastpostdate - (($q['poststart'] -1) * 86400))); 513 $otherdate = date('Y-m-d H:i:s', ($lastpostdate - (($q['postend'] -1) * 86400))); 514 $where .= " AND post_date > '$otherdate' AND post_date < '$startdate'"; 515 } 516 } else if (empty($q['nopaging']) && ! is_single()) { 492 if (empty($q['nopaging']) && ! is_single()) { 517 493 $page = $q['paged']; 518 494 if (empty($page)) {
