Commit graph

553 commits

Author SHA1 Message Date
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
Platonides
426b1f116a Updated distributors docs.
Added load.php to the entry point list.
Mention maintenance/install.php existence.
Added section explaining that they shall run maintenance/update.php on update.
2011-02-26 22:53:11 +00:00
Max Semenik
1fdaf8db17 (bug 1379) Installer directory conflicts with some hosts' configuration panel.
Renamed config/ to mw-config/, however left aliases for b/c.
2011-02-26 12:35:23 +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
Krinkle
30b881123f more clear 2011-02-04 03:30:50 +00:00
Krinkle
7a5c40b671 adding that Vector shipped with 1.16 in 2010 2011-02-04 03:30:14 +00:00
Sam Reed
6b9f655c2a Fixup r81467 2011-02-03 22:06:10 +00:00
Sam Reed
1231097194 bug 27133 - Update docs/skin.txt 2011-02-03 16:45:45 +00:00
Alexandre Emsenhuber
51c6afc751 * Replaced $wgMessageCache by MessageCache::singleton(); since we only use one instance of this class (as for ParserCache, LinkCache)
* MessageCache::singleton() calls wfGetMessageCacheStorage() directly instead of using $messageMemc, just in case this would be called before that variable is set
* Per TimStarling: also removed deprecated methods in MessageCache class: addMessages() and related, [get|set|enable|disable]Transform(), loadAllMessages(), loadMessageFile() and some others. Same for the legacyData stuff in LocalisationCache that was only used by MessageCache::addMessages() and related. 
* Converted remaining extensions
2011-01-26 15:42:04 +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
Chad Horohoe
26505b170a Fix concern raised by Brion in r74108 (but has really existed since the maintenance rewrite). Right now, including a maintenance script causes it to execute. This is bad when you want to reuse the particular class but not have it start executing all by itself.
Until now, we relied on setting MW_NO_SETUP which was a) hacky, b) irreversable, and c) likely to be forgotten if you didn't use one of the wrappers like runChild().

Instead, move the freaky magic to doMaintenance and have *it* check if it's in a specific call stack that indicates this is being run from the file scope and should be executed. Rename DO_MAINTENANCE to RUN_MAINTENANCE_IF_MAIN so it's nice and clear what magic happens behind the require_once().
2011-01-13 22:58:55 +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
Rob Lanphier
1893285849 Followup to r79856: s/0.4/0.5/ and added "bytes" attribute to "text" element 2011-01-09 02:38:04 +00:00
Rob Lanphier
d76b01b332 Creating export-0.5.xsd as part of followup to r79856 2011-01-09 02:27:56 +00:00
Rob Lanphier
3e29b914b5 Made it so that our existing 0.4 exports validate 2011-01-09 02:12:35 +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
Daniel Friesen
1bfd360cb8 Might as well fix this doc file... even though it's completely out of date... 2010-12-31 17:26:31 +00:00
Chad Horohoe
d411e290ab Tweak comment 2010-12-29 17:03: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
Alexandre Emsenhuber
cb6f556784 * (bug 26253) Removed $wgPostCommitUpdateList
As I said on the bug, this variable is not used since ages
2010-12-06 16:17:43 +00:00
Raimond Spekking
ac7fbc3bed Follow-up r76434, r76570,r76668: Pass skin object per CR 2010-11-14 19:45:55 +00:00