r105801 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105800‎ | r105801 | r105802 >
Date:16:04, 11 December 2011
Author:ialex
Status:ok
Tags:
Comment:
Fix documentation of Title::userCan() and Title::quickUserCan() and added line breaks in Title::getUserPermissionsErrors()'s one
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -1483,7 +1483,7 @@
14841484 }
14851485
14861486 /**
1487 - * Can $wgUser perform $action on this page?
 1487+ * Can $user perform $action on this page?
14881488 * This skips potentially expensive cascading permission checks
14891489 * as well as avoids expensive error formatting
14901490 *
@@ -1493,7 +1493,8 @@
14941494 * May provide false positives, but should never provide a false negative.
14951495 *
14961496 * @param $action String action that permission needs to be checked for
1497 - * @param $user User to check (since 1.19)
 1497+ * @param $user User to check (since 1.19); $wgUser will be used if not
 1498+ * provided.
14981499 * @return Bool
14991500 */
15001501 public function quickUserCan( $action, $user = null ) {
@@ -1501,11 +1502,13 @@
15021503 }
15031504
15041505 /**
1505 - * Can $wgUser perform $action on this page?
 1506+ * Can $user perform $action on this page?
15061507 *
15071508 * @param $action String action that permission needs to be checked for
1508 - * @param $user User to check (since 1.19)
1509 - * @param $doExpensiveQueries Bool Set this to false to avoid doing unnecessary queries.
 1509+ * @param $user User to check (since 1.19); $wgUser will be used if not
 1510+ * provided.
 1511+ * @param $doExpensiveQueries Bool Set this to false to avoid doing
 1512+ * unnecessary queries.
15101513 * @return Bool
15111514 */
15121515 public function userCan( $action, $user = null, $doExpensiveQueries = true ) {
@@ -1523,9 +1526,10 @@
15241527 *
15251528 * @param $action String action that permission needs to be checked for
15261529 * @param $user User to check
1527 - * @param $doExpensiveQueries Bool Set this to false to avoid doing unnecessary queries by
1528 - * skipping checks for cascading protections and user blocks.
1529 - * @param $ignoreErrors Array of Strings Set this to a list of message keys whose corresponding errors may be ignored.
 1530+ * @param $doExpensiveQueries Bool Set this to false to avoid doing unnecessary
 1531+ * queries by skipping checks for cascading protections and user blocks.
 1532+ * @param $ignoreErrors Array of Strings Set this to a list of message keys
 1533+ * whose corresponding errors may be ignored.
15301534 * @return Array of arguments to wfMsg to explain permissions problems.
15311535 */
15321536 public function getUserPermissionsErrors( $action, $user, $doExpensiveQueries = true, $ignoreErrors = array() ) {

Status & tagging log