Commit graph

775 commits

Author SHA1 Message Date
Siebrand Mazeland
9c592c508c Correct documentation for EditFilter hook parameter
Change-Id: I1f5dbc834c44c33fce495a8c4ca5fc0f2b61b4c7
2012-10-24 10:18:38 +02:00
Alexandre Emsenhuber
d888481866 Follow-up I186669a5 (4b62b03): reorder hooks alphabetically
Change-Id: I399f10df254762c4dd05e2c6fb83c29cc6121f81
2012-10-17 22:32:02 +00:00
aude
42ff119e8a Fix typo in contenthandler documentation
Change-Id: Id03f854eca4b6c53ecd535422b779bf8a459750d
2012-10-16 10:36:56 +00:00
Aaron Schulz
19745cb831 Merge "Prefix new ContentHandler hooks in WikiPage with Page instead of Article" 2012-10-11 17:12:50 +00:00
Siebrand Mazeland
4b62b0339c Prefix new ContentHandler hooks in WikiPage with Page instead of Article
Covers 3 hooks:
* ArticleContentInsertComplete -> PageContentInsertComplete
* ArticleContentSave -> PageContentSave
* ArticleContentSaveComplete -> PageContentSaveComplete

Change-Id: I186669a5941d8982725ed364b481215d291b2043
2012-10-11 18:22:52 +02:00
Alex Monk
388df2ee24 Tidy up InfoAction and note it's hook in docs/hooks.txt
Also add $context parameter to the hook and (bug 40845) don't
overwrite pageInfo's $title parameter.

Change-Id: I41128abb72553142b45e90befabde541b2d8941f
2012-10-11 01:41:43 +01:00
daniel
329d5b3516 Merge branch 'Wikidata' into master.
This introduces the ContentHandler facility into MediaWiki,
see docs/contenthandler.txt.

For convenient review, a squashed version is available at
https://gerrit.wikimedia.org/r/27191

The ContentHandler facility is a major building block of the Wikidata project.
It has been discussed repeatedly on wikitech-l.

Change-Id: I3804e2d5f6f59e6a39db80744bdf61bfe8c14f98
2012-10-09 11:34:24 +02:00
umherirrender
d73e90c99c Add version number to deprecated setting
Fix one doc

Change-Id: I527639c3694d7b72d9f3bff62fb8b0b7eb6ee126
2012-10-09 08:25:01 +02:00
daniel
c546fae8ed merge latest master into Wikidata branch
Change-Id: Id4e0f40c03679c13d8934a6add99b5cd86d0437d
2012-10-08 13:58:54 +02:00
Aude
c3a46a5d36 Merge "copyedit" into Wikidata 2012-10-05 13:42:46 +00:00
daniel
1cfa4fc0dc copyedit
Change-Id: Ifad517560a3374575c08095991fa846fc6bc7ed4
2012-10-05 15:09:09 +02:00
daniel
601b5c9959 Merge "Updated export XSD to include model and format." into Wikidata 2012-10-05 12:37:57 +00:00
daniel
d087dd0f88 added architecture documentation
Change-Id: I60f1d0b710802b2076fff94e535cd4534b6c9a30
2012-10-05 14:33:51 +02:00
daniel
f3dc35246e Updated export XSD to include model and format.
Change-Id: Iffd89862c76f850950e13e56b8d6a9c855230fed
2012-10-05 12:05:16 +02:00
Siebrand Mazeland
36ac69b928 The hooks are initiated from WikiPage instead of Article
Change-Id: Ie3d29d6b73916a17cec8cb5ce1a66d98d791eb40
2012-09-25 22:03:34 -07:00
Chad Horohoe
431a2216c2 Fix invalid HTML in design doc
Change-Id: Ibb664c22dc54109b113a51b4385e5564c2b80ce1
2012-09-24 09:01:59 -04:00
daniel
8f479e2e45 Add parameters to ArticleDeleteComplete.
Supply more information about the deleted revision to hook functions.

Change-Id: Ie1fc967d074deb918c824e10398bcb0ec2d557ac
2012-09-20 21:15:43 +02:00
daniel
b6b686c13b merged master
Change-Id: I0ef7c7f33a5dc5855f38b20c03ddc5306f38ec66
2012-09-19 12:34:10 +02:00
IAlex
4498b01558 Merge "fix docu for ApiCheckCanExecute" 2012-09-12 18:51:34 +00:00
Alexandre Emsenhuber
d19e0d6c94 Link to mediawiki.org using https from doxygen first page, not http
Change-Id: I13fe244e6122930731f144f97f27126339065481
2012-09-11 21:43:29 +02:00
daniel
b8d6d18452 fix docu for ApiCheckCanExecute
Change-Id: Ib9af835f3e775dd89a655b186923535d9bd01678
2012-09-11 15:16:39 +02:00
daniel
12166f46b4 merged master (2012-09-11)
Change-Id: I8e953eaa22f9d331b0af5e780fbeff6d702b23e3
2012-09-11 11:43:02 +02:00
IAlex
8634014e86 Merge "Replace some occurrences of wfMsg* by alternatives. Undeprecated wfMsgReplaceArgs." 2012-09-10 17:33:37 +00:00
Aaron Schulz
781377eacc Merge "New hook, 'SearchResultInitFromTitle'" 2012-09-07 20:49:32 +00:00
Daniel Werner
2f6430d40d New hook 'AfterFinalPageOutput' which is called at the end of OutputPage::output()
Called  before final ob_end_flush() which will send the buffered output to the client. This allows for last-minute modification of the output within the buffer by using ob_get_clean().

- patch-set2: moved the hook before OutputPage::sendCacheControl() is called, as suggested by Reedy.

Change-Id: I264a37ac74e0c18ff141f82156e669ece3212c2d
2012-09-07 09:32:39 +02:00
Daniel Kinzler
a1a296ac84 Merge "New hook ApiCheckCanExecute." 2012-09-05 19:06:48 +00:00
Tyler Romeo
780b6878f7 New hook ApiCheckCanExecute.
Added new hook in ApiMain::checkCanExecute
so that extensions can authenticate and
authorize API clients before the module is
execute. (Necessary for extensions like
OAuth that externally authnz clients.)

Change-Id: I1b059fd9a4aa717928af8b09f5edebe899ab3ce1
Signed-off-by: Tyler Romeo <tylerromeo@gmail.com>
2012-09-05 14:33:14 -04:00
yaron
13b2fe802e New hook, 'SearchResultInitFromTitle'
This hook lets you change the revision ID used for a page (a Title
object), when displaying that page in search results. It's useful for
the Approved Revs extension, so that pages whose approved revision is
not their latest can have their approved revision, not the latest one,
show up when doing a search text. It's also potentially useful for
other, similar extensions, like FlaggedRevs.

Change-Id: Ic4bad8dfaa83de131db9c8e7667d7f5767d8d5f5
2012-09-05 20:03:09 +04:00
daniel
b6fe213226 merge latest master.
some tests fail due to logical changes, will fix that in a follow-up

Change-Id: I8a5e4087ecf674fbcf6327c5d168cd401be12400
2012-09-05 17:50:13 +02:00
Siebrand Mazeland
475a1daa03 Replace some occurrences of wfMsg* by alternatives. Undeprecated wfMsgReplaceArgs.
* wfMsgReplaceArgs isn't really i18n related. It just replaces text parts.
* Updated language.txt. Now refers to mediawiki.org.
* Removed deprecated Block::formatExpiry(). Merge Id7d057a4 first.
* Reformatted weirdly formatted array in ApiBase.php.
* Removed wfMsg() in RandomTest.php.

Change-Id: Ied5cfda8fa5d9283dfeebdcb0e1af8453d47e7a9
2012-09-03 11:49:58 +02:00
Max Semenik
a1cedee3c4 New hook ApiMain::onException
Allows custom logging of API errors

Change-Id: If8841c33998dff96448a7eb8dbe95d68119e068f
2012-08-29 20:42:48 +04:00
daniel
9994968774 merged master
Change-Id: Ib2b879c4daa17401eeeb50767c0e5a54254855c3
2012-08-29 15:20:15 +02:00
Daniel Kinzler
392af46809 Revert "merged master"
This reverts commit 67bfdc7a68
2012-08-29 13:14:49 +00:00
daniel
67bfdc7a68 merged master
Change-Id: Ib2b879c4daa17401eeeb50767c0e5a54254855c3
2012-08-29 12:06:38 +02:00
daniel
2c488a0eba Replace usage of doEdit() with doEditContent()
Change-Id: I2c423744bd91044c37bbec53b35729bd1c09901b
2012-08-28 16:53:19 +02:00
jeroendedauw
38c7f444e1 Use __DIR__ instead of dirname( __FILE__ )
We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :)

Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
2012-08-27 21:45:00 +02:00
Siebrand Mazeland
e4321e3e66 Replace deprecated wfMsg* calls with Message class calls.
Doing this in steps of roughly 100 changes per commit, so that it remains
reviewable.

Change-Id: Ie349afa5c809c887c787c7c04c49c9dd3478ccac
2012-08-22 21:04:12 +02:00
daniel
29719f846b merging latest master
Change-Id: I36b7f2f63ab8c08f8412d521dc68ea45c8b67711
2012-08-20 16:55:28 +02:00
Siebrand Mazeland
26f7bcd4e0 Replace deprecated <tt> with <code>.
Change-Id: I5e15628e34dd0473d2f6ce17509ed17e94257dfa
2012-08-16 10:30:43 +02:00
Daniel Werner
aaf45a0b75 New hook 'ParserTestGlobals'
Allows to set globals before running parser tests.

Change-Id: Iea057b992b260611bca7f3adade2c8214b0dcea2
2012-08-14 00:18:50 +02:00
Siebrand Mazeland
42eb5e04cc Fix documentation for hook AbortNewAccount.
Change-Id: I8982f5f512eec0742fe5232c2e68396e9b1c95f4
2012-08-10 00:36:13 +02:00
robin
e4b4bfdf9b (bug 38351) Image alignment should follow the page content language
The alignment of image thumbs should follow the page content language instead of the wiki content language.
For this it needs the parser context, and because it makes sense to have it as first parameter, I renamed makeImageLink2() to makeImageLink(), the 2 seemed to be redundant anyway.
The old function name keeps the old behaviour, but can be removed quite soon since almost no extension is using it.

Change-Id: I0c35b06a85528dcc43fdd0578dc9b327c495cf4a
2012-08-03 00:48:06 +02:00
daniel
086f719116 fix WikiPage::getDeletionUpdates() for cases where no content object is present.
Change-Id: Idbd8dd9a4f84f45acfe1a4388653990cf191a33b
2012-07-24 17:51:28 +02:00
daniel
c8e633f1e3 moved getDeletionUpdates to Content interface
Change-Id: I1b46b1d663f8efd609aeb1b63cb07ee1a0a00c33
2012-07-23 22:54:25 +02:00
daniel
d87135d706 merged master
Change-Id: Iad12ee382d6aeb1fab6fefb611d290b74865ea4b
2012-07-23 22:07:18 +02:00
Derrick Coetzee
2bf1a9cd8a (bug 35060) more allowed params to Special:MyPage, Special:MyTalk
I investigated the available parameters and considered which could be
plausibly useful for Special:MyPage and Special:MyTalk, and there are
quite a few. See inline documentation for a list of them. More could
potentially be added in the future if a use case is discovered.

This patch also make it possible for extensions to add their own
parameters to this list, through the new hook:
RedirectSpecialArticleRedirectParams

It has at least one application - with FlaggedRevs, it's desirable to
pass the "stable" flag through Special:MyPage. It also makes it simple
for individual servers that have some special reason to pass on a
particular parameter to do so in LocalSettings.php, simplifying
upgrades.

Change-Id: I3101fbe2eba8712b87a53706583f4e8f3e907478
2012-07-19 11:57:58 -07:00
Andrew Garrett
e289e4231f Allow extensions to abort (and replace) email notifications
Change-Id: I769ad24fcd6f3e3c03fb67122eab25a8472047b6
2012-07-17 12:59:54 -07:00
jeroendedauw
c8c50eb1ef Added SpecialPageAfterExecute and SpecialPageBeforeExecute hooks
Danwe apparently needs them :)

Change-Id: Ic74c7ba7f4168d2b0cfbd3c4e551218f6cb2693a
2012-07-06 16:10:42 +02:00
Daniel Werner
3921515104 hook InternalParseBeforeSanitize
This patch add the hook 'InternalParseBeforeSanitize' which gets called
during Parser's internalParse method just before the parser removes
unwanted/dangerous HTML tags.

Change-Id: If32053f9304088d7943aa0c9e78716a644c34fe1
2012-07-04 23:32:14 +01:00
Brad Jorsch
3d474cae60 (bug 17865) Add a "ParserAfterParse" hook
In order to correctly output an error message that might contain
wikilinks, Cite.php needs a hook that is called after the page is parsed
but before the call to replaceLinkHolders().

Change-Id: Iaa2755f994edb081eb1d176f632f7add41640dbf
2012-07-04 22:33:19 +01:00