Ticket #4499: 4499-trunk.diff
File 4499-trunk.diff, 2.3 KB (added by , 18 years ago) |
---|
-
wp-includes/query.php
450 450 $qv['day'] = (int) $qv['day']; 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. 458 458 if ( '' != $qv['subpost'] ) … … 469 469 $this->is_single = true; 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. 475 475 $this->is_single = true; … … 481 481 } else { 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; 497 497 } … … 739 739 $where .= ' AND SECOND(post_date)=' . substr($q['m'], 12, 2); 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 751 751 if ( $q['year'] ) … … 1361 1361 return true; 1362 1362 } 1363 1363 1364 ?> 1364 ?> 1365 No newline at end of file