X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=docs%2Fhooks.txt;h=8fa3793d8f296fb7056a6a13ad99dbe8ca153c8e;hb=e8ff3b583925efcd84e05cfbb54ae2dbd68d7231;hp=57240c98f9626c41687c3e9cab776204be81d33b;hpb=d4f1e00a0c240a3b725127dcb2779f377a6772dd;p=lhc%2Fweb%2Fwiklou.git diff --git a/docs/hooks.txt b/docs/hooks.txt index 57240c98f9..8fa3793d8f 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -608,6 +608,7 @@ $reason: the reason the article was deleted $id: id of the article that was deleted $content: the Content of the deleted page $logEntry: the ManualLogEntry used to record the deletion +$archivedRevisionCount: the number of revisions archived during the deletion 'ArticleEditUpdateNewTalk': Before updating user_newtalk when a user talk page was changed. @@ -1103,6 +1104,9 @@ $row: the DB row for this line $id: User identifier $title: User page title &$tools: Array of tool links +$specialPage: SpecialPage instance for context and services. Can be either + SpecialContributions or DeletedContributionsPage. Extensions should type + hint against a generic SpecialPage though. 'ConvertContent': Called by AbstractContent::convert when a conversion to another content model is requested. @@ -1141,6 +1145,85 @@ $page: SpecialPage object for DeletedContributions $row: the DB row for this line &$classes: the classes to add to the surrounding
  • +'DifferenceEngineMarkPatrolledLink': Allows extensions to change the "mark as patrolled" link +which is shown both on the diff header as well as on the bottom of a page, usually +wrapped in a span element which has class="patrollink". +$differenceEngine: DifferenceEngine object +&$markAsPatrolledLink: The "mark as patrolled" link HTML (string) +$rcid: Recent change ID (rc_id) for this change (int) +$token: Patrol token; $rcid is used in generating this variable + +'DifferenceEngineMarkPatrolledRCID': Allows extensions to possibly change the rcid parameter. +For example the rcid might be set to zero due to the user being the same as the +performer of the change but an extension might still want to show it under certain +conditions. +&$rcid: rc_id (int) of the change or 0 +$differenceEngine: DifferenceEngine object +$change: RecentChange object +$user: User object representing the current user + +'DifferenceEngineNewHeader': Allows extensions to change the $newHeader variable, which +contains information about the new revision, such as the revision's author, whether +the revision was marked as a minor edit or not, etc. +$differenceEngine: DifferenceEngine object +&$newHeader: The string containing the various #mw-diff-otitle[1-5] divs, which +include things like revision author info, revision comment, RevisionDelete link and more +$formattedRevisionTools: Array containing revision tools, some of which may have +been injected with the DiffRevisionTools hook +$nextlink: String containing the link to the next revision (if any); also included in $newHeader +$rollback: Rollback link (string) to roll this revision back to the previous one, if any +$newminor: String indicating if the new revision was marked as a minor edit +$diffOnly: Boolean parameter passed to DifferenceEngine#showDiffPage, indicating +whether we should show just the diff; passed in as a query string parameter to the +various URLs constructed here (i.e. $nextlink) +$rdel: RevisionDelete link for the new revision, if the current user is allowed +to use the RevisionDelete feature +$unhide: Boolean parameter indicating whether to show RevisionDeleted revisions + +'DifferenceEngineOldHeader': Allows extensions to change the $oldHeader variable, which +contains information about the old revision, such as the revision's author, whether +the revision was marked as a minor edit or not, etc. +$differenceEngine: DifferenceEngine object +&$oldHeader: The string containing the various #mw-diff-otitle[1-5] divs, which +include things like revision author info, revision comment, RevisionDelete link and more +$prevlink: String containing the link to the previous revision (if any); also included in $oldHeader +$oldminor: String indicating if the old revision was marked as a minor edit +$diffOnly: Boolean parameter passed to DifferenceEngine#showDiffPage, indicating +whether we should show just the diff; passed in as a query string parameter to the +various URLs constructed here (i.e. $prevlink) +$ldel: RevisionDelete link for the old revision, if the current user is allowed +to use the RevisionDelete feature +$unhide: Boolean parameter indicating whether to show RevisionDeleted revisions + +'DifferenceEngineOldHeaderNoOldRev': Change the $oldHeader variable in cases when +there is no old revision +&$oldHeader: empty string by default + +'DifferenceEngineRenderRevisionAddParserOutput': Allows extensions to change the parser output. +Return false to not add parser output via OutputPage's addParserOutput method. +$differenceEngine: DifferenceEngine object +$out: OutputPage object +$parserOutput: ParserOutput object +$wikiPage: WikiPage object + +DifferenceEngineRenderRevisionShowFinalPatrolLink': An extension can hook into this hook +point and return false to not show the final "mark as patrolled" link on the bottom +of a page. +This hook has no arguments. + +'DifferenceEngineShowDiff': Allows extensions to affect the diff text which +eventually gets sent to the OutputPage object. +$differenceEngine: DifferenceEngine object + +'DifferenceEngineShowEmptyOldContent': Allows extensions to change the diff table +body (without header) in cases when there is no old revision or the old and new +revisions are identical. +$differenceEngine: DifferenceEngine object + +'DifferenceEngineShowDiffPage': Add additional output via the available OutputPage +object into the diff view +$out: OutputPage object + 'DiffRevisionTools': Override or extend the revision tools available from the diff view, i.e. undo, etc. $newRev: Revision object of the "new" revision @@ -2620,6 +2703,18 @@ search results. $title: Current Title object being displayed in search results. &$id: Revision ID (default is false, for latest) +'SearchIndexFields': Add fields to search index mapping. +&$fields: Array of fields, all implement SearchIndexField +$engine: SearchEngine instance for which mapping is being built. + +'SearchDataForIndex': Add data to search document. Allows to add any data to +the field map used to index the document. +&$fields: Array of name => value pairs for fields +$handler: ContentHandler for the content being indexed +$page: WikiPage that is being indexed +$output: ParserOutput that is produced from the page +$engine: SearchEngine for which the indexing is intended + 'SecondaryDataUpdates': Allows modification of the list of DataUpdates to perform when page content is modified. Currently called by AbstractContent::getSecondaryDataUpdates.