Commit graph

738 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
mlitn
c8e0ec3f4b Introduce a new hook that allows extensions to add to My Contributions
Meanwhile also:
- refactored reallyDoQuery in Pager.php, to make outside intervention possible
- extend reallyDoQuery in SpecialContributions.php, adding in the hook and composing the final results array based on the combined results of all queries added through the hook

Change-Id: Ifd63cdf1950f914a3fba1757a905385aca311eda
2012-07-03 10:48:29 -07:00
mlitn
1c757557b0 Pass $classes in the ContributionsLineEnding hook
Originally part of https://gerrit.wikimedia.org/r/13880

Change-Id: I05d9d13e8dc4e9442ecfba79a7d1af8bf192c28b
2012-07-03 10:39:21 -07:00
Siebrand
5fb8b96195 Merge "Expose the log_id of the deletion log entry in the action=delete API" 2012-07-01 15:55:29 +00:00
Aaron Schulz
1d693af826 Merge "xsd: fix id within contributor to allow 0" 2012-06-28 17:50:47 +00:00
Aaron Schulz
604148f1be Revert "Introduce a new hook that allows extensions to add to My Contributions".
In formatRow(): the hook change breaks FlaggedRevs, and also $ret may not
always be defined. The patch could use some extra work.

This reverts commit 0944502d4c

This reverts commit d0131e8a19.

Change-Id: I05d980e19d99e1c461199705b04de9e307daa907
2012-06-27 21:27:32 -07:00
Christian Aistleitner
0e2d8996c2 xsd: fix id within contributor to allow 0
Change-Id: I7a4a2c866fdecd282e5c287cdce26434331142ec
2012-06-27 11:31:41 +02:00
mlitn
d0131e8a19 fix typo's
Change-Id: I2dda789683f34207e09e8b09ee0218285f708068
2012-06-26 17:43:38 +02:00
mlitn
0944502d4c Introduce a new hook that allows extensions to add to My Contributions
Meanwhile also:
- refactored reallyDoQuery in Pager.php, to make outside intervention possible
- extend reallyDoQuery in SpecialContributions.php, adding in the hook and composing the final results array based on the combined results of all queries added through the hook
- remain backwards compatible on method-level
- fix FakeResultWrapper::fetchRow, which (contrary to ResultWrapper::fetchRow) didn't always return an array

Change-Id: I74c3784d6d93b992d72f2db24cc29f30e458c1e3
2012-06-23 01:37:18 +02:00
Aaron Schulz
d04b8ceea6 Merge "(bug 33222) Add parentid to revision in export xml" 2012-06-16 04:25:52 +00:00
jeblad
631e79d556 Added a hook for formatting autocomments
Removed some spurious whitespace

Changed how wfRunHooks are used, and also the test for default formatting

Change-Id: I4c3fc1080f83166d7b89aeb9a1487e173e9ccb65
2012-06-15 13:25:31 +02:00
Ryan Lane
233f421923 Allowing the change password form to be extended
Change-Id: Id676b1ec4b43140790b18a87bc8466f10c957577
2012-06-14 17:23:44 +02:00
Catrope
2e352de1de Merge "Added result properties to action=paraminfo" 2012-06-12 20:52:35 +00:00
Max Semenik
63fb18bd4e Add a way for packagers to override some installation details
...after a discussion with Debian packagers. They can now override installer
classes and change LocalSettings.php the installer generates. The file
intended for such overrides, mw-config/overrides.php, has intentionally been
placed outside of includes to underline the "don't change includes" paradigm.

Change-Id: Id82b90f6740307609bc6c6f4fb8765bc3484dbe7
2012-06-12 20:18:44 +04:00
umherirrender
afa123ccf8 (bug 33222) Add parentid to revision in export xml
From bug description: "This is helpful for incremental dumps, to know if
there are revisions missing between the last full dump and this
incremental dump"

Change-Id: I772f976942a306ad573efc659d09714e8250f5ec
2012-06-09 15:41:55 +02:00
Petr Onderka
80aa025528 Added result properties to action=paraminfo
Added information about the properties of the results of API calls
to action=paraminfo, including information about "property groups":
what should the prop parameter be set to to get that property.

Uses the same format for types as parameters already do.
The output format of some modules doesn't fit this, so the result
properties for them weren't added, or only partially.

Partially implemented modules:
* expandtemplates:
  parsetree is in its own tag
* protect, allusers, backlinks, deletedrevs, info, imageinfo,
  logevents, querypage, recentchanges, revisions, searchinfo,
  usercontribs, userinfo, users, watchlist, upload:
  response with partially complex structure

Not implemented modules:
* feedcontributions, feedwatchlist, opensearch, rds:
  non-standard reponse
* help:
  error is normal response; not very useful for automated tools anyway
* paraminfo, parse, pageprops, siteinfo, userrights:
  response with complex structure

Change-Id: Iff2a9bef79f994e73eef3062b4dd5461bff968ab
2012-06-06 19:24:59 +02:00
umherirrender
556b096670 revision id in export.xsd is not optional
Change-Id: If3d891aaa7c6d1bbc82e7ab15e3393bb1554e883
2012-06-06 17:02:45 +02:00
awjrichards
c29fd59775 Big oops - merged to wrong branch.
Revert "Revert to arbitrarily old point before initial remote branch creation to help clean up"

This reverts commit ee0d3d330f
2012-06-05 22:58:54 +00:00
awjrichards
ee0d3d330f Revert to arbitrarily old point before initial remote branch creation to help clean up
Change-Id: I41a3d1e55d3ea9dffa42451237fe065f9334361d
2012-06-02 08:43:04 -07:00
umherirrender
1de07ace0e update <redirect> in export.xsd to match export xml
The xsd defines the <redirect> as string tag, but it is outputted with a
title attribute. To keep b/c with the dumps this patch changed the xsd
and not the export xml.

Change-Id: Iba77e19ce40768018e292a08997473b82bc263f8
2012-06-03 19:47:01 +02:00
Aaron Schulz
98aaf7b52b Merge "(bug 22750) <logitem> is at wrong location in export.xsd" 2012-06-03 10:06:18 +00:00
umherirrender
00e259482f update export-demo.xml
Add tags with examples for the update from version 0.4 to 0.7

Change-Id: I99c32ea29741a989ecd80ea61251c6636799ec25
2012-06-01 18:10:54 +02:00
umherirrender
6209ef4086 (bug 22750) <logitem> is at wrong location in export.xsd
* fix indent of logitem
* add logtitle/params tags
* change one Image: to File:

Change-Id: I02e631d8c4679c46095320901cdff724533d66f0
2012-06-01 17:57:02 +02:00
Mormegil
6c39a1714b (bug 35264) Wrong type used for <ns> in export.xsd
Change-Id: I6d5a399d3fde4d70a8814c4f8d107765c8e3da96
2012-05-31 19:16:41 +02:00
Reedy
221b42e9ed Fix trailing whitespace (and mixed spaces) in XSD files
Change-Id: Ie3c9917442c0bb47e1e95ad304943a721eb430cd
2012-05-27 14:03:29 +01:00
Elvis Stansvik
d2e8dd6251 (bug 4220) dump schema get unique contraints on id
This patch was made in December 2005 by Elvis Stansvik on bug 4220, you
will find below the rewritten introduction for his patch contribution.

"""
The XML Schema for the XML dump format used by MediaWiki has no
constraints for the page and revision identifiers. This patch solve that
issue by enforcing the constraint in the XSD.

It most probably makes sense, since I think that:

 - some parsers capable of Schema validation can work more efficiently
   if constraints are in the XSD.
 - Another reason is that (however unlikely) some other software might
   output files in this format are not obliged to keep the IDs unique,
   according the the XSD in its current form.
"""

Updating the http://www.mediawiki.org/xml/export-0.7/ public URL is
tracked by bug 37111.

Change-Id: Idb82fe620c3395acaa8f051b4d4d0d770cd33d44
2012-05-25 09:44:26 +02:00
Reedy
51b4b2fe39 Merge "Cosmetic change: add a new line after a section title." 2012-05-15 01:00:05 +00:00