Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -582,7 +582,7 @@ |
583 | 583 | $wgExtNewFields[] = array( 'reader_feedback', 'rfb_ratings', "$base/archives/patch-rfb_ratings.sql" ); |
584 | 584 | $wgExtNewFields[] = array( 'flaggedpage_config', 'fpc_level', "$base/archives/patch-fpc_level.sql" ); |
585 | 585 | $wgExtNewTables[] = array( 'flaggedpage_pending', "$base/archives/patch-flaggedpage_pending.sql" ); |
586 | | - } else if( $wgDBtype == 'postgres' ) { |
| 586 | + } elseif( $wgDBtype == 'postgres' ) { |
587 | 587 | $wgExtNewTables[] = array( 'flaggedrevs', "$base/FlaggedRevs.pg.sql" ); // Initial install tables |
588 | 588 | $wgExtPGNewFields[] = array('flaggedpage_config', 'fpc_expiry', "TIMESTAMPTZ NULL" ); |
589 | 589 | $wgExtNewIndexes[] = array('flaggedpage_config', 'fpc_expiry', "$base/postgres/patch-expiry-index.sql" ); |
Index: trunk/extensions/FlaggedRevs/svggraph/svgGraph.php |
— | — | @@ -541,7 +541,7 @@ |
542 | 542 | if ($this->rotTagsX == 0) { |
543 | 543 | $transform = "transform='translate(0, $innerPadding)'"; |
544 | 544 | $this->svgPlot .= "<text text-anchor='middle' $transform dy='1em' x='$u' y='$bottom'>$text</text>\n"; |
545 | | - } else if($this->rotTagsX > 0) { |
| 545 | + } elseif($this->rotTagsX > 0) { |
546 | 546 | $transform = "transform='translate(0, $innerPadding) rotate({$this->rotTagsX} $u $bottom)'"; |
547 | 547 | $this->svgPlot .= "<text text-anchor='start' $transform x='$u' y='$bottom'>$text</text>\n"; |
548 | 548 | } else { |
Index: trunk/extensions/FlaggedRevs/maintenance/updateLinks.inc |
— | — | @@ -58,7 +58,7 @@ |
59 | 59 | $file = $crow ? $row->page_title : null; |
60 | 60 | } |
61 | 61 | # Leave it alone if already set |
62 | | - } else if( $row->fr_img_name && $row->page_namespace == NS_IMAGE ) { |
| 62 | + } elseif( $row->fr_img_name && $row->page_namespace == NS_IMAGE ) { |
63 | 63 | $time = $row->fr_img_timestamp; |
64 | 64 | $sha1 = $row->fr_img_sha1; |
65 | 65 | $file = $row->fr_img_name; |
Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | global $wgArticle, $wgTitle; |
20 | 20 | if( !empty( $wgArticle ) ) { |
21 | 21 | return self::getInstance( $wgArticle ); |
22 | | - } else if( !empty( $wgTitle ) ) { |
| 22 | + } elseif( !empty( $wgTitle ) ) { |
23 | 23 | return self::getTitleInstance( $wgTitle ); |
24 | 24 | } |
25 | 25 | return null; |
— | — | @@ -95,7 +95,7 @@ |
96 | 96 | # Viewer sees stable by default |
97 | 97 | return !( $wgRequest->getIntOrNull('stable') === 0 ); |
98 | 98 | # We are explicity requesting the stable version? |
99 | | - } else if( $wgRequest->getIntOrNull('stable') === 1 ) { |
| 99 | + } elseif( $wgRequest->getIntOrNull('stable') === 1 ) { |
100 | 100 | return true; |
101 | 101 | } |
102 | 102 | return false; |
— | — | @@ -172,7 +172,7 @@ |
173 | 173 | global $wgFlaggedRevsReviewForDefault; |
174 | 174 | if( !FlaggedRevs::isPageReviewable( $this->parent->getTitle() ) ) { |
175 | 175 | return false; |
176 | | - } else if( !$titleOnly && $wgFlaggedRevsReviewForDefault && !$this->showStableByDefault() ) { |
| 176 | + } elseif( !$titleOnly && $wgFlaggedRevsReviewForDefault && !$this->showStableByDefault() ) { |
177 | 177 | return false; |
178 | 178 | } |
179 | 179 | return true; |
— | — | @@ -187,7 +187,7 @@ |
188 | 188 | global $wgFlaggedRevsReviewForDefault; |
189 | 189 | if( FlaggedRevs::isPagePatrollable( $this->parent->getTitle() ) ) { |
190 | 190 | return true; |
191 | | - } else if( !$titleOnly && $wgFlaggedRevsReviewForDefault && !$this->showStableByDefault() ) { |
| 191 | + } elseif( !$titleOnly && $wgFlaggedRevsReviewForDefault && !$this->showStableByDefault() ) { |
192 | 192 | return true; |
193 | 193 | } |
194 | 194 | return false; |
— | — | @@ -298,7 +298,7 @@ |
299 | 299 | if( $this->isPageLocked() ) { |
300 | 300 | $prot = "<span class='fr-icon-locked' title=\"". |
301 | 301 | wfMsgHtml('revreview-locked-title')."\"></span>"; |
302 | | - } else if( $this->isPageUnlocked() ) { |
| 302 | + } elseif( $this->isPageUnlocked() ) { |
303 | 303 | $prot = "<span class='fr-icon-unlocked' title=\"". |
304 | 304 | wfMsgHtml('revreview-unlocked-title')."\"></span>"; |
305 | 305 | } |
— | — | @@ -378,7 +378,7 @@ |
379 | 379 | $pcache = false; |
380 | 380 | // Looking at some specific old revision (&oldid=x) or if FlaggedRevs is not |
381 | 381 | // set to override given the relevant conditions (like &action=protect). |
382 | | - } else if( !$stable && !$this->pageOverride() ) { |
| 382 | + } elseif( !$stable && !$this->pageOverride() ) { |
383 | 383 | $revsSince = FlaggedRevs::getRevCountSince( $this->parent, $srev->getRevId() ); |
384 | 384 | $synced = false; |
385 | 385 | # We only care about syncing if not viewing an old stable version |
— | — | @@ -479,7 +479,7 @@ |
480 | 480 | if( $synced ) { |
481 | 481 | # uses messages 'revreview-quality-same', 'revreview-basic-same' |
482 | 482 | $msg .= '-same'; |
483 | | - } else if( $revsSince == 0 ) { |
| 483 | + } elseif( $revsSince == 0 ) { |
484 | 484 | # uses messages 'revreview-quality-i', 'revreview-basic-i' |
485 | 485 | $msg .= '-i'; |
486 | 486 | } |
— | — | @@ -502,9 +502,9 @@ |
503 | 503 | } |
504 | 504 | # Some checks for which tag CSS to use |
505 | 505 | if( FlaggedRevs::useSimpleUI() ) $tagClass = 'flaggedrevs_short'; |
506 | | - else if( $simpleTag ) $tagClass = 'flaggedrevs_notice'; |
507 | | - else if( $pristine ) $tagClass = 'flaggedrevs_pristine'; |
508 | | - else if( $quality ) $tagClass = 'flaggedrevs_quality'; |
| 506 | + elseif( $simpleTag ) $tagClass = 'flaggedrevs_notice'; |
| 507 | + elseif( $pristine ) $tagClass = 'flaggedrevs_pristine'; |
| 508 | + elseif( $quality ) $tagClass = 'flaggedrevs_quality'; |
509 | 509 | else $tagClass = 'flaggedrevs_basic'; |
510 | 510 | # Wrap tag contents in a div |
511 | 511 | if( $tag !='' ) { |
— | — | @@ -533,7 +533,7 @@ |
534 | 534 | $time = false; |
535 | 535 | if( $reqId = $wgRequest->getVal('stableid') ) { |
536 | 536 | $frev = FlaggedRevision::newFromTitle( $this->parent->getTitle(), $reqId ); |
537 | | - } else if( $this->pageOverride() ) { |
| 537 | + } elseif( $this->pageOverride() ) { |
538 | 538 | $frev = $this->getStableRev(); |
539 | 539 | } |
540 | 540 | if( !is_null($frev) ) { |
— | — | @@ -607,7 +607,7 @@ |
608 | 608 | wfMsgExt($msg,array('parseinline')) . "</div>"; |
609 | 609 | } |
610 | 610 | # Let new users know about review procedure a tag |
611 | | - } else if( !$wgUser->getId() && $this->showStableByDefault() ) { |
| 611 | + } elseif( !$wgUser->getId() && $this->showStableByDefault() ) { |
612 | 612 | wfLoadExtensionMessages( 'FlaggedRevs' ); |
613 | 613 | $warning = "<div id='mw-editwarningtag' class='flaggedrevs_editnotice plainlinks'>" . |
614 | 614 | wfMsgExt('revreview-editnotice',array('parseinline')) . "</div>"; |
— | — | @@ -624,7 +624,7 @@ |
625 | 625 | if( $this->isPageLocked() ) { |
626 | 626 | $prot = "<span class='fr-icon-locked' title=\"". |
627 | 627 | wfMsgHtml('revreview-locked-title')."\"></span>"; |
628 | | - } else if( $this->isPageUnlocked() ) { |
| 628 | + } elseif( $this->isPageUnlocked() ) { |
629 | 629 | $prot = "<span class='fr-icon-unlocked' title=\"". |
630 | 630 | wfMsgHtml('revreview-unlocked-title')."\"></span>"; |
631 | 631 | } |
— | — | @@ -716,7 +716,7 @@ |
717 | 717 | $this->parent->getTitle()->getPrefixedText(), '', 1 ); |
718 | 718 | $wgOut->addHTML( "</div>" ); |
719 | 719 | # ...or unstable |
720 | | - } else if( $this->isPageUnlocked() ) { |
| 720 | + } elseif( $this->isPageUnlocked() ) { |
721 | 721 | wfLoadExtensionMessages( 'FlaggedRevs' ); |
722 | 722 | $wgOut->addHTML( "<div class='mw-warning-with-logexcerpt'>" ); |
723 | 723 | $wgOut->addWikiMsg( 'revreview-unlocked' ); |
— | — | @@ -826,7 +826,7 @@ |
827 | 827 | $wgOut->prependHTML( "<span class='plainlinks'>" . |
828 | 828 | wfMsgExt( 'revreview-visibility',array('parseinline'), |
829 | 829 | $title->getPrefixedText() ) . "</span>" ); |
830 | | - } else if( $frev ) { |
| 830 | + } elseif( $frev ) { |
831 | 831 | $wgOut->prependHTML( "<span class='plainlinks'>" . |
832 | 832 | wfMsgExt( 'revreview-visibility2',array('parseinline'), |
833 | 833 | $title->getPrefixedText() ) . "</span>" ); |
— | — | @@ -901,7 +901,7 @@ |
902 | 902 | $draftTabCss = ''; |
903 | 903 | $stableTabCss = 'selected'; |
904 | 904 | // We are looking at the talk page or diffs/hist/oldids |
905 | | - } else if( !(self::isViewAction($action) || $action=='edit') || $skin->mTitle->isTalkPage() ) { |
| 905 | + } elseif( !(self::isViewAction($action) || $action=='edit') || $skin->mTitle->isTalkPage() ) { |
906 | 906 | $draftTabCss = ''; |
907 | 907 | $stableTabCss = ''; |
908 | 908 | // We are looking at the current revision or in edit mode |
— | — | @@ -1063,7 +1063,7 @@ |
1064 | 1064 | $notice = ''; |
1065 | 1065 | if( count($changeList) > 0 ) { |
1066 | 1066 | $notice = '<br/>' . wfMsgExt('revreview-update-use', array('parseinline')); |
1067 | | - } else if( !$synced ) { |
| 1067 | + } elseif( !$synced ) { |
1068 | 1068 | $diff->mTitle->invalidateCache(); // bad cache, said they were not synced |
1069 | 1069 | } |
1070 | 1070 | |
— | — | @@ -1071,12 +1071,12 @@ |
1072 | 1072 | if( empty($changeList) && $wgUser->isAllowed('review') ) { |
1073 | 1073 | $wgOut->addHTML( "<div id='mw-difftostable' class='flaggedrevs_diffnotice plainlinks'>" . |
1074 | 1074 | wfMsgExt('revreview-update-none', array('parseinline')).$notice.'</div>' ); |
1075 | | - } else if( !empty($changeList) && $wgUser->isAllowed('review') ) { |
| 1075 | + } elseif( !empty($changeList) && $wgUser->isAllowed('review') ) { |
1076 | 1076 | $changeList = implode(', ',$changeList); |
1077 | 1077 | $wgOut->addHTML( "<div id='mw-difftostable' class='flaggedrevs_diffnotice plainlinks'>" . |
1078 | 1078 | wfMsgExt('revreview-update', array('parseinline')).' '. |
1079 | 1079 | $changeList.$notice.'</div>' ); |
1080 | | - } else if( !empty($changeList) ) { |
| 1080 | + } elseif( !empty($changeList) ) { |
1081 | 1081 | $changeList = implode(', ',$changeList); |
1082 | 1082 | $wgOut->addHTML( "<div id='mw-difftostable' class='flaggedrevs_diffnotice plainlinks'>" . |
1083 | 1083 | wfMsgExt('revreview-update-includes', array('parseinline')).' '. |
— | — | @@ -1409,7 +1409,7 @@ |
1410 | 1410 | } |
1411 | 1411 | $form .= Xml::closeElement('select')."\n"; |
1412 | 1412 | # If there are more than two qualities (none, 1 and more) current user gets radio buttons |
1413 | | - } else if( $quantity > 2 ) { |
| 1413 | + } elseif( $quantity > 2 ) { |
1414 | 1414 | foreach( $label as $i => $name ) { |
1415 | 1415 | $attribs = array( 'class' => "fr-rating-option-$i", 'onchange' => "updateRatingForm()" ); |
1416 | 1416 | $form .= Xml::radioLabel( FlaggedRevs::getTagMsg($name), "wp$quality", $i, "wp$quality".$i, |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -121,7 +121,7 @@ |
122 | 122 | foreach( $wgFlaggedRevsExceptions as $group ) { |
123 | 123 | if( $group == 'user' ) { |
124 | 124 | return ( !$wgUser->isAnon() ); |
125 | | - } else if( in_array( $group, $wgUser->getGroups() ) ) { |
| 125 | + } elseif( in_array( $group, $wgUser->getGroups() ) ) { |
126 | 126 | return true; |
127 | 127 | } |
128 | 128 | } |
— | — | @@ -615,7 +615,7 @@ |
616 | 616 | $value = self::getMemcValue( $wgMemc->get($key), $article ); |
617 | 617 | if( $value === "true" ) { |
618 | 618 | return true; |
619 | | - } else if( $value === "false" ) { |
| 619 | + } elseif( $value === "false" ) { |
620 | 620 | return false; |
621 | 621 | } |
622 | 622 | # If parseroutputs not given, fetch them... |
— | — | @@ -663,7 +663,7 @@ |
664 | 664 | # If this is the case, the current revision will have a newer template or image version used somewhere. |
665 | 665 | if( $currentOutput->fr_newestImageTime > $stableOutput->fr_newestImageTime ) { |
666 | 666 | $synced = false; |
667 | | - } else if( $currentOutput->fr_newestTemplateID > $stableOutput->fr_newestTemplateID ) { |
| 667 | + } elseif( $currentOutput->fr_newestTemplateID > $stableOutput->fr_newestTemplateID ) { |
668 | 668 | $synced = false; |
669 | 669 | } else { |
670 | 670 | $synced = true; |
— | — | @@ -1063,7 +1063,7 @@ |
1064 | 1064 | public static function getLevelTier( $flags ) { |
1065 | 1065 | if( self::isPristine($flags ) ) |
1066 | 1066 | return FR_PRISTINE; |
1067 | | - else if( self::isQuality($flags ) ) |
| 1067 | + elseif( self::isQuality($flags ) ) |
1068 | 1068 | return FR_QUALITY; |
1069 | 1069 | else |
1070 | 1070 | return 0; |
Index: trunk/extensions/FlaggedRevs/FlaggedRevision.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | $this->mTitle = isset($row->page_namespace) && isset($row->page_title) ? |
35 | 35 | Title::makeTitleSafe( $row->page_namespace, $row->page_title ) : null; |
36 | 36 | $this->mFlags = isset($row->fr_flags) ? explode(',',$row->fr_flags) : null; |
37 | | - } else if( is_array($row) ) { |
| 37 | + } elseif( is_array($row) ) { |
38 | 38 | $this->mRevId = intval( $row['fr_rev_id'] ); |
39 | 39 | $this->mPageId = intval( $row['fr_page_id'] ); |
40 | 40 | $this->mTimestamp = $row['fr_timestamp']; |
— | — | @@ -160,7 +160,7 @@ |
161 | 161 | if( $row && $config['select'] == FLAGGED_VIS_PRISTINE ) { |
162 | 162 | // we have what we want already |
163 | 163 | # Look for the latest quality revision... |
164 | | - } else if( FlaggedRevs::qualityVersions() && $config['select'] != FLAGGED_VIS_LATEST ) { |
| 164 | + } elseif( FlaggedRevs::qualityVersions() && $config['select'] != FLAGGED_VIS_LATEST ) { |
165 | 165 | // If we found a pristine rev above, this one must be newer... |
166 | 166 | $newerClause = $row ? "fr_rev_id > {$row->fr_rev_id}" : "1 = 1"; |
167 | 167 | $qrow = $dbw->selectRow( array('flaggedrevs','revision'), |
— | — | @@ -245,8 +245,8 @@ |
246 | 246 | * @returns Array basic select fields (not including text/text flags) |
247 | 247 | */ |
248 | 248 | public static function selectFields() { |
249 | | - return array('fr_rev_id','fr_page_id','fr_user','fr_timestamp','fr_comment','fr_quality', |
250 | | - 'fr_tags','fr_img_name', 'fr_img_sha1', 'fr_img_timestamp'); |
| 249 | + return array('fr_rev_id','fr_page_id','fr_user','fr_timestamp','fr_comment', |
| 250 | + 'fr_quality','fr_tags','fr_img_name', 'fr_img_sha1', 'fr_img_timestamp'); |
251 | 251 | } |
252 | 252 | |
253 | 253 | /** |
Index: trunk/extensions/FlaggedRevs/specialpages/Stabilization_body.php |
— | — | @@ -24,9 +24,9 @@ |
25 | 25 | if( $wgRequest->wasPosted() ) { |
26 | 26 | if( $wgUser->isBlocked( !$confirm ) ) { |
27 | 27 | return $wgOut->blockedPage(); |
28 | | - } else if( !$this->isAllowed ) { |
| 28 | + } elseif( !$this->isAllowed ) { |
29 | 29 | return $wgOut->permissionRequired( 'stablesettings' ); |
30 | | - } else if( wfReadOnly() ) { |
| 30 | + } elseif( wfReadOnly() ) { |
31 | 31 | return $wgOut->readOnlyPage(); |
32 | 32 | } |
33 | 33 | } |
— | — | @@ -41,10 +41,10 @@ |
42 | 42 | # We need a page... |
43 | 43 | if( is_null($this->page) ) { |
44 | 44 | return $wgOut->showErrorPage( 'notargettitle', 'notargettext' ); |
45 | | - } else if( !$this->page->exists() ) { |
| 45 | + } elseif( !$this->page->exists() ) { |
46 | 46 | return $wgOut->addHTML( wfMsgExt( 'stabilization-notexists', array('parseinline'), |
47 | 47 | $this->page->getPrefixedText() ) ); |
48 | | - } else if( !FlaggedRevs::isPageReviewable( $this->page ) ) { |
| 48 | + } elseif( !FlaggedRevs::isPageReviewable( $this->page ) ) { |
49 | 49 | return $wgOut->addHTML( wfMsgExt( 'stabilization-notcontent', array('parseinline'), |
50 | 50 | $this->page->getPrefixedText() ) ); |
51 | 51 | } |
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | if( val == 'existing' ) |
120 | 120 | document.getElementById('mwStabilize-expiry').value = ". |
121 | 121 | Xml::encodeJsVar($this->oldExpiry)."; |
122 | | - else if( val != 'othertime' ) |
| 122 | + elseif( val != 'othertime' ) |
123 | 123 | document.getElementById('mwStabilize-expiry').value = val; |
124 | 124 | } |
125 | 125 | </script>" |
— | — | @@ -359,7 +359,7 @@ |
360 | 360 | $changed = ($dbw->affectedRows() != 0); // did this do anything? |
361 | 361 | # Otherwise, add a row unless we are just setting it as the site default, |
362 | 362 | # or it is the same the current one... |
363 | | - } else if( !$reset ) { |
| 363 | + } elseif( !$reset ) { |
364 | 364 | if( !$row || $row->fpc_select != $this->select || $row->fpc_override != $this->override |
365 | 365 | || $row->fpc_level != $this->autoreview || $row->fpc_expiry != $expiry ) |
366 | 366 | { |
— | — | @@ -441,7 +441,7 @@ |
442 | 442 | FlaggedRevs::autoReviewEdit( $article, $wgUser, $text, $nullRevision, $flags, true ); |
443 | 443 | $invalidate = false; // already done with auto-review |
444 | 444 | // ...otherwise, go to diff if possible |
445 | | - } else if( $frev ) { |
| 445 | + } elseif( $frev ) { |
446 | 446 | $query = "oldid={$frev->getRevId()}&diff=cur&diffonly=0"; |
447 | 447 | } else { |
448 | 448 | // can't autoreview and no diff to show... |
Index: trunk/extensions/FlaggedRevs/specialpages/ProblemPages_body.php |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | $wgOut->addHTML( $pager->getNavigationBar() ); |
64 | 64 | $wgOut->addHTML( $pager->getBody() ); |
65 | 65 | $wgOut->addHTML( $pager->getNavigationBar() ); |
66 | | - } else if( $this->tag ) { // must select first... |
| 66 | + } elseif( $this->tag ) { // must select first... |
67 | 67 | $wgOut->addHTML( wfMsgExt('problempages-none', array('parse') ) ); |
68 | 68 | } |
69 | 69 | } |
Index: trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php |
— | — | @@ -99,7 +99,7 @@ |
100 | 100 | $this->dims[$tag] = $wgRequest->getIntOrNull( "wp$tag" ); |
101 | 101 | if( $this->dims[$tag] === 0 ) { |
102 | 102 | $this->unapprovedTags++; |
103 | | - } else if( is_null($this->dims[$tag]) ) { |
| 103 | + } elseif( is_null($this->dims[$tag]) ) { |
104 | 104 | # This happens if we uncheck a checkbox |
105 | 105 | $this->unapprovedTags++; |
106 | 106 | $this->dims[$tag] = 0; |
— | — | @@ -117,7 +117,7 @@ |
118 | 118 | $valid = true; |
119 | 119 | if( $this->unapprovedTags && $this->unapprovedTags < count( FlaggedRevs::getDimensions() ) ) { |
120 | 120 | $valid = false; |
121 | | - } else if( !$wgUser->matchEditToken( $wgRequest->getVal('wpEditToken') ) ) { |
| 121 | + } elseif( !$wgUser->matchEditToken( $wgRequest->getVal('wpEditToken') ) ) { |
122 | 122 | $valid = false; |
123 | 123 | } |
124 | 124 | # Submit or display info on failure |
— | — | @@ -128,11 +128,11 @@ |
129 | 129 | $wgOut->setPageTitle( wfMsgHtml('actioncomplete') ); |
130 | 130 | $wgOut->addHTML( $this->showSuccess( $approved, true ) ); |
131 | 131 | // Sync failure for flagging |
132 | | - } else if( is_array($status) && $approved ) { |
| 132 | + } elseif( is_array($status) && $approved ) { |
133 | 133 | $wgOut->setPageTitle( wfMsgHtml('internalerror') ); |
134 | 134 | $wgOut->addHTML( $this->showSyncFailure( $status, true ) ); |
135 | 135 | // Failure for unflagging |
136 | | - } else if( $status === false && !$approved ) { |
| 136 | + } elseif( $status === false && !$approved ) { |
137 | 137 | $wgOut->redirect( $this->page->getFullUrl() ); |
138 | 138 | // Any other fail... |
139 | 139 | } else { |
— | — | @@ -265,9 +265,9 @@ |
266 | 266 | list($approved,$status) = $form->submit(); |
267 | 267 | if( $status === true ) { |
268 | 268 | return '<suc#>'.$form->showSuccess( $approved ); |
269 | | - } else if( $approved && is_array($status) ) { |
| 269 | + } elseif( $approved && is_array($status) ) { |
270 | 270 | return '<err#>'.$form->showSyncFailure( $status ); |
271 | | - } else if( $approved ) { |
| 271 | + } elseif( $approved ) { |
272 | 272 | return '<err#>' . wfMsg( 'revreview-revnotfound' ); |
273 | 273 | } else { // hmmm? |
274 | 274 | return '<err#>'; |
— | — | @@ -589,15 +589,15 @@ |
590 | 590 | $synced = true; |
591 | 591 | if( $stableOutput->fr_newestImageTime != $flaggedOutput->fr_newestImageTime ) |
592 | 592 | $synced = false; |
593 | | - else if( $stableOutput->fr_newestTemplateID != $flaggedOutput->fr_newestTemplateID ) |
| 593 | + elseif( $stableOutput->fr_newestTemplateID != $flaggedOutput->fr_newestTemplateID ) |
594 | 594 | $synced = false; |
595 | | - else if( $oldfrev->getTags() != $flags ) |
| 595 | + elseif( $oldfrev->getTags() != $flags ) |
596 | 596 | $synced = false; |
597 | | - else if( $oldfrev->getFileSha1() != @$fileData['sha1'] ) |
| 597 | + elseif( $oldfrev->getFileSha1() != @$fileData['sha1'] ) |
598 | 598 | $synced = false; |
599 | | - else if( $oldfrev->getComment() != $this->notes ) |
| 599 | + elseif( $oldfrev->getComment() != $this->notes ) |
600 | 600 | $synced = false; |
601 | | - else if( $oldfrev->getQuality() != $quality ) |
| 601 | + elseif( $oldfrev->getQuality() != $quality ) |
602 | 602 | $synced = false; |
603 | 603 | # Don't review if the same |
604 | 604 | if( $synced ) { |
— | — | @@ -653,7 +653,7 @@ |
654 | 654 | $includesSynced = true; |
655 | 655 | if( $poutput->fr_newestImageTime > $stableOutput->fr_newestImageTime ) { |
656 | 656 | $includesSynced = false; |
657 | | - } else if( $poutput->fr_newestTemplateID > $stableOutput->fr_newestTemplateID ) { |
| 657 | + } elseif( $poutput->fr_newestTemplateID > $stableOutput->fr_newestTemplateID ) { |
658 | 658 | $includesSynced = false; |
659 | 659 | } |
660 | 660 | $u->fr_stableRev = $sv; // no need to re-fetch this! |
— | — | @@ -801,9 +801,9 @@ |
802 | 802 | $highest = count($levels) - 1; // highest valid level |
803 | 803 | if( !self::userCan($qal,$level,$config) ) { |
804 | 804 | return false; |
805 | | - } else if( isset($oldflags[$qal]) && !self::userCan($qal,$oldflags[$qal]) ) { |
| 805 | + } elseif( isset($oldflags[$qal]) && !self::userCan($qal,$oldflags[$qal]) ) { |
806 | 806 | return false; |
807 | | - } else if( $level < 0 || $level > $highest ) { |
| 807 | + } elseif( $level < 0 || $level > $highest ) { |
808 | 808 | return false; |
809 | 809 | } |
810 | 810 | } |
— | — | @@ -902,7 +902,7 @@ |
903 | 903 | $action = (FlaggedRevs::isQuality($dims) || FlaggedRevs::isQuality($oldDims)) ? 'approve2' : 'approve'; |
904 | 904 | if( !$stableId ) { // first time |
905 | 905 | $action .= $isAuto ? "-ia" : "-i"; |
906 | | - } else if( $isAuto ) { // automatic |
| 906 | + } elseif( $isAuto ) { // automatic |
907 | 907 | $action .= "-a"; |
908 | 908 | } |
909 | 909 | } else { // depreciated |
Index: trunk/extensions/FlaggedRevs/specialpages/QualityOversight_body.php |
— | — | @@ -93,7 +93,7 @@ |
94 | 94 | $actions['approve2'] = 0; |
95 | 95 | $actions['approve2-i'] = 0; |
96 | 96 | $actions['unapprove2'] = 0; |
97 | | - } else if( $this->level === 1 ) { // quality revisions |
| 97 | + } elseif( $this->level === 1 ) { // quality revisions |
98 | 98 | $actions['approve'] = 0; |
99 | 99 | $actions['approve-a'] = 0; |
100 | 100 | $actions['approve-i'] = 0; |
— | — | @@ -106,13 +106,13 @@ |
107 | 107 | $actions['approve2'] = 0; |
108 | 108 | $actions['unapprove'] = 0; |
109 | 109 | $actions['unapprove2'] = 0; |
110 | | - } else if( $this->status === 2 ) { // re-approved |
| 110 | + } elseif( $this->status === 2 ) { // re-approved |
111 | 111 | $actions['approve-i'] = 0; |
112 | 112 | $actions['approve-ia'] = 0; |
113 | 113 | $actions['approve2-i'] = 0; |
114 | 114 | $actions['unapprove'] = 0; |
115 | 115 | $actions['unapprove2'] = 0; |
116 | | - } else if( $this->status === 3 ) { // depreciated |
| 116 | + } elseif( $this->status === 3 ) { // depreciated |
117 | 117 | $actions['approve'] = 0; |
118 | 118 | $actions['approve-a'] = 0; |
119 | 119 | $actions['approve-i'] = 0; |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | if( $this->automatic === 0 ) { // manual review |
125 | 125 | $actions['approve-a'] = 0; |
126 | 126 | $actions['approve-ia'] = 0; |
127 | | - } else if( $this->automatic === 1 ) { // auto-reviewed |
| 127 | + } elseif( $this->automatic === 1 ) { // auto-reviewed |
128 | 128 | $actions['approve'] = 0; |
129 | 129 | $actions['approve-i'] = 0; |
130 | 130 | $actions['approve2'] = 0; |
Index: trunk/extensions/FlaggedRevs/specialpages/RatingHistory_body.php |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | if( is_null($this->page) ) { |
39 | 39 | $wgOut->showErrorPage( 'notargettitle', 'notargettext' ); |
40 | 40 | return; |
41 | | - } else if( !FlaggedRevs::isPageRateable( $this->page ) ) { |
| 41 | + } elseif( !FlaggedRevs::isPageRateable( $this->page ) ) { |
42 | 42 | $wgOut->addHTML( wfMsgExt('readerfeedback-main',array('parse')) ); |
43 | 43 | return; |
44 | 44 | } |
— | — | @@ -128,7 +128,7 @@ |
129 | 129 | // ...if not, then regenerate it |
130 | 130 | if( $sExt === 'svg' && !$exists ) { |
131 | 131 | $exists = $this->makeSvgGraph($tag,$filePath); |
132 | | - } else if( $sExt === 'png' && !$exists ) { |
| 132 | + } elseif( $sExt === 'png' && !$exists ) { |
133 | 133 | $exists = $this->makePngGraph($tag,$filePath); |
134 | 134 | } |
135 | 135 | if( $exists ) $data = true; |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | $table = fread( $fp, filesize($filePath) ); |
168 | 168 | fclose( $fp ); |
169 | 169 | $html .= '<h2>' . wfMsgHtml("readerfeedback-$tag") . '</h2>' . $table . "\n"; |
170 | | - } else if( $table = $this->makeHTMLTable( $tag, $filePath ) ) { |
| 170 | + } elseif( $table = $this->makeHTMLTable( $tag, $filePath ) ) { |
171 | 171 | $html .= '<h2>' . wfMsgHtml("readerfeedback-$tag") . '</h2>' . $table . "\n"; |
172 | 172 | } |
173 | 173 | break; |
— | — | @@ -564,7 +564,7 @@ |
565 | 565 | global $wgSvgGraphDir, $wgPHPlotDir; |
566 | 566 | if( $wgSvgGraphDir ) { |
567 | 567 | $ext = 'svg'; |
568 | | - } else if( $wgPHPlotDir ) { |
| 568 | + } elseif( $wgPHPlotDir ) { |
569 | 569 | $ext = 'png'; |
570 | 570 | } else { |
571 | 571 | $ext = 'html'; |
Index: trunk/extensions/FlaggedRevs/specialpages/ReaderFeedback_body.php |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | if( $this->dims[$tag] === NULL ) { // nothing sent at all :( |
57 | 57 | $wgOut->redirect( $this->page->getLocalUrl() ); |
58 | 58 | return; |
59 | | - } else if( $this->dims[$tags] === -1 ) { |
| 59 | + } elseif( $this->dims[$tags] === -1 ) { |
60 | 60 | $unsureCount++; |
61 | 61 | } |
62 | 62 | } |
— | — | @@ -146,7 +146,7 @@ |
147 | 147 | $form->dims[$p] = intval($val); |
148 | 148 | if( $form->dims[$p] === NULL ) { // nothing sent at all :( |
149 | 149 | return '<err#>' . wfMsg('formerror'); // bad range |
150 | | - } else if( $form->dims[$p] === -1 ) { |
| 150 | + } elseif( $form->dims[$p] === -1 ) { |
151 | 151 | $unsureCount++; |
152 | 152 | } |
153 | 153 | } |
Index: trunk/extensions/FlaggedRevs/specialpages/LikedPages_body.php |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | $wgOut->addHTML( $pager->getNavigationBar() ); |
64 | 64 | $wgOut->addHTML( $pager->getBody() ); |
65 | 65 | $wgOut->addHTML( $pager->getNavigationBar() ); |
66 | | - } else if( $this->tag ) { // must select first... |
| 66 | + } elseif( $this->tag ) { // must select first... |
67 | 67 | $wgOut->addHTML( wfMsgExt('likedpages-none', array('parse') ) ); |
68 | 68 | } |
69 | 69 | } |
Index: trunk/extensions/FlaggedRevs/specialpages/OldReviewedPages_body.php |
— | — | @@ -230,7 +230,7 @@ |
231 | 231 | $days = round($hours/24,0); |
232 | 232 | $age = wfMsgExt('oldreviewedpages-days',array('parsemag'),$days); |
233 | 233 | // If one or more hours, use hours |
234 | | - } else if( $hours >= 1 ) { |
| 234 | + } elseif( $hours >= 1 ) { |
235 | 235 | $hours = round($hours,0); |
236 | 236 | $age = wfMsgExt('oldreviewedpages-hours',array('parsemag'),$hours); |
237 | 237 | } else { |
Index: trunk/extensions/FlaggedRevs/specialpages/StablePages_body.php |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | |
70 | 70 | if( intval($row->fpc_select) === FLAGGED_VIS_PRISTINE ) { |
71 | 71 | $type = wfMsgHtml('stablepages-prec-pristine'); |
72 | | - } else if( intval($row->fpc_select) === FLAGGED_VIS_QUALITY ) { |
| 72 | + } elseif( intval($row->fpc_select) === FLAGGED_VIS_QUALITY ) { |
73 | 73 | $type = wfMsgHtml('stablepages-prec-quality'); |
74 | 74 | } else { |
75 | 75 | $type = wfMsgHtml('stablepages-prec-none'); |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsXML.php |
— | — | @@ -207,7 +207,7 @@ |
208 | 208 | if( $pristine ) { |
209 | 209 | $tagClass = 'flaggedrevs-box3'; |
210 | 210 | $color = 'flaggedrevs-color-3'; |
211 | | - } else if( $quality ) { |
| 211 | + } elseif( $quality ) { |
212 | 212 | $tagClass = 'flaggedrevs-box2'; |
213 | 213 | $color = 'flaggedrevs-color-2'; |
214 | 214 | } else { |
— | — | @@ -218,7 +218,7 @@ |
219 | 219 | if( $synced ) { |
220 | 220 | $msg = $quality ? 'revreview-quality-same' : 'revreview-basic-same'; |
221 | 221 | $html = wfMsgExt($msg, array('parseinline'), $frev->getRevId(), $time, $revsSince ); |
222 | | - } else if( $old ) { |
| 222 | + } elseif( $old ) { |
223 | 223 | $msg = $quality ? 'revreview-quality-old' : 'revreview-basic-old'; |
224 | 224 | $html = wfMsgExt($msg, array('parseinline'), $frev->getRevId(), $time ); |
225 | 225 | } else { |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -450,7 +450,7 @@ |
451 | 451 | if( $isKnownLocal ) { |
452 | 452 | $isLocalFile = true; // no need to check |
453 | 453 | # Load the image if needed (note that time === '0' means we have no image) |
454 | | - } else if( $time !== "0" ) { |
| 454 | + } elseif( $time !== "0" ) { |
455 | 455 | $file = $file ? $file : self::getLocalFile( $title, $time ); # FIXME: would be nice not to double fetch! |
456 | 456 | $isLocalFile = $file && $file->exists() && $file->isLocal(); |
457 | 457 | } |
— | — | @@ -536,7 +536,7 @@ |
537 | 537 | if( $isKnownLocal ) { |
538 | 538 | $isLocalFile = true; // no need to check |
539 | 539 | # Load the image if needed (note that time === '0' means we have no image) |
540 | | - } else if( $time !== "0" ) { |
| 540 | + } elseif( $time !== "0" ) { |
541 | 541 | $file = $file ? $file : self::getLocalFile( $nt, $time ); # FIXME: would be nice not to double fetch! |
542 | 542 | $isLocalFile = $file && $file->exists() && $file->isLocal(); |
543 | 543 | } |
— | — | @@ -775,7 +775,7 @@ |
776 | 776 | if( !$prevRevId ) { |
777 | 777 | $reviewableNewPage = (bool)$wgFlaggedRevsAutoReviewNew; |
778 | 778 | // Edits to existing pages |
779 | | - } else if( $baseRevId ) { |
| 779 | + } elseif( $baseRevId ) { |
780 | 780 | $frev = FlaggedRevision::newFromTitle( $title, $baseRevId, FR_MASTER ); |
781 | 781 | # If the base revision was not reviewed, check if the previous one was. |
782 | 782 | # This should catch null edits as well as normal ones. |
— | — | @@ -1462,11 +1462,11 @@ |
1463 | 1463 | global $wgFlaggedRevsNamespaces; |
1464 | 1464 | if( !in_array($row->page_namespace,$wgFlaggedRevsNamespaces) ) { |
1465 | 1465 | // do nothing |
1466 | | - } else if( isset($row->fr_quality) ) { |
| 1466 | + } elseif( isset($row->fr_quality) ) { |
1467 | 1467 | $ret = '<span class="'.FlaggedRevsXML::getQualityColor($row->fr_quality).'">'.$ret.'</span>'; |
1468 | | - } else if( isset($row->fp_stable) && $row->rev_id > $row->fp_stable ) { |
| 1468 | + } elseif( isset($row->fp_stable) && $row->rev_id > $row->fp_stable ) { |
1469 | 1469 | $ret = '<span class="flaggedrevs-unreviewed">'.$ret.'</span>'; |
1470 | | - } else if( !isset($row->fp_stable) ) { |
| 1470 | + } elseif( !isset($row->fp_stable) ) { |
1471 | 1471 | $ret = '<span class="flaggedrevs-unreviewed2">'.$ret.'</span>'; |
1472 | 1472 | } |
1473 | 1473 | return true; |
Index: trunk/extensions/FlaggedRevs/api/ApiReview.php |
— | — | @@ -105,9 +105,9 @@ |
106 | 106 | list( $approved, $status ) = $form->submit(); |
107 | 107 | if( $status === true ) { |
108 | 108 | $this->getResult()->addValue( null, $this->getModuleName(), array( 'result' => 'Success' ) ); |
109 | | - } else if( $approved && is_array( $status ) ) { |
| 109 | + } elseif( $approved && is_array( $status ) ) { |
110 | 110 | $this->dieUsage( "A sync failure has occured while reviewing. Please try again.", 'syncfailure' ); |
111 | | - } else if( $approved ) { |
| 111 | + } elseif( $approved ) { |
112 | 112 | $this->dieUsage( "Cannot find a revision with the specified ID.", 'notarget' ); |
113 | 113 | } else { |
114 | 114 | $this->dieUsageMsg( array( 'unknownerror' ) ); |