From: Aryeh Gregor Date: Wed, 2 Jan 2008 02:05:01 +0000 (+0000) Subject: Clarify in getUserPermissionErrors hook documentation that errors should not be made... X-Git-Tag: 1.31.0-rc.0~50186 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=b24975a3ff91f95e3f72bdcdd55dcc22f0a39b2e;p=lhc%2Fweb%2Fwiklou.git Clarify in getUserPermissionErrors hook documentation that errors should not be made red, bold, etc. --- diff --git a/docs/hooks.txt b/docs/hooks.txt index b2c610d30c..ffb58eebdf 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -582,9 +582,13 @@ $title: Title object of page $url: string value as output (out parameter, can modify) $query: query options passed to Title::getLocalURL() -'getUserPermissionsErrors': Add a permissions error when permissions errors are checked for. - Use instead of userCan for most cases. Return false if the user can't do it, - and populate $result with the reason in the form of array( messagename, param1, param2 ) +'getUserPermissionsErrors': Add a permissions error when permissions errors are + checked for. Use instead of userCan for most cases. Return false if the + user can't do it, and populate $result with the reason in the form of + array( messagename, param1, param2, ... ). For consistency, error messages + should be plain text with no special coloring, bolding, etc. to show that + they're errors; presenting them properly to the user as errors is done by + the caller. $title: Title object being checked against $user : Current user object $action: Action being checked