Commit graph

596 commits

Author SHA1 Message Date
Daniel Friesen
87e5fc82f8 Followup r96180, I can't believe I did't notice I accidentally killed the hook name.
While I'm at it, add missing $variant parameters to every 'Get*URL' hook in Title.
2011-09-05 08:31:51 +00:00
Krinkle
f1b79b7eba Pass OutputPage instance to MakeGlobalVariablesScript. Allows extensions to getTitle()->equals( .. ) and add config vars depending on title 2011-09-01 17:23:13 +00:00
Roan Kattouw
41ac01dfc8 Followup r95753 per CR: prevent extensions from making isMovable() return true for interwiki titles and immovable namespaces 2011-08-31 12:18:02 +00:00
Niklas Laxström
a3b5d71b19 Amend r95775 per Siebrand's suggestion 2011-08-30 13:59:54 +00:00
Niklas Laxström
11a50da270 New hook to replace live hack on translatewiki.net. Allows reordering namespaces 2011-08-30 13:24:27 +00:00
Roan Kattouw
89a7657063 Add TitleIsMovable hook so extensions can create new namespaces in which pages can't be moved. RL2 needs this for the Gadgets_definition namespace 2011-08-30 11:21:24 +00:00
Raimond Spekking
2d2d98e6eb New hook point to exempt an IP address from the account creation throttle. Redo of r95041 per Niklas CR
Needed for a new extension to make (mass) account creation easier for schools/colleges etc
2011-08-21 16:38:02 +00:00
Raimond Spekking
d3857667d5 Self revert r95041 per CR. I will commit a cleaner patch. 2011-08-20 18:07:48 +00:00
Raimond Spekking
83a0837904 Fix a typo 2011-08-19 20:58:32 +00:00
Raimond Spekking
cda98b8976 New hook point to change $wgAccountCreationThrottle
Needed for a new extension to make (mass) account creation easier for schools/colleges etc
2011-08-19 20:57:41 +00:00
Roan Kattouw
04e002d582 Followup r94995: add hooks.txt entries for the new hooks 2011-08-19 14:05:00 +00:00
Victor Vasiliev
80a7648a42 Allow extensions to run their own backlink-based updates:
* Introduce new hooks which allow BacklinkCache to handle non-core tables
* Make table name a parameter to RefreshLinks2 job (instead of hardcoded templatelinks)
2011-08-13 22:42:09 +00:00
Daniel Friesen
0139030f2b Improve the ability for extensions to participate in how MediaWiki handles url paths:
- Allow extensions to hook into WebRequest::getPathInfo and add to or alter the way titles are extracted from paths
- Add a $variant argument to the GetLocalURL hook; It's always had $query, but never had $variant. As a result extensions using GetLocalURL never new if getLocalURL and have the possibility of trying to change the url in cases where they shouldn't and as a result breaking links on wiki with language variants.
- Add GetLocalURL::Internal hook for non-interwiki links. These kinds of links internally use a ugly hack for action=render and an extension using GetLocalURL can be buggy in render mode if they don't re-implement the same ugly hack that MW does. This ::Internal hook runs before the hack does so extension authors don't need to be exposed to our ugly hacky code.
- Add GetLocalURL::Article hook specifically for url tweaks to pretty urls (ie: Only when we would apply $wgArticlePath); This hook avoids the need for extensions that only want to tweak pretty url output. This hook avoids the need to make a bunch of tests for things like !$title->isExternal(), $query == '', and $variant === false which getLocalURL does and could potentially change in the future making wider GetLocalURL hooks change in function requiring extension updates.
2011-08-12 19:23:43 +00:00
Victor Vasiliev
d636fac2d8 Allow extensions to add pages with non-wikitext display by adding two new
hooks (generalizing the code already used for CSS/JS pages).
2011-08-11 17:21:31 +00:00
Robin Pepermans
3bb3e4793c Add 2 @since and add documentation for PageContentLanguage hook 2011-08-11 14:52:57 +00:00
Alexandre Emsenhuber
c1f4b460e2 Fix doc: wfLoadAllMessages() doesn't exists 2011-08-09 20:09:30 +00:00
Chad Horohoe
ce3517c8a0 Followup r92643: refer to the passed object as $parser, not $this 2011-08-09 13:30:01 +00:00
Chad Horohoe
4beb6b59f4 Self-revert r91453: not a well thought out addition to the EditPage::showEditForm:initial hook 2011-08-04 21:04:59 +00:00
Mark A. Hershberger
8e9deef3c4 re: r93415
* Document what happens as the result of each value returned
* Require boolean true to continue, not just a true value or strings
  would succeed
* Trim the arguments since the header array already contains them.
2011-08-02 19:35:01 +00:00
Roan Kattouw
7ed75c87ca Introduce a hook so extensions can customize what's considered to be a CSS/JS page. This is needed for the Gadgets extension in the RL2 branch 2011-08-02 15:40:27 +00:00
Mark A. Hershberger
a03831aa25 followup r93415 — there is no “$this” in a static method. 2011-07-29 01:15:52 +00:00
Mark A. Hershberger
e5a99a4262 Add hook that could be the solution for Bug #28026 (“Enable e-mail
notifications for watchlist (EnotifWatchlist) on all small wikis”) to
make logging sent emails easier.
2011-07-28 19:19:42 +00:00
Aaron Schulz
800a962253 Updated hooks docs per r91123. The UI methods are not part of the object anymore. 2011-07-25 16:44:57 +00:00
Alexandre Emsenhuber
d136c4b227 Removed SkinTemplateSetupPageCss hook and SkinTemplate::setupPageCss(), no extension use this anymore. This can only add raw CSS to page; it is much better to use the ResourceLoader (or to link to a file). But if it is really needed, extensions can use the BeforePageDisplay to achieve the same functionnality. 2011-07-21 11:43:05 +00:00
Ian Baker
db03d2545b Documenting new parser hook, re r92506.
This refers to an extension that's not checked in quite yet, FYI
2011-07-20 17:08:37 +00:00
Aaron Schulz
4a1b848c58 Follow-up r92220: changed autoblock handling to use PerformRetroactiveAutoblock hook instead of a global. Also made CheckUser always override autoblocks (no config). 2011-07-15 00:48:02 +00:00
Brian Wolff
bf1df55887 (bug 29680, bug 22911) Add GetDeaultSortkey hook in order to override default sortkey used on pages (default is {{PAGENAME}})
Some people want it to default to subpage or to fullpagename this hook would let
them do what they want :)
2011-07-06 00:38:40 +00:00
Chad Horohoe
be876831c5 (bug 5800) Added $formCallback as a parameter to the hook EditPage::showEditForm:initial 2011-07-05 12:48:46 +00:00
Brian Wolff
013088cf75 (follow-up r91436) add new hook to hooks.txt
I totally updated the doc file, and then committed my other changes without the doc file.
2011-07-05 05:33:54 +00:00
Alexandre Emsenhuber
82ad5844cb Added: ActionBeforeFormDisplay, ActionModifyFormFields, ExtensionTypes, MaintenanceRefreshLinksInit and SpecialPasswordResetOnSubmit
Removed: AfterUserMessage, FormatUserMessage, MathAfterTexvc, SetupUserMessageArticle and UserLoginMailPassword
2011-06-13 14:55:03 +00:00
Platonides
5a28aa7bf5 Follow up r85410 & r89688. Try to make clearer that this is a message key. 2011-06-07 21:20:07 +00:00
Chad Horohoe
0bb3d226c7 Doc fix for r85410 2011-06-07 20:56:21 +00:00
Brion Vibber
87b966a789 * (bug 29140) FirePHP debugging assist extension
FirePHP is an extension to Firebug, an awesome debugging extension to Firefox.
It allows pulling debug log data in from your PHP script via HTTP headers, which then get displayed in Firebug's console along with errors, warnings, and AJAX hits from the web page.

Added 'Debug' hook which gets called from wfDebug() and wfDebugLog() to take this; note that a few lines of output won't make it to FirePHP as they are output either before we've done all plugin initialization, or after we've flushed output and can no longer add HTTP headers.

BSD-licensed FirePHPCore library from firephp-libs commit aff25803a3ff460b2797:
https://github.com/cadorn/firephp-libs/blob/aff25803a3ff460b2797/packages/core/lib/FirePHPCore/FirePHP.class.php

There's not a lot of fancy integration; everything's just output as a 'log' line.
You can use $wgFirePHP global (or call FirePHP::getInstance() yourself) to get direct access to FirePHP's fancier features in test code.
2011-05-25 22:01:08 +00:00
Krinkle
66e64cb2f0 Moving check higher up in case there's a premade toggle _but_ no .wm-collapsible-content premade. This way the link will be caught before it's inner-wrapped, after which it would no longer be a direct child. 2011-05-23 19:08:26 +00:00
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
Chad Horohoe
3e11266ae5 $wgArticle is deprecated! Possible removal in 1.20 or 1.21!
* Encapsulate index.php in wfIndexMain() (similar to r77873)
* Kill $wgArticle check in Exception, not necessary anymore
* Kill $wgArticle in Setup, also not necessary
* Add angry note about $wgArticle to rebuildFileCache.
* Remove note about $wgArticle in Parser since it's dying anyway
2011-05-22 17:59:47 +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
Antoine Musso
6bd50a6388 Basic HTML file to test our CSS box 2011-05-14 16:46:16 +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
Greg Sabino Mullane
c9f12ba553 Per discussion on Mediawiki-l, talk about the GROUP BY issue a bit. 2011-04-29 13:42:48 +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