From: Aryeh Gregor Date: Sun, 13 Jan 2008 22:23:36 +0000 (+0000) Subject: Random small fixes: formatting/whitespace, comments, fix inexplicably misleading... X-Git-Tag: 1.31.0-rc.0~50025 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=b3cff936fc55a4ba522d8b1e3bec96d4f60c9d62;p=lhc%2Fweb%2Fwiklou.git Random small fixes: formatting/whitespace, comments, fix inexplicably misleading profiling name in getUserPermissionsErrorsInternal. --- diff --git a/includes/Title.php b/includes/Title.php index da7ccea41d..16530672a8 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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; } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 4506919248..fbaadc1dc5 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1928,8 +1928,7 @@ Last edit was by [[User:$3|$3]] ([[User talk:$3|Talk]]).', 'editcomment' => 'The edit comment was: "$1".', # 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.',