r44726 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44725‎ | r44726 | r44727 >
Date:20:19, 17 December 2008
Author:aaron
Status:ok
Tags:
Comment:
*Tweak for Standard skin
*Rename var
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php
@@ -796,7 +796,7 @@
797797 /**
798798 * Add stable version tabs. Rename some of the others if necessary.
799799 */
800 - public function setActionTabs( $skin, &$contentActions ) {
 800+ public function setActionTabs( $skin, &$actions ) {
801801 global $wgRequest, $wgUser, $wgFlaggedRevTabs;
802802 $title = $this->parent->getTitle()->getSubjectPage();
803803 # Non-content pages cannot be validated
@@ -805,10 +805,10 @@
806806 # We can change the behavoir of stable version for this page to be different
807807 # than the site default.
808808 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']) ) {
810810 wfLoadExtensionMessages( 'Stabilization' );
811811 $stableTitle = SpecialPage::getTitleFor( 'Stabilization' );
812 - $contentActions['default'] = array(
 812+ $actions['default'] = array(
813813 'class' => false,
814814 'text' => wfMsg('stabilization-tab'),
815815 'href' => $stableTitle->getLocalUrl('page='.$title->getPrefixedUrl())
@@ -831,18 +831,18 @@
832832 # Be clear about what is being edited...
833833 $synced = FlaggedRevs::stableVersionIsSynced( $srev, $article );
834834 if( !$skin->mTitle->isTalkPage() && !$synced ) {
835 - if( isset( $contentActions['edit'] ) ) {
 835+ if( isset( $actions['edit'] ) ) {
836836 if( $this->showStableByDefault() )
837 - $contentActions['edit']['text'] = wfMsg('revreview-edit');
 837+ $actions['edit']['text'] = wfMsg('revreview-edit');
838838 # If the user is requesting the draft or some revision, they don't need a diff.
839839 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'] ) ) {
842842 if( $this->showStableByDefault() )
843 - $contentActions['viewsource']['text'] = wfMsg('revreview-source');
 843+ $actions['viewsource']['text'] = wfMsg('revreview-source');
844844 # If the user is requesting the draft or some revision, they don't need a diff.
845845 if( $this->pageOverride() )
846 - $contentActions['viewsource']['href'] = $title->getLocalUrl( 'action=edit' );
 846+ $actions['viewsource']['href'] = $title->getLocalUrl( 'action=edit' );
847847 }
848848 }
849849 // Add auxillary tabs...
@@ -864,7 +864,7 @@
865865 $newActions = array();
866866 $first = true;
867867 # Straighten out order, set the tab AFTER the main tab is set
868 - foreach( $contentActions as $tabAction => $data ) {
 868+ foreach( $actions as $tabAction => $data ) {
869869 # Main page tab...
870870 if( $first ) {
871871 $first = false;
@@ -889,7 +889,7 @@
890890 }
891891 }
892892 # Reset static array
893 - $contentActions = $newActions;
 893+ $actions = $newActions;
894894 return true;
895895 }
896896

Status & tagging log