Index: trunk/phase3/includes/Title.php |
— | — | @@ -1483,7 +1483,7 @@ |
1484 | 1484 | } |
1485 | 1485 | |
1486 | 1486 | /** |
1487 | | - * Can $wgUser perform $action on this page? |
| 1487 | + * Can $user perform $action on this page? |
1488 | 1488 | * This skips potentially expensive cascading permission checks |
1489 | 1489 | * as well as avoids expensive error formatting |
1490 | 1490 | * |
— | — | @@ -1493,7 +1493,8 @@ |
1494 | 1494 | * May provide false positives, but should never provide a false negative. |
1495 | 1495 | * |
1496 | 1496 | * @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. |
1498 | 1499 | * @return Bool |
1499 | 1500 | */ |
1500 | 1501 | public function quickUserCan( $action, $user = null ) { |
— | — | @@ -1501,11 +1502,13 @@ |
1502 | 1503 | } |
1503 | 1504 | |
1504 | 1505 | /** |
1505 | | - * Can $wgUser perform $action on this page? |
| 1506 | + * Can $user perform $action on this page? |
1506 | 1507 | * |
1507 | 1508 | * @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. |
1510 | 1513 | * @return Bool |
1511 | 1514 | */ |
1512 | 1515 | public function userCan( $action, $user = null, $doExpensiveQueries = true ) { |
— | — | @@ -1523,9 +1526,10 @@ |
1524 | 1527 | * |
1525 | 1528 | * @param $action String action that permission needs to be checked for |
1526 | 1529 | * @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. |
1530 | 1534 | * @return Array of arguments to wfMsg to explain permissions problems. |
1531 | 1535 | */ |
1532 | 1536 | public function getUserPermissionsErrors( $action, $user, $doExpensiveQueries = true, $ignoreErrors = array() ) { |