lhc/web/wiklou.git
11 years agoMerge "Revert "merged master"" into Wikidata
Daniel Kinzler [Wed, 29 Aug 2012 13:15:19 +0000 (13:15 +0000)]
Merge "Revert "merged master"" into Wikidata

11 years agoRevert "merged master"
Daniel Kinzler [Wed, 29 Aug 2012 13:14:49 +0000 (13:14 +0000)]
Revert "merged master"

This reverts commit 67bfdc7a68940d901e585eadd984a2074bf0216a

11 years agoclear magicword cache before testing cleanSig
daniel [Wed, 29 Aug 2012 08:42:47 +0000 (10:42 +0200)]
clear magicword cache before testing cleanSig

Change-Id: I89dc2173f6a27dcd16b0548b06070ac4244fd3cb

11 years agomerged master
daniel [Wed, 29 Aug 2012 08:07:10 +0000 (10:07 +0200)]
merged master

Change-Id: Ib2b879c4daa17401eeeb50767c0e5a54254855c3

11 years agoMerge "Fix error display on failing rollback" into Wikidata
daniel [Wed, 29 Aug 2012 10:02:26 +0000 (10:02 +0000)]
Merge "Fix error display on failing rollback" into Wikidata

11 years agoMerge "Check prepareSave() before undeleting." into Wikidata
daniel [Wed, 29 Aug 2012 10:02:17 +0000 (10:02 +0000)]
Merge "Check prepareSave() before undeleting." into Wikidata

11 years agoReplace usage of doEdit() with doEditContent()
daniel [Tue, 28 Aug 2012 14:02:13 +0000 (16:02 +0200)]
Replace usage of doEdit() with doEditContent()

Change-Id: I2c423744bd91044c37bbec53b35729bd1c09901b

11 years agoMerge "EditPage cleanup - parser errors, etc" into Wikidata
daniel [Tue, 28 Aug 2012 14:42:04 +0000 (14:42 +0000)]
Merge "EditPage cleanup - parser errors, etc" into Wikidata

11 years agoMerge "Updating of redirect target in Content objects" into Wikidata
daniel [Tue, 28 Aug 2012 14:41:14 +0000 (14:41 +0000)]
Merge "Updating of redirect target in Content objects" into Wikidata

11 years agoEditPage cleanup - parser errors, etc
daniel [Tue, 21 Aug 2012 12:06:04 +0000 (14:06 +0200)]
EditPage cleanup - parser errors, etc

Cleaned up EditPage, removing and fixing comments etc.

The most prominent changes are:
* improved handing for parse errors
* improved handling for image redirects
* better readability because one huge try/catch block was removed

Change-Id: Ie33720922eb05dda89a22ca1f5f0cba4b1d31129

11 years agoAvoid deprecation warnings in test cases.
daniel [Tue, 28 Aug 2012 13:58:36 +0000 (15:58 +0200)]
Avoid deprecation warnings in test cases.

a) when testing deprecated functions, use $this->hideDeprecated() to
suppress warnings.

b) use doEditContent() instead of doEdit()

Change-Id: Ifa9e0ef373ed72ef7d4a3c2dd558483af4a3fd55

11 years agoUpdating of redirect target in Content objects
daniel [Tue, 21 Aug 2012 15:32:44 +0000 (17:32 +0200)]
Updating of redirect target in Content objects

Content::updateRedirect may be used to change the redirect target
without knowing anything about the content's format.

Change-Id: Ifaf8f2bdd9d1cbf984e2ef3c60d0282c984c18c1

11 years agoMerge "Fixing creation of DifferenceEninge" into Wikidata
daniel [Tue, 28 Aug 2012 11:44:44 +0000 (11:44 +0000)]
Merge "Fixing creation of DifferenceEninge" into Wikidata

11 years agoMerge "Revert all changes to DairikiDiff." into Wikidata
daniel [Tue, 28 Aug 2012 11:44:22 +0000 (11:44 +0000)]
Merge "Revert all changes to DairikiDiff." into Wikidata

11 years agoMerge "Make LinkFilter handle Content objects" into Wikidata
daniel [Tue, 28 Aug 2012 11:44:08 +0000 (11:44 +0000)]
Merge "Make LinkFilter handle Content objects" into Wikidata

11 years agoMerge "Add Content::matchMagicWord" into Wikidata
daniel [Tue, 28 Aug 2012 11:42:46 +0000 (11:42 +0000)]
Merge "Add Content::matchMagicWord" into Wikidata

11 years agoMerge "cleaned up comments in DifferenceEngine" into Wikidata
daniel [Tue, 28 Aug 2012 11:42:18 +0000 (11:42 +0000)]
Merge "cleaned up comments in DifferenceEngine" into Wikidata

11 years agoMerge "Made ApiParse aware of ContentHandler" into Wikidata
daniel [Tue, 28 Aug 2012 11:42:04 +0000 (11:42 +0000)]
Merge "Made ApiParse aware of ContentHandler" into Wikidata

11 years agoMerge "Improved content model handling in ApiEditPage" into Wikidata
daniel [Tue, 28 Aug 2012 11:41:52 +0000 (11:41 +0000)]
Merge "Improved content model handling in ApiEditPage" into Wikidata

11 years agoMerge "Revision::getContent must return clone if mutable" into Wikidata
daniel [Tue, 28 Aug 2012 11:40:32 +0000 (11:40 +0000)]
Merge "Revision::getContent must return clone if mutable" into Wikidata

11 years agoMerge "Bug 39509: Function for running legacy hooks." into Wikidata
daniel [Tue, 28 Aug 2012 11:40:11 +0000 (11:40 +0000)]
Merge "Bug 39509: Function for running legacy hooks." into Wikidata

11 years agoFix error display on failing rollback
daniel [Mon, 27 Aug 2012 19:40:03 +0000 (21:40 +0200)]
Fix error display on failing rollback

Rollback will now show the actual errors that caused it to fail,
instead of a misleading message about permissions.

Also, errores returned by WikiPage::doEditContent are now propagated
and shown.

Change-Id: I5a3f8cb7a0b881d07d52f63504dd3757192205a9

11 years agoCheck prepareSave() before undeleting.
daniel [Mon, 27 Aug 2012 15:06:53 +0000 (17:06 +0200)]
Check prepareSave() before undeleting.

This calls prepareSave() before undeleting a page, to make sure the restored
revision does not violate any constraints imposed by the ContentHandler.

To achieve this, several improvements are made to the error handling in
SpecialUndelete.

Change-Id: I41bab9892de7c604be6aa7f6db9dee47b3f0d27c

11 years agoFixing creation of DifferenceEninge
daniel [Fri, 24 Aug 2012 18:49:19 +0000 (20:49 +0200)]
Fixing creation of DifferenceEninge

Creation of DifferenceEninge insteances was based on invalid assumptions
in several places.

Change-Id: Ib67ca893ea53a27d4ac7efd8a9ca0d3b2d93949f

11 years agoRevert all changes to DairikiDiff.
daniel [Fri, 24 Aug 2012 18:47:23 +0000 (20:47 +0200)]
Revert all changes to DairikiDiff.

Reverting unrelated changes to DairikiDiff. Slight refactoring would
make the diff classes much more reusable and flexible, but that needs
some more thought, and is unrelated to the task at hand.

Change-Id: I9f132985207096676cbb6139c7d37572a10b8806

11 years agoMerge "cherry-pick bdaee6f6594532409ce55e9cde0f942f96ec4181" into Wikidata
jeroendedauw [Fri, 24 Aug 2012 14:54:45 +0000 (14:54 +0000)]
Merge "cherry-pick bdaee6f6594532409ce55e9cde0f942f96ec4181" into Wikidata

11 years agocherry-pick bdaee6f6594532409ce55e9cde0f942f96ec4181
jeroendedauw [Thu, 23 Aug 2012 20:43:20 +0000 (22:43 +0200)]
cherry-pick bdaee6f6594532409ce55e9cde0f942f96ec4181

Change-Id: I5251c8f83f401731c3027718656cb65d8d910f22

11 years agoadd docs for getContentInternal()
aude [Tue, 21 Aug 2012 09:49:01 +0000 (09:49 +0000)]
add docs for getContentInternal()

Change-Id: I87a0c9908975c236794bad39209ad8bdef4699c3

11 years agoAdd Content::matchMagicWord
daniel [Tue, 21 Aug 2012 15:08:49 +0000 (17:08 +0200)]
Add Content::matchMagicWord

Allows Content objects to control how magic worlds are applied to it.
Useful mainly when magic words are used outside the parser.

Change-Id: I9711f580f8beadfb9f93a706f87c97c7cf667f6c

11 years agoMake LinkFilter handle Content objects
daniel [Tue, 21 Aug 2012 15:54:52 +0000 (17:54 +0200)]
Make LinkFilter handle Content objects

Change-Id: Iced1c83642143faa79a5461ae6278267e0595aa9

11 years agocleaned up comments in DifferenceEngine
daniel [Tue, 21 Aug 2012 14:26:14 +0000 (16:26 +0200)]
cleaned up comments in DifferenceEngine

Change-Id: I939fa563a66357efb8eae8d8f60bf0ba08cd05eb

11 years agoMade ApiParse aware of ContentHandler
daniel [Tue, 21 Aug 2012 14:15:12 +0000 (16:15 +0200)]
Made ApiParse aware of ContentHandler

Change-Id: I656e4cab6641eaae98b40700c7b3a7cb0eeed54f

11 years agoImproved content model handling in ApiEditPage
daniel [Tue, 21 Aug 2012 14:14:18 +0000 (16:14 +0200)]
Improved content model handling in ApiEditPage

Change-Id: Ifd9e344864f7663de7263cb536e83dbdc03cf2ed

11 years agoRevision::getContent must return clone if mutable
daniel [Tue, 21 Aug 2012 10:48:29 +0000 (12:48 +0200)]
Revision::getContent must return clone if mutable

Revision::getContent must return a cloned instance of the Content object
if the Content object is mutable to avoid confusion.

Content::copy is used to achieve this, which is specified to return $this
for immutable Content.

Change-Id: Iace17b6ae8aa85a3500624441b69bc067c1ade00

11 years agoBug 39509: Function for running legacy hooks.
daniel [Mon, 20 Aug 2012 17:28:20 +0000 (19:28 +0200)]
Bug 39509: Function for running legacy hooks.

ContentHandler::runLegacyHooks can be used to run hooks that don't
supprot Content objects yet. runLegacyHooks will issue a warning and take
case of serialization/unserialization of the content as appropriate.

Changeset 2: rebased.

Change-Id: I31109061110f87c38bdeebf30d520c8e1241bb29

11 years agofixing long lines
daniel [Mon, 20 Aug 2012 19:33:07 +0000 (21:33 +0200)]
fixing long lines

Change-Id: Iebcd40a1a37a3a93cc571fa2c2b0a87f53dc97a4

11 years agoMerge "merging latest master" into Wikidata
daniel [Mon, 20 Aug 2012 14:57:55 +0000 (14:57 +0000)]
Merge "merging latest master" into Wikidata

11 years agomerging latest master
daniel [Mon, 20 Aug 2012 14:55:28 +0000 (16:55 +0200)]
merging latest master

Change-Id: I36b7f2f63ab8c08f8412d521dc68ea45c8b67711

11 years agoAdded utility method taking an array of elements and wrapping each element in it...
jeroendedauw [Sun, 12 Aug 2012 19:37:54 +0000 (21:37 +0200)]
Added utility method taking an array of elements and wrapping each element in it's own array.

Useful for data providers that only return a single argument.

Change-Id: I220948865e3de395363bf8858098e61de3c8d35b

11 years agoMerge "add Article::setParserOptions" into Wikidata
Daniel Werner [Tue, 7 Aug 2012 17:08:05 +0000 (17:08 +0000)]
Merge "add Article::setParserOptions" into Wikidata

11 years agoadd Article::setParserOptions
daniel [Mon, 6 Aug 2012 13:55:52 +0000 (15:55 +0200)]
add Article::setParserOptions

Change-Id: Ica1c0a3c4b5b569c4911d4c1fb0167812f932c20

11 years agoAdded fixme for incorrect assumption being made
jeroendedauw [Mon, 6 Aug 2012 17:28:57 +0000 (19:28 +0200)]
Added fixme for incorrect assumption being made

Change-Id: I40b83428019b32c39c529577bf3f55677a407693

11 years agomerged master
daniel [Thu, 2 Aug 2012 09:01:22 +0000 (11:01 +0200)]
merged master

Change-Id: I6afafe971afb3f38fc8f1e66ba409283b8a698f8

11 years agoRevert "(bug 260) Wrap <pre> overflow properly."
Tim Starling [Thu, 2 Aug 2012 04:48:06 +0000 (14:48 +1000)]
Revert "(bug 260) Wrap <pre> overflow properly."

Due to bug 38800. Just reverting to prevent accidental deployment in
1.20wmf9. I would set a fixme status instead if there was such a thing.

The problem with this is that it breaks formatting of thousands of
Wikipedia articles due to interaction with SyntaxHighlight_GeSHi. I'm
sure some satisfactory solution can be found which fixes both bugs, but
leaving this commit deployed is not a good interim solution.

This reverts commit 782b9f177404f02417c03abaf96b371e1462f160.

Change-Id: I1977f093563b5658def9ba57a6ea6cfa9796f795

11 years agoMerge "[FileBackend] Skip over some illegal paths and output the error."
Catrope [Wed, 1 Aug 2012 23:52:14 +0000 (23:52 +0000)]
Merge "[FileBackend] Skip over some illegal paths and output the error."

11 years ago[FileBackend] Skip over some illegal paths and output the error.
Aaron Schulz [Sat, 28 Jul 2012 17:38:25 +0000 (10:38 -0700)]
[FileBackend] Skip over some illegal paths and output the error.

Change-Id: Ib32aadc6398168e4a63279d7da61a0dd1e1a6483

11 years agoMerge "Add localonly= to prop duplicatefiles and imageinfo"
Catrope [Wed, 1 Aug 2012 23:47:35 +0000 (23:47 +0000)]
Merge "Add localonly= to prop duplicatefiles and imageinfo"

11 years agoBetter inline styling for badge.
Kaldari [Wed, 1 Aug 2012 23:03:35 +0000 (16:03 -0700)]
Better inline styling for badge.

Change-Id: Ie92a18478c0f9b62fceff39f54a9524432eec921

11 years agoMerge "bug 36073 Use mw-imagepage-linkstoimage-ns as a class instead of an ID"
Catrope [Wed, 1 Aug 2012 21:54:27 +0000 (21:54 +0000)]
Merge "bug 36073 Use mw-imagepage-linkstoimage-ns as a class instead of an ID"

11 years agoMerge "Change File::compare to use getName, not getTitle"
Aaron Schulz [Wed, 1 Aug 2012 19:39:10 +0000 (19:39 +0000)]
Merge "Change File::compare to use getName, not getTitle"

11 years agobug 36073 Use mw-imagepage-linkstoimage-ns as a class instead of an ID
Derk-Jan Hartman [Mon, 16 Jul 2012 23:10:01 +0000 (01:10 +0200)]
bug 36073 Use mw-imagepage-linkstoimage-ns as a class instead of an ID

This avoids multiple defines of the same ID on a File page.

Change-Id: I0f8ae37d74f2ec519361b2af164e115f6efa4ac6

11 years agoMerge "memcached: better error messaging"
Aaron Schulz [Wed, 1 Aug 2012 19:06:53 +0000 (19:06 +0000)]
Merge "memcached: better error messaging"

11 years ago(bug 38492) let doxygen document variables
Antoine Musso [Wed, 1 Aug 2012 16:23:56 +0000 (18:23 +0200)]
(bug 38492) let doxygen document variables

We are using '@var' to document our variables and class properties,
which is unfortunately not working since '@var' is really meant to
document a function or method.

The way to fix it is to use an input filter that will rewrite our PHP
source code to pretends variables are typed. Aka something like:

 /**
  * A title object
  * @var Title
  */
 var $title;

Will be made:

 /**
  * A title object
  * @var Title
  */
 Title $title;

That is incorrect PHP code but it is properly recognized by Doxygen.

This patch as a side effect, all variables and properties will end up
being documented in addition of type hinting.

Use a hack authored by Goran Rakic at:
http://stackoverflow.com/a/8472180/276152

Change-Id: I4ead1bd1feace44496b45ed8c55f5e52c59e7694

11 years agoAdd localonly= to prop duplicatefiles and imageinfo
umherirrender [Wed, 1 Aug 2012 17:51:23 +0000 (19:51 +0200)]
Add localonly= to prop duplicatefiles and imageinfo

When looking only for local files, the localonly param skipped the
mabye expensive look up inside the file repos.

Change-Id: Ib8f38d6abf9238a349bbfd617a36933bdfe74b5c

11 years agoChange File::compare to use getName, not getTitle
umherirrender [Wed, 1 Aug 2012 17:40:10 +0000 (19:40 +0200)]
Change File::compare to use getName, not getTitle

For files the file name with underscores is often used,
than the compare method should do that also.
This matches than the ORDER BY img_name done by some query.

Change-Id: Ia1b89577538bdfdf751c7b9584e7c008a8c2bb1e

11 years agomemcached: better error messaging
Antoine Musso [Fri, 13 Jul 2012 16:20:00 +0000 (18:20 +0200)]
memcached: better error messaging

MemcachedClient output a generic error message: "Error parsing memcached
response\n" whenever it is not able to read from the socket. It is also
lacking the remote peer it is reading from.

This patch add a new message when fgets( <socket> ) return false, which
means we could not read from the file pointer. It also get the stream
remote name for debugging purposes.

Change-Id: I9b8a25a03af0d730aa3b4830a44b1ea739343274

11 years agoMerge "autoloader entry for UserNotLoggedIn class"
Nikerabbit [Wed, 1 Aug 2012 11:15:08 +0000 (11:15 +0000)]
Merge "autoloader entry for UserNotLoggedIn class"

11 years ago(bug 37830) new $wgRequirePasswordforEmailChange
Reedy [Fri, 22 Jun 2012 16:29:48 +0000 (17:29 +0100)]
(bug 37830) new $wgRequirePasswordforEmailChange

$wgRequirePasswordforEmailChange to control whether password
confirmation is required for changing an email address or not.

Change-Id: Iaef440ef56d391bf9e68d15899fc81c6050722fb

11 years agoautoloader entry for UserNotLoggedIn class
Antoine Musso [Wed, 1 Aug 2012 10:46:54 +0000 (12:46 +0200)]
autoloader entry for UserNotLoggedIn class

I have forgot to add an autoloader entry for the new exception class
named UserNotLoggedIn (introduced by Id8127299 / b1c1448d).

Change-Id: Ib7226c8532fd695edf78f0e4c33b91edbf8ed52e

11 years agoMerge "Namespace gender aliases for Lithuanian (lt)"
Siebrand [Wed, 1 Aug 2012 08:30:49 +0000 (08:30 +0000)]
Merge "Namespace gender aliases for Lithuanian (lt)"

11 years agoNamespace gender aliases for Lithuanian (lt)
Niklas Laxström [Tue, 31 Jul 2012 22:03:54 +0000 (22:03 +0000)]
Namespace gender aliases for Lithuanian (lt)

http://translatewiki.net/wiki/Summary:Support/Gender_in_Lithuanian_namespace_names

Change-Id: If0a30180fb103ee1b56781a5fd1587b48e100da8

11 years ago(bug 38151) Implement mw.user.getRights and getGroups
Alex Monk [Thu, 5 Jul 2012 16:27:41 +0000 (17:27 +0100)]
(bug 38151) Implement mw.user.getRights and getGroups

* Also deprecate name() and anonymous()
  in favour of getName() and isAnon() (to match User.php), just
  like getRights and getGroups are now as well.

* Added unit tests for all.

Change-Id: I5970be9e8593589018152f4878f168b9b85ca5d5

11 years agoMerge "Revert "AJAXify watchlist editor""
Krinkle [Wed, 1 Aug 2012 03:19:28 +0000 (03:19 +0000)]
Merge "Revert "AJAXify watchlist editor""

11 years agoRevert "AJAXify watchlist editor"
Krinkle [Wed, 1 Aug 2012 03:19:12 +0000 (03:19 +0000)]
Revert "AJAXify watchlist editor"

Doesn't properly work on Special:EditWatchlist, some of the titles being unwatched are not fading out and staying behind.

There's also a small code quality issue unaddressed. Please re-submit for further review.

This reverts commit b46ec8fde5dfd3e80fa3861a01f1aac6f5a7b5ba

11 years agoMerge "(bug 30625) Return warnings, if they exist, despite ignorewarnings"
Catrope [Wed, 1 Aug 2012 00:48:19 +0000 (00:48 +0000)]
Merge "(bug 30625) Return warnings, if they exist, despite ignorewarnings"

11 years agoMerge "(bug 18834) Add an edit count to rollback link"
Catrope [Wed, 1 Aug 2012 00:44:29 +0000 (00:44 +0000)]
Merge "(bug 18834) Add an edit count to rollback link"

11 years agoMerge "(bug 27395) Write PHPUnit test suite for CSSJanus"
Catrope [Wed, 1 Aug 2012 00:26:48 +0000 (00:26 +0000)]
Merge "(bug 27395) Write PHPUnit test suite for CSSJanus"

11 years agoMerge "AJAXify watchlist editor"
Catrope [Wed, 1 Aug 2012 00:24:46 +0000 (00:24 +0000)]
Merge "AJAXify watchlist editor"

11 years ago(bug 31644) [MERGE DEPENDENCY] Let WikiMap url builders return full urls instead...
Derk-Jan Hartman [Tue, 31 Jul 2012 21:06:51 +0000 (23:06 +0200)]
(bug 31644) [MERGE DEPENDENCY] Let WikiMap url builders return full urls instead of canonical urls

* This commit depends on a commit of globalusage https://gerrit.wikimedia.org/r/17117
* This allows GlobalUsage, CentralAuth and AbuseLog extensions to use protocol relative URLs.

Change-Id: I7e65bd029f359c36770aa48e6663f26a671b92c0

11 years ago(bug 18834) Add an edit count to rollback link
jan [Sun, 29 Jul 2012 16:57:11 +0000 (18:57 +0200)]
(bug 18834) Add an edit count to rollback link

Add an edit count to rollback link to show how many edits will be
rollbacked. When the count is over 10 the text "more than 10 edits" will
be outputed.

Change-Id: I5c4050e0a9197d4c505e85685a9780c97138d427

11 years agoMerge "Some fixes to our jQuery UI skin for buttons"
Trevor Parscal [Tue, 31 Jul 2012 20:25:55 +0000 (20:25 +0000)]
Merge "Some fixes to our jQuery UI skin for buttons"

11 years agoMerge "[FileBackend] Made swift handle unknown content types better."
Catrope [Tue, 31 Jul 2012 20:13:35 +0000 (20:13 +0000)]
Merge "[FileBackend] Made swift handle unknown content types better."

11 years ago(bug 27395) Write PHPUnit test suite for CSSJanus
Timo Tijhof [Tue, 31 Jul 2012 08:02:04 +0000 (01:02 -0700)]
(bug 27395) Write PHPUnit test suite for CSSJanus

Change-Id: If40c5de54bffae6e5ac8fac81754a53a40c652b1

11 years ago[FileBackend] Made swift handle unknown content types better.
Aaron [Tue, 31 Jul 2012 17:53:27 +0000 (10:53 -0700)]
[FileBackend] Made swift handle unknown content types better.

Change-Id: I50a5c17c40152a9e469a54bdd70a8408c57ebd50

11 years agoMerge "Add hint for pipe-separated list to action=help"
Catrope [Tue, 31 Jul 2012 16:56:18 +0000 (16:56 +0000)]
Merge "Add hint for pipe-separated list to action=help"

11 years agoMerge "Fix logic error from Ia74ac399 (2ee4653)."
Reedy [Tue, 31 Jul 2012 16:50:09 +0000 (16:50 +0000)]
Merge "Fix logic error from Ia74ac399 (2ee4653)."

11 years agoMerge "* oracle DB schema update to current (changes relevant to 1.19 will be backpor...
Demon [Tue, 31 Jul 2012 16:30:33 +0000 (16:30 +0000)]
Merge "* oracle DB schema update to current (changes relevant to 1.19 will be backported) * fixed an updater bug from 1.19 (will be backported)"

11 years agoFix logic error from Ia74ac399 (2ee4653).
Alexandre Emsenhuber [Tue, 31 Jul 2012 11:18:03 +0000 (13:18 +0200)]
Fix logic error from Ia74ac399 (2ee4653).

The "views" part of the table should only
be displayed if view counters are *not*
disabled (and not the opposite).

Change-Id: I4859f396cc9e2eb7b9f4eff6502efc459a3410fd

11 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Tue, 31 Jul 2012 08:06:11 +0000 (08:06 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I6556bddc4204ecebff39db8c8d01e8a169e62fc0

11 years agoAdded placeholder-msg support and more documentation to jquery.localize
Trevor Parscal [Mon, 30 Jul 2012 21:43:58 +0000 (14:43 -0700)]
Added placeholder-msg support and more documentation to jquery.localize

* Added examples of all options (prefix, keys and params)
* Added example of raw attribute being used to bypass escaping
* Added documentation to code where it seemed clarification was needed
* Reduce duplication and simplified  some unnecessarily complex statements
* Added test for new placeholder-msg attribute support
* Made adding more attributes in the future easier
* Moved message wrapper function out of the localize function so we aren't defining it each time localize is used

Change-Id: I77593acf4c1b3974d502a1a8382cca9267af2d41

11 years agoMerge "(bug 37390) Clean up QUnit test suites"
Trevor Parscal [Mon, 30 Jul 2012 23:54:39 +0000 (23:54 +0000)]
Merge "(bug 37390) Clean up QUnit test suites"

11 years ago(bug 37390) Clean up QUnit test suites
Timo Tijhof [Mon, 30 Jul 2012 23:46:50 +0000 (16:46 -0700)]
(bug 37390) Clean up QUnit test suites

* Use new QUnit 1.8.0+ pattern:
 - no-globals (only QUnit itself)
 - assert-object pattern
 - Remove pointless '-- Initial check' assertions.
   I introduced this pattern last year for no particular reason and
   everybody just copied it. There is no reason for it, it works fine
   without it. And the rest of the world that uses QUnit doesn't do
   it either. Exceptions are caught by QUnit and error handling there
   is much better than a dull '!ok()' assertion.

* .jshintrc:
 - Tolerate "mulistr" (this is used in many extensions, test suites
   as well as in MediaWiki core)
   "foo\
   bar"
 - Use "jquery: true" instead of "jQuery" so that JSHint can optimize
   for jQuery edge cases.

Misc issues fixed:
 * Trailing comma's in jquery.tablesorter.test
 * Missing semi-colon in testrunner.js
 * Remove backwards-compatible line for "equals()" and "same()".
   These have been deprecated in QUnit since 2009 (which is way
   before we even started looking at QUnit).
   Inside QUnit itself is a deprecation notice, I don't know why
   I added this compatibility line, it is stupid and overrides the
   nice deprecation-warning that QUnit has built in for it).
 * Use QUnit.push inside assertTrue and assertFalse.
   QUnit assertion methods must not call each other, in order to keep
   the call stack length as expected so that QUnit can report the
   file and line number of the caller of the assertion in case of
   failure etc.

Change-Id: I5cded6e8c32dba39170a02bdd3236c8b7b04d269

11 years agoMerge "Fix at end navigation condition for query pages"
Aaron Schulz [Mon, 30 Jul 2012 22:30:12 +0000 (22:30 +0000)]
Merge "Fix at end navigation condition for query pages"

11 years agoMerge "Realign $magicWords array in LanguageEn.php"
Aaron Schulz [Mon, 30 Jul 2012 22:17:16 +0000 (22:17 +0000)]
Merge "Realign $magicWords array in LanguageEn.php"

11 years agoMerge "Move some readonly around"
Aaron Schulz [Mon, 30 Jul 2012 22:16:43 +0000 (22:16 +0000)]
Merge "Move some readonly around"

11 years agoMerge "Make MWHttpRequest::__construct() protected."
Aaron Schulz [Mon, 30 Jul 2012 22:15:42 +0000 (22:15 +0000)]
Merge "Make MWHttpRequest::__construct() protected."

11 years agoAJAXify watchlist editor
Eranroz [Sun, 3 Jun 2012 14:39:04 +0000 (17:39 +0300)]
AJAXify watchlist editor

This patch makes the watchlist editor to use pagination. That would
avoid old browsers crashing (bug 20483).
Patch also add some AJAX operations to the editor, for example to remove
items from watchlist (bug 32151).

The AJAX support is an ALTERNATIVE to the form based method, to keep
support for non javascript users.

This change contains a required change in the API for watch operation,
to allow batch operation, by support titles parameter. The old title
(single page) parameter is still used to keep backward compatibility.

Change-Id: I1d8c66db9ba6456858ef655397935a2b3a421632

11 years agoClean up badger.{css,js} from PageTriage, generalise it and move it into core.
Andrew Garrett [Mon, 30 Jul 2012 21:16:56 +0000 (14:16 -0700)]
Clean up badger.{css,js} from PageTriage, generalise it and move it into core.

Change-Id: I0f5e754146359448eb125456e240cf5768d4f541

11 years ago(bug 37331) Modules sometimes execute twice in Firefox
Catrope [Tue, 24 Jul 2012 20:24:56 +0000 (13:24 -0700)]
(bug 37331) Modules sometimes execute twice in Firefox

This seems to have been caused by a weird race condition that caused the
loader to run while the module in question was also running; could also
have been caused by the module calling mw.loader, but that didn't seem
to be the case here.

The fix is to set .state='ready' before executing the module rather than
after. We can't do this in debug mode (where we're loading raw files and
can't execute things at will), but we have to do this in production
mode to prevent these freakish double executions.

Change-Id: I7e8dbd361fb265e520d3935e3a1fc7e3b6710b66

11 years agoMove some readonly around
umherirrender [Mon, 30 Jul 2012 16:46:01 +0000 (18:46 +0200)]
Move some readonly around

Checking first permission and than read only is better, than user
without permissions does not retry it when read only is over.

Moving disallowUserJS to top so javascript is always not possible, same
is already done on Special:ChangePassword

Change-Id: Ia27ee177b67f1151fd1178b24744b65da8e756fd

11 years agoMerge "Localize comma separators in jump-to-nav."
Siebrand [Mon, 30 Jul 2012 15:53:58 +0000 (15:53 +0000)]
Merge "Localize comma separators in jump-to-nav."

11 years agoMerge "(bug 38362) Special:Listuser now includeable"
Siebrand [Mon, 30 Jul 2012 15:40:26 +0000 (15:40 +0000)]
Merge "(bug 38362) Special:Listuser now includeable"

11 years agoMake MWHttpRequest::__construct() protected.
Liangent [Mon, 30 Jul 2012 15:18:44 +0000 (23:18 +0800)]
Make MWHttpRequest::__construct() protected.

This class is not for direct initialization, and
new MWHttpRequest(...)->execute() doesn't work at all.

Change-Id: I557723c218cd8e8f27283d01141c890263da095d

11 years agoAdd @since 1.20 to getDirMarkEntity
Amir E. Aharoni [Mon, 30 Jul 2012 08:51:47 +0000 (11:51 +0300)]
Add @since 1.20 to getDirMarkEntity

Change-Id: Ib74b68a85e470ef23685802af93c3ec66d50e1ed

11 years agoMerge "Follow-up Ifa9c55b7 (58852d8): Change one more item to getWatchedItem()"
Demon [Mon, 30 Jul 2012 01:52:37 +0000 (01:52 +0000)]
Merge "Follow-up Ifa9c55b7 (58852d8): Change one more item to getWatchedItem()"

11 years agoMerge "No need to call parseTitle() directly in MediaWiki::__construct()."
Demon [Mon, 30 Jul 2012 01:48:42 +0000 (01:48 +0000)]
Merge "No need to call parseTitle() directly in MediaWiki::__construct()."

11 years agoMerge "Don't unset() $wgOut in AjaxDispatcher."
Demon [Mon, 30 Jul 2012 01:45:17 +0000 (01:45 +0000)]
Merge "Don't unset() $wgOut in AjaxDispatcher."

11 years agoMerge "Fix for Ic74c7ba7 (c8c50eb): there's no reason to pass $this by reference."
Demon [Mon, 30 Jul 2012 01:44:23 +0000 (01:44 +0000)]
Merge "Fix for Ic74c7ba7 (c8c50eb): there's no reason to pass $this by reference."

11 years agoMerge "Use local context to get messages and time formatting methods of Language...
Siebrand [Sun, 29 Jul 2012 20:46:40 +0000 (20:46 +0000)]
Merge "Use local context to get messages and time formatting methods of Language class."

11 years agoMerge "Store the Title and User objects passed RecentChange::notify*()"
Siebrand [Sun, 29 Jul 2012 20:43:36 +0000 (20:43 +0000)]
Merge "Store the Title and User objects passed RecentChange::notify*()"