Merge "Bug 44855, Bug 37743: Improved vector button styles for jquery.ui"
[lhc/web/wiklou.git] / includes / specials / SpecialListgrouprights.php
index 7cccf88..3309682 100644 (file)
@@ -85,7 +85,7 @@ class SpecialListGroupRights extends SpecialPage {
                                $msg->text() :
                                MWNamespace::getCanonicalName( NS_PROJECT ) . ':' . $groupname;
 
-                       if( $group == '*' ) {
+                       if ( $group == '*' ) {
                                // Do not make a link for the generic * group
                                $grouppage = htmlspecialchars( $groupnameLocalized );
                        } else {
@@ -149,9 +149,9 @@ class SpecialListGroupRights extends SpecialPage {
         */
        private function formatPermissions( $permissions, $revoke, $add, $remove, $addSelf, $removeSelf ) {
                $r = array();
-               foreach( $permissions as $permission => $granted ) {
+               foreach ( $permissions as $permission => $granted ) {
                        //show as granted only if it isn't revoked to prevent duplicate display of permissions
-                       if( $granted && ( !isset( $revoke[$permission] ) || !$revoke[$permission] ) ) {
+                       if ( $granted && ( !isset( $revoke[$permission] ) || !$revoke[$permission] ) ) {
                                $description = $this->msg( 'listgrouprights-right-display',
                                        User::getRightDescription( $permission ),
                                        '<span class="mw-listgrouprights-right-name">' . $permission . '</span>'
@@ -159,8 +159,8 @@ class SpecialListGroupRights extends SpecialPage {
                                $r[] = $description;
                        }
                }
-               foreach( $revoke as $permission => $revoked ) {
-                       if( $revoked ) {
+               foreach ( $revoke as $permission => $revoked ) {
+                       if ( $revoked ) {
                                $description = $this->msg( 'listgrouprights-right-revoked',
                                        User::getRightDescription( $permission ),
                                        '<span class="mw-listgrouprights-right-name">' . $permission . '</span>'
@@ -170,43 +170,43 @@ class SpecialListGroupRights extends SpecialPage {
                }
                sort( $r );
                $lang = $this->getLanguage();
-               if( $add === true ) {
+               if ( $add === true ) {
                        $r[] = $this->msg( 'listgrouprights-addgroup-all' )->escaped();
-               } elseif( is_array( $add ) && count( $add ) ) {
+               } elseif ( is_array( $add ) && count( $add ) ) {
                        $add = array_values( array_unique( $add ) );
                        $r[] = $this->msg( 'listgrouprights-addgroup',
                                $lang->listToText( array_map( array( 'User', 'makeGroupLinkWiki' ), $add ) ),
                                count( $add )
                        )->parse();
                }
-               if( $remove === true ) {
+               if ( $remove === true ) {
                        $r[] = $this->msg( 'listgrouprights-removegroup-all' )->escaped();
-               } elseif( is_array( $remove ) && count( $remove ) ) {
+               } elseif ( is_array( $remove ) && count( $remove ) ) {
                        $remove = array_values( array_unique( $remove ) );
                        $r[] = $this->msg( 'listgrouprights-removegroup',
                                $lang->listToText( array_map( array( 'User', 'makeGroupLinkWiki' ), $remove ) ),
                                count( $remove )
                        )->parse();
                }
-               if( $addSelf === true ) {
+               if ( $addSelf === true ) {
                        $r[] = $this->msg( 'listgrouprights-addgroup-self-all' )->escaped();
-               } elseif( is_array( $addSelf ) && count( $addSelf ) ) {
+               } elseif ( is_array( $addSelf ) && count( $addSelf ) ) {
                        $addSelf = array_values( array_unique( $addSelf ) );
                        $r[] = $this->msg( 'listgrouprights-addgroup-self',
                                $lang->listToText( array_map( array( 'User', 'makeGroupLinkWiki' ), $addSelf ) ),
                                count( $addSelf )
                        )->parse();
                }
-               if( $removeSelf === true ) {
+               if ( $removeSelf === true ) {
                        $r[] = $this->msg( 'listgrouprights-removegroup-self-all' )->parse();
-               } elseif( is_array( $removeSelf ) && count( $removeSelf ) ) {
+               } elseif ( is_array( $removeSelf ) && count( $removeSelf ) ) {
                        $removeSelf = array_values( array_unique( $removeSelf ) );
                        $r[] = $this->msg( 'listgrouprights-removegroup-self',
                                $lang->listToText( array_map( array( 'User', 'makeGroupLinkWiki' ), $removeSelf ) ),
                                count( $removeSelf )
                        )->parse();
                }
-               if( empty( $r ) ) {
+               if ( empty( $r ) ) {
                        return '';
                } else {
                        return '<ul><li>' . implode( "</li>\n<li>", $r ) . '</li></ul>';