}
/**
- * 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.
global $wgEmailConfirmToEdit, $wgUser;
- if ( $wgEmailConfirmToEdit && !$user->isEmailConfirmed() )
- {
+ if ( $wgEmailConfirmToEdit && !$user->isEmailConfirmed() ) {
$errors[] = array( 'confirmedittext' );
}
}
/**
- * 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();
}
}
-
if ($action == 'create') {
$title_protection = $this->getTitleProtection();
$errors[] = $return;
}
- wfProfileOut( $fname );
+ wfProfileOut( __METHOD__ );
return $errors;
}
'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.',