Random small fixes: formatting/whitespace, comments, fix inexplicably misleading...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Sun, 13 Jan 2008 22:23:36 +0000 (22:23 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Sun, 13 Jan 2008 22:23:36 +0000 (22:23 +0000)
includes/Title.php
languages/messages/MessagesEn.php

index da7ccea..1653067 100644 (file)
@@ -1025,7 +1025,9 @@ class Title {
        }
 
        /**
-        * Can $user perform $action on this page?
+        * Can $user perform $action on this page?  This *does not* check throttles
+        * (User::pingLimiter()) yet; check that manually to be sure.
+        *
         * @param string $action action that permission needs to be checked for
         * @param bool $doExpensiveQueries Set this to false to avoid doing unnecessary queries.
         * @return array Array of arrays of the arguments to wfMsg to explain permissions problems.
@@ -1043,8 +1045,7 @@ class Title {
 
                global $wgEmailConfirmToEdit, $wgUser;
 
-               if ( $wgEmailConfirmToEdit && !$user->isEmailConfirmed() )
-               {
+               if ( $wgEmailConfirmToEdit && !$user->isEmailConfirmed() ) {
                        $errors[] = array( 'confirmedittext' );
                }
 
@@ -1100,15 +1101,16 @@ class Title {
        }
 
        /**
-        * Can $user perform $action on this page?
-        * This is an internal function, which checks ONLY that previously checked by userCan (i.e. it leaves out checks on wfReadOnly() and blocks)
+        * Can $user perform $action on this page? This is an internal function,
+        * which checks ONLY that previously checked by userCan (i.e. it leaves out
+        * checks on wfReadOnly() and blocks)
+        *
         * @param string $action action that permission needs to be checked for
         * @param bool $doExpensiveQueries Set this to false to avoid doing unnecessary queries.
         * @return array Array of arrays of the arguments to wfMsg to explain permissions problems.
         */
        private function getUserPermissionsErrorsInternal( $action, $user, $doExpensiveQueries = true ) {
-               $fname = 'Title::userCan';
-               wfProfileIn( $fname );
+               wfProfileIn( __METHOD__ );
 
                $errors = array();
 
@@ -1194,7 +1196,6 @@ class Title {
                        }
                }
 
-
                if ($action == 'create') {                      
                        $title_protection = $this->getTitleProtection();
 
@@ -1244,7 +1245,7 @@ class Title {
                        $errors[] = $return;
                }
 
-               wfProfileOut( $fname );
+               wfProfileOut( __METHOD__ );
                return $errors;
        }
 
index 4506919..fbaadc1 100644 (file)
@@ -1928,8 +1928,7 @@ Last edit was by [[User:$3|$3]] ([[User talk:$3|Talk]]).',
 'editcomment'                 => 'The edit comment was: "<i>$1</i>".', # only shown if there is an edit comment
 'revertpage'                  => 'Reverted edits by [[Special:Contributions/$2|$2]] ([[User talk:$2|Talk]]); changed back to last version by [[User:$1|$1]]',
 'rollback-success'            => 'Reverted edits by $1; changed back to last version by $2.',
-'sessionfailure'              => 'There seems to be a problem with your login session;
-this action has been canceled as a precaution against session hijacking.
+'sessionfailure'              => 'There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking.
 Please hit "back" and reload the page you came from, then try again.',
 'protectlogpage'              => 'Protection log',
 'protectlogtext'              => 'Below is a list of page locks and unlocks. See the [[Special:Protectedpages|protected pages list]] for the list of currently operational page protections.',