Rights log changes:
authorRotem Liss <rotem@users.mediawiki.org>
Tue, 20 Jun 2006 09:09:20 +0000 (09:09 +0000)
committerRotem Liss <rotem@users.mediawiki.org>
Tue, 20 Jun 2006 09:09:20 +0000 (09:09 +0000)
* Adding "(none)" notice also if the third parameter (new groups) is empty (when desysoping someone, for example).
* Adding the "(none)" notice also in the recent changes.
* Adding the "(none)" notice only if the action is "rights/rights", to prevent future potential incompatibility, if we add other log actions in "rights" log, or if an extension does so.
* First checking if the parameter is null before checking if it's empty, to prevent an ugly notice appears when using Makesysop (apparently not in Wikimedia servers, I think notices are disabled there).

includes/LogPage.php

index 753c1dc..f588105 100644 (file)
@@ -154,8 +154,6 @@ class LogPage {
                                                        }
                                                        break;
                                                case 'rights':
-                                                       if( trim( $params[0] ) == '' )
-                                                               $params[0] = wfMsg( 'rightsnone' );
                                                        $text = $wgContLang->ucfirst( $title->getText() );
                                                        $titleLink = $skin->makeLinkObj( Title::makeTitle( NS_USER, $text ) );
                                                        break;
@@ -166,6 +164,17 @@ class LogPage {
                                } else {
                                        $titleLink = $title->getPrefixedText();
                                }
+                               if( $key == 'rights/rights' ) {
+                                       if ($skin) {
+                                               $rightsnone = wfMsg( 'rightsnone' );
+                                       } else {
+                                               $rightsnone = wfMsgForContent( 'rightsnone' );
+                                       }
+                                       if( !isset( $params[0] ) || trim( $params[0] ) == '' )
+                                               $params[0] = $rightsnone;
+                                       if( !isset( $params[1] ) || trim( $params[1] ) == '' )
+                                               $params[1] = $rightsnone;
+                               }
                                if( count( $params ) == 0 ) {
                                        if ( $skin ) {
                                                $rv = wfMsg( $wgLogActions[$key], $titleLink );