Commit graph

720 commits

Author SHA1 Message Date
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
Liangent
21b50f1123 Cosmetic change: add a new line after a section title.
Change-Id: I3e0557e5a1e4e69f795fcf4992b2ce64bbb70e59
2012-05-15 00:32:42 +08: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
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
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