From 2acc76365c57bec26ae055853a6a6c455dd4653e Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 11 Dec 2011 16:04:53 +0000 Subject: [PATCH] Fix documentation of Title::userCan() and Title::quickUserCan() and added line breaks in Title::getUserPermissionsErrors()'s one --- includes/Title.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 5ee2eab539..adaffc4861 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1483,7 +1483,7 @@ class Title { } /** - * Can $wgUser perform $action on this page? + * Can $user perform $action on this page? * This skips potentially expensive cascading permission checks * as well as avoids expensive error formatting * @@ -1493,7 +1493,8 @@ class Title { * May provide false positives, but should never provide a false negative. * * @param $action String action that permission needs to be checked for - * @param $user User to check (since 1.19) + * @param $user User to check (since 1.19); $wgUser will be used if not + * provided. * @return Bool */ public function quickUserCan( $action, $user = null ) { @@ -1501,11 +1502,13 @@ class Title { } /** - * Can $wgUser perform $action on this page? + * Can $user perform $action on this page? * * @param $action String action that permission needs to be checked for - * @param $user User to check (since 1.19) - * @param $doExpensiveQueries Bool Set this to false to avoid doing unnecessary queries. + * @param $user User to check (since 1.19); $wgUser will be used if not + * provided. + * @param $doExpensiveQueries Bool Set this to false to avoid doing + * unnecessary queries. * @return Bool */ public function userCan( $action, $user = null, $doExpensiveQueries = true ) { @@ -1523,9 +1526,10 @@ class Title { * * @param $action String action that permission needs to be checked for * @param $user User to check - * @param $doExpensiveQueries Bool Set this to false to avoid doing unnecessary queries by - * skipping checks for cascading protections and user blocks. - * @param $ignoreErrors Array of Strings Set this to a list of message keys whose corresponding errors may be ignored. + * @param $doExpensiveQueries Bool Set this to false to avoid doing unnecessary + * queries by skipping checks for cascading protections and user blocks. + * @param $ignoreErrors Array of Strings Set this to a list of message keys + * whose corresponding errors may be ignored. * @return Array of arguments to wfMsg to explain permissions problems. */ public function getUserPermissionsErrors( $action, $user, $doExpensiveQueries = true, $ignoreErrors = array() ) { -- 2.20.1