Commit graph

526 commits

Author SHA1 Message Date
Aaron Schulz
fcbdd58326 * In core:
** Added hooks for custom RC/newpages filters
** Added tables,fields,and join_conds to SpecialNewPagesConditions hook
** Removed superflous $nameSpace logic in watchlist code
** Removed some copy-paste code for RC/watchlist filters
** Updates hooks.txt
* In FlaggedRevs:
* Added "hide reviewed edits" filter to RC/newpages
* Combined two handlers into modifyChangesListQuery. Removed is_array() check - always true now.
* Fixed onBeforePageDisplay() so that CSS worked on sp:Watchlist
* @TODO: remove $wgUseRCPatrol stuff...this gets us closer.
2011-05-23 04:28:58 +00:00
Jack Phoenix
9a4d62c4f5 three new hooks in SpecialUndelete.php from Wikia codebase so that extensions, such as the Video extension, can use their custom PageArchive class 2011-05-16 13:30:32 +00:00
Alexandre Emsenhuber
65f68227ba insertNewArticle() no longer exists 2011-05-12 20:16:51 +00:00
Daniel Friesen
0770700368 Followup r87668, update hooks.txt 2011-05-09 02:55:17 +00:00
Alexandre Emsenhuber
0cd07c7ce7 Removed LogPageValidTypes, LogPageLogName, LogPageLogHeader and LogPageActionText hooks. They are deprecated since 1.6 or so. 2011-05-06 18:17:52 +00:00
Niklas Laxström
ce59727553 Allow extensions to customize the search forms. This required some cleanup and refactoring to special:search and search engine.
Should be fully backwards compatible. Lightly tested, but only with MySQL search backend.
Introduces concept of search profiles, which replace long list of namespaces in the url.
2011-04-22 16:13:58 +00:00
Brian Wolff
74f16767e7 Merge to trunk everything in img_metadata branch.
Hope I did this in an ok fashion. svn merge --re-integrate was giving me issues
so I just essentially over-wrote my working copy with the version at img_metadata.
2011-04-16 01:23:15 +00:00
Nimish Gautam
dd6bb7563c added explanation of the BeforeWelcomeCreation hook 2011-04-15 00:23:37 +00:00
Happy-melon
bc4a096805 Revert r86001: Brion says it's too scary :D will recommit in pieces 2011-04-13 23:36:27 +00:00
Happy-melon
6dc8136d12 New infrastructure for actions, as discussed on wikitech-l. Fairly huge commit.
* Actions come in two flavours: the show-a-form-then-do-something-with-the-result (delete, protect, edit, etc) and the just-do-something (watch, rollback, patrol, etc).  Create abstract base classes Action and FormlessAction to support these two cases.  HTMLForm is an integral part of the form-based structure.
* Look mum, no globals!  :D  Fully context-based.
* Implement watch/unwatch, credits and delete actions in the new system as proof-of-concept.  This also gives the delete frontend a much-needed overhaul.
* Stub out the newly-deprecated functions from Article.php.  This already reduces its linecount by about 15%, and there are plenty more actions still to do.
* Centralising actions like this is going to render a lot of hooks type-incompatible.  There's simply nowhere you can put the ArticleConfirmDelete hook, for instance, where it can be passed an OutputPage as the second parameter.  On the other hand, we can implement new hooks like ActionModifyFormFields and ActionBeforeFormDisplay, which can do much prettier stuff to the forms, like adding extra fields the 'right' way.  Update LiquidThreads to use these new hooks where appropriate.
2011-04-13 23:04:07 +00:00
Brion Vibber
1aa25ba469 * (bug 24755) AuthPlugin auto-creation of local accounts can now be aborted by
other extensions by handling the 'AbortAutoAccount' hook, similar to the
  'AbortNewAccount' triggered by explicit account creations. (They are separate
  to avoid loops and confusion; auth plugins like CentralAuth need to handle
  AbortNewAccount separately.
2011-04-05 01:18:40 +00:00
Aaron Schulz
3a49b629e6 Follow-up changes to r84610:
* Cleaned up mImageTimeKeys format
* ImageMap: Removed redundant addImage call (makeImage handes this)
* ParserFunctions: added time/sha1 to addImage() call
* Removed excess ampersands in hooks
* Added some function doc comments
2011-04-04 01:22:08 +00:00
Daniel Friesen
ed776e618b Followup r85229; Drop this unnecessary reference on the user from ChangesList::newFromUser. 2011-04-03 11:33:10 +00:00
Sam Reed
e82ca13996 Don't pass $this by reference 2011-03-24 11:11:15 +00:00
Aaron Schulz
67955599f8 * Replaced crufty BeforeParserMakeImageLinkObj/BeforeGalleryFindFile hooks with BeforeParserFetchFileAndTile hook
* Updated the only calling extension (these was basically single-purpose hooks)
2011-03-24 01:44:48 +00:00
Aaron Schulz
d5460bce86 * Made BeforeParserMakeImageLinkObj/BeforeGalleryFindFile let hooks set sha1 parameter
* Made FlaggedRevs specify files by sha1,timestamp to handle renames with no redirects. This makes them handled as well as templates in this regard. (bug 27836) 
* Moved BeforeGalleryFindFile hook to proper place (don't trigger for non-NS_FILE titles)
* Removed unused mRevisionId field from ImageGallery
* Removed old hotfix from makeMediaLinkObj(); all the current callers would crash beforehand if the title was null anyway
* Updated hook docs (some prior params were missing)
* Broke some long lines and cleaned up some whitespace
* TODO: track file info in core rather than fr_fileSHA1Keys and ugly, duplicated, queries. This should be easy to do now.
2011-03-23 03:13:37 +00:00
Roan Kattouw
743026d69c (bug 26805) Introduce ResourceLoaderGetStartupModules hook to allow extensions to add modules to the startup set (normally this is jQuery and mediawiki). Applied patch by Michael Dale, with minor style tweaks 2011-03-20 17:15:51 +00:00
Sam Reed
d8279d2c4a * (bug 16288) API: consider making closure status of wikis more clear with meta=siteinfo
Added bug to RELEASE-NOTES, this adds the hook and usage into SiteMatrix


Have I got my & all right? I can never remember
2011-03-20 13:41:41 +00:00
Sam Reed
1a951ec9cd Addition of 'APIQuerySiteInfoGeneralInfo' hook for usage in bug 16288 "API: consider making closure status of wikis more clear with meta=siteinfo" 2011-03-20 13:31:22 +00:00
Bryan Tong Minh
ef3c0a92b4 Added hook BitmapHandlerTransform to allow extension to transform a file without overriding the entire handler. 2011-03-18 22:28:19 +00:00
Mark A. Hershberger
21699d49c5 Follow up r84134 document reference passing. 2011-03-17 19:22:10 +00:00
Platonides
467ae14ca2 Add hook InterwikiLoadPrefix 2011-03-17 15:51:19 +00:00
Mark A. Hershberger
2828702889 Fix Bug #28082, Add Hooks to User::addGroup and User::removeGroup
I propose to add two new hooks, one should be called when adding a
    group to a user, one when a group is removed. This allows
    MediaWiki for example to add/remove groups from a remote
    authentication/authorization service.

Adapted provided patch.
2011-03-16 23:13:38 +00:00
Alexandre Emsenhuber
d9c46a0939 * Added UserGetLanguageObject hook to change the language used in $wgLang 2011-03-06 21:05:18 +00:00
Jack D. Pond
02ef2dc762 Documentation updates for r83371 2011-03-06 06:07:14 +00:00
Daniel Friesen
c525af5eee Followup r83141. Forgot to commit the hooks.txt update. 2011-03-03 11:00:08 +00:00
Alexandre Emsenhuber
b2a0cc74d5 Moved wfGetSiteNotice(), wfGetNamespaceNotice() and wfGetCachedNotice() to Skin call to allow passing the Skin object to the SiteNoticeBefore and SiteNoticeAfter hooks.
I didn't left compatibility functions since there's no other call to these functions in core or extensions.
2011-02-12 21:24:05 +00:00
Alexandre Emsenhuber
859bd8e70c * Fix hook name
* Update paths in findhooks script
2011-02-12 17:15:24 +00:00
Robert Leverington
2a30aa1d25 Add new hook ArticlePrepareTextForEdit, called when preparing text to be saved.
Add new parser option "PreSaveTransform" that allows the pre-save transformation to be selectively disabled.
2011-01-16 21:12:26 +00:00
Alexandre Emsenhuber
10c8ebb2e7 Added ArticleViewFooter hook to allow extensions adding additional items to the footer of normal views 2011-01-14 21:54:29 +00:00
Daniel Friesen
e604e2186f Fix documentation for the SkinTemplateToolboxEnd hook which has a $sk (QuickTemplate) argument rather than the $tools array it says it has. 2011-01-13 22:06:48 +00:00
Roan Kattouw
7de66bd84f Add a hook for registering variables in ResourceLoaderStartUpModule::getConfig() to complement MakeGlobalVariablesScript 2011-01-09 11:44:52 +00:00
Daniel Friesen
c510db2665 Merging Vector's navigation_urls and SkinTemplate's content_actions code into content_navigation. content_actions is now built by folding content_navigation and cleaning it up a bit.
content_actions hooks no longer work and have been dropped from the code, the hooks that affected vector before now affect all skins.
A few logic changes were made to make for a clean merge:
- vector was using vector-???-??? messages while SkinTemplate was using '???' messages. So as a side effect of merging that together all skins now support messages like '$skinname-view-history' which will fallback to the standard message if not defined.
- For MediaWiki: pages where the page does not exist but the message does in the i18n system SkinTemplate displayed "Edit" while Vector displayed "Create"; All skins now display "Edit".
- For users without undelete permissions SkinTemplate displayed an "Undelete" tab if the user had deletedhistory and deletedtext permissions. Vector would only display the tab for users with both deletedhistory and undelete permissions; The new behavior in all skins is to always display a tab if you have deletedhistory (since Special:Undelete will always have something to display) but display a "View ... deleted" instead of "Undelete" message if you do not have undelete permissions.
- Skins no longer need to hardcode tests for the &action= to decide if they should ignore the accesskey on some tabs, tabs which should not have an accesskey in the current page now have a "tooltiponly" key set to true.
2010-12-31 23:30:00 +00:00
Niklas Laxström
15faf878e1 New method for making it easier for developers to get localised language names.
For now the core itself doesn't provide those, but extension can use the hook
to provide them. Callers should not except full coverage in every language.
2010-12-31 18:18:57 +00:00
Daniel Friesen
9893840edc Add SkinTemplateNavigation::SpecialPage and SkinTemplateNavigation::Universal hooks to match the content_actions based hooks that vector based hooks are missing. 2010-12-31 17:48:07 +00:00
Roan Kattouw
56b5aa18ed Merge querypage-work2 branch from trunk. The most relevant changes are:
* QueryPage now uses array-based query building instead of raw SQL
* Converted all QueryPage-based special pages that were using old-style wfSpecialFoo functions to new-style SpecialPage subclasses; this is possible because QueryPage is changed to extend SpecialPage
* Backward compatibility for extensions is partly preserved: getSQL() is fallen back on for QueryPage subclasses that don't implement getQueryInfo(), but getOrder() will be ignored (implement getOrderFields() instead). This also means that dual compatibility (1.18 compat and b/c with pre-1.18) is trivial

Extension changes will be merged after this commit.

These changes make it easier to write an API module for QueryPages (bug 14869); this wasn't done in the branch but will be done in trunk soon.
2010-12-22 14:16:25 +00:00
Bryan Tong Minh
f29e192da9 Follow-up r78297: allow the hook to break the execution; added &$term: could be useful for modifying the edit link 2010-12-13 20:00:43 +00:00
Sam Reed
8a9f0e54f5 Followup r65114 (per CR cabal), remove SpecialSearchGomatch, replace with SpecialSearchGo in SearchEngine::getNearMatch 2010-12-12 18:57:10 +00:00
Sam Reed
22d873f85d Fix typo in hooks.txt 2010-12-12 18:17:33 +00:00
Aaron Schulz
0bb1fb5cbd * Removed redundant revdelete msg above content
* Show bottom patrol link even if hook replaces preview content
* Hook doc tweaks
* Assorted minor cleanups
2010-12-11 05:32:48 +00:00
Daniel Friesen
55f0903c0b More skin system improvements; Create a new BaseTemplate class extended from QuickTemplate, this class will house helper methods that interact with QuickTemplate data set by SkinTemplate to help cut down on boilerplate for common uses of that data.
For the first helper in this class add a helper to use in generating a toolbox. Include a list item and link generating method that can be used to generate most of our sidebar links with minimal code.
Eventually this toolbox code will be used in code abstracting common sidebar generating code away into common helpers. For now make MonoBook and Vector and the skins based off of them use this method of generating toolboxes and sidebar links.
2010-12-06 17:47:53 +00:00
Raimond Spekking
ac7fbc3bed Follow-up r76434, r76570,r76668: Pass skin object per CR 2010-11-14 19:45:55 +00:00
Raimond Spekking
49a678e29e Follow-up r76434, r76570: Add skinname per CR 2010-11-14 19:28:32 +00:00
Raimond Spekking
a1cd029838 Follow-up r76434: Run hook for Modern skin too per suggestion of Jack Phoenix 2010-11-12 12:16:48 +00:00
Raimond Spekking
47bf2bd024 * (bug 22463) Add hook 'SkinGetPoweredBy' to make 'powered by' icon customizable
Patch by Yaron
2010-11-10 08:18:21 +00:00
Bryan Tong Minh
497dba23b2 Undeprecate UploadForm:BeforeProcessing. Instead only deprecate the code path that would return the user a blank form with no error message. 2010-11-08 21:07:10 +00:00
Bryan Tong Minh
e9fd126b9a (bug 25648) API discovery information has been added as RSD link in page <head> and by providing an API module action=rsd. Added hook ApiRsdServiceApis for extensions to add their own service to the services list.
Patch by Brion Vibber and Bryan Tong Minh.
2010-10-28 19:20:21 +00:00
Platonides
902bab26cd Address my own CR in r75332. 2010-10-26 22:34:18 +00:00
Platonides
76167d9f27 Follow up r74725. Also add $lang parameter to EditSectionLink.
Document the changes in hooks.txt
2010-10-14 22:13:43 +00:00
Aaron Schulz
d6086a51bf Removed single-purpose HTMLCacheUpdate::doUpdate hook, now unused 2010-10-07 18:12:27 +00:00
Daniel Friesen
001df82cad Clean up names of my bodyAttr hooks on Brion's recomendation. 2010-10-04 05:38:48 +00:00
Daniel Friesen
1839a15957 Add to OutputPage::headElement a OutputPageBodyAttrs hook for extensions and a bodyAttrs callback to Skin so that Extensions and Skins are able to add attributes and classes to the <body> tag without neeing to do insane things. 2010-10-03 14:12:41 +00:00
Trevor Parscal
8f25c77bc2 Updated hooks documentation as per changes in r73971. 2010-09-29 19:06:32 +00:00
Alexandre Emsenhuber
aac9dd2e56 * (bug 25292) SkinSubPageSubtitle hook now passes the Skin object as second parameter 2010-09-26 16:37:00 +00:00
Trevor Parscal
2d8b027219 * Fixed bug #25281 by adding special treatment for modules in the "private" group
* Added $wgResourceLoaderInlinePrivateModules to allow private modules to be either embedded in the HTML output or accessed through ResourceLoader (which will bypass squid cache and check the user paramter against $wgUser)
* Moved more generated javascript functionality to ResourceLoader
* Fixed comment typo made in r73673
* Added documentation for ResoruceLoaderRegisterModules hook
2010-09-24 22:10:25 +00:00
Platonides
32b3fa74f0 Remove $wgIP global, but add a hook instead.
This allows extensions to "make mediawiki ignore ips completely", as requested earlier today in #mediawiki
2010-09-11 13:45:51 +00:00
Platonides
a4e6acb288 Move FileUpload hook out of the transaction.
FileSearch relied on the article not existing to detect if it's a but it was broken: always detected it as a reupload.
Add a new parameter to the hook to detect reuploads.
Fixed other issues on FileSearch extension.
2010-08-31 13:16:42 +00:00
Derk-Jan Hartman
ed978a1f4f Followup r71942. Documentation fix, the mime passed is a string, not an object. 2010-08-31 11:01:00 +00:00
Chad Horohoe
49a4b3f3ec Tweak SpecialRecentChangesQuery hook. Need to be able to modify selected fields on RCL (part 1 for bug 23916) 2010-08-30 19:07:09 +00:00
Daniel Kinzler
a1130bb205 interoduced new hoop in Uploadbase::verifyFile, as per comments to r71789 2010-08-30 12:10:02 +00:00
Niklas Laxström
82a9afdcad Someone made a typo in r71576 2010-08-24 20:12:15 +00:00
Niklas Laxström
ea8428af0f Added a hook into MWNamespace::getCanonicalNamespaces() to provide safe way to
define new namespaces in extensions.

Without the hook the list could be initialised too early and some namespaces
would be left undefined. Was causing problems at translatewiki.net.
2010-08-24 19:58:55 +00:00
Sam Reed
b31d0cb758 Update SkinAfterContent hook to pass the current skin too
So we don't need nasty $wgTitle globals
2010-08-24 01:31:28 +00:00
Chad Horohoe
f08c6b1df9 Initial refactoring for Postgres; DatabaseUpdater subclass is now passed to LoadExtensionSchemaUpdates 2010-08-15 18:55:08 +00:00
Andrew Garrett
aa75a3061b Remove User::getToggles() code, dormant since preferences rewrite over a year ago 2010-08-14 08:46:36 +00:00
Tim Starling
cc9f81ed94 * Revert r66878, completely misses the point of factoring out doEdit() in the first place, which was to separate the UI layer from the backend layer, to support callers with alternate UIs or no UIs.
* Reverted followup 66880.
* Reverted dependent changes r67752, r68606, r68608, r68609. The point of deprecating insertArticle()/updateArticle() was to allow the UI code to be moved to EditPage. If you move that exact EditPage-specific functionality back into Article::doEdit(), and call it from all sorts of non-EditPage places, then we'll hit the same sorts of bugs we had before r14834.
2010-08-09 08:33:42 +00:00
Chad Horohoe
dbb4f71497 (bug 22514) SpecialRecentChangesQuery should also work on Special:RecentChangesLinked. Commented since inception, no reason not to call it here as well. Need this for FlaggedRevs stuff later anyway ;-) 2010-08-06 13:07:46 +00:00
Raimond Spekking
0f55112939 Show the copyright message in user preference language for Wikimedia wikis, important especially for multi language projects like Commons.
Stick to content language for standard MediaWiki installations for the case that [[MediaWiki:Copyright]] is customized.
It is very unlikely that a third party installation translate its customization in 204 languages like we have done it at Translatewiki for WikimediaMessages
2010-07-21 16:01:10 +00:00
Alexandre Emsenhuber
9d37f29a9a * document new hooks
* fixed quotes
2010-07-03 14:33:09 +00:00
Max Semenik
7f12b94750 Added a new hook that allows extensions to add their own tests to the core test suite 2010-06-28 18:17:47 +00:00
Matěj Grabovský
beb7b8fe3b (bug 18891) Deprecated Article::insertNewArticle still used in core 2010-06-26 13:25:08 +00:00
Platonides
3566d5cb13 Deprecate MonoBookTemplateToolboxEnd hook.
SkinTemplateToolboxEnd available since 1.13 should be used instead.
Usage among extensions fixed.
2010-06-08 14:52:15 +00:00
Aaron Schulz
7a0769d619 (bug 23676) Spelling correction: ArticleRevisionVisiblitySet -> ArticleRevisionVisibilitySet 2010-05-27 15:13:30 +00:00
Mark A. Hershberger
5148fe8cd7 re r66675 fix typo 2010-05-21 00:57:46 +00:00
Mark A. Hershberger
4f01b9f10b * Add formatting for user messages.
** First, try a hook for the user messages
** Next, check for a template
** Otherwise, do something sane.
2010-05-20 18:47:13 +00:00
Mark A. Hershberger
0a4586c223 * Since it makes sense (to me :) to make the arguments for the two UserMessage hooks more uniform, do it.
* Document these hooks in doc/hooks.txt
2010-05-20 02:12:04 +00:00
Alexandre Emsenhuber
7a14da0df5 * (bug 23429) Added new hook WatchlistEditorBuildRemoveLine
* one indentation fix in WatchlistEditor.php
2010-05-08 13:23:11 +00:00
Sam Reed
bc8da89b18 Fix hooks.txt to match code, minor followup to r65506 2010-04-24 11:12:07 +00:00
Sam Reed
7c0aecb42b * (bug 23276) Add hook to Special:NewPages to modify query
Patch by Dan Barrett
2010-04-24 11:05:15 +00:00
Sam Reed
505f4ce94a Fix hooks.txt SpecialSearchNogomatch $title to &$title
* (bug 23206) Add Special::Search hook for detecting successful "Go"

Not implemented completely as per patch, $term removed, seems a bit useless/redundant (and doesn't exist for Nomatch)
2010-04-16 10:19:50 +00:00
Alexandre Emsenhuber
1cf4890aba Documented hooks added in r64903 2010-04-13 17:33:22 +00:00
Alexandre Emsenhuber
da5cd88a3e fix typo 2010-03-09 20:40:00 +00:00
Platonides
c3964fe4d5 Remove unused VectorTemplateToolboxEnd hook.
Per-skin hooks are evil. Extensions should use SkinTemplateToolboxEnd.
2010-03-03 22:15:40 +00:00
Alexandre Emsenhuber
d4c2f2796b (bug 8790) Metadata edition ($wgUseMetadataEdit) has been moved to a separate extension "MetadataEdit":
* Removed $wgUseMetadataEdit and related code in EditPage from and created a new extension "MetadataEdit"
* Added 3 new hooks EditFormInitialText, EditFormGetDiffText and EditFormGetPreviewText
* Moved 'metadata_help' message to the extension
2010-02-20 17:05:56 +00:00
Tim Starling
8557f29f5e Revert r58635 and related, unnecessary and incorrect use of the hook mechanism 2010-02-09 06:12:15 +00:00
Alexandre Emsenhuber
638701000c * (bug 22315) SpecialRecentChangesQuery hook now pass $query_options and checks the return value 2010-01-29 17:27:30 +00:00
Platonides
525cc3f606 Revert r61572. These titles are output parameters. A reference is the only way they can work correctly
(eg. think on a hook that always does 'return $titleResult = Title::newFromText("Foo");').
2010-01-27 14:39:03 +00:00
Platonides
86814a51cc Apply r61570 (Follow-up r61150: Do not pass objects as references in new hooks).
This time in the correct place.
2010-01-27 11:52:35 +00:00
Aaron Schulz
244dd9b4de * EditPageNoSuchSection hook
* Added message to bad section error for reviewed pages
* A few tiny cleanups
2010-01-18 00:58:22 +00:00
Platonides
64da9d2eb0 Bug 19996 (backend hooks) Finally adding the four hooks. 2010-01-16 23:27:55 +00:00
Aaron Schulz
cb5166a9a6 Follow up r60759: forgot to commit hook change 2010-01-07 01:21:02 +00:00
Raimond Spekking
a94fcedffa Rename hook per Tim's CR on r58192 2009-12-30 08:51:25 +00:00
Bryan Tong Minh
e2374f6b64 Restore hooks UploadForm:initial and UploadForm:BeforeProcessing removed in r57868. 2009-12-21 19:57:43 +00:00
Alexandre Emsenhuber
b2049915da * removed $this in parameters list since it's a reserved word
* consistency in parameter descriptions
2009-11-17 20:52:04 +00:00
Daniel Kinzler
ee0cbd5dca allow UploadVerification hooks to return error details 2009-11-13 16:08:17 +00:00
Bryan Tong Minh
6fec9d682b Follow-up to r58633 and r58628 (lqt): Rename Title::getProtectionTypes to Title::getRestrictionTypes and fix the hook name. 2009-11-09 12:05:30 +00:00
Bryan Tong Minh
9d64bbc404 * Add globalusage link to the file toc
* Add thumb of the file to Special:GlobalUsage
2009-11-08 11:09:20 +00:00
Alexandre Emsenhuber
27d800b4c4 Sync docs/hooks.txt:
* removed AbortNewAccountAuto since it was reverted
* added ArticleConfirmDelete and ImgAuthBeforeStream
2009-11-07 10:33:10 +00:00
Bryan Tong Minh
d3fe87c552 Add hook ImagePageAfterImageLinks for showing extra information on the image page after the imagelinks 2009-11-07 09:31:16 +00:00
Ariel Glenn
f873fbad9e document CacheHeadersAfterSet hook 2009-11-06 16:49:41 +00:00
Andrew Garrett
f6f5e90888 Enabling changes for r56828: some refactoring and code cleanup of the protection interface, including a new hook, generalisation to more restriction types than edit/move, and some other related changes. 2009-11-06 10:27:44 +00:00
Raimond Spekking
48fe5241a5 New hook getOtherBlockLogLink, called in Special:IPBlockList to show links to block logs of other blocking extensions, i.e. GlobalBlocking 2009-10-27 14:08:02 +00:00
Bryan Tong Minh
c824e30197 * Updated upload hooks documentation
* Allow users to submit a modified file description without ignoring warnings
2009-10-23 20:05:31 +00:00
Fenzik Joseph
a9357faf94 * function isValidPassword modified to return boolean(true/false)
* Added function getPasswordValidity return error message on failure for the given unvalidated password input.
* Replaced isValidPassword() fn call to getPasswordValidity() in SpecialUserlogin.php
2009-10-19 03:01:11 +00:00
Andrew Garrett
c4867954fd Missing docs/hooks update for r57459 2009-10-07 14:30:12 +00:00
Brion Vibber
76e4820e02 Cleanup r57359 -- removing PHP4-isms (references not needed to pass objects unless you're going to replace them with different objects as outparams) 2009-10-06 22:14:40 +00:00
Jack Phoenix
fb95ba0b14 redoing r38040: two new hooks for email confirmation/invalidation, both are in User class now so they should work even if email is confirmed through password reset (etc.) 2009-10-04 16:26:43 +00:00
Aaron Schulz
205d3bf0ca Tweak r57300: swap hook listing order :) 2009-10-02 18:47:38 +00:00
Aaron Schulz
0d833fe671 * Added $wgFlaggedRevsProtectLevels to allow for site defined review "protection" levels. Disables stabilization and a small fieldset to the protection form with the options.
* Added three ProtectionForm hooks for the above
* Removed PHP4-ism from getPageVisibilitySettings()
2009-10-02 18:46:19 +00:00
Brion Vibber
0d1d984313 Revert broken rewrite of login system; totally broken.
* Login doesn't attach to session properly, so can't stay logged in!
* Password field shown in plaintext!

If it just DOESN'T WORK please keep it on a work branch, don't put it in trunk!

Reverted:
r56682
r56683
r56684
r56686
r56688
r56696
r56699
r56702
r56703
r56704
r56782
r56896
2009-09-26 00:49:32 +00:00
Happy-melon
3e957cc137 Add new hook, AbortNewAccountAuto, to abort account creations from AuthPlugin- or ExtUser-driven requests. 2009-09-24 12:50:12 +00:00
Happy-melon
d3f901b029 Merge in Login rewrite, second time lucky. 2009-09-20 20:28:27 +00:00
Alex Z
71a97237b5 Replace the user rename log display for non-existent userpages with a hook (followup to r56251).
Update for Renameuser extension to follow.

Also make docs for LogEventsList::showLogExtract() actually useful
2009-09-14 18:10:13 +00:00
Brion Vibber
841014ad91 Revert broken rewrite of login forms:
r55990 "* Totally refactor includes/specials/SpecialUserlogin.php:"
r55991 "Followup to r55990 - Remove debugging hack :("
r55994 "Followup to r55990 - rename method to avoid PHP Strict warnings"
r55997 "Follow-up to r55990, per comments:"

Continued reports of breakage with the new version...
Non-vital changes of this magnitude should probably be worked up on a branch to ensure everything's consistent before pushing them to trunk.
2009-09-08 18:40:05 +00:00
Andrew Garrett
1ec4f9dbaa Add "Discussions" option to search when LiquidThreads is active. Includes some fixes to SpecialSearch.php, to allow this sort of change 2009-09-08 11:50:31 +00:00
Roan Kattouw
a369bbd7d9 Update hooks.txt for r55682 2009-09-07 19:29:55 +00:00
Happy-melon
fca012212f * Totally refactor includes/specials/SpecialUserlogin.php:
** Split backend stuff out into includes/Login.php
** Split account creation and login stuff up, into includes/specials/CreateAccount.php and includes/specials/Userlogin.php.
* Reimplement the special pages as subclasses of SpecialPage
* Use HTMLForm to generate the input forms
** Deprecate and delete includes/templates/Userlogin.php, which is horrible and old :D

This changes the syntax of the UserLoginForm and UserCreateForm hooks, and AuthPlugin::modifyUITemplate; they now receive the SpecialPage subclass rather than the template to work with. Update everything I could find in SVN to accommodate this.
2009-09-07 19:00:49 +00:00
Brion Vibber
aa1740d88d Cleaning up some old PHP 4 object-reference usage in some edit filtering hooks.
There was a mix of uses of the reference and non-uses of the reference. :)
Reverts r53714 and fixes it from the other end by cleaning up the uses to not expect references.
2009-08-21 21:51:29 +00:00
Alex Z
195157b2c2 Re-implement r54638 in a higher-level way. Allows extensions to modify selection criteria for Special:Random or subsititute their own result. 2009-08-17 15:23:51 +00:00
Andrew Garrett
9a29dae0df Customise display of thread search result titles.
* Show the subject, not the title.
* Link to the post in context, not by itself.
2009-08-14 16:06:11 +00:00
Siebrand Mazeland
bdcaf4f7bf Update doc for deprecated 'MagicWordMagicWords': refer to $magicWords instead of LanguageGetMagic hook. 2009-08-14 11:48:40 +00:00
Brion Vibber
86b022c2bd Revert r54638 "Deprecate the $wgExtraRandompageSQL config variable by adding a hook, SpecialRandomBeforeSQL"
If we're going to make a generalizable plug-in point for extensions to supply their own randomization, we shouldn't be exposing it at the point of low-level database operations. The extension should instead be given the chance to pick an item any way it pleases and return a result or set of results to choose from.
2009-08-10 20:44:31 +00:00
Alex Z
1166f4b410 Deprecate the $wgExtraRandompageSQL config variable by adding a hook, SpecialRandomBeforeSQL
This allows extensions more flexibility to modify the query, 
or replace it entirely by setting their own query and returning false
$wgExtraRandompageSQL still retained for back-compat
2009-08-08 19:09:16 +00:00
Jan Luca Naumann
a9f717e8ed (r54511) Replace global array with hook 2009-08-06 13:40:13 +00:00
Chad Horohoe
90a940cb6b (bug 15209) New hook right after initialization 2009-08-03 22:31:52 +00:00
Andrew Garrett
6e5dd5459a Incremental enabling changes to allow searching of LiquidThreads by page and by thread:
* Add three new hooks, XmlDumpWriterOpenPage, ModifyExportQuery and XmlDumpWriterWriteRevision, to WikiExporter class.
* Hook two of these events to add a DiscussionThreading section to XML dumps, containing the parent, ancestor and discussion page to which a post belongs, if it is indeed a LiquidThreads post (as determined by joining on the thread table).
* Deprecate old calling style for Thread constructor, the $children parameter has been unused for yonks.
2009-07-27 17:57:51 +00:00
Alexandre Emsenhuber
34342ce7c2 * update UploadComplete hook, the object is now a subclass of UploadBase
* whitespaces fixes
2009-07-21 11:48:52 +00:00
Alex Z
25370b6d0e (bug 19564) Update docs/hooks.txt 2009-07-19 20:03:13 +00:00
Andrew Garrett
e92ce78b5c LiquidThreads updates:
* Overhaul deletion system. Totally remove deletion special page, deletion will now be handled through the standard MediaWiki deletion system. When a thread's "root" is deleted, the thread itself is marked as deleted. When the page is re-undeleted, the thread will be marked as restored.
* Move some class files from Lqt* to simply *.
* Remove HistoryIterator class, pointless.
* Miscellaneous code quality as found.

Includes core changes to pass comment along with ArticleRevisionUndeleted hook.
2009-07-16 15:20:13 +00:00
ThomasV
ac0bb2fec8 documenting EditPage::importFormData 2009-07-08 18:47:46 +00:00
Roan Kattouw
cf0a94df6d Fix up hook docs for SkinTemplateNavigation 2009-07-08 17:59:08 +00:00
Roan Kattouw
438a3d3bbb Document EditPageBeforeEditToolbar hook 2009-07-07 16:45:12 +00:00
Andrew Garrett
23a9f934a9 remove conflict markers 2009-07-07 14:32:52 +00:00
Andrew Garrett
717af5aaea Make warnings for special page alias errors useful 2009-07-07 14:27:58 +00:00
Trevor Parscal
b81342aa88 Added documentation for VectorTemplateToolboxEnd 2009-07-06 23:35:01 +00:00
Niklas Laxström
f3ae962093 Encoding issues are not this unseen of... 2009-07-06 22:24:37 +00:00
Trevor Parscal
0d0a41ddcf Fixed bugs in the data structure of the result of buildNavigationUrls including internationalized messages as keys (#19304), lack of documentation for the SkinTemplateNavigation hook (#19522) and an issue with an XML ID being ca-main_talk rather than ca-talk mentioned in #19471 2009-07-06 21:22:40 +00:00
Tim Starling
23cfebd3d2 * Introduced a new system for localisation caching. The system is based around fast fetches of individual messages, minimising memory overhead and startup time in the typical case. It handles both core messages (formerly in Language.php) and extension messages (formerly in MessageCache.php). Profiling indicates a significant win for average throughput.
* The serialized message cache, which would have been redundant, has been removed. Similar performance characteristics can be achieved with $wgLocalisationCacheConf['manualRecache'] = true;
* Added a maintenance script rebuildLocalisationCache.php for offline rebuilding of the localisation cache.
* Extension i18n files can now contain any of the variables which can be set in Messages*.php. It is possible, and recommended, to use this feature instead of the hooks for special page aliases and magic words. 
* $wgExtensionAliasesFiles, LanguageGetMagic and LanguageGetSpecialPageAliases are retained for backwards compatibility. $wgMessageCache->addMessages() and related functions have been removed. wfLoadExtensionMessages() is a no-op and can continue to be called for b/c. 
* Introduced $wgCacheDirectory as a default location for the various local caches that have accumulated. Suggested $IP/cache as a good place for it in the default LocalSettings.php and created this directory with a deny-all .htaccess.
* Patched Exception.php to avoid using the message cache when an exception is thrown from within LocalisationCache, since this tends to fail horribly.
* Removed Language::getLocalisationArray(), Language::loadLocalisation(), Language::load()
* Fixed FileDependency::__sleep()
* In Cdb.php, fixed newlines in debug messages

In MessageCache::get(): 
* Replaced calls to $wgContLang capitalisation functions with plain PHP functions, reducing the typical case from 99us to 93us. Message cache keys are already documented as being restricted to ASCII.
* Implemented a more efficient way to filter out bogus language codes, reducing the "foo/en" case from 430us to 101us
* Optimised wfRunHooks() in the typical do-nothing case, from ~30us to ~3us. This reduced MessageCache::get() typical case time from 93us to 38us.
* Removed hook MessageNotInMwNs to save an extra 3us per cache hit. Reimplemented the only user (LocalisationUpdate) using the new hook LocalisationCacheRecache.
2009-06-28 07:11:43 +00:00
Chad Horohoe
8f11162800 (bug 19157) createAndPromote error on bad password
* Tweak User::isValidPassword() and hook. Return a STRING msg key on failure, not false. Updated all callers to handle this
* Split too-short/match username errors for clarity
* Update docs, messages.
* Merge fix for bug from maintenance-work branch
2009-06-27 16:53:27 +00:00
Brion Vibber
644cccdf39 Prepping for site default overrides of copyright/TOS statements for Wikimedia
sites with updated CC-BY-SA license... Messages now available in 
WikimediaMessages extension for localization:
* wikimedia-copyright - page footer
* wikimedia-copyrightwarning - edit page, above summary/save button
* wikimedia-editpage-tos-summary - edit page, below summary/save button & above edittools

Initial English defaults are taken from
http://meta.wikimedia.org/wiki/Licensing_update/Implementation

Ariel's search for other copyright-related messages looks fairly clean,
so we should be good here for now as $wgRightsText/$wgRightsUrl are
already updated.

Messages are overridden using new hooks, which can also be used to switch the
messages based on title or namespace -- this may be desirable for sites such
as mediawiki.org which keep some namespaces PD etc.

Use of the overridden messages by WikimediaMessages is switched in when
$wgRightsUrl is set to 'http://creativecommons.org/licenses/by-sa/3.0/'
2009-06-24 16:49:28 +00:00
Ryan Schmidt
2da101ba2c * Remove the two hooks introduced in r52082
* Remove the unused UserrightsChangeableGroups hook introduced in r39368 (1.14)
* Fix typo in Special:ListGroupRights introduced in r52083
* Prevent duplicate key display in Special:ListGroupRights (new behavior: if a permission is both assigned and revoked from a group, it only displays as revoked).
* Fix $wgRevokePermissions handling, it now runs after every group permission has been assigned in order to revoke the permission properly.
2009-06-18 14:47:18 +00:00
Ryan Schmidt
003a5f3431 * (bug 17014) Blocked users can no longer use Special:UserRights if they do
not have the 'userrights' permission.
* Add hook 'UserrightsGetCheckboxes' to give extensions the ability to modify
  the arrangement of checkboxes on the Special:UserRights form
* Add hook 'UserrightsSaveUserGroups' to give extensions the ability to modify
  the groups being added and removed last-minute.
2009-06-18 02:13:42 +00:00
Andrew Garrett
8139c8a066 Block password resets from globally blocked IP addresses 2009-06-16 17:10:17 +00:00
Alexandre Emsenhuber
9dbfd93927 * break lines at 80 chars
* spacing consistency
2009-05-28 17:05:09 +00:00
Andrew Garrett
3192644753 Fix bug 18947 LiquidThreads thread renaming silently fails if user is not allowed to move pages.
It now fails gracefully, but really I'd like to be able to disable that subject bar altogether instead of letting users change it only to be told off.
2009-05-28 12:32:43 +00:00
Alexandre Emsenhuber
19eda34276 fix for r50667: consistency with other hooks: removed "* " before params 2009-05-16 19:35:03 +00:00
Alexandre Emsenhuber
b4ede1bb06 Document "MessageNotInMwNs" hook 2009-05-16 19:32:12 +00:00
Alexandre Emsenhuber
343ddffec5 Don't use $this in hook description since it's a reserved word 2009-05-07 20:15:09 +00:00
Chad Horohoe
0ea3a0c7da Add $this as a parameter to LoadAllMessages. 2009-05-07 18:49:57 +00:00
Alexandre Emsenhuber
19712a49de Follow-up r49790: remove from docs/hooks.txt hooks that were removed from code 2009-04-25 13:50:48 +00:00