Changeset 5848
- Timestamp:
- 08/04/2007 04:30:27 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r5707 r5848 451 451 $qv['w'] = (int) $qv['w']; 452 452 $qv['m'] = (int) $qv['m']; 453 if ( '' != $qv['hour'] ) $qv['hour'] = (int) $qv['hour'];454 if ( '' != $qv['minute'] ) $qv['minute'] = (int) $qv['minute'];455 if ( '' != $qv['second'] ) $qv['second'] = (int) $qv['second'];453 if ( '' !== $qv['hour'] ) $qv['hour'] = (int) $qv['hour']; 454 if ( '' !== $qv['minute'] ) $qv['minute'] = (int) $qv['minute']; 455 if ( '' !== $qv['second'] ) $qv['second'] = (int) $qv['second']; 456 456 457 457 // Compat. Map subpost to attachment. … … 470 470 } elseif ( $qv['p'] ) { 471 471 $this->is_single = true; 472 } elseif ( ('' != $qv['hour']) && ('' != $qv['minute']) &&('' != $qv['second']) && ('' != $qv['year']) && ('' != $qv['monthnum']) && ('' != $qv['day']) ) {472 } elseif ( ('' !== $qv['hour']) && ('' !== $qv['minute']) &&('' !== $qv['second']) && ('' != $qv['year']) && ('' != $qv['monthnum']) && ('' != $qv['day']) ) { 473 473 // If year, month, day, hour, minute, and second are set, a single 474 474 // post is being queried. … … 482 482 // Look for archive queries. Dates, categories, authors. 483 483 484 if ( '' != $qv['second'] ) {484 if ( '' !== $qv['second'] ) { 485 485 $this->is_time = true; 486 486 $this->is_date = true; 487 487 } 488 488 489 if ( '' != $qv['minute'] ) {489 if ( '' !== $qv['minute'] ) { 490 490 $this->is_time = true; 491 491 $this->is_date = true; 492 492 } 493 493 494 if ( '' != $qv['hour'] ) {494 if ( '' !== $qv['hour'] ) { 495 495 $this->is_time = true; 496 496 $this->is_date = true; … … 740 740 } 741 741 742 if ( '' != $q['hour'] )742 if ( '' !== $q['hour'] ) 743 743 $where .= " AND HOUR(post_date)='" . $q['hour'] . "'"; 744 744 745 if ( '' != $q['minute'] )745 if ( '' !== $q['minute'] ) 746 746 $where .= " AND MINUTE(post_date)='" . $q['minute'] . "'"; 747 747 748 if ( '' != $q['second'] )748 if ( '' !== $q['second'] ) 749 749 $where .= " AND SECOND(post_date)='" . $q['second'] . "'"; 750 750
Note: See TracChangeset
for help on using the changeset viewer.