Commit graph

993 commits

Author SHA1 Message Date
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
Hashar
7b890dce25 Merge "update export-demo.xml to version-0.8.xsd" 2012-11-06 09:04:34 +00:00
umherirrender
098f7680a4 Fix escaping of pattern in export-0.8.xsd
ExportDemoTest::testExportDemo
xml not valid against xsd: DOMDocument::schemaValidate(): failed to
compile: Wrong escape sequence, misuse of character '\'

Change-Id: Iefae25270b0ad1bf3aa587a51eec3fec1866cff8
2012-11-03 19:38:58 +01:00
umherirrender
daf20e5c8c update export-demo.xml to version-0.8.xsd
Add a assertion to the validation test to ensure, export-demo.xml is
updated next time, when a new version is created.

Change-Id: I004ca23d848dd6701acb45e9b755397b434370c4
2012-11-03 19:37:02 +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
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
Daniel Werner
7969562308 We need this 'AfterFinalPageOutput' hook for the STTLanguage extension.
Change-Id: I1f131e87324cb7a62355dc296f0b4d411a9a0800
2012-07-04 23:23:56 +02: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
daniel
b801fa8b3b merged master
Change-Id: I6cf08c09c7d9b38ecce0b2bbed61431939edd7d4
2012-06-20 19:13:16 +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
daniel
a830943203 Merge branch 'master' of ssh://gerrit.wikimedia.org:29418/mediawiki/core into Wikidata 2012-06-14 12:43:43 +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
daniel
3d58f903d8 Merge branch 'master' of ssh://gerrit.wikimedia.org:29418/mediawiki/core into Wikidata 2012-06-11 17:45:59 +02: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
jeroendedauw
a7e28d2011 merged master
Change-Id: I4cf7b0f87cd571a6b50f66995dd9ad987a6ecdf8
2012-06-06 16:44:15 +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
daniel
250da851d1 merged master 2012-05-29 17:01:13 +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
daniel
c45d150b76 get deletion updates from content handler and hook 2012-05-15 09:08:16 +02:00
daniel
181641792a merged master after 1.20wmf3 2012-05-15 08:46:34 +02:00
Reedy
51b4b2fe39 Merge "Cosmetic change: add a new line after a section title." 2012-05-15 01:00:05 +00:00
Liangent
21b50f1123 Cosmetic change: add a new line after a section title.
Change-Id: I3e0557e5a1e4e69f795fcf4992b2ce64bbb70e59
2012-05-15 00:32:42 +08:00
daniel
cbc2014b2d Use integers for content_model and content_format.
Representing content_model and content_format as integers in the
database was suggested by Asher mainly to save space.

This change entails some refactoring and renaming, but no big
change in logic.
2012-05-14 10:22:52 +02:00
Catrope
3068742546 Expose the log_id of the deletion log entry in the action=delete API
This entails some refactoring to actually surface the log_id all the way
up:

* Made doDeleteArticleReal() return a Status object rather than a
  constant, and put the log_id in $status->value. This Status object is
  also passed to the ArticleDelete hook.
* Kept doDeleteArticle() the same for extension compatibility.
* Switched all core callers of doDeleteArticle() to
  doDeleteArticleReal() and surfaced the error message from the Status
  if appropriate, rather than hardcoding 'cannotdelete' all over the
  place.
* Exposed the log_id in ApiDelete
* Add 'delete-hook-aborted' message for when a hook aborts the deletion
  but does not provide an error message. Previously this just caused the
  'cannotdelete' message to appear.

Change-Id: Ia6415b390d5d4172ce96667f46ccdba2be02461f
2012-05-13 18:20:05 -07:00
jeroendedauw
717e93bd81 Adding NamespaceIsMovable hook to isMovable in MWNamespace, much like done in Title::isMovable.
Change-Id: I72c19be541391857aa25ff2433c017e5d63a8ecd
2012-05-11 16:13:30 +02:00
daniel
af28c6f55a merged from master 2012-04-29 21:41:03 +02:00
Brion VIBBER
a001ceab01 Merge "[FileRepo] Added hook to let us copy thumbnails into additional places as they are transformed." 2012-04-26 22:56:05 +00:00
daniel
49ed9dfdd0 documented new hooks, deprecated old hooks 2012-04-26 15:12:40 +02:00
Max Semenik
ab4e51863b Make API action=tokens extendable
LocalSettings snippet for testing:

$wgHooks['ApiTokensGetTokenTypes'][] = function( &$hookTypes ) {
	$hookTypes['foo'] = function() { return 'bar'; };
	return true;
};

Change-Id: Idf1f4379e677d21059c1b4e12f80e9d2bafb9897
2012-04-25 12:48:53 +04:00
Aaron
0f19338535 [FileRepo] Added hook to let us copy thumbnails into additional places as they are transformed.
Change-Id: I673faf338e58c8230ab6da5243f921c178c47e97
2012-04-24 11:14:37 -07:00
Simon Walker
6c29ec2921 Add GitViewers hook for extensions to add git viewers to SpecialVersion
This adds a GitViewers hook to GitInfo, and slightly refactors the
$viewers variable to be called through a function so the hook can be
called. This is so extensions can add their own git repository viewer
to the Special:Version git sha field.

Change-Id: Ifc8396984de6a51be85fb63cd9754d57333bde03
2012-04-16 16:57:58 +00:00
Reedy
4cc3cc4336 Tests aren't in /maintenance anymore! ;)
Change-Id: I084a1d5dc27f0cfdb1f22ba8d205e8f5a5b641a8
2012-04-15 19:21:12 +01:00
Aaron Schulz
770c9d8c2e Renamed "wfShellMaintenanceCmd" function and new, unused, het-deploy, hook
to "wfShellWikiCmd". The old function now remains as a wrapper. The term "maintenance" is too restrictive.

Change-Id: I5c23d6475fd1aca374ee57b89212eee3a0d8cea1
2012-04-04 16:48:55 -07:00
Christian Aistleitner
b5a262a8d3 .gitignore for generated html doc
Change-Id: I38c66fe3a219d36d935da9a1c31ac3182bb2dbd9
2012-03-31 20:17:34 +02:00
Alex Monk
bc0446e8b5 Fixed some links from SVN to Git.
Change-Id: If425135e3601f11e42c0fc66b1eff7192b2a0704
2012-03-23 22:32:53 +00:00
Max Semenik
083d47cc73 (bug 23795) Add parser itself to ParserMakeImageParams hook. 2012-03-09 18:32:03 +00:00
Ryan Kaldari
045772cbbe grammar fix 2012-03-04 19:14:20 +00:00
Sam Reed
c47f83a4d4 More __METHOD__ in our madness 2012-02-24 18:45:24 +00:00
Daniel Friesen
14b524c118 Add an OutputPage to the EditPage::showEditForm:initial to match the EditPage::showEditForm:fields hook so that people will stop global'ing $wgOut. e.g.: In WikiEditor. 2012-02-15 19:32:36 +00:00
Andrew Garrett
938871aa56 Port (with changes) r110866 to trunk. Reviewed by Brion before commit. 2012-02-13 22:32:44 +00:00
Jeroen De Dauw
6479096233 follow up to r111017, move hook to isAlwatsKnown as per discussion on CR 2012-02-12 23:10:06 +00:00
Alexandre Emsenhuber
129d23aacc Added missing directories to findHooks.php and missing quote in hooks.txt that made LoginAuthenticateAudit show up as undocumented when running findHooks.php 2012-02-12 19:18:36 +00:00
Jeroen De Dauw
6ee113c1e3 follow up to r111017 - added docs 2012-02-09 14:10:59 +00:00
Chad Horohoe
fb9faea302 Revert r103467, r106446 (bug 24464: calling LoginAuthenticateAudit hook more often)
Pretty narrow use case isn't very well defined, and this has *felt wrong* to me since
it was committed in November. Easier to pull for now rather than blocking release.
2012-02-06 22:44:30 +00:00
Antoine Musso
3b609d22bf doxygen landing page 2012-02-01 21:40:49 +00:00
Jeroen De Dauw
95bbe12c68 this is no longer a guideline afaik 2012-01-29 05:37:49 +00:00
Diederik van Liere
22746a5807 Add the new SHA1 revision field to the XML export, add SHA1 field to export-0.6.xsd and fix namespace element from string to integer. 2012-01-23 19:48:20 +00:00
Antoine Musso
ccc769bac2 design file for nested tables CSS
See:
Bug 33752 - Wikitable uses CSS not supported in IE6
r107669
2012-01-19 17:22:36 +00:00
Siebrand Mazeland
ef9293b1b7 Remove support for the deprecated and no longer used in trunk hook MagicWordMagicWords. 2012-01-18 18:20:50 +00:00
Siebrand Mazeland
685216dd7f Update documentation. 2012-01-18 17:53:04 +00:00
Antoine Musso
883da87ccf firefox does not honor colgroup width with fixed layout 2012-01-16 21:13:48 +00:00
Sam Reed
284d014e37 Update documentation for ImportHandleRevisionXMLTag 2012-01-16 15:49:32 +00:00
Chad Horohoe
f3a6fc1576 Revert r102624, r104262 (user display name stuff). Per CR there isn't consensus on this yet. 2012-01-11 00:53:08 +00:00
Alexandre Emsenhuber
a0e6ccdb07 Made UnwatchArticle, UnwatchArticleComplete, WatchArticle and WatchArticleComplete pass a WikiPage object instead of Article.
There are two extensions (InterwikiIntegration and Syslog) that use these hooks and they don't Article-only methods so they won't break by this change.
2012-01-06 16:28:11 +00:00
Aaron Schulz
1d77bc94c2 * Cleanup for r108175: made if easier for extensions to interact with each other in TitleReadWhitelist hook. A handler can set $whitelisted to true to whitelist the page or it can set it to false and return false (most restrictive wins).
* Added some hook doc comments.
2012-01-06 06:16:05 +00:00
Alexandre Emsenhuber
7b96bc9010 Per request of Aaron Schulz, follow-up r102187: added new 'TitleReadWhitelist' hook to allow extensions to bypass core (and other extensions) checks to allow an user to read the page 2012-01-05 20:29:53 +00:00
Antoine Musso
616ff7b66c explanations by Erwin Dokter on bug 33496 2012-01-05 15:06:49 +00:00
Antoine Musso
4343153649 additional monospaced font-family hacks
font-family: monospace, monospace;
Is elegant and has my preference :-)

  font-family: monospace, DOESNOTEXISTREALLY;
Really make it obvious

follow r108123
2012-01-05 09:24:16 +00:00
Antoine Musso
37905df53a test rendering font-family for monospaced fonts
follow r108112
2012-01-05 09:16:13 +00:00
Niklas Laxström
3985279f03 Guessing a typo fix, could also be 'is a feed' but neither expression really opens to me 2012-01-04 11:03:33 +00:00
Antoine Musso
434f82e596 ResourceLoaderTestModules doc: better wording
follow r107993
2012-01-04 10:18:49 +00:00
Niklas Laxström
d0f832fd40 Typos, casing. Still don't understand "'qunit' is feed using tests/qunit/QUnitTestResources.php"
Ping r107919
2012-01-04 08:29:58 +00:00
Antoine Musso
c447423593 merge JSTesting branch into trunk
Changed written by Timo and reviewed by Hashar. This should be harmless.

To enable the feature:
  $wgEnableJavaScriptTest = true;

Then head to:
  [[Special:JavaScriptTest/qunit]]
2012-01-03 18:33:26 +00:00
Daniel Friesen
e96d2d6802 Add RequestContextCreateSkin hook to allow extensions to override the loading of skins. 2012-01-03 01:58:27 +00:00
Krinkle
be12ebf1ab [Core JS] More fixing of global config variable usage
* mw.config is the new way, and global config variable lookups are deprecated

* Based on two phase3-wide quick searches:
-- of " wg": http://toolserver.org/~krinkle/wikimedia-svn-search/view.php?id=321&hash=81700bf7486e4fee3b7bc1f83eb9eba6
-- of "!wg": http://toolserver.org/~krinkle/wikimedia-svn-search/view.php?id=327&hash=47c9d54a7a1d5d58a724dd834585f40d

Related changes:
* Changed some php comments mentioning "wg" variables to include the dollar sign, and a typo when the wf function prefix was meant.
* Removed TODO comment in wikibits.js and made it use the JS equivalent of wfUrlencode, which we have now, mw.util.wikiUrlencode 
* SpecialUpload.php: use OutputPage::addJsConfigVars instead of creating a new script tag through OutputPage::addScript(Skin::makeVariablesScript(..))
* Renamed wgUploadSetup in upload.js and made it local. Not used anywhere in ./trunk/phase3 and ./trunk/extensions
* Fix OutputPage::addJsConfigVars so that it can actually be called with an array instead of two arguments for key/value
* Some minor whitespace/convention stuff around the same line
2011-12-31 21:25:00 +00:00
Alexandre Emsenhuber
921bced830 Revert r106545 and pass a null variable by ref (also updated the documentation) so that the hook is called at the correct moment and after everything is executed.
This is *exactly* the same behaviour as before r88898 since $article was an out parameter to fill $wgArticle correctly.
2011-12-18 14:48:23 +00:00
Brion Vibber
5a6372103a Add BeforePageRedirect hook to OutputPage, allowing extensions to override redirect output.
This is needed by MobileFrontend to normalize some redirects to the mobile site, such as on login.
2011-12-14 00:38:21 +00:00
Daniel Friesen
9d0ee321b6 Introduce a Language::getMessagesFileName hook that will allow extensions to define new language messages files outside of core. 2011-12-12 19:32:59 +00:00
Daniel Friesen
42e8b0a8e7 Replace get{Local,Full,Link,Canonical}URL's $variant argument with a secondary $query argument and treat variant paths like we do action paths. 2011-12-12 19:19:23 +00:00
Tim Starling
3da36a9103 Reverted r92364 (per-namespace permissions).
This is the wrong configuration format for such a feature, and the wrong interface. We already have certain per-namespace permissions in the Title class, and we didn't need to add extra formal parameters to a whole lot of User methods in order to get them. The feature should be implemented wholly in Title, and the concept of user rights should remain relatively simple and easy to understand, and independent of its many applications, i.e. a user either has a right or doesn't. Rights are just a tool for developing access policies; the complexity should be in the caller.

The revert was mostly done by hand, since there were a lot of conflicts. I tried to preserve the gist of conflicting changes in r102187 and r102873. The test changes are not simple reverts, rather I just edited out the per-namespace tests. I reverted the followups r92589 and r104310.
2011-12-12 06:03:01 +00:00
Aaron Schulz
6dcefd735f Added LoggableUserIPData hook to hooks.txt and made CheckUser handle it. This is needed for bug 32925. 2011-12-09 20:13:31 +00:00
Aaron Schulz
dcbe8e7dd3 FU r101117: removed cURL thumb handler code and made thumb_handler.php a thin wrapper around thumb.php
* Moved original URL fetching code and parameter extraction code to thumb.php
* Made use of local repo URL and hash settings to avoid extra config code
* This makes it easy to add hooks for extensions/config to alter behavoir (ExtractThumbParameters hook added)
* Added FileRepo::getHashLevels()
2011-12-08 03:43:07 +00:00
Antoine Musso
d383f5a5e8 uidesign: fix diffchange, show basic diff just like on wiki 2011-12-06 09:35:24 +00:00
Antoine Musso
941c553f3c basic design file for our diffs
Might help folks on r94461 . Loading this file will let you easily
look at the diff file. Might need to be improved to show a real diff
instead.
2011-12-06 09:15:41 +00:00
Antoine Musso
d3bb1dbe80 move docs/design.html to a new 'uidesign' directory 2011-12-06 09:14:27 +00:00
Daniel Friesen
fba28f5233 Followup r104688, reintroduce the full PathRouter code now that the bug with url encoded paths is fixed. 2011-11-30 15:12:19 +00:00
Brion Vibber
73b6bd244a Revert r104274, r104284, r104285 -- breaks special pages on non-english 2011-11-28 19:55:49 +00:00
Sam Reed
f3839fe71f Added "ApiGetDescription" hook 2011-11-28 15:33:28 +00:00
Bryan Tong Minh
e7e9ad5f43 Follow-up r92364: Update hooks documentation 2011-11-26 21:31:22 +00:00
Daniel Friesen
63e93db2d8 Implement path routing code.
- Makes extending paths with extensions simpler.
- Should fix bug 32621 by parsing paths based on pattern weight rather than pattern order.
2011-11-26 16:29:25 +00:00
Brion Vibber
fa78b0a3d4 tweak hook doc; followup r103762 2011-11-23 00:56:45 +00:00
Sam Reed
8e9b597894 * (bug 24765) User tool links edit hook
Original patch by "biolizard", updated to not use $this in static, and added relevant documentation
2011-11-20 15:16:54 +00:00
Alexandre Emsenhuber
dd58309f1a * Added WikiPage::getParserOutput() and changed Article::getParserOutput() to use it
* WikiPage::getParserOutput() requires a ParserOptions object (and optionally the revision ID) instead of an User object, removes an hidden dependency on $wgLang. For this reason, WikiPage::isParserCacheUsed() now also uses a ParserOptions object instead of an User object (doesn't change anything in the code except the variable name and it's not called in extensions)
* Moved PoolWorkArticleView to WikiPage.php and added an entry in the AutoLoader and moved output-related stuff directly in Article::view() so that in can be shared with WikiPage::getParserOutput() (removes code duplication, etc.)
* Added the revision ID to the PoolCounter key so that it knows which revision is being parsed and doesn't wait for another parse operation with same options but different revisions
* Removed Article::doViewParse(), Article::tryDirtyCache() and Article::getOutputFromWikitext() since they are now integrated in PoolWorkArticleView and Article::view() and there are no callers in extensions. This also fixes a bug since Article::doViewParse() will get another ParserOptions instance with special options set in Article::view() not be repercuted.
* Updated DifferenceEngine to use the new system
* Updated docs/memcached.txt to correct method names
2011-11-17 20:21:54 +00:00
Mark A. Hershberger
8eb1dd2944 Adapt and re-apply Michael Newton's patch from Bug 24464 - Execute
LoginAuthenticateAudit hook more often.

Also updated release notes.
2011-11-17 15:16:03 +00:00
Alexandre Emsenhuber
c35b82a036 * Factorise common code in ImagePage::delete() and allow normal page deletion if $wgUploadMaintenance is true
* Moved $wgUploadMaintenance check after permissions and read only, so that the user doesn't think the error is temporary if he both doesn't have the permission and $wgUploadMaintenance is true
* Show normal error page when $wgUploadMaintenance and added a message for the error title
* Moved watchlist updating to FileDeletForm::execute(), it has nothing to do in doDelete() (would also be executed for api requests, etc.)
* Added $user parameter to FileDeletForm::doDelete() to pass the user doing the action
* Use WikiPage instead of Article
2011-11-15 18:08:34 +00:00
Sam Reed
ad6d7f0ffa Followup r102575, recreate export-0.6.xsd copied with export-0.5.xsd history 2011-11-15 11:04:00 +00:00
Sam Reed
bcca9d67a4 Followup r102575, delete export-0.6.xsd to create from a copy of export-0.5.xsd 2011-11-15 11:02:21 +00:00
Aaron Schulz
f00af516ab Changed new LocalFilePurgeThumbnails hook arguments and updated wmf/swift.php to actually work for archived file thumbs. 2011-11-15 02:20:08 +00:00
Daniel Friesen
44ab4a9448 Add a new User::getDisplayName() to return the name that should be displayed in the interface.
Add a UserDisplayName hook to allow extensions to give custom display names for users.
Add a $wgRealNameInInterface to use the real name of a user as the display name.
To start of the first use of the display name functionality tweak SkinTemplate to declare the userdisplayname and use it inside of personal_urls.
2011-11-10 06:55:21 +00:00
Diederik van Liere
eadfd5a581 Commit to fix bug 30513. 2011-11-09 21:15:48 +00:00
Aaron Schulz
eabb7d1638 Updated docs for r101896 2011-11-04 15:05:00 +00:00
Bryan Tong Minh
eac3d58b44 Per comments on r99911 move $wgMaxImageArea check back to normaliseParams(). Added hook BitmapHandlerCheckImageArea to override the area check. I'm not very happy with this overly specific hook, but I don't see a clear way to obtain the functionallity required otherwise.
Remove the width and height params from BitmapHandler::getImageArea(). There is really no reason for them to be there.
2011-11-02 20:48:50 +00:00
Roan Kattouw
698f9e9c00 Revert r101488, breaks parser test. Add a comment explaining why there is no caching currently being done, and document the fact that the hook is called a zillion times in hooks.txt 2011-11-01 16:25:26 +00:00
Alexandre Emsenhuber
41e944bac2 Some cleanup to ProtectionForm:
* When the user doesn't have permission to protect/unprotect the page, display a page with the title set to "View protection level for ...", then the permissions errors and the current protection levels. Except for the title, this was already the case for permissions errors, but when the database was read-only this was throwing an exception due to the change in OutputPage::readOnlyPage()  
* Moved check for NS_MEDIAWIKI a level up, so that is it also catched on page save, and make the output in such case much more user friendly
* Changed edit token to be salted with array( 'protect', 'page name' ) (as for action=watch)
* Allow extensions to return false in ProtectionForm::save hook for consistency with other hooks and in that case fill the error message with 'hookaborted' if the extension does not provide an customised error message.
* Changed ProtectionForm::show() to accept an array of message name and its parameters in addition of a string with raw HTML and converted calls to use the new method. This also means that ProtectionForm::save can use this 
* Removed the setSubtitle() call for the 'formerror' message in case of error since it's overriden by the "back link"
2011-11-01 15:45:52 +00:00
Roan Kattouw
a0a775a9b4 Followup r101354: pass $this to the PreferencesGetLegend hook so the callee will have a ContextSource to work with 2011-10-31 13:19:38 +00:00
Roan Kattouw
b2b8ea70db Introduce the PreferencesGetLegend hook. I need this to customize the labels of <fieldset>s in the preferences for the Gadgets extension in the RL2 branch and I can't think of a cleaner way to do this. 2011-10-31 12:36:51 +00:00
Aaron Schulz
d3cb63fb5b FU r100716:
* Pass the File object in LocalFilePurgeThumbnails so handlers can use the getRel() functions and such
* Also added the hook to hooks.txt, as this could be useful for other caches or things in thumb_handler.php
2011-10-28 22:21:03 +00:00
Mark A. Hershberger
8e65a9e093 Fixes Bug #6793 — “New Variable __NEWSECTIONS__ like __TOC__” by
adding Nx.devnull's patch that adds a hook needed by
Extension:PlaceNewSection.
2011-10-27 23:55:29 +00:00
Raimond Spekking
5e555ba677 Change the hook case per CR r95152 2011-10-19 17:15:05 +00:00
Daniel Friesen
7383253816 Followup r98212; Hook documentation. 2011-10-09 19:42:45 +00:00
Alexandre Emsenhuber
c7ecb6777d Reorder ResourceLoader hooks alphabetically 2011-10-08 09:07:02 +00:00
Alexandre Emsenhuber
3fbca542c9 Added missing directory to findHooks.php and a missing hook in hooks.txt 2011-10-02 17:36:19 +00:00
Alexandre Emsenhuber
b5cbe8d677 Per Aaron, fix for r98012: make Title object be handled correctly and document where there can now be a Title object 2011-09-29 19:03:57 +00:00
Aaron Schulz
c5e8690bf9 Article refactoring and changes for bug 31144. Dependency inject ParserOutput objects in some places and let hooks set $outputDone as the parser output used. 2011-09-24 21:12:26 +00:00
Brion Vibber
7da1d55a84 Add in a 'TestCanonicalRedirect' hook to be called when about to make a redirect to the canonical page form of a regular page view. Some extensions such as MobileProfile may need to modify this logic to prevent incorrect redirects, such as on alternate en.m.wikipedia.org domain, where we'd want to either skip it or rewrite to the alternate domain.
Support for resolving bug 31012.
2011-09-19 23:14:52 +00:00
Antoine Musso
7c1c773e2e close <span> with </span> not </p>
follow up r97101
2011-09-19 20:08:27 +00:00
Krinkle
ba37da2b0b (bug 30940) Add a hook in User:getDefaultOptions.
Needs back porting to 1.18 in order to fix Gadgets in REL1_18
2011-09-17 02:42:34 +00:00
Sean Colombo
85b58f9ec3 Followup to r97342 to add docs for new hook. 2011-09-16 23:14:13 +00:00
Antoine Musso
4a38013f70 revert r97203
That code was not really meant to work :-D
2011-09-16 06:13:57 +00:00
Antoine Musso
16acae654b New hook RecentChangesListRecentChangesLine which let you customize an
entire recent changes line for user with 'Enhanced recent changes' option
It is equivalent to the existing hook OldChangesListRecentChangesLine

Reported by finlay on IRC.
2011-09-15 20:57:43 +00:00
Robin Pepermans
9046f2d981 Re-do reverted r96824, but in SpecialSearch first return if the title object is invalid. 2011-09-15 16:26:35 +00:00
Roan Kattouw
1831886215 Per Nikerabbit on IRC, document the $status parameter in ArticleSaveComplete. Has been undocumented since its introduction in r41244 (!) 2011-09-15 13:11:59 +00:00
Antoine Musso
a2f8219b6f ammend design guide :p 2011-09-14 20:48:02 +00:00
Brion Vibber
e46693ba79 Revert r96824: causes fatal errors when search query doesn't happen to be a valid title. Code doesn't appear to have been tested? 2011-09-14 20:34:39 +00:00
Robin Pepermans
6df3fdb647 SpecialSearch: add two hooks, one to modify the power search box, one to change the message pointing to the page title searched for
WikimediaIncubator:
* use these hooks and SpecialSearchSetupEngine to improve search usability
* use a different message for the language code in preferences, per suggestion of Amir
2011-09-12 01:39:11 +00:00
Aaron Schulz
9d572d1844 Cleanup to r84610 per CR: changed BeforeParserMakeImageLinkObj hook to use a RepoGroup style param array that also excepts a 'broken' parameter. This new parameter replaces the odd "use timestamp '0' to make a broken thumbnail' convention. No other callers are using this hook other than FR, so the old time/sha1 params where removed. 2011-09-06 18:11:53 +00:00
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
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