Commit graph

596 commits

Author SHA1 Message Date
jenkins-bot
3158abd351 Merge "Hook to allow manipulation of image data" 2012-12-23 18:01:30 +00:00
nischayn22
b207c900fa Hook to allow manipulation of image data
Adds a new hook, ThumbnailBeforeProduceHTML, to ThumbnailImage::toHtml
method, in order to permit the user to manipulate the image and link
attributes before the HTML is rendered. For details see bug 41835

Note: Patch given by Victor <vdanilchenko@vistaprint.net>

Change-Id: Ib94967997e1303522d0081c7387e29af9c0ef0f0
2012-12-23 12:55:15 -05:00
Siebrand Mazeland
6e165c76a3 Update misleading variable names in docs
$article for a WikiPage object isn't a great choice. Let's use $wikiPage.

Change-Id: I98832355b14fc4a281d3f0e2dbee85e142d83418
2012-12-05 14:41:41 +01:00
Chad Horohoe
73451c606b Add a hook to Special:Version so we can customize the version URL
Change-Id: I02fe38c7b13dcfe570e78d28783098fc18756204
2012-11-29 15:01:54 -05:00
Ori.livneh
023b1dafd3 Merge "Addition of SearchAfterNoDirectMatch hook" 2012-11-28 11:52:07 +00:00
Reedy
904e4bdf7f Addition of SearchAfterNoDirectMatch hook
Needed for mediawiki/extensions/SearchExtraNS

Change-Id: If0a7da5c8691c418bc388e50dd11eea3b57ed45d
2012-11-28 03:47:17 -08:00
IAlex
7e8154f9e8 Merge "Fix doc/hooks.txt for EditPage::showStandardInputs:options" 2012-11-27 19:01:51 +00:00
bsitu
494529503b (bug 14901) Email notification mistakes log action for new page creation
Original patch by Dan Nessett, modified by Benny Situ and Roan Kattouw

Change-Id: Ibb7953741e4189127d1cd6718ac58492f254671e
2012-11-26 19:37:01 +00:00
Brad Jorsch
078a0c16d0 Fix doc/hooks.txt for EditPage::showStandardInputs:options
The documentation added for this hook in Ic5d35c8e missed one of the
parameters.

Change-Id: I935dac942679d999658fa9fe367db81df33edbfd
2012-11-26 12:57:25 -05:00
Brad Jorsch
8d198333d3 Add EditPage hooks AlternateEditPreview, EditPage::showStandardInputs:options
Adds two new hooks:
* AlternateEditPreview allows an extension to override the standard
  page preview display.
* EditPage::showStandardInputs:options allows an extension to add
  additional HTML to the end of the editOptions area of the edit form.

Change-Id: Ic5d35c8e9ff71282b5ebccc87c64894a385e5836
2012-11-22 01:13:33 +00:00
Daniel Kinzler
d4556df5e8 Merge "add SpecialUndeleteLogEntry hook" 2012-11-19 13:17:31 +00:00
aude
58bd2adb3d add SpecialUndeleteLogEntry hook
- allows extensions to perform some action at time that a undeletion log entry is performed,
or skip the insertion of a log entry.

Change-Id: I5b0caaddfe5d7262612a60946d9f5c4af2679141
2012-11-19 10:23:21 +00:00
Ori Livneh
29cb4c98ed Fix typo (cointent => content)
Change-Id: I4d6702d0b2a6c4fe224a8c59808a579b6c6916a0
2012-11-16 21:19:48 -08:00
Brad Jorsch
7c9d6c0d10 (bug 32368) Add ParserCloned hook
We store various bits of data as "expando" properties on the Parser
object, to pass information from one stage of the parser to another. If
the parser is cloned, however, we can run into trouble because two
different Parser objects are now manipulating the same extension data
structure; this often shows up when ParserClearState is called on one
clone and clears the state of the other as well.

Since a deep clone might be too expensive and still might be wrong in
some cases, it seems most useful to simply provide a ParserCloned hook
so extensions can just do The Right Thing.

Change-Id: Ieec65c908d71e89b9a66f83b9a626f842aadacbb
2012-11-16 11:27:13 -05:00
Aaron Schulz
a8644b99bb Merge "Content::convert() for conv. betw. content models." 2012-11-07 20:39:09 +00:00
Aaron Schulz
4c8816746f Merge "(Bug 41580) Hook for custom search hit rendering." 2012-11-07 00:55:41 +00:00
Chad Horohoe
444d3490eb Doc tweak: variable is actually $isKnown and is a reference
Change-Id: Ib68ea809cbda50b445865bcde22ad7583c8e7f38
2012-11-06 14:52:30 -05:00
daniel
ea4473037d Content::convert() for conv. betw. content models.
This is needed to fix bug 41706 and similar, watch for follow-ups.

Automatic, implicit conversion may be handy in several cases, especially
for converting between different text based content models. E.g. it should
be possible to create a diff between a JavaScript and a wikitext page. This
change lais the foundations for this ability.

Change-Id: Ie7d87b67b24ac9897cb5696220a7785b228d3c79
2012-11-06 17:39:10 +01:00
daniel
d6495c2a4e (Bug 41580) Hook for custom search hit rendering.
Introducing ShowSearchHit hook into SpecialSearch, so extensions
can control of how search results are displayed. This does not
fix bug 41580, but it's a precondition to fixing it in Wikibase.

Change-Id: I9158684b92e320a486266c45dc3f7cf466ec5a24
2012-11-06 14:01:16 +01:00
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
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
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
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
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
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
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
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