From 34342ce7c23fa887ebbb9e189abd4bcc7dec0ea3 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 21 Jul 2009 11:48:52 +0000 Subject: [PATCH] * update UploadComplete hook, the object is now a subclass of UploadBase * whitespaces fixes --- docs/hooks.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index 6f98b7e162..ece9e28e58 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -68,7 +68,7 @@ email notification when an article is shown may add: if ($wgNotifyArticle) { wfNotifyArticleShow($article)); } - } + } Using a hook-running strategy, we can avoid having all this option-specific stuff in our mainline code. Using hooks, the function becomes: @@ -270,7 +270,7 @@ is enabled ( $wgUseAjax = true; ). 'AlternateEdit': before checking if an user can edit a page and before showing the edit form ( EditPage::edit() ). This is triggered on &action=edit. -$EditPage : the EditPage object +$EditPage: the EditPage object 'APIAfterExecute': after calling the execute() method of an API module. Use this to extend core API modules. @@ -1443,8 +1443,8 @@ string $tempName: filesystem path to the temporary file for checks string &$error: output: HTML error to show if upload canceled by returning false 'UploadComplete': Upon completion of a file upload -$uploadForm: Upload form object. File can be accessed by - $uploadForm->mLocalFile. +$uploadBase: UploadBase (or subclass) object. File can be accessed by + $uploadBase->getLocalFile(). 'User::mailPasswordInternal': before creation and mailing of a user's new temporary password @@ -1469,7 +1469,6 @@ $result: Pointer to result returned if hook returns false. If null is returned, $user: User (object) whose permission is being checked &$canSend: bool set on input, can override on output - 'UserClearNewTalkNotification': called when clearing the "You have new messages!" message, return false to not delete it $user: User (object) that'll clear the message @@ -1515,7 +1514,7 @@ $user: User object &$groups: List of implicit (automatically-assigned) groups 'UserGetReservedNames': allows to modify $wgReservedUsernames at run time -*&$reservedUsernames: $wgReservedUsernames +&$reservedUsernames: $wgReservedUsernames 'UserGetRights': Called in User::getRights() $user: User to get rights for -- 2.20.1