r52880 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52879‎ | r52880 | r52881 >
Date:00:44, 8 July 2009
Author:aaron
Status:ok
Tags:
Comment:
*Use is_array() for tab check
*Fixed typo
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php
@@ -904,11 +904,6 @@
905905 // Exits, since only reviewable pages need these tabs
906906 return true;
907907 }
908 - /*
909 - * FIXME: IS THIS LOGIC CORRECT? IT DOES NOT MAKES SENSE THAT WE ONLY
910 - * PROVICE A STABLIZE TAB FOR PEOPLE WHTHOUT PROTECTION RIGHTS BUT WITH
911 - * AT LEAST ONE TAB AS SEEN HERE...
912 - */
913908 // Checks if...
914909 if (
915910 // This page is not a talk page
@@ -916,10 +911,10 @@
917912 // User is allowed to stablize pages
918913 $wgUser->isAllowed( 'stablesettings' ) &&
919914 // Actions is an array
920 - count( $actions ) &&
 915+ is_array( $actions ) &&
921916 // A protect tab does not exist
922917 !isset( $actions['protect'] ) &&
923 - // An unprtect tab does not exist
 918+ // An unprotect tab does not exist
924919 !isset( $actions['unprotect'] )
925920 ) {
926921 // Loads messages for stabilization UI

Status & tagging log