Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -796,7 +796,7 @@ |
797 | 797 | /** |
798 | 798 | * Add stable version tabs. Rename some of the others if necessary. |
799 | 799 | */ |
800 | | - public function setActionTabs( $skin, &$contentActions ) { |
| 800 | + public function setActionTabs( $skin, &$actions ) { |
801 | 801 | global $wgRequest, $wgUser, $wgFlaggedRevTabs; |
802 | 802 | $title = $this->parent->getTitle()->getSubjectPage(); |
803 | 803 | # Non-content pages cannot be validated |
— | — | @@ -805,10 +805,10 @@ |
806 | 806 | # We can change the behavoir of stable version for this page to be different |
807 | 807 | # than the site default. |
808 | 808 | if( !$skin->mTitle->isTalkPage() && $wgUser->isAllowed('stablesettings') ) { |
809 | | - if( !isset($contentActions['protect']) && !isset($contentActions['unprotect']) ) { |
| 809 | + if( count($actions) && !isset($actions['protect']) && !isset($actions['unprotect']) ) { |
810 | 810 | wfLoadExtensionMessages( 'Stabilization' ); |
811 | 811 | $stableTitle = SpecialPage::getTitleFor( 'Stabilization' ); |
812 | | - $contentActions['default'] = array( |
| 812 | + $actions['default'] = array( |
813 | 813 | 'class' => false, |
814 | 814 | 'text' => wfMsg('stabilization-tab'), |
815 | 815 | 'href' => $stableTitle->getLocalUrl('page='.$title->getPrefixedUrl()) |
— | — | @@ -831,18 +831,18 @@ |
832 | 832 | # Be clear about what is being edited... |
833 | 833 | $synced = FlaggedRevs::stableVersionIsSynced( $srev, $article ); |
834 | 834 | if( !$skin->mTitle->isTalkPage() && !$synced ) { |
835 | | - if( isset( $contentActions['edit'] ) ) { |
| 835 | + if( isset( $actions['edit'] ) ) { |
836 | 836 | if( $this->showStableByDefault() ) |
837 | | - $contentActions['edit']['text'] = wfMsg('revreview-edit'); |
| 837 | + $actions['edit']['text'] = wfMsg('revreview-edit'); |
838 | 838 | # If the user is requesting the draft or some revision, they don't need a diff. |
839 | 839 | if( $this->pageOverride() ) |
840 | | - $contentActions['edit']['href'] = $title->getLocalUrl( 'action=edit' ); |
841 | | - } if( isset( $contentActions['viewsource'] ) ) { |
| 840 | + $actions['edit']['href'] = $title->getLocalUrl( 'action=edit' ); |
| 841 | + } if( isset( $actions['viewsource'] ) ) { |
842 | 842 | if( $this->showStableByDefault() ) |
843 | | - $contentActions['viewsource']['text'] = wfMsg('revreview-source'); |
| 843 | + $actions['viewsource']['text'] = wfMsg('revreview-source'); |
844 | 844 | # If the user is requesting the draft or some revision, they don't need a diff. |
845 | 845 | if( $this->pageOverride() ) |
846 | | - $contentActions['viewsource']['href'] = $title->getLocalUrl( 'action=edit' ); |
| 846 | + $actions['viewsource']['href'] = $title->getLocalUrl( 'action=edit' ); |
847 | 847 | } |
848 | 848 | } |
849 | 849 | // Add auxillary tabs... |
— | — | @@ -864,7 +864,7 @@ |
865 | 865 | $newActions = array(); |
866 | 866 | $first = true; |
867 | 867 | # Straighten out order, set the tab AFTER the main tab is set |
868 | | - foreach( $contentActions as $tabAction => $data ) { |
| 868 | + foreach( $actions as $tabAction => $data ) { |
869 | 869 | # Main page tab... |
870 | 870 | if( $first ) { |
871 | 871 | $first = false; |
— | — | @@ -889,7 +889,7 @@ |
890 | 890 | } |
891 | 891 | } |
892 | 892 | # Reset static array |
893 | | - $contentActions = $newActions; |
| 893 | + $actions = $newActions; |
894 | 894 | return true; |
895 | 895 | } |
896 | 896 | |