Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | */ |
78 | 78 | public static function InjectStyleForSpecial() { |
79 | 79 | global $wgTitle, $wgOut, $wgUser; |
80 | | - if( empty($wgTitle) || $wgTitle->getNamespace() !== -1 ) { |
| 80 | + if( empty($wgTitle) || $wgTitle->getNamespace() !== NS_SPECIAL ) { |
81 | 81 | return true; |
82 | 82 | } |
83 | 83 | $spPages = array( 'UnreviewedPages', 'OldReviewedPages', 'Watchlist', 'Recentchanges', |
— | — | @@ -105,8 +105,8 @@ |
106 | 106 | array( 'fr_page_id' => $revision->getPage() ), |
107 | 107 | array( 'fr_page_id' => $oldPageID, |
108 | 108 | 'fr_rev_id' => $revision->getID() ), |
109 | | - __METHOD__ ); |
110 | | - |
| 109 | + __METHOD__ |
| 110 | + ); |
111 | 111 | return true; |
112 | 112 | } |
113 | 113 | |
— | — | @@ -150,8 +150,8 @@ |
151 | 151 | $dbw = wfGetDB( DB_MASTER ); |
152 | 152 | $dbw->delete( 'flaggedpage_config', |
153 | 153 | array( 'fpc_page_id' => $article->getID() ), |
154 | | - __METHOD__ ); |
155 | | - |
| 154 | + __METHOD__ |
| 155 | + ); |
156 | 156 | return true; |
157 | 157 | } |
158 | 158 | |
— | — | @@ -182,7 +182,7 @@ |
183 | 183 | } else { |
184 | 184 | # Try stable version cache. This should be updated before this is called. |
185 | 185 | $parserOut = FlaggedRevs::getPageCache( $article ); |
186 | | - if( $parserOut==false ) { |
| 186 | + if( $parserOut === false ) { |
187 | 187 | $text = $sv->getTextForParse(); |
188 | 188 | # Parse the text |
189 | 189 | $parserOut = FlaggedRevs::parseStableText( $article, $text, $sv->getRevId() ); |
— | — | @@ -619,7 +619,7 @@ |
620 | 620 | # See if there is a stable version. Also, see if, given the page |
621 | 621 | # config and URL params, the page can be overriden. |
622 | 622 | $flaggedArticle = FlaggedArticle::getTitleInstance( $title ); |
623 | | - if( $wgTitle && $wgTitle->equals( $title ) ) { |
| 623 | + if( !empty($wgTitle) && $wgTitle->equals( $title ) ) { |
624 | 624 | // Cache stable version while we are at it. |
625 | 625 | if( $flaggedArticle->pageOverride() && $flaggedArticle->getStableRev() ) { |
626 | 626 | $result = true; |
— | — | @@ -1056,7 +1056,7 @@ |
1057 | 1057 | * @param string $t timestamp of the log entry |
1058 | 1058 | * @return bool true |
1059 | 1059 | */ |
1060 | | - public static function reviewLogLine( $type = '', $action = '', $title = null, $paramArray = array(), &$c = '', &$r = '' ) { |
| 1060 | + public static function reviewLogLine( $type='', $action='', $title=null, $paramArray=array(), &$c='', &$r='' ) { |
1061 | 1061 | $actionsValid = array('approve','approve2','approve-a','approve2-a','unapprove','unapprove2'); |
1062 | 1062 | # Show link to page with oldid=x |
1063 | 1063 | if( $type == 'review' && in_array($action,$actionsValid) && is_object($title) && isset($paramArray[0]) ) { |
— | — | @@ -1243,7 +1243,7 @@ |
1244 | 1244 | |
1245 | 1245 | public static function addBacklogNotice( &$notice ) { |
1246 | 1246 | global $wgUser, $wgTitle, $wgFlaggedRevsBacklog; |
1247 | | - if( !$wgTitle ) { |
| 1247 | + if( !empty($wgTitle) ) { |
1248 | 1248 | return true; // nothing to do here |
1249 | 1249 | } |
1250 | 1250 | $watchlist = SpecialPage::getTitleFor( 'Watchlist' ); |