Index: trunk/extensions/FlaggedRevs/FlaggedRevision.php |
— | — | @@ -556,29 +556,29 @@ |
557 | 557 | $db = ( $flags & FR_MASTER ) ? |
558 | 558 | wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE ); |
559 | 559 | $res = $db->select( |
560 | | - array( 'flaggedimages', 'page', 'flaggedpages', 'flaggedrevs' ), |
561 | | - array( 'fi_name', 'fr_img_timestamp', 'fr_img_sha1' ), |
| 560 | + array( 'flaggedimages', 'page', 'flaggedpages', 'flaggedrevs' ), |
| 561 | + array( 'fi_name', 'fr_img_timestamp', 'fr_img_sha1' ), |
562 | 562 | array( 'fi_rev_id' => $this->getRevId() ), |
563 | 563 | __METHOD__, |
564 | | - array(), |
565 | | - array( |
566 | | - 'page' => array( 'LEFT JOIN', |
567 | | - 'page_namespace = ' . NS_FILE . ' AND page_title = fi_name' ), |
568 | | - 'flaggedpages' => array( 'LEFT JOIN', 'fp_page_id = page_id' ), |
569 | | - 'flaggedrevs' => array( 'LEFT JOIN', |
570 | | - 'fr_page_id = fp_page_id AND fr_rev_id = fp_stable' ) |
| 564 | + array(), |
| 565 | + array( |
| 566 | + 'page' => array( 'LEFT JOIN', |
| 567 | + 'page_namespace = ' . NS_FILE . ' AND page_title = fi_name' ), |
| 568 | + 'flaggedpages' => array( 'LEFT JOIN', 'fp_page_id = page_id' ), |
| 569 | + 'flaggedrevs' => array( 'LEFT JOIN', |
| 570 | + 'fr_page_id = fp_page_id AND fr_rev_id = fp_stable' ) |
571 | 571 | ) |
572 | 572 | ); |
573 | 573 | foreach ( $res as $row ) { |
574 | | - $reviewedTS = '0'; |
575 | | - $reviewedSha1 = ''; |
576 | | - if ( $row->fr_img_timestamp ) { |
577 | | - $reviewedTS = wfTimestamp( TS_MW, $row->fr_img_timestamp ); |
578 | | - $reviewedSha1 = strval( $row->fr_img_sha1 ); |
579 | | - } |
| 574 | + $reviewedTS = '0'; |
| 575 | + $reviewedSha1 = ''; |
| 576 | + if ( $row->fr_img_timestamp ) { |
| 577 | + $reviewedTS = wfTimestamp( TS_MW, $row->fr_img_timestamp ); |
| 578 | + $reviewedSha1 = strval( $row->fr_img_sha1 ); |
| 579 | + } |
580 | 580 | $this->mStableFiles[$row->fi_name] = array(); |
581 | | - $this->mStableFiles[$row->fi_name]['ts'] = $reviewedTS; |
582 | | - $this->mStableFiles[$row->fi_name]['sha1'] = $reviewedSha1; |
| 581 | + $this->mStableFiles[$row->fi_name]['ts'] = $reviewedTS; |
| 582 | + $this->mStableFiles[$row->fi_name]['sha1'] = $reviewedSha1; |
583 | 583 | } |
584 | 584 | } |
585 | 585 | return $this->mStableFiles; |