Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -324,7 +324,8 @@ |
325 | 325 | $tokenFunctions array and return true (returning false makes no sense) |
326 | 326 | $tokenFunctions: array(action => callback) |
327 | 327 | |
328 | | -'APIQueryRecentChangesTokens': use this hook to add custom tokens to list=recentchanges. |
| 328 | +'APIQueryRecentChangesTokens': use this hook to add custom tokens to |
| 329 | +list=recentchanges. |
329 | 330 | Every token has an action, which will be used in the rctoken parameter |
330 | 331 | and in the output (actiontoken="..."), and a callback function which |
331 | 332 | should return the token, or false if the user isn't allowed to obtain |
— | — | @@ -344,7 +345,8 @@ |
345 | 346 | $tokenFunctions array and return true (returning false makes no sense) |
346 | 347 | $tokenFunctions: array(action => callback) |
347 | 348 | |
348 | | -'ArticleAfterFetchContent': after fetching content of an article from the database |
| 349 | +'ArticleAfterFetchContent': after fetching content of an article from |
| 350 | +the database |
349 | 351 | $article: the article (object) being loaded from the database |
350 | 352 | $content: the content (string) of the article |
351 | 353 | |
— | — | @@ -361,18 +363,23 @@ |
362 | 364 | $reason: the reason the article was deleted |
363 | 365 | $id: id of the article that was deleted |
364 | 366 | |
365 | | -'ArticleEditUpdateNewTalk': before updating user_newtalk when a user talk page was changed |
| 367 | +'ArticleEditUpdateNewTalk': before updating user_newtalk when a user talk page |
| 368 | +was changed |
366 | 369 | $article: article (object) of the user talk page |
367 | 370 | |
368 | | -'ArticleEditUpdates': when edit updates (mainly link tracking) are made when an article has been changed |
| 371 | +'ArticleEditUpdates': when edit updates (mainly link tracking) are made when an |
| 372 | +article has been changed |
369 | 373 | $article: the article (object) |
370 | | -$editInfo: data holder that includes the parser output ($editInfo->output) for that page after the change |
| 374 | +$editInfo: data holder that includes the parser output ($editInfo->output) for |
| 375 | +that page after the change |
371 | 376 | $changed: bool for if the page was changed |
372 | 377 | |
373 | | -'ArticleEditUpdatesDeleteFromRecentchanges': before deleting old entries from recentchanges table, return false to not delete old entries |
| 378 | +'ArticleEditUpdatesDeleteFromRecentchanges': before deleting old entries from |
| 379 | +recentchanges table, return false to not delete old entries |
374 | 380 | $article: article (object) being modified |
375 | 381 | |
376 | | -'ArticleFromTitle': when creating an article object from a title object using Wiki::articleFromTitle() |
| 382 | +'ArticleFromTitle': when creating an article object from a title object using |
| 383 | +Wiki::articleFromTitle() |
377 | 384 | $title: title (object) used to create the article object |
378 | 385 | $article: article (object) that will be returned |
379 | 386 | |
— | — | @@ -457,17 +464,20 @@ |
458 | 465 | $create: Whether or not the restoration caused the page to be created |
459 | 466 | (i.e. it didn't exist before) |
460 | 467 | |
461 | | -'ArticleUpdateBeforeRedirect': After a page is updated (usually on save), before the user is redirected back to the page |
| 468 | +'ArticleUpdateBeforeRedirect': After a page is updated (usually on save), |
| 469 | +before the user is redirected back to the page |
462 | 470 | &$article: the article |
463 | 471 | &$sectionanchor: The section anchor link (e.g. "#overview" ) |
464 | 472 | &$extraq: Extra query parameters which can be added via hooked functions |
465 | 473 | |
466 | | -'ArticleViewHeader': Before the parser cache is about to be tried for article viewing. |
| 474 | +'ArticleViewHeader': Before the parser cache is about to be tried for article |
| 475 | +viewing. |
467 | 476 | &$article: the article |
468 | 477 | &$pcache: whether to try the parser cache or not |
469 | 478 | &$outputDone: whether the output for this page finished or not |
470 | 479 | |
471 | | -'ArticleViewRedirect': before setting "Redirected from ..." subtitle when follwed an redirect |
| 480 | +'ArticleViewRedirect': before setting "Redirected from ..." subtitle when |
| 481 | +follwed an redirect |
472 | 482 | $article: target article (object) |
473 | 483 | |
474 | 484 | 'AuthPluginAutoCreate': Called when creating a local account for an user logged |
— | — | @@ -573,7 +583,8 @@ |
574 | 584 | $oldRev: Revision object of the "old" revision (may be null/invalid) |
575 | 585 | $newRev: Revision object of the "new" revision |
576 | 586 | |
577 | | -'DisplayOldSubtitle': before creating subtitle when browsing old versions of an article |
| 587 | +'DisplayOldSubtitle': before creating subtitle when browsing old versions of |
| 588 | +an article |
578 | 589 | $article: article (object) being viewed |
579 | 590 | $oldid: oldid (int) being viewed |
580 | 591 | |
— | — | @@ -601,7 +612,8 @@ |
602 | 613 | $error: error message to return |
603 | 614 | $summary: Edit summary for page |
604 | 615 | |
605 | | -'EditFormPreloadText': Allows population of the edit form when creating new pages |
| 616 | +'EditFormPreloadText': Allows population of the edit form when creating |
| 617 | +new pages |
606 | 618 | &$text: Text to preload with |
607 | 619 | &$title: Title object representing the page being created |
608 | 620 | |
— | — | @@ -617,10 +629,10 @@ |
618 | 630 | 'EditPage::showEditForm:initial': before showing the edit form |
619 | 631 | $editor: EditPage instance (object) |
620 | 632 | |
621 | | -Return false to halt editing; you'll need to handle error messages, etc. yourself. |
622 | | -Alternatively, modifying $error and returning true will cause the contents of $error |
623 | | -to be echoed at the top of the edit form as wikitext. Return true without altering |
624 | | -$error to allow the edit to proceed. |
| 633 | +Return false to halt editing; you'll need to handle error messages, etc. |
| 634 | +yourself. Alternatively, modifying $error and returning true will cause the |
| 635 | +contents of $error to be echoed at the top of the edit form as wikitext. |
| 636 | +Return true without altering $error to allow the edit to proceed. |
625 | 637 | |
626 | 638 | 'EditPageBeforeConflictDiff': allows modifying the EditPage object and output |
627 | 639 | when there's an edit conflict. Return false to halt normal diff output; in |
— | — | @@ -630,12 +642,14 @@ |
631 | 643 | &$editor: EditPage instance |
632 | 644 | &$out: OutputPage instance |
633 | 645 | |
634 | | -'EditPageBeforeEditButtons': allows modifying the edit buttons below the textarea in the edit form |
| 646 | +'EditPageBeforeEditButtons': allows modifying the edit buttons below the |
| 647 | +textarea in the edit form |
635 | 648 | &$editpage: The current EditPage object |
636 | 649 | &$buttons: Array of edit buttons "Save", "Preview", "Live", and "Diff" |
637 | 650 | &$tabindex: HTML tabindex of the last edit check/button |
638 | 651 | |
639 | | -'EditPageBeforeEditChecks': allows modifying the edit checks below the textarea in the edit form |
| 652 | +'EditPageBeforeEditChecks': allows modifying the edit checks below the |
| 653 | +textarea in the edit form |
640 | 654 | &$editpage: The current EditPage object |
641 | 655 | &$checks: Array of edit checks like "watch this page"/"minor edit" |
642 | 656 | &$tabindex: HTML tabindex of the last edit check/button |
— | — | @@ -670,17 +684,18 @@ |
671 | 685 | $editToken: The user's edit token. |
672 | 686 | &$hookErr: Out-param for the error. Passed as the parameters to OutputPage::showErrorPage. |
673 | 687 | |
674 | | -'FetchChangesList': When fetching the ChangesList derivative for a particular user |
| 688 | +'FetchChangesList': When fetching the ChangesList derivative for |
| 689 | +a particular user |
675 | 690 | &$user: User the list is being fetched for |
676 | 691 | &$skin: Skin object to be used with the list |
677 | | -&$list: List object (defaults to NULL, change it to an object instance and return |
678 | | -false override the list derivative used) |
| 692 | +&$list: List object (defaults to NULL, change it to an object |
| 693 | + instance and return false override the list derivative used) |
679 | 694 | |
680 | 695 | 'FileDeleteComplete': When a file is deleted |
681 | 696 | $file: reference to the deleted file |
682 | 697 | $oldimage: in case of the deletion of an old image, the name of the old file |
683 | | -$article: in case all revisions of the file are deleted a reference to the article |
684 | | - associated with the file. |
| 698 | +$article: in case all revisions of the file are deleted a reference to the |
| 699 | + article associated with the file. |
685 | 700 | $user: user who performed the deletion |
686 | 701 | $reason: reason |
687 | 702 | |
— | — | @@ -693,7 +708,8 @@ |
694 | 709 | $user: user who performed the undeletion |
695 | 710 | $reason: reason |
696 | 711 | |
697 | | -'GetAutoPromoteGroups': When determining which autopromote groups a user is entitled to be in. |
| 712 | +'GetAutoPromoteGroups': When determining which autopromote groups a user |
| 713 | +is entitled to be in. |
698 | 714 | &$user: user to promote. |
699 | 715 | &$promote: groups that will be added. |
700 | 716 | |
— | — | @@ -716,7 +732,8 @@ |
717 | 733 | $query: query options passed to Title::getInternalURL() |
718 | 734 | |
719 | 735 | 'GetLinkColours': modify the CSS class of an array of page links |
720 | | -$linkcolour_ids: array of prefixed DB keys of the pages linked to, indexed by page_id. |
| 736 | +$linkcolour_ids: array of prefixed DB keys of the pages linked to, |
| 737 | + indexed by page_id. |
721 | 738 | &$colours: (output) array of CSS classes, indexed by prefixed DB keys |
722 | 739 | |
723 | 740 | 'GetLocalURL': modify local URLs as output into page links |
— | — | @@ -743,7 +760,8 @@ |
744 | 761 | 'getUserPermissionsErrorsExpensive': Absolutely the same, but is called only |
745 | 762 | if expensive checks are enabled. |
746 | 763 | |
747 | | -'HTMLCacheUpdate::doUpdate': After cache invalidation updates are inserted into the job queue. |
| 764 | +'HTMLCacheUpdate::doUpdate': After cache invalidation updates are inserted |
| 765 | +into the job queue. |
748 | 766 | $title: Title object, pages linked to this title are purged. |
749 | 767 | |
750 | 768 | 'ImageBeforeProduceHTML': Called before producing the HTML created by a wiki |
— | — | @@ -782,8 +800,8 @@ |
783 | 801 | $target: Title/string of redirect target |
784 | 802 | $article: Article object |
785 | 803 | |
786 | | -'InternalParseBeforeLinks': during Parser's internalParse method before links but |
787 | | -after noinclude/includeonly/onlyinclude and other processing. |
| 804 | +'InternalParseBeforeLinks': during Parser's internalParse method before links |
| 805 | +but after noinclude/includeonly/onlyinclude and other processing. |
788 | 806 | &$this: Parser object |
789 | 807 | &$text: string containing partially parsed text |
790 | 808 | &$this->mStripState: Parser's internal StripState object |
— | — | @@ -805,11 +823,13 @@ |
806 | 824 | &$result: Set this and return false to override the internal checks |
807 | 825 | $user: User the password is being validated for |
808 | 826 | |
809 | | -'LanguageGetMagic': Use this to define synonyms of magic words depending of the language |
| 827 | +'LanguageGetMagic': Use this to define synonyms of magic words depending |
| 828 | +of the language |
810 | 829 | $magicExtensions: associative array of magic words synonyms |
811 | 830 | $lang: laguage code (string) |
812 | 831 | |
813 | | -'LanguageGetSpecialPageAliases': Use to define aliases of special pages names depending of the language |
| 832 | +'LanguageGetSpecialPageAliases': Use to define aliases of special pages |
| 833 | +names depending of the language |
814 | 834 | $specialPageAliases: associative array of magic words synonyms |
815 | 835 | $lang: laguage code (string) |
816 | 836 | |
— | — | @@ -842,22 +862,26 @@ |
843 | 863 | ciative array form. |
844 | 864 | &$ret: the value to return if your hook returns false. |
845 | 865 | |
846 | | -'LinkerMakeExternalImage': At the end of Linker::makeExternalImage() just before the return |
| 866 | +'LinkerMakeExternalImage': At the end of Linker::makeExternalImage() just |
| 867 | +before the return |
847 | 868 | &$url: the image url |
848 | 869 | &$alt: the image's alt text |
849 | 870 | &$img: the new image HTML (if returning false) |
850 | 871 | |
851 | | -'LinkerMakeExternalLink': At the end of Linker::makeExternalLink() just before the return |
| 872 | +'LinkerMakeExternalLink': At the end of Linker::makeExternalLink() just |
| 873 | +before the return |
852 | 874 | &$url: the link url |
853 | 875 | &$text: the link text |
854 | 876 | &$link: the new link HTML (if returning false) |
855 | 877 | &$attribs: the attributes to be applied. |
856 | 878 | $linkType: The external link type |
857 | 879 | |
858 | | -'LinksUpdate': At the beginning of LinksUpdate::doUpdate() just before the actual update |
| 880 | +'LinksUpdate': At the beginning of LinksUpdate::doUpdate() just before the |
| 881 | +actual update |
859 | 882 | &$linksUpdate: the LinkUpdate object |
860 | 883 | |
861 | | -'LinksUpdateComplete': At the end of LinksUpdate::doUpdate() when updating has completed |
| 884 | +'LinksUpdateComplete': At the end of LinksUpdate::doUpdate() when updating has |
| 885 | +completed |
862 | 886 | &$linksUpdate: the LinkUpdate object |
863 | 887 | |
864 | 888 | 'LinksUpdateConstructed': At the end of LinksUpdate() is contruction. |
— | — | @@ -866,10 +890,12 @@ |
867 | 891 | 'ListDefinedTags': When trying to find all defined tags. |
868 | 892 | &$tags: The list of tags. |
869 | 893 | |
870 | | -'LoadAllMessages': called by MessageCache::loadAllMessages() to load extensions messages |
| 894 | +'LoadAllMessages': called by MessageCache::loadAllMessages() to load extensions |
| 895 | +messages |
871 | 896 | &$messageCache: The MessageCache object |
872 | 897 | |
873 | | -'LoadExtensionSchemaUpdates': called by maintenance/updaters.inc when upgrading database schema |
| 898 | +'LoadExtensionSchemaUpdates': called by maintenance/updaters.inc when upgrading |
| 899 | +database schema |
874 | 900 | |
875 | 901 | 'LocalFile::getHistory': called before file history query performed |
876 | 902 | $file: the file |
— | — | @@ -879,62 +905,71 @@ |
880 | 906 | $opts: query options |
881 | 907 | $join_conds: JOIN conditions |
882 | 908 | |
883 | | -'LoginAuthenticateAudit': a login attempt for a valid user account either succeeded or failed. |
884 | | - No return data is accepted; this hook is for auditing only. |
| 909 | +'LoginAuthenticateAudit': a login attempt for a valid user account either |
| 910 | +succeeded or failed. No return data is accepted; this hook is for auditing only. |
885 | 911 | $user: the User object being authenticated against |
886 | 912 | $password: the password being submitted and found wanting |
887 | | -$retval: a LoginForm class constant with authenticateUserData() return value (SUCCESS, WRONG_PASS, etc) |
| 913 | +$retval: a LoginForm class constant with authenticateUserData() return |
| 914 | + value (SUCCESS, WRONG_PASS, etc) |
888 | 915 | |
889 | 916 | 'LogLine': Processes a single log entry on Special:Log |
890 | | -$log_type: string for the type of log entry (e.g. 'move'). Corresponds to logging.log_type |
891 | | - database field. |
892 | | -$log_action: string for the type of log action (e.g. 'delete', 'block', 'create2'). Corresponds |
893 | | - to logging.log_action database field. |
894 | | -$title: Title object that corresponds to logging.log_namespace and logging.log_title database fields. |
895 | | -$paramArray: Array of parameters that corresponds to logging.log_params field. Note that only $paramArray[0] |
896 | | - appears to contain anything. |
897 | | -&$comment: string that corresponds to logging.log_comment database field, and which is displayed in the UI. |
| 917 | +$log_type: string for the type of log entry (e.g. 'move'). Corresponds to |
| 918 | + logging.log_type database field. |
| 919 | +$log_action: string for the type of log action (e.g. 'delete', 'block', |
| 920 | + 'create2'). Corresponds to logging.log_action database field. |
| 921 | +$title: Title object that corresponds to logging.log_namespace and |
| 922 | + logging.log_title database fields. |
| 923 | +$paramArray: Array of parameters that corresponds to logging.log_params field. |
| 924 | + Note that only $paramArray[0] appears to contain anything. |
| 925 | +&$comment: string that corresponds to logging.log_comment database field, and |
| 926 | + which is displayed in the UI. |
898 | 927 | &$revert: string that is displayed in the UI, similar to $comment. |
899 | 928 | $time: timestamp of the log entry (added in 1.12) |
900 | 929 | |
901 | | -'LogPageValidTypes': action being logged. DEPRECATED: Use $wgLogTypes |
| 930 | +'LogPageValidTypes': action being logged. |
| 931 | +DEPRECATED: Use $wgLogTypes |
902 | 932 | &$type: array of strings |
903 | 933 | |
904 | | -'LogPageLogName': name of the logging page(s). DEPRECATED: Use $wgLogNames |
| 934 | +'LogPageLogName': name of the logging page(s). |
| 935 | +DEPRECATED: Use $wgLogNames |
905 | 936 | &$typeText: array of strings |
906 | 937 | |
907 | | -'LogPageLogHeader': strings used by wfMsg as a header. DEPRECATED: Use $wgLogHeaders |
| 938 | +'LogPageLogHeader': strings used by wfMsg as a header. |
| 939 | +DEPRECATED: Use $wgLogHeaders |
908 | 940 | &$headerText: array of strings |
909 | 941 | |
910 | | -'LogPageActionText': strings used by wfMsg as a header. DEPRECATED: Use $wgLogActions |
| 942 | +'LogPageActionText': strings used by wfMsg as a header. |
| 943 | +DEPRECATED: Use $wgLogActions |
911 | 944 | &$actionText: array of strings |
912 | 945 | |
913 | | -'MagicWordMagicWords': When defining new magic word. DEPRECATED: Use LanguageGetMagic hook instead |
| 946 | +'MagicWordMagicWords': When defining new magic word. |
| 947 | +DEPRECATED: Use LanguageGetMagic hook instead |
914 | 948 | $magicWords: array of strings |
915 | 949 | |
916 | 950 | 'MagicWordwgVariableIDs': When definig new magic words IDs. |
917 | 951 | $variableIDs: array of strings |
918 | 952 | |
919 | | -'MakeGlobalVariablesScript': called right before Skin::makeVariablesScript is executed |
| 953 | +'MakeGlobalVariablesScript': called right before Skin::makeVariablesScript |
| 954 | +is executed |
920 | 955 | &$vars: variable (or multiple variables) to be added into the output |
921 | | - of Skin::makeVariablesScript |
| 956 | + of Skin::makeVariablesScript |
922 | 957 | |
923 | 958 | 'MarkPatrolled': before an edit is marked patrolled |
924 | 959 | $rcid: ID of the revision to be marked patrolled |
925 | 960 | $user: the user (object) marking the revision as patrolled |
926 | 961 | $wcOnlySysopsCanPatrol: config setting indicating whether the user |
927 | | - needs to be a sysop in order to mark an edit patrolled |
| 962 | + needs to be a sysop in order to mark an edit patrolled |
928 | 963 | |
929 | 964 | 'MarkPatrolledComplete': after an edit is marked patrolled |
930 | 965 | $rcid: ID of the revision marked as patrolled |
931 | 966 | $user: user (object) who marked the edit patrolled |
932 | 967 | $wcOnlySysopsCanPatrol: config setting indicating whether the user |
933 | | - must be a sysop to patrol the edit |
| 968 | + must be a sysop to patrol the edit |
934 | 969 | |
935 | 970 | 'MathAfterTexvc': after texvc is executed when rendering mathematics |
936 | 971 | $mathRenderer: instance of MathRenderer |
937 | 972 | $errmsg: error message, in HTML (string). Nonempty indicates failure |
938 | | - of rendering the formula |
| 973 | + of rendering the formula |
939 | 974 | |
940 | 975 | 'MediaWikiPerformAction': Override MediaWiki::performAction(). |
941 | 976 | Use this to do something completely different, after the basic |
— | — | @@ -950,7 +985,8 @@ |
951 | 986 | $title: title of the message (string) |
952 | 987 | $message: value (string), change it to the message you want to define |
953 | 988 | |
954 | | -'MessageCacheReplace': When a message page is changed. Useful for updating caches. |
| 989 | +'MessageCacheReplace': When a message page is changed. |
| 990 | +Useful for updating caches. |
955 | 991 | $title: name of the page changed. |
956 | 992 | $text: new contents of the page. |
957 | 993 | |
— | — | @@ -961,25 +997,30 @@ |
962 | 998 | $langcode: language code |
963 | 999 | $isFullKey: specifies whether $lckey is a two part key "msg/lang" |
964 | 1000 | |
965 | | -'MonoBookTemplateToolboxEnd': Called by Monobook skin after toolbox links have been rendered (useful for adding more) |
| 1001 | +'MonoBookTemplateToolboxEnd': Called by Monobook skin after toolbox links have |
| 1002 | +been rendered (useful for adding more) |
966 | 1003 | Note: this is only run for the Monobook skin. To add items to the toolbox |
967 | 1004 | for all 'SkinTemplate'-type skins, use the SkinTemplateToolboxEnd hook |
968 | 1005 | instead. |
969 | 1006 | $tools: array of tools |
970 | 1007 | |
971 | | -'NewRevisionFromEditComplete': called when a revision was inserted due to an edit |
| 1008 | +'NewRevisionFromEditComplete': called when a revision was inserted |
| 1009 | +due to an edit |
972 | 1010 | $article: the article edited |
973 | 1011 | $rev: the new revision |
974 | 1012 | $baseID: the revision ID this was based off, if any |
975 | 1013 | $user: the editing user |
976 | 1014 | |
977 | 1015 | 'NormalizeMessageKey': Called before the software gets the text of a message |
978 | | - (stuff in the MediaWiki: namespace), useful for changing WHAT message gets displayed |
979 | | -&$key: the message being looked up. Change this to something else to change what message gets displayed (string) |
| 1016 | +(stuff in the MediaWiki: namespace), useful for changing WHAT message gets |
| 1017 | +displayed |
| 1018 | +&$key: the message being looked up. Change this to something else to change |
| 1019 | + what message gets displayed (string) |
980 | 1020 | &$useDB: whether or not to look up the message in the database (bool) |
981 | 1021 | &$langCode: the language code to get the message for (string) - or - |
982 | | - whether to use the content language (true) or site language (false) (bool) |
983 | | -&$transform: whether or not to expand variables and templates in the message (bool) |
| 1022 | + whether to use the content language (true) or site language (false) (bool) |
| 1023 | +&$transform: whether or not to expand variables and templates |
| 1024 | + in the message (bool) |
984 | 1025 | |
985 | 1026 | 'OldChangesListRecentChangesLine': Customize entire Recent Changes line. |
986 | 1027 | &$changeslist: The OldChangesList instance. |
— | — | @@ -995,18 +1036,23 @@ |
996 | 1037 | $parserOutput: the parserOutput (object) that corresponds to the page |
997 | 1038 | $text: the text that will be displayed, in HTML (string) |
998 | 1039 | |
999 | | -'OutputPageCheckLastModified': when checking if the page has been modified since the last visit |
1000 | | -&$modifiedTimes: array of timestamps, the following keys are set: page, user, epoch |
| 1040 | +'OutputPageCheckLastModified': when checking if the page has been modified |
| 1041 | +since the last visit |
| 1042 | +&$modifiedTimes: array of timestamps. |
| 1043 | + The following keys are set: page, user, epoch |
1001 | 1044 | |
1002 | 1045 | 'OutputPageParserOutput': after adding a parserOutput to $wgOut |
1003 | 1046 | $out: OutputPage instance (object) |
1004 | 1047 | $parserOutput: parserOutput instance being added in $out |
1005 | 1048 | |
1006 | | -'OutputPageMakeCategoryLinks': links are about to be generated for the page's categories. |
1007 | | - Implementations should return false if they generate the category links, so the default link generation is skipped. |
| 1049 | +'OutputPageMakeCategoryLinks': links are about to be generated for the page's |
| 1050 | +categories. Implementations should return false if they generate the category |
| 1051 | +links, so the default link generation is skipped. |
1008 | 1052 | $out: OutputPage instance (object) |
1009 | | -$categories: associative array, keys are category names, values are category types ("normal" or "hidden") |
1010 | | -$links: array, intended to hold the result. Must be an associative array with category types as keys and arrays of HTML links as values. |
| 1053 | +$categories: associative array, keys are category names, values are category |
| 1054 | + types ("normal" or "hidden") |
| 1055 | +$links: array, intended to hold the result. Must be an associative array with |
| 1056 | + category types as keys and arrays of HTML links as values. |
1011 | 1057 | |
1012 | 1058 | 'PageHistoryBeforeList': When a history page list is about to be constructed. |
1013 | 1059 | $article: the article that the history is loading for |
— | — | @@ -1015,13 +1061,14 @@ |
1016 | 1062 | $row: the revision row for this line |
1017 | 1063 | $s: the string representing this parsed line |
1018 | 1064 | |
1019 | | -'PageHistoryPager::getQueryInfo': when a history pager query parameter set is constructed |
| 1065 | +'PageHistoryPager::getQueryInfo': when a history pager query parameter set |
| 1066 | +is constructed |
1020 | 1067 | $pager: the pager |
1021 | 1068 | $queryInfo: the query parameters |
1022 | 1069 | |
1023 | 1070 | 'PageRenderingHash': alter the parser cache option hash key |
1024 | | - A parser extension which depends on user options should install |
1025 | | - this hook and append its values to the key. |
| 1071 | +A parser extension which depends on user options should install |
| 1072 | +this hook and append its values to the key. |
1026 | 1073 | $hash: reference to a hash key string which can be modified |
1027 | 1074 | |
1028 | 1075 | 'ParserAfterStrip': Same as ParserBeforeStrip |
— | — | @@ -1035,7 +1082,8 @@ |
1036 | 1083 | $text: text to parse |
1037 | 1084 | $stripState: StripState instance being used |
1038 | 1085 | |
1039 | | -'ParserBeforeStrip': Called at start of parsing time (no more strip, deprecated ?) |
| 1086 | +'ParserBeforeStrip': Called at start of parsing time |
| 1087 | +(no more strip, deprecated ?) |
1040 | 1088 | $parser: parser object |
1041 | 1089 | $text: text being parsed |
1042 | 1090 | $stripState: stripState used (object) |
— | — | @@ -1050,30 +1098,37 @@ |
1051 | 1099 | 'ParserFirstCallInit': called when the parser initialises for the first time |
1052 | 1100 | &$parser: Parser object being cleared |
1053 | 1101 | |
1054 | | -'ParserGetVariableValueSwitch': called when the parser need the value of a custom magic word |
| 1102 | +'ParserGetVariableValueSwitch': called when the parser need the value of a |
| 1103 | +custom magic word |
1055 | 1104 | $parser: Parser object |
1056 | | -$varCache: array to store the value in case of multiples calls of the same magic word |
| 1105 | +$varCache: array to store the value in case of multiples calls of the |
| 1106 | + same magic word |
1057 | 1107 | $index: index (string) of the magic |
1058 | 1108 | $ret: value of the magic word (the hook should set it) |
1059 | 1109 | |
1060 | | -'ParserGetVariableValueTs': use this to change the value of the time for the {{LOCAL...}} magic word |
| 1110 | +'ParserGetVariableValueTs': use this to change the value of the time for the |
| 1111 | +{{LOCAL...}} magic word |
1061 | 1112 | $parser: Parser object |
1062 | 1113 | $time: actual time (timestamp) |
1063 | 1114 | |
1064 | | -'ParserGetVariableValueVarCache': use this to change the value of the variable cache or return false to not use it |
| 1115 | +'ParserGetVariableValueVarCache': use this to change the value of the |
| 1116 | +variable cache or return false to not use it |
1065 | 1117 | $parser: Parser object |
1066 | 1118 | $varCache: varaiable cache (array) |
1067 | 1119 | |
1068 | | -'ParserLimitReport': called at the end of Parser:parse() when the parser will include comments about size of the text parsed |
| 1120 | +'ParserLimitReport': called at the end of Parser:parse() when the parser will |
| 1121 | +include comments about size of the text parsed |
1069 | 1122 | $parser: Parser object |
1070 | 1123 | $limitReport: text that will be included (without comment tags) |
1071 | 1124 | |
1072 | | -'ParserMakeImageParams': Called before the parser make an image link, use this to modify the parameters of the image. |
| 1125 | +'ParserMakeImageParams': Called before the parser make an image link, use this |
| 1126 | +to modify the parameters of the image. |
1073 | 1127 | $title: title object representing the file |
1074 | 1128 | $file: file object that will be used to create the image |
1075 | 1129 | &$params: 2-D array of parameters |
1076 | 1130 | |
1077 | | -'ParserTestParser': called when creating a new instance of Parser in maintenance/parserTests.inc |
| 1131 | +'ParserTestParser': called when creating a new instance of Parser in |
| 1132 | +maintenance/parserTests.inc |
1078 | 1133 | $parser: Parser object created |
1079 | 1134 | |
1080 | 1135 | 'ParserTestTables': alter the list of tables to duplicate when parser tests |
— | — | @@ -1172,14 +1227,18 @@ |
1173 | 1228 | 'SkinSubPageSubtitle': At the beginning of Skin::subPageSubtitle() |
1174 | 1229 | $skin: Skin object |
1175 | 1230 | &$subpages: Subpage links HTML |
1176 | | -If false is returned $subpages will be used instead of the HTML subPageSubtitle() generates. |
1177 | | -If true is returned, $subpages will be ignored and the rest of subPageSubtitle() will run. |
| 1231 | +If false is returned $subpages will be used instead of the HTML |
| 1232 | +subPageSubtitle() generates. |
| 1233 | +If true is returned, $subpages will be ignored and the rest of |
| 1234 | +subPageSubtitle() will run. |
1178 | 1235 | |
1179 | | -'SkinTemplateBuildContentActionUrlsAfterSpecialPage': after the single tab when showing a special page |
| 1236 | +'SkinTemplateBuildContentActionUrlsAfterSpecialPage': after the single tab |
| 1237 | +when showing a special page |
1180 | 1238 | $sktemplate: SkinTemplate object |
1181 | 1239 | $content_actions: array of tabs |
1182 | 1240 | |
1183 | | -'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink': after creating the "permanent link" tab |
| 1241 | +'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink': after creating the |
| 1242 | +"permanent link" tab |
1184 | 1243 | $sktemplate: SkinTemplate object |
1185 | 1244 | $nav_urls: array of tabs |
1186 | 1245 | |
— | — | @@ -1188,7 +1247,8 @@ |
1189 | 1248 | [See http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/examples/Content_action.php |
1190 | 1249 | for an example] |
1191 | 1250 | |
1192 | | -'SkinTemplateOutputPageBeforeExec': Before SkinTemplate::outputPage() starts page output |
| 1251 | +'SkinTemplateOutputPageBeforeExec': Before SkinTemplate::outputPage() |
| 1252 | +starts page output |
1193 | 1253 | &$sktemplate: SkinTemplate object |
1194 | 1254 | &$tpl: Template engine object |
1195 | 1255 | |
— | — | @@ -1200,7 +1260,8 @@ |
1201 | 1261 | $out: Css to return |
1202 | 1262 | |
1203 | 1263 | 'SkinTemplateTabAction': Override SkinTemplate::tabAction(). |
1204 | | - You can either create your own array, or alter the parameters for the normal one. |
| 1264 | +You can either create your own array, or alter the parameters for |
| 1265 | +the normal one. |
1205 | 1266 | &$this: The SkinTemplate instance. |
1206 | 1267 | $title: Title instance for the page. |
1207 | 1268 | $message: Visible label of tab. |
— | — | @@ -1215,32 +1276,40 @@ |
1216 | 1277 | $sktemplate: SkinTemplate object |
1217 | 1278 | $content_actions: array of tabs |
1218 | 1279 | |
1219 | | -'SkinTemplateToolboxEnd': Called by SkinTemplate skins after toolbox links have been rendered (useful for adding more) |
| 1280 | +'SkinTemplateToolboxEnd': Called by SkinTemplate skins after toolbox links have |
| 1281 | +been rendered (useful for adding more) |
1220 | 1282 | $tools: array of tools |
1221 | 1283 | |
1222 | | -'SoftwareInfo': Called by Special:Version for returning information about the software |
1223 | | -$software: The array of software in format 'name' => 'version'. See SpecialVersion::softwareInformation() |
| 1284 | +'SoftwareInfo': Called by Special:Version for returning information about |
| 1285 | +the software |
| 1286 | +$software: The array of software in format 'name' => 'version'. |
| 1287 | + See SpecialVersion::softwareInformation() |
1224 | 1288 | |
1225 | 1289 | 'SpecialContributionsBeforeMainOutput': Before the form on Special:Contributions |
1226 | 1290 | $id: User identifier |
1227 | 1291 | |
1228 | | -'SpecialListusersDefaultQuery': called right before the end of UsersPager::getDefaultQuery() |
| 1292 | +'SpecialListusersDefaultQuery': called right before the end of |
| 1293 | +UsersPager::getDefaultQuery() |
1229 | 1294 | $pager: The UsersPager instance |
1230 | 1295 | $query: The query array to be returned |
1231 | 1296 | |
1232 | | -'SpecialListusersFormatRow': called right before the end of UsersPager::formatRow() |
| 1297 | +'SpecialListusersFormatRow': called right before the end of |
| 1298 | +UsersPager::formatRow() |
1233 | 1299 | $item: HTML to be returned. Will be wrapped in <li></li> after the hook finishes |
1234 | 1300 | $row: Database row object |
1235 | 1301 | |
1236 | | -'SpecialListusersHeader': called before closing the <fieldset> in UsersPager::getPageHeader() |
| 1302 | +'SpecialListusersHeader': called before closing the <fieldset> in |
| 1303 | +UsersPager::getPageHeader() |
1237 | 1304 | $pager: The UsersPager instance |
1238 | 1305 | $out: The header HTML |
1239 | 1306 | |
1240 | | -'SpecialListusersHeaderForm': called before adding the submit button in UsersPager::getPageHeader() |
| 1307 | +'SpecialListusersHeaderForm': called before adding the submit button in |
| 1308 | +UsersPager::getPageHeader() |
1241 | 1309 | $pager: The UsersPager instance |
1242 | 1310 | $out: The header HTML |
1243 | 1311 | |
1244 | | -'SpecialListusersQueryInfo': called right before the end of UsersPager::getQueryInfo() |
| 1312 | +'SpecialListusersQueryInfo': called right before the end of |
| 1313 | +UsersPager::getQueryInfo() |
1245 | 1314 | $pager: The UsersPager instance |
1246 | 1315 | $query: The query array to be returned |
1247 | 1316 | |
— | — | @@ -1249,31 +1318,38 @@ |
1250 | 1319 | $oldTitle: old title (object) |
1251 | 1320 | $newTitle: new title (object) |
1252 | 1321 | |
1253 | | -'SpecialPage_initList': called when setting up SpecialPage::$mList, use this hook to remove a core special page |
| 1322 | +'SpecialPage_initList': called when setting up SpecialPage::$mList, use this |
| 1323 | +hook to remove a core special page |
1254 | 1324 | $list: list (array) of core special pages |
1255 | 1325 | |
1256 | | -'SpecialRecentChangesPanel': called when building form options in SpecialRecentChanges |
| 1326 | +'SpecialRecentChangesPanel': called when building form options in |
| 1327 | +SpecialRecentChanges |
1257 | 1328 | &$extraOpts: array of added items, to which can be added |
1258 | 1329 | $opts: FormOptions for this request |
1259 | 1330 | |
1260 | | -'SpecialRecentChangesQuery': called when building sql query for SpecialRecentChanges |
| 1331 | +'SpecialRecentChangesQuery': called when building sql query for |
| 1332 | +SpecialRecentChanges |
1261 | 1333 | &$conds: array of WHERE conditionals for query |
1262 | 1334 | &$tables: array of tables to be queried |
1263 | 1335 | &$join_conds: join conditions for the tables |
1264 | 1336 | $opts: FormOptions for this request |
1265 | 1337 | |
1266 | | -'SpecialSearchNogomatch': called when user clicked the "Go" button but the target doesn't exist |
| 1338 | +'SpecialSearchNogomatch': called when user clicked the "Go" button but the |
| 1339 | +target doesn't exist |
1267 | 1340 | $title: title object generated from the text entred by the user |
1268 | 1341 | |
1269 | | -'SpecialSearchResults': called before search result display when there are matches |
| 1342 | +'SpecialSearchResults': called before search result display when there |
| 1343 | +are matches |
1270 | 1344 | $term: string of search term |
1271 | 1345 | &$titleMatches: empty or SearchResultSet object |
1272 | 1346 | &$textMatches: empty or SearchResultSet object |
1273 | 1347 | |
1274 | | -'SpecialSearchNoResults': called before search result display when there are no matches |
| 1348 | +'SpecialSearchNoResults': called before search result display when there are |
| 1349 | +no matches |
1275 | 1350 | $term: string of search term |
1276 | 1351 | |
1277 | | -'SpecialVersionExtensionTypes': called when generating the extensions credits, use this to change the tables headers |
| 1352 | +'SpecialVersionExtensionTypes': called when generating the extensions credits, |
| 1353 | +use this to change the tables headers |
1278 | 1354 | $extTypes: associative array of extensions types |
1279 | 1355 | |
1280 | 1356 | 'SpecialWatchlistQuery': called when building sql query for SpecialWatchlist |
— | — | @@ -1282,7 +1358,8 @@ |
1283 | 1359 | &$join_conds: join conditions for the tables |
1284 | 1360 | &$fields: array of query fields |
1285 | 1361 | |
1286 | | -'TitleArrayFromResult': called when creating an TitleArray object from a database result |
| 1362 | +'TitleArrayFromResult': called when creating an TitleArray object from a |
| 1363 | +database result |
1287 | 1364 | &$titleArray: set this to an object to override the default object returned |
1288 | 1365 | $res: database result used to create the object |
1289 | 1366 | |
— | — | @@ -1331,46 +1408,55 @@ |
1332 | 1409 | string &$error: output: HTML error to show if upload canceled by returning false |
1333 | 1410 | |
1334 | 1411 | 'UploadComplete': Upon completion of a file upload |
1335 | | -$uploadForm: Upload form object. File can be accessed by $uploadForm->mLocalFile. |
| 1412 | +$uploadForm: Upload form object. File can be accessed by |
| 1413 | + $uploadForm->mLocalFile. |
1336 | 1414 | |
1337 | | -'User::mailPasswordInternal': before creation and mailing of a user's new temporary password |
| 1415 | +'User::mailPasswordInternal': before creation and mailing of a user's new |
| 1416 | +temporary password |
1338 | 1417 | $user: the user who sent the message out |
1339 | 1418 | $ip: IP of the user who sent the message out |
1340 | 1419 | $u: the account whose new password will be set |
1341 | 1420 | |
1342 | | -'UserArrayFromResult': called when creating an UserArray object from a database result |
| 1421 | +'UserArrayFromResult': called when creating an UserArray object from a |
| 1422 | +database result |
1343 | 1423 | &$userArray: set this to an object to override the default object returned |
1344 | 1424 | $res: database result used to create the object |
1345 | 1425 | |
1346 | 1426 | 'userCan': To interrupt/advise the "user can do X to Y article" check. |
1347 | | - If you want to display an error message, try getUserPermissionsErrors. |
| 1427 | +If you want to display an error message, try getUserPermissionsErrors. |
1348 | 1428 | $title: Title object being checked against |
1349 | 1429 | $user : Current user object |
1350 | 1430 | $action: Action being checked |
1351 | 1431 | $result: Pointer to result returned if hook returns false. If null is returned, |
1352 | | - userCan checks are continued by internal code. |
| 1432 | + userCan checks are continued by internal code. |
1353 | 1433 | |
1354 | 1434 | 'UserCanSendEmail': To override User::canSendEmail() permission check |
1355 | 1435 | $user: User (object) whose permission is being checked |
1356 | 1436 | &$canSend: bool set on input, can override on output |
1357 | 1437 | |
1358 | 1438 | |
1359 | | -'UserClearNewTalkNotification': called when clearing the "You have new messages!" message, return false to not delete it |
| 1439 | +'UserClearNewTalkNotification': called when clearing the |
| 1440 | +"You have new messages!" message, return false to not delete it |
1360 | 1441 | $user: User (object) that'll clear the message |
1361 | 1442 | |
1362 | | -'UserComparePasswords': called when checking passwords, return false to override the default password checks |
| 1443 | +'UserComparePasswords': called when checking passwords, return false to |
| 1444 | +override the default password checks |
1363 | 1445 | &$hash: String of the password hash (from the database) |
1364 | 1446 | &$password: String of the plaintext password the user entered |
1365 | | -&$userId: Integer of the user's ID or Boolean false if the user ID was not supplied |
1366 | | -&$result: If the hook returns false, this Boolean value will be checked to determine if the password was valid |
| 1447 | +&$userId: Integer of the user's ID or Boolean false if the user ID was not |
| 1448 | + supplied |
| 1449 | +&$result: If the hook returns false, this Boolean value will be checked to |
| 1450 | + determine if the password was valid |
1367 | 1451 | |
1368 | 1452 | 'UserCreateForm': change to manipulate the login form |
1369 | 1453 | $template: SimpleTemplate instance for the form |
1370 | 1454 | |
1371 | | -'UserCryptPassword': called when hashing a password, return false to implement your own hashing method |
| 1455 | +'UserCryptPassword': called when hashing a password, return false to implement |
| 1456 | +your own hashing method |
1372 | 1457 | &$password: String of the plaintext password to encrypt |
1373 | 1458 | &$salt: String of the password salt or Boolean false if no salt is provided |
1374 | | -&$wgPasswordSalt: Boolean of whether the salt is used in the default hashing method |
| 1459 | +&$wgPasswordSalt: Boolean of whether the salt is used in the default |
| 1460 | + hashing method |
1375 | 1461 | &$hash: If the hook returns false, this String will be used as the hash |
1376 | 1462 | |
1377 | 1463 | 'UserEffectiveGroups': Called in User::getEffectiveGroups() |
— | — | @@ -1384,9 +1470,11 @@ |
1385 | 1471 | $user: User object |
1386 | 1472 | &$email: email, change this to override local email |
1387 | 1473 | |
1388 | | -'UserGetEmailAuthenticationTimestamp': called when getting the timestamp of email authentification |
| 1474 | +'UserGetEmailAuthenticationTimestamp': called when getting the timestamp of |
| 1475 | +email authentification |
1389 | 1476 | $user: User object |
1390 | | -&$timestamp: timestamp, change this to override local email authentification timestamp |
| 1477 | +&$timestamp: timestamp, change this to override local email authentification |
| 1478 | + timestamp |
1391 | 1479 | |
1392 | 1480 | 'UserGetImplicitGroups': Called in User::getImplicitGroups() |
1393 | 1481 | &$groups: List of implicit (automatically-assigned) groups |
— | — | @@ -1403,7 +1491,8 @@ |
1404 | 1492 | $ip: User's IP address |
1405 | 1493 | &$blocked: Whether the user is blocked, to be modified by the hook |
1406 | 1494 | |
1407 | | -'UserLoadAfterLoadFromSession': called to authenticate users on external/environmental means; occurs after session is loaded |
| 1495 | +'UserLoadAfterLoadFromSession': called to authenticate users on |
| 1496 | +external/environmental means; occurs after session is loaded |
1408 | 1497 | $user: user object being loaded |
1409 | 1498 | |
1410 | 1499 | 'UserLoadDefaults': called when loading a default user |
— | — | @@ -1414,11 +1503,14 @@ |
1415 | 1504 | $user: user object |
1416 | 1505 | &$s: database query object |
1417 | 1506 | |
1418 | | -'UserLoadFromSession': called to authenticate users on external/environmental means; occurs before session is loaded |
| 1507 | +'UserLoadFromSession': called to authenticate users on external/environmental |
| 1508 | +means; occurs before session is loaded |
1419 | 1509 | $user: user object being loaded |
1420 | | -&$result: set this to a boolean value to abort the normal authentification process |
| 1510 | +&$result: set this to a boolean value to abort the normal authentification |
| 1511 | + process |
1421 | 1512 | |
1422 | | -'UserLoadOptions': when user options/preferences are being loaded from the database. |
| 1513 | +'UserLoadOptions': when user options/preferences are being loaded from |
| 1514 | +the database. |
1423 | 1515 | $user: User object |
1424 | 1516 | &$options: Options, can be modified. |
1425 | 1517 | |
— | — | @@ -1442,7 +1534,8 @@ |
1443 | 1535 | $add : Array of strings corresponding to groups added |
1444 | 1536 | $remove: Array of strings corresponding to groups removed |
1445 | 1537 | |
1446 | | -'UserrightsChangeableGroups': allows modification of the groups a user may add or remove via Special:UserRights |
| 1538 | +'UserrightsChangeableGroups': allows modification of the groups a user |
| 1539 | +may add or remove via Special:UserRights |
1447 | 1540 | $userrights : UserrightsPage object |
1448 | 1541 | $user : User object of the current user |
1449 | 1542 | $addergroups : Array of groups that the user is in |
— | — | @@ -1454,7 +1547,8 @@ |
1455 | 1548 | 'remove-self' => array( removable groups from self ) |
1456 | 1549 | ) |
1457 | 1550 | |
1458 | | -'UserRetrieveNewTalks': called when retrieving "You have new messages!" message(s) |
| 1551 | +'UserRetrieveNewTalks': called when retrieving "You have new messages!" |
| 1552 | +message(s) |
1459 | 1553 | $user: user retrieving new talks messages |
1460 | 1554 | $talks: array of new talks page(s) |
1461 | 1555 | |
— | — | @@ -1474,14 +1568,18 @@ |
1475 | 1569 | $user: User object |
1476 | 1570 | &$email: new email, change this to override new email address |
1477 | 1571 | |
1478 | | -'UserSetEmailAuthenticationTimestamp': called when setting the timestamp of email authentification |
| 1572 | +'UserSetEmailAuthenticationTimestamp': called when setting the timestamp |
| 1573 | +of email authentification |
1479 | 1574 | $user: User object |
1480 | | -&$timestamp: new timestamp, change this to override local email authentification timestamp |
| 1575 | +&$timestamp: new timestamp, change this to override local email |
| 1576 | +authentification timestamp |
1481 | 1577 | |
1482 | | -'UserToggles': called when initialising User::$mToggles, use this to add new toggles |
| 1578 | +'UserToggles': called when initialising User::$mToggles, use this to add |
| 1579 | +new toggles |
1483 | 1580 | $toggles: array of toggles to add |
1484 | 1581 | |
1485 | | -'WantedPages::getSQL': called in WantedPagesPage::getSQL(), can be used to alter the SQL query which gets the list of wanted pages |
| 1582 | +'WantedPages::getSQL': called in WantedPagesPage::getSQL(), can be used to |
| 1583 | +alter the SQL query which gets the list of wanted pages |
1486 | 1584 | &$wantedPages: WantedPagesPage object |
1487 | 1585 | &$sql: raw SQL query used to get the list of wanted pages |
1488 | 1586 | |
— | — | @@ -1493,13 +1591,15 @@ |
1494 | 1592 | $user: user that watched |
1495 | 1593 | $article: article object watched |
1496 | 1594 | |
1497 | | -'WikiExporter::dumpStableQuery': Get the SELECT query for "stable" revisions dumps |
| 1595 | +'WikiExporter::dumpStableQuery': Get the SELECT query for "stable" revisions |
| 1596 | +dumps |
1498 | 1597 | One, and only one hook should set this, and return false. |
1499 | 1598 | &$tables: Database tables to use in the SELECT query |
1500 | 1599 | &$opts: Options to use for the query |
1501 | 1600 | &$join: Join conditions |
1502 | 1601 | |
1503 | | -'wgQueryPages': called when initialising $wgQueryPages, use this to add new query pages to be updated with maintenance/updateSpecialPages.php |
| 1602 | +'wgQueryPages': called when initialising $wgQueryPages, use this to add new |
| 1603 | +query pages to be updated with maintenance/updateSpecialPages.php |
1504 | 1604 | $query: $wgQueryPages itself |
1505 | 1605 | |
1506 | 1606 | More hooks might be available but undocumented, you can execute |