lhc/web/wiklou.git
10 years agoReturn messages in a consistent form from Status objects
daniel [Wed, 17 Jul 2013 17:11:56 +0000 (19:11 +0200)]
Return messages in a consistent form from Status objects

Also fixes Message::getKey() to always return a string.

Rationale:

Some code, like RollbackAction, assumes that Status::getErrorArray will
return an array of the form ( messagekey, param... ), but this was not
the case when a Message object was passed to the Status.

This change makes sure Status::getErrorArray will always return arrays
of the expected form. This is especially important since the messages in
the Status object may be provided by extensions.

In order to convert Message objects to arrays of message keys and parameters,
Message::getKey() needed to be fixed to return a single key always.

Bug: 49338
Change-Id: I0deaa9888e9d86726a8e41ca606c571f56190c91

10 years agoMerge "Installer: page refresh should refresh list of supported DBs"
MarkAHershberger [Mon, 29 Jul 2013 22:30:37 +0000 (22:30 +0000)]
Merge "Installer: page refresh should refresh list of supported DBs"

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Mon, 29 Jul 2013 19:29:49 +0000 (19:29 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I811dc8a2b7065867047e4519257b6c611fdc47df

10 years agoMerge "Abort page restriction if no null revision can be created"
jenkins-bot [Mon, 29 Jul 2013 17:40:57 +0000 (17:40 +0000)]
Merge "Abort page restriction if no null revision can be created"

10 years agoMerge "updater: Move rev_sha1 addition before convertUserOptions"
MarkAHershberger [Mon, 29 Jul 2013 14:24:32 +0000 (14:24 +0000)]
Merge "updater: Move rev_sha1 addition before convertUserOptions"

10 years agoupdater: Move rev_sha1 addition before convertUserOptions
David Mudrák [Mon, 29 Jul 2013 13:09:25 +0000 (15:09 +0200)]
updater: Move rev_sha1 addition before convertUserOptions

Execution of the script and addition of rev_sha1 are both 1.19
activities, but for some reason the issue has only shown up in 1.21.

* MysqlUpdater::getCoreUpdateList() declares that 'doMigrateUserOptions'
  should be executed before adding the field rev_sha1 into the revision table
* ConvertUserOptions::execute() calls User::saveSettings()
* User::saveSettings() at its very end calls $this->getUserPage()->invalidateCache()
  and that is where the revision query is joining the party.

Bug: 48820
Change-Id: Id0a6efc33a8c46fdc3e9c294aa2d005d46c7dda0

10 years agoMerge "Use one call to .attr instead of two and linebreak consistency"
jenkins-bot [Mon, 29 Jul 2013 11:23:29 +0000 (11:23 +0000)]
Merge "Use one call to .attr instead of two and linebreak consistency"

10 years agoMerge "Improve documentation for $wgRecentChangesFlags"
jenkins-bot [Mon, 29 Jul 2013 08:26:55 +0000 (08:26 +0000)]
Merge "Improve documentation for $wgRecentChangesFlags"

10 years agoImprove documentation for $wgRecentChangesFlags
umherirrender [Fri, 19 Jul 2013 18:04:53 +0000 (20:04 +0200)]
Improve documentation for $wgRecentChangesFlags

Change-Id: If11461942462f48921a27d291c1bf383bc488a28

10 years agoUse one call to .attr instead of two and linebreak consistency
Derk-Jan Hartman [Sun, 28 Jul 2013 13:53:40 +0000 (15:53 +0200)]
Use one call to .attr instead of two and linebreak consistency

Follow-up to: I2b937eba605b7e6a98612a02c75eb9e7f347752

Change-Id: I45254ad2fee63918763cc7662523b80c26418177

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Sun, 28 Jul 2013 18:58:08 +0000 (18:58 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I525a26602a3f7d210b1a710cfc4b0d7b67961095

10 years agoMerge "Move unsortable class into tablesorter config"
jenkins-bot [Sun, 28 Jul 2013 15:08:38 +0000 (15:08 +0000)]
Merge "Move unsortable class into tablesorter config"

10 years agoMerge changes I48dcf831,I8922b80e
TheDJ [Sun, 28 Jul 2013 14:26:20 +0000 (14:26 +0000)]
Merge changes I48dcf831,I8922b80e

* changes:
  jquery.makeCollapsible: Consistency in test names
  jquery.makeCollapsible: Tests for collapse and expand text

10 years agoMove unsortable class into tablesorter config
Derk-Jan Hartman [Thu, 18 Jul 2013 19:43:15 +0000 (21:43 +0200)]
Move unsortable class into tablesorter config

Change-Id: I7fc1e9fe9e63128b3c6bac0ec067f1631e53cde2

10 years agoMake wfMatchesDomainList not match partial domains
Kevin Israel [Mon, 10 Jun 2013 02:04:24 +0000 (22:04 -0400)]
Make wfMatchesDomainList not match partial domains

Change-Id: I90e7af152fbd9bb8d84d5f2c54bd352b461c530d

10 years agoMerge "Correct the regular expression for explicit plural forms"
jenkins-bot [Sat, 27 Jul 2013 20:08:17 +0000 (20:08 +0000)]
Merge "Correct the regular expression for explicit plural forms"

10 years agoContentHandler: Fix a typo
Mark A. Hershberger [Sat, 27 Jul 2013 19:19:52 +0000 (15:19 -0400)]
ContentHandler: Fix a typo

Change-Id: I3accd0605f62e73d5ea527da7b3c03e4bdda3fc7

10 years agoMerge "Remove Persian from link underlining removal"
jenkins-bot [Sat, 27 Jul 2013 18:53:59 +0000 (18:53 +0000)]
Merge "Remove Persian from link underlining removal"

10 years agoRemove Persian from link underlining removal
Ebrahim Byagowi [Wed, 24 Jul 2013 14:47:29 +0000 (14:47 +0000)]
Remove Persian from link underlining removal

There was a discussion [1] on this on Persian Wikipedia and users
don't want it actually. It is such an UI inconsistency and detecting
links based on their color is hard. It may have problem on Amiri font
but not on System default font and Persian Wikipedia fonts.

[1] https://fa.wikipedia.org/wiki/MediaWiki:Common.css?oldid=10552148

Change-Id: I8168baff1b9e64d0c79dcd7a896b9cbeeed0b266

10 years agoMerge "Clarify exif-copyrighted-false means only Copyright flag not set"
jenkins-bot [Sat, 27 Jul 2013 18:12:41 +0000 (18:12 +0000)]
Merge "Clarify exif-copyrighted-false means only Copyright flag not set"

10 years agoMerge "Change name of Neapolitan language from "Nnapulitano" to "Napulitano""
jenkins-bot [Sat, 27 Jul 2013 18:10:08 +0000 (18:10 +0000)]
Merge "Change name of Neapolitan language from "Nnapulitano" to "Napulitano""

10 years agoMerge "Make prefs-advancedediting more consistent"
jenkins-bot [Sat, 27 Jul 2013 17:48:57 +0000 (17:48 +0000)]
Merge "Make prefs-advancedediting more consistent"

10 years agoMerge "mediawiki.page.startup: Fix typo in @event"
jenkins-bot [Sat, 27 Jul 2013 17:23:19 +0000 (17:23 +0000)]
Merge "mediawiki.page.startup: Fix typo in @event"

10 years agoMake prefs-advancedediting more consistent
Nemo bis [Sat, 27 Jul 2013 17:18:15 +0000 (19:18 +0200)]
Make prefs-advancedediting more consistent

Cf. "Advanced options", "Display options" etc.
<https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Prefs-advancedediting/pt-br>

Change-Id: I35608d99eff9a95a14bc12ace8de9a8e1dd808a1

10 years agomediawiki.page.startup: Fix typo in @event
Timo Tijhof [Sat, 27 Jul 2013 17:09:22 +0000 (19:09 +0200)]
mediawiki.page.startup: Fix typo in @event

Follows-up 736e7e843a.

Change-Id: Id796646228fb2468a084d5ce5b4f15acf8e517ec

10 years agoClarify exif-copyrighted-false means only Copyright flag not set
Nemo bis [Sat, 27 Jul 2013 17:00:27 +0000 (19:00 +0200)]
Clarify exif-copyrighted-false means only Copyright flag not set

The previous "Public domain" is misleading, as we can't assume
such a copyright status when the EXIF info is not set.
<https://translatewiki.net/wiki/Thread:Support/Change_MediaWiki:Exif-copyrighted-false>

Change-Id: Ic471ed5a997b476fd1e8b4a15106ffc8cd895197

10 years agoChange name of Neapolitan language from "Nnapulitano" to "Napulitano"
Nemo bis [Sat, 27 Jul 2013 16:25:49 +0000 (18:25 +0200)]
Change name of Neapolitan language from "Nnapulitano" to "Napulitano"

Bug: 43793
Change-Id: I08d6a07efac43565eeece324bc6a314a9a79f9c7

10 years agoMerge "Increase vertical offset of post-edit confirmation in MonoBook"
jenkins-bot [Sat, 27 Jul 2013 08:56:40 +0000 (08:56 +0000)]
Merge "Increase vertical offset of post-edit confirmation in MonoBook"

10 years agojquery.placeholder: Fixup for 7ec7d879ee
Timo Tijhof [Sat, 27 Jul 2013 05:59:48 +0000 (07:59 +0200)]
jquery.placeholder: Fixup for 7ec7d879ee

Check for 'arguments.length' was done in the wrong scope.
It checked for arguments to .each() which is always 2 (i, el).

This caused a regression where any call to .placeholder() without
arguments resulted in the string 'undefined' to be displayed as
placeholder (since it was doing setAttribute and passing it `text`
which is undefined, and then further using that undefined variable).

Until 7ec7d879ee / a8145d6fa2 this was the only way .placeholder
could be called, so this is a major regression affecting all use
of it.

Change-Id: I862b0f72548ec2122dad9c5d013149ac57688dab

10 years agoIncrease vertical offset of post-edit confirmation in MonoBook
Ori Livneh [Sat, 27 Jul 2013 00:00:29 +0000 (17:00 -0700)]
Increase vertical offset of post-edit confirmation in MonoBook

At an offset of 3em from the top, the confirmation message overlies MonoBook's
tabs. If the user already knows that they want to use one of the tabs to
navigate away from the article page, she must wait for the confirmation to
fade out so that the obscured tabs are again visible and clickable. Increasing
the offset to 6em seems to fix it.

Bug: 41240
Change-Id: Ifc09523858adf47b7f321d9e29dcb53d290e9d81

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Fri, 26 Jul 2013 20:29:23 +0000 (20:29 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I9f146e7fbae674a1f09834b5335f47da647ae815

10 years agojquery.makeCollapsible: Consistency in test names
MatmaRex [Sun, 21 Jul 2013 11:52:47 +0000 (13:52 +0200)]
jquery.makeCollapsible: Consistency in test names

Mention which part of the code is being tested in parentheses in test
names. Some actions can be triggered inmore than one way or in more
than one context: this gives a clearer image of what has tests already
and what hasn't.

Change-Id: I48dcf831f6a622f08061b29ca90fb0614e4cbab6

10 years agoMerge "jquery.placeholder: Fixup for a8145d6fa2"
jenkins-bot [Fri, 26 Jul 2013 18:13:51 +0000 (18:13 +0000)]
Merge "jquery.placeholder: Fixup for a8145d6fa2"

10 years agojquery.placeholder: Fixup for a8145d6fa2
Marius Hoch [Fri, 26 Jul 2013 17:23:52 +0000 (19:23 +0200)]
jquery.placeholder: Fixup for a8145d6fa2

* add release notes
* fix minor bug where wrong value is used

Change-Id: Iaab38cc041d143228332e00092f8521f6f3de596

10 years agoMerge "Followup Idfee1b4d per Tim"
jenkins-bot [Fri, 26 Jul 2013 17:24:27 +0000 (17:24 +0000)]
Merge "Followup Idfee1b4d per Tim"

10 years agoMerge "jquery.placeholder: Take placeholder text as parameter"
jenkins-bot [Fri, 26 Jul 2013 17:07:33 +0000 (17:07 +0000)]
Merge "jquery.placeholder: Take placeholder text as parameter"

10 years agojquery.placeholder: Take placeholder text as parameter
rillke [Thu, 18 Jul 2013 09:42:40 +0000 (11:42 +0200)]
jquery.placeholder: Take placeholder text as parameter

After this change, it will be possible to supply the text to be used as
a placeholder to the plugIn. Instead of doing:
$('<input type="text" />').attr({
        placeholder: "Placeholder text"
}).placeholder();

you can now simply do:
$('input#myInput')
.placeholder("Placeholder text");

after loading the plug-in.

Bug: 40430
Change-Id: I25255b2ef657f3215e64895d7905b984a1e9d59a

10 years agoMerge "Watchlist: Separate non-form parts out of the <fieldset>"
jenkins-bot [Fri, 26 Jul 2013 16:36:29 +0000 (16:36 +0000)]
Merge "Watchlist: Separate non-form parts out of the <fieldset>"

10 years agoMerge "Allow debugging of unit tests via wfDebugLog."
jenkins-bot [Fri, 26 Jul 2013 16:05:33 +0000 (16:05 +0000)]
Merge "Allow debugging of unit tests via wfDebugLog."

10 years agoFollowup Idfee1b4d per Tim
Brad Jorsch [Fri, 26 Jul 2013 14:58:02 +0000 (10:58 -0400)]
Followup Idfee1b4d per Tim

OAuth was going to return different values for UserIsEveryoneAllowed
depending on whether OAuth headers were provided, so the bolding on
Special:SpecialPages wouldn't be odd. That wasn't liked, so instead
we'll only mark special pages as restricted based on $wgGroupPermissions
and not what extensions might do.

Also, it was suggested that if an extension can remove 'read' then the
cache headers set by RawAction and the API should reflect that.

Change-Id: I381553e79c5320083c6d6d9ddd5bc0b146600f9e

10 years ago(bug 49694) Apply $wgSpamRegex to the new section name in action=edit&section=new
Alexandre Emsenhuber [Wed, 24 Jul 2013 07:47:50 +0000 (09:47 +0200)]
(bug 49694) Apply $wgSpamRegex to the new section name in action=edit&section=new

Either on $this->sectiontitle or $this->summary depending on which will be used.

bug: 49694
Change-Id: Ie35c6bfe5cc66313930b0dc4d8f9e618657b3aea

10 years agoFix documentation of $wgTranscludeCacheExpiry
Alexandre Emsenhuber [Fri, 26 Jul 2013 12:30:33 +0000 (14:30 +0200)]
Fix documentation of $wgTranscludeCacheExpiry

Fix for 937fc3b (SVN r98467)...

Also improve the one of $wgEnableScaryTranscluding while I'm at it.

Bug: 52006
Change-Id: Ia84c826f4f4d8fa18d3bf36f732e5b487544caa2

10 years agoSpecial:PagesWithProp: Fix PHP notice if no page properties are present
Alexandre Emsenhuber [Fri, 26 Jul 2013 06:24:06 +0000 (08:24 +0200)]
Special:PagesWithProp: Fix PHP notice if no page properties are present

Always declare $propnames as an array; do not assume that there will
be a property to implicitly set it.

Bug: 51891
Change-Id: I82c6b71a3283c7dc17e66873c2e54cea973c67c0

10 years agoMake the templates/category lists on edit page collapsible
MatmaRex [Sat, 23 Mar 2013 15:36:14 +0000 (16:36 +0100)]
Make the templates/category lists on edit page collapsible

This is a total rewrite of Vector extension's functionality, to fix
various accessibility and internationalization issues with the
original one. Both the JavaScript and the CSS have been redone from
scratch.

Still, the look&feel is almost the same as in the original version,
save for the mentioned messaging changes and minor UI differences (the
toggles are no longer <a> elements). The same cookie names have been
used to avoid any issues when migrating.

Used standard arrow icons from the mediawiki.icon module.

Bug: 43689
Change-Id: I91a3704cb09b9e17dd8baa516ab6f8ee441b7467

10 years agojobqueue: made federated queue use HashRing for root job de-duplication
Aaron Schulz [Fri, 31 May 2013 03:46:33 +0000 (20:46 -0700)]
jobqueue: made federated queue use HashRing for root job de-duplication

* This can spread entries out across job servers rather than always $wgMemc.
* Also made the sectionsByWiki config default to an empty array.

Change-Id: I176ff02eb4f05a1ea7d3bf93e0a10e074bb27d11

10 years agoMerge "mediawiki.action.edit.preview: Fire "wikipage.content" mw.hook"
jenkins-bot [Fri, 26 Jul 2013 01:13:04 +0000 (01:13 +0000)]
Merge "mediawiki.action.edit.preview: Fire "wikipage.content" mw.hook"

10 years agoMerge "Fix the target URL of HTMLForm"
jenkins-bot [Fri, 26 Jul 2013 01:11:48 +0000 (01:11 +0000)]
Merge "Fix the target URL of HTMLForm"

10 years agomediawiki.action.edit.preview: Fire "wikipage.content" mw.hook
Timo Tijhof [Thu, 18 Jul 2013 00:57:59 +0000 (02:57 +0200)]
mediawiki.action.edit.preview: Fire "wikipage.content" mw.hook

The mw.hook framework was added in 2e97025 and it also added
an example event ("wikipage.content") but this was never
actually fired anywhere other than for the initial load.

This will finally make things like jquery.tablesorter and
jquery.makeCollapsible work in live preview.

Also:

* Deprecate non-standard jQuery events triggered on jQuery
  wrapper around the "mw" object.

Bug: 33399
Change-Id: Ic516b3a01b4c1510cbe5f2de2998ad8275ecc607

10 years agomediawiki.page.ready: Use wikipage.content instead of domready
Timo Tijhof [Thu, 18 Jul 2013 00:47:55 +0000 (02:47 +0200)]
mediawiki.page.ready: Use wikipage.content instead of domready

Restructure mediawiki.page.ready to add to the "wikipage.content"
hook instead of using document-ready.

Except for parts that aren't inside the wikipage content.
Portlet links are outside content entirely and should run only
once from document-ready still. Inputs with placeholders can be
both inside and outside (inside with e.g. InputBox extension,
outside in e.g. search bar of skin) so it needs to be in both.
The one in document-ready needs to exclude ones in content to
avoid applying the placeholder polyfill twice.

This also opens up the doors for extensions and gadgets to
reliably both fire and add to this hook:
- Code can fire this hook when rendering a new DOM (such as
  LivePreview, VisualEditor, ..).
- Code can add to this hook to enhance page content and have it
  properly re-run when there is a new DOM (e.g. gadgets like
  Navigation popups, Reference Tooltips, ..).

Also added release notes for 2e97025.

Bug: 30713
Bug: 33399
Bug: 51565
Change-Id: Icb0eda9edf2aeb3d612ff1d9bfea4859d33e1fbb

10 years agoMerge "Fix fatal error when $wgValidateAllHtml is enabled and apache_request_headers...
jenkins-bot [Thu, 25 Jul 2013 23:10:29 +0000 (23:10 +0000)]
Merge "Fix fatal error when $wgValidateAllHtml is enabled and apache_request_headers() does not exists"

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Thu, 25 Jul 2013 19:25:15 +0000 (19:25 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I8ba898043b74a52eeb01aabfb81af51ef3a0c451

10 years agoFollow-up I3f03dd0100 (08adf46): simplify checks
Alexandre Emsenhuber [Thu, 25 Jul 2013 09:52:29 +0000 (11:52 +0200)]
Follow-up I3f03dd0100 (08adf46): simplify checks

Those variables are only used when $canViewPrivateInfo is true;
so no need set them when it is not the case

Change-Id: I87a27ea94f3eadc757b6e6048437a7ec58d09d03

10 years agoUpdate messages.inc and rebuild MessagesEn.php
Alexandre Emsenhuber [Thu, 25 Jul 2013 09:57:47 +0000 (11:57 +0200)]
Update messages.inc and rebuild MessagesEn.php

Change-Id: Id700531dec4289840afec36848a8206320180705

10 years agoMerge "If a user does not have permission to view a log type, throw a PermissionsError"
jenkins-bot [Thu, 25 Jul 2013 11:20:06 +0000 (11:20 +0000)]
Merge "If a user does not have permission to view a log type, throw a PermissionsError"

10 years agoFix fatal error when $wgValidateAllHtml is enabled and apache_request_headers() does...
Alexandre Emsenhuber [Tue, 14 May 2013 05:57:34 +0000 (07:57 +0200)]
Fix fatal error when $wgValidateAllHtml is enabled and apache_request_headers() does not exists

Changed apache_request_headers() to headers_list() since the latter is always available

Change-Id: Ia52f5a0d12db0680aa03b57dd45c974291e88af9

10 years agoAllow debugging of unit tests via wfDebugLog.
daniel [Wed, 17 Jul 2013 19:23:28 +0000 (21:23 +0200)]
Allow debugging of unit tests via wfDebugLog.

This adds a listener to the PHPUnit test runner that will report
testing progress via wfDebugLog. This is useful for debugging
situations in which phpunit itself fails to report errors and
does not terminate normally. Having a debug log should at least
help with locating the trigger of the problem.

Change-Id: I433537a7f26197d8cff6f133e26ae5709871500f

10 years agoIf a user does not have permission to view a log type, throw a PermissionsError
Kunal Mehta [Fri, 19 Jul 2013 04:14:51 +0000 (21:14 -0700)]
If a user does not have permission to view a log type, throw a PermissionsError

Currently if you view a private log like [[Special:Log/suppress]] and do not
have the right permission, you just see [[Special:Log]]. Now it will
throw a PermissionsError which states the user does not have the right permission.

Bug: 17881
Change-Id: I15486a1cc227a4900ab7cd38d7f0cc7eb685195a

10 years agoMake Special:MIMESearch a non-expensive special page.
Brian Wolff [Fri, 7 Jun 2013 17:29:56 +0000 (14:29 -0300)]
Make Special:MIMESearch a non-expensive special page.

This tries to use the index on (img_media_type, img_major_mime, img_minor_mime).
This is not the ideal index for this purpose (due to starting with
img_media_type, and not having an img_name at the end). However it
seems usable due to the low number of values img_media_type can have.
Thus we can just specify all values, and the index will get used
as a range index.

The only potentially problematic thing I see is that it uses
LIMIT X,Y for the offsets (due to being a query page) which can
be expensive on big offsets. If that's an issue, we could limit
the number of results to be at most $wgQueryCacheLimit or something.

Note: There's some discussion on the bug rather negative to this
special page in general. While I agree with much of the criticism,
I still think this special page can be useful, and if it can be
made efficient without needing to modify the indicies, we might
as well.

Bug: 13438
Change-Id: I88826ae7bff0812374157e596f86a19b248220e1

10 years agoMerge "User#getOption: Check ignoreHidden before $wgHiddenPrefs"
jenkins-bot [Wed, 24 Jul 2013 21:28:18 +0000 (21:28 +0000)]
Merge "User#getOption: Check ignoreHidden before $wgHiddenPrefs"

10 years agooption to strip requested prefix index in the list
Antoine Musso [Wed, 3 Jul 2013 19:49:29 +0000 (21:49 +0200)]
option to strip requested prefix index in the list

[[Special:PrefixIndex]] could be transcluded to generate a dynamic list
of pages. Since all pages share the same prefix, it is not always
wanted, specially when looking for subpages.

Given articles named:

- Project/Alix
- Project/FixBug20281
- Project/S3cretPlan
- Projects roadmap

{{Special:PrefixIndex/Project}} yields:

  Project/Alix   Project/FixBug20281  Project/S3cretPlan
  Projects roadmap

Adding |stripprefix=1 get rid of the prefix:

{{Special:PrefixIndex/Project|stripprefix=1}}

   /Alix      /FixBug20281     /S3cretPlan
   s roadmap

{{Special:PrefixIndex/Project/|stripprefix=1}}

   Alix      FixBug20281     S3cretPlan

The patch adds a checkbox to activate the prefix stripping.

For the implementation, I have chosen a protected class property instead
of adding parameters to various methods.  That seems easier to handle.

Change-Id: I96a0a08ea11a82016eb382abbeb2d54bfc2c4016

10 years agoRefactor watchlist token handling
MatmaRex [Fri, 14 Jun 2013 16:59:59 +0000 (18:59 +0200)]
Refactor watchlist token handling

Do not allow the user to change it directly; instead create a form
where they can reset it. (The token can still be changed via the API.)
The token is autogenerated whenever it is shown or otherwise used.

This really should have never used the preferences; however, trying to
change that now would be lots of work for very little gain, so this
keeps using that mechanism, adding a little abstraction over it.

It's not unconceivable that similar tokens could be used for other
pieces of data, like Echo's notifications; this enables that with one
new hook.

----

Things done here:

* Add getTokenFromOption() and resetTokenFromOption() methods to User,
  abstracting out the get-and-generate-if-empty process of handling
  tokens. Respect $wgHiddenPrefs (Watchlist didn't do that
  previously).

* Create Special:ResetTokens, inspired by Special:Preferences and
  Special:ChangeEmail, presenting the token resetting interface
  (HTMLForm-based with CSRF protection).

* Create a new hook, SpecialResetTokensTokens, allowing extensions to
  register tokens to be shown in the resetting form. Each token needs
  information about the preference it corresponds to and a short
  description (used for checkbox label).

* Hide the preference on Special:Preferences (use type=api to achieve
  this), display a link to aforementioned special page instead. Move
  info blurb to its own section at the bottom.

Bug: 21912
Change-Id: I0bdd2469972c4af81bfb480e9dde58cdd14c67a8

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Wed, 24 Jul 2013 19:50:59 +0000 (19:50 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Ic8fa806b35c79dcbb77ae71237a04e0bf3a5226a

10 years agomw.notification: Fix incorrect initial offset
Timo Tijhof [Wed, 24 Jul 2013 17:56:06 +0000 (19:56 +0200)]
mw.notification: Fix incorrect initial offset

Follows-up a4b62f1. Fixes bug where initial offset during set up is
wrong and thus causes the used offset to be 0.

Change-Id: I7444bf55a11e817d85bb5c4879022633869fc55d

10 years agohook to intercept upload_by_url
nischayn22 [Thu, 23 May 2013 10:16:38 +0000 (15:46 +0530)]
hook to intercept upload_by_url

This is planned to be used for intercepting by UW for Flickr blacklisting.

Bug: 42307
Change-Id: Ia3daaeba1ce5e69e751ffc2ae5afd5e449cf4aa7

10 years agoMerge "Remove redundant namespaceAliases"
jenkins-bot [Wed, 24 Jul 2013 14:45:18 +0000 (14:45 +0000)]
Merge "Remove redundant namespaceAliases"

10 years agoRemove redundant namespaceAliases
This, that and the other [Wed, 24 Jul 2013 11:52:15 +0000 (21:52 +1000)]
Remove redundant namespaceAliases

Same as the actual namespace names.
Apparently translatewiki doesn't handle namespaceAliases.
Bug: 51934

Change-Id: I132dabf918311712ddf83b9ac3d4ab262c8ab6bc

10 years agoMerge "Move firing of "wikipage.content" mw.hook out of mediawiki.util"
jenkins-bot [Wed, 24 Jul 2013 12:22:15 +0000 (12:22 +0000)]
Merge "Move firing of "wikipage.content" mw.hook out of mediawiki.util"

10 years agoPass through request parameters in API action=edit
Roan Kattouw [Wed, 24 Jul 2013 06:26:37 +0000 (23:26 -0700)]
Pass through request parameters in API action=edit

In addition to constructing a fake request using the data the caller
gave us, also pass through any other request variables that might have
been set. This is a bit of an evil hack, but it's the only thing we can
do to make random things like wpReviewEdit in FlaggedRevs work through
the API.

Change-Id: Idab5b524b0e3daae58ab4f26466c0f6d9d8d3044

10 years agoDiscard comments in mergeMessageFileList.php's --list-file file
Ori Livneh [Thu, 18 Jul 2013 22:46:18 +0000 (15:46 -0700)]
Discard comments in mergeMessageFileList.php's --list-file file

We're currently working around a bug in an extension (bug 51643) by deviating
from lexicographical order in extension-list to ensure that one extension is
loaded before another. It'd be nice to be able to document that in the file
itself, but there is no convention for adding comments to the file;
mergeMessageFileList.php treats every line as a file name. We've previously
talked about including a comment header in the file as part of our reponse to
bug 50347.

This patch adds some minimal syntax-handling to mergeMessageFileList.php which
causes it to treat as a comment any substring starting with '#' and extending
to the end of the line. This change implements part of what aude projected for
Gerrit change 71056, but I don't see the harm in pushing ahead with it here.

Change-Id: I4b296aa69ad77ecb51f1a0e27ce6a698cf09732b

10 years agoMerge "Add a hook to Title::getEditNotices() so extensions can add them"
jenkins-bot [Wed, 24 Jul 2013 04:48:14 +0000 (04:48 +0000)]
Merge "Add a hook to Title::getEditNotices() so extensions can add them"

10 years agoAdd a hook to Title::getEditNotices() so extensions can add them
Roan Kattouw [Wed, 24 Jul 2013 00:28:47 +0000 (17:28 -0700)]
Add a hook to Title::getEditNotices() so extensions can add them

FlaggedRevs will have to use this to expose its edit notices to
VisualEditor.

Also add an $oldid parameter so edit notices can be generated based
on the revision ID being edited.

Change-Id: Ie44a01ebfa7002fa3a89f081e0f831442666ac03

10 years agomediawiki.notification: Make notification area sticky to window
Timo Tijhof [Tue, 23 Jul 2013 23:15:12 +0000 (01:15 +0200)]
mediawiki.notification: Make notification area sticky to window

Whenever the user scrolls beyond the natural offset (possibly
customised by the skin, e.g. in Vector it accounts for the
tabs and search bar, in Monobook it is relative to the content
area, etc.) we switch from absolute to fixed position.

Changed the 1em top/right padding to be actual padding instead
of part of the offset, as otherwise `window.scrollTop > offset.top`
would trigger too late and thus cause it to "jump" back about
13px (1em) whenever we switch (the scroll logic depends on the
floating-mode offset being 0).

Now it seemlessly switches between the two area modes.
Based on logic in VisualEditor for the sticky editor toolbar.

Using a class instead of an ID for the area element as otherwise
all selectors would require being like "#area.area-floating" to
work from the skin. This should've been the case from the
beginning (using IDs in CSS is almost always bad).

Falls back to absolute position in IE6, where 'fixed' is not
supported (and would use positon 'static' otherwise which would
be a problem).

Cleaned up useless 'null' value for $area variable.

Bug: 50870
Change-Id: Icb7cd68f48443c1770e3585c8567fea2ac16dad8

10 years agomw.config: Add wgIsRedirect
Timo Tijhof [Tue, 23 Jul 2013 19:11:17 +0000 (21:11 +0200)]
mw.config: Add wgIsRedirect

Change-Id: I6e365f20b513ded10ede51d4b34de0736653a3dc

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Tue, 23 Jul 2013 18:37:23 +0000 (18:37 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Ic5becb02cca2d035192b096b6b4273d5cb036790

10 years agoWatchlist: Separate non-form parts out of the <fieldset>
MatmaRex [Mon, 20 May 2013 09:07:25 +0000 (11:07 +0200)]
Watchlist: Separate non-form parts out of the <fieldset>

These include the information blurb at the top and the "Mark all pages
visited" button.

This also allows us the change the form-inside-fieldset nesting to
saner fieldset-inside-form. The 'mw-watchlist-form-namespaceselector'
id was removed; the primary form now has id of 'mw-watchlist-form'.

Bug: 48615
Change-Id: I9398922dc4cabc7b190f8d97c5d91a05710206bb

10 years agoMerge "Special:PagesWithProp: Do not show very long or binary values"
jenkins-bot [Tue, 23 Jul 2013 16:45:08 +0000 (16:45 +0000)]
Merge "Special:PagesWithProp: Do not show very long or binary values"

10 years agoSpecial:PagesWithProp: Do not show very long or binary values
MatmaRex [Tue, 23 Jul 2013 15:40:28 +0000 (17:40 +0200)]
Special:PagesWithProp: Do not show very long or binary values

It already looks rather silly when querying for 'templatedata' prop
from the TemplateData extension (e.g. [1]), it will start looking much
worse once Ie66b0dd6 in TemplateData is merged (which makes it store
the props gzip-compressed).

Do not show very long (over 1 kB) or binary (containing a null byte)
values; instead display a helpful message and size.

Changing the display format slightly, it's now "Page: <propvalue-or-message>"
instead of "Page (<propvalue-or-message>)", because the helpful
messages themselves include parentheses.

[1] https://en.wikipedia.org/wiki/Special:PagesWithProp?propname=templatedata

Bug: 51888
Change-Id: Ib2db241a117b06faee2426c8ea9ae18eab499e08

10 years agoCorrect the regular expression for explicit plural forms
Santhosh Thottingal [Tue, 23 Jul 2013 15:03:04 +0000 (20:33 +0530)]
Correct the regular expression for explicit plural forms

/\d+=/ will match a12=abc. That is wrong. The plural form must
start with digits. Changing it to /^\d+=/

Also avoid Regex instance creation in mediawiki.language.js, use
literal regex.

Follow up: I82b9067 and I50eb0c6
Bug: 51284

Change-Id: I70ad3f99ad0a2600773c005d9e9cc8238e6e6d09

10 years agoMerge "tablesorter: Keyboard accessibility for sort headers."
jenkins-bot [Tue, 23 Jul 2013 13:21:58 +0000 (13:21 +0000)]
Merge "tablesorter: Keyboard accessibility for sort headers."

10 years agoMake "Special:FilePath?file=.." work again
Alexandre Emsenhuber [Tue, 23 Jul 2013 09:34:25 +0000 (11:34 +0200)]
Make "Special:FilePath?file=.." work again

bug: 51542
Change-Id: I2418e33ebd91dc0dc6968ba003a46857ec7524d3

10 years agoMerge "Fix exception in ApiPageSet"
jenkins-bot [Mon, 22 Jul 2013 22:37:13 +0000 (22:37 +0000)]
Merge "Fix exception in ApiPageSet"

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Mon, 22 Jul 2013 20:08:50 +0000 (20:08 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I66a366d0f2d8efdfa15be0488c3dcf5b91b4caa0

10 years agoFix exception in ApiPageSet
Brad Jorsch [Mon, 22 Jul 2013 17:08:31 +0000 (13:08 -0400)]
Fix exception in ApiPageSet

ApiPageSet is calling $this->profileOut(), then calling a function that
calls $this->profileDBIn(). Move that function to after a new
$this->profileIn().

Also, add a unit test for this situation.

Bug: 51821
Change-Id: Ib4dbfb567faadcd5e3d7d058ca6bdf8b4c83f634

10 years agoUser#getOption: Check ignoreHidden before $wgHiddenPrefs
Timo Tijhof [Fri, 19 Jul 2013 02:31:33 +0000 (04:31 +0200)]
User#getOption: Check ignoreHidden before $wgHiddenPrefs

Change-Id: Icb1aab8cd8dc15387d199bb51ca2cd72de6dba88

10 years agoMove firing of "wikipage.content" mw.hook out of mediawiki.util
Timo Tijhof [Thu, 18 Jul 2013 00:45:16 +0000 (02:45 +0200)]
Move firing of "wikipage.content" mw.hook out of mediawiki.util

* Update "wikipage.content" arguments to really pass the
  content and not the entire body wrapper (no longer
  mw.util.$content).

* Move the firing of "wikipage.content" from mediawiki.util to
  mediawiiki.page.startup. It didnt really belong in
  mediawiki.util, and now that we're no longer passing it
  mw.util.$content they're no longer related in either direction.

Bug: 30713
Change-Id: I56d6491527547f898e239b531c98e903863f8999

10 years agoMerge "Special:ListGroupRights: Display the legend at the top"
jenkins-bot [Mon, 22 Jul 2013 12:15:05 +0000 (12:15 +0000)]
Merge "Special:ListGroupRights: Display the legend at the top"

10 years agoMerge "Possible error messages for action=createaccount should be in English and...
jenkins-bot [Mon, 22 Jul 2013 12:11:32 +0000 (12:11 +0000)]
Merge "Possible error messages for action=createaccount should be in English and not show local modifications"

10 years agoMerge "DifferenceEngine: Remove broken comment"
jenkins-bot [Mon, 22 Jul 2013 11:44:03 +0000 (11:44 +0000)]
Merge "DifferenceEngine: Remove broken comment"

10 years agojquery.makeCollapsible: Tests for collapse and expand text
MatmaRex [Sun, 21 Jul 2013 11:40:52 +0000 (13:40 +0200)]
jquery.makeCollapsible: Tests for collapse and expand text

Provided via data- attributes (data-collapsetext, data-expandtext)
and via options (options.collapseText, options.expandText).

Change-Id: I8922b80ee9aff149a56c9ca44edc247033fc6d6a

10 years agoPossible error messages for action=createaccount should be in English and not show...
Kunal Mehta [Mon, 22 Jul 2013 09:44:03 +0000 (02:44 -0700)]
Possible error messages for action=createaccount should be in English and not show local modifications

Bug: 47791
Change-Id: Id55f65d1a7b9b2d6a17da0b87bffe42ceb4231ef

10 years agoMerge "Add linktrail for Malayalam"
jenkins-bot [Mon, 22 Jul 2013 08:45:28 +0000 (08:45 +0000)]
Merge "Add linktrail for Malayalam"

10 years agoAdd linktrail for Malayalam
Santhosh Thottingal [Mon, 22 Jul 2013 04:15:48 +0000 (09:45 +0530)]
Add linktrail for Malayalam

Bug: 44029
Change-Id: I591a92ab563f2ef8340122f63a202d2c02d29d97

10 years agoMerge "Clean up: Consistently use "$" instead of "$( document ).ready""
jenkins-bot [Mon, 22 Jul 2013 02:42:54 +0000 (02:42 +0000)]
Merge "Clean up: Consistently use "$" instead of "$( document ).ready""

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Sun, 21 Jul 2013 19:04:25 +0000 (19:04 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Icd89c666b6962cf3028ee4d13860f4f61243c654

10 years agoTablesorter: Add testcase for unsortable column
Derk-Jan Hartman [Wed, 17 Jul 2013 21:23:51 +0000 (23:23 +0200)]
Tablesorter: Add testcase for unsortable column

Change-Id: I64ea3c7301a8be6c4b7b9b462d0e81b89a525f9e

10 years agoMerge "Tweak Special:Log/block for supporting RTL wikis"
jenkins-bot [Sun, 21 Jul 2013 09:31:48 +0000 (09:31 +0000)]
Merge "Tweak Special:Log/block for supporting RTL wikis"

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Sat, 20 Jul 2013 20:44:43 +0000 (20:44 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I4e0a77e7c5d398749995401d4035f16ce994ecea

10 years agoTweak Special:Log/block for supporting RTL wikis
Ebrahim Byagowi [Sat, 20 Jul 2013 00:09:02 +0000 (00:09 +0000)]
Tweak Special:Log/block for supporting RTL wikis

dir="ltr" was added to make block durations on Special:Log/block
readable for non-local admins, While removing it, I used a
solution to keep block duration on title readable for non-local
admins and making inner text readable for local users

Change-Id: I31aef50196319be7355ad14657e67ca23fc15e20

10 years agoDeprecate MWFunction::call and ::callArray
Kevin Israel [Fri, 19 Jul 2013 03:30:42 +0000 (23:30 -0400)]
Deprecate MWFunction::call and ::callArray

These functions existed to work around a bug (fixed in PHP 5.3) and
a missing feature (added in PHP 5.2) in older versions of PHP;
therefore, they are no longer necessary.

Change-Id: Ifebbe3d449fc57fd83f8350c28f467605c1a07b7

10 years agoChange message to say deleting "unused" accounts rather than "inactive".
Kunal Mehta [Thu, 18 Jul 2013 06:31:59 +0000 (23:31 -0700)]
Change message to say deleting "unused" accounts rather than "inactive".

Bug: 49128
Change-Id: I8f93ba581abbf6e9c83ad8ade32ea0657bde6b01