mediawiki.git
9 years agoUpdated release notes and version number1.20.6
csteipp [Tue, 21 May 2013 16:37:12 +0000 (21 09:37 -0700)]
Updated release notes and version number

Change-Id: I630010e6371ac4ba9ea24e5f2f48e891d3e41c2f

9 years agoSECURITY: Do checks on all upload types
csteipp [Mon, 20 May 2013 22:23:35 +0000 (20 15:23 -0700)]
SECURITY: Do checks on all upload types

Also, verify file before stashing it

Change-Id: I5dd027acc994cf7308c9e4d85a61237d802ccee8

9 years agomediawiki.user: Use session ID instead of 1-year cross-session cookies
Timo Tijhof [Tue, 7 May 2013 21:07:49 +0000 (7 23:07 +0200)]
mediawiki.user: Use session ID instead of 1-year cross-session cookies

No cookies should be assigned for longer than session expiry.

Bug: 44327
Change-Id: If2f096dadb639769d859e1596d84b3ad5775a01d

9 years agoMonobook: Remove unused file FF2Fixes.css
Timo Tijhof [Mon, 22 Apr 2013 11:18:12 +0000 (22 13:18 +0200)]
Monobook: Remove unused file FF2Fixes.css

As of Id8214c6a5 and Ia54dd738b (per bug 35906) we started
blacklisting Firefox 2 from the additional resource loader.

Though we haven't supported Firefox 2 for several years, Monobook
has had this patch for years and we never removed it (cheap to
maintain).

Since wikibits.js is no longer being loaded in Firefox 2, this
fix is now obsolete. It is never loaded, not even in Firefox 2.

It is causing problems because the legacy code incorrectly
detects Firefox 20 as Firefox 2, so instead of being a useless
file that is never loaded, it is actually causing problems by
being loaded in Firefox 20.

Bug: 47202
Change-Id: I2fdd0da8c17553a3465ef27c46a4632e135c4405

9 years ago(bug 31044) Make ResourceLoader behave in read-only mode
Catrope [Tue, 15 Jan 2013 23:32:10 +0000 (15 15:32 -0800)]
(bug 31044) Make ResourceLoader behave in read-only mode

When the database is in read-only mode or writes fail for some other
reason, ResourceLoader should make every attempt to still serve JS and
CSS correctly.

* Surround a bunch of DB write code in MessageBlobStore.php in try-catch
  blocks.
* Surround the DB write in ResourceLoaderFileModule.php in a try-catch
  block rather than checking wfReadOnly(), because the DB may fail for
  other reasons.
* In ResourceLoader::respond() and helpers, set a short cache timeout on
  responses that include commented-out error messages.

Change-Id: Idc83a0fe042806263f9337c40ade8c38c56aa3cd

9 years agoUpdated release notes and version number1.20.5
csteipp [Tue, 30 Apr 2013 16:59:26 +0000 (30 09:59 -0700)]
Updated release notes and version number

Change-Id: I8003f2a8a9d71eccf403d9d162ce9f3e583f0a46

9 years agoAdd hook AbortChangePassword to Special:ChangePassword
Ryan Lane [Tue, 30 Apr 2013 16:49:08 +0000 (30 09:49 -0700)]
Add hook AbortChangePassword to Special:ChangePassword

Adds a consistent method for authentication extensions to block
password changing operations.

Bug: 46590
Change-Id: I3469e90a958c4fb0f24cafd67de5590d3cc2f075

9 years agoSECURITY: Check SVG xml encoding against whitelist
csteipp [Tue, 23 Apr 2013 21:15:01 +0000 (23 14:15 -0700)]
SECURITY: Check SVG xml encoding against whitelist

Some browsers will interpret obscure xml encodings as UTF-8, while
PHP/expat will interpret the given encoding in the xml declaration.

bug: 47304
Change-Id: I3b311a7078d977ae89c51e95e625d79fba183cfc

9 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Mon, 29 Apr 2013 22:48:19 +0000 (29 22:48 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I7a4199a1793fe9db51db5bf4eb592fe532c75406

9 years agoBackport compatible message changes from master.
Siebrand Mazeland [Mon, 29 Apr 2013 19:38:26 +0000 (29 21:38 +0200)]
Backport compatible message changes from master.

Change-Id: I6eb886b2ead3d2cc2a96c18f43c98da0c65ce999

9 years agomwdocgen.php: Implement --version option.
Timo Tijhof [Fri, 15 Mar 2013 06:10:04 +0000 (15 07:10 +0100)]
mwdocgen.php: Implement --version option.

So that the job that runs it can pass along what it should
display (e.g. branch, tag, hash etc. whatever is appropiate
for the context of that run).

Change-Id: I1d5b6266e49a71672b0a53069e6ea6bb4658c3d2

9 years agoRemove svnstat stuff used in Doxygen generation
Reedy [Wed, 26 Sep 2012 22:52:36 +0000 (26 23:52 +0100)]
Remove svnstat stuff used in Doxygen generation

Change-Id: I9d8db5fae6e0c99d59fcb9a43d7ed4aab953c300

9 years agoRelease notes for wfSuppressWarnings change I backported to 1.20
Brian Wolff [Wed, 13 Mar 2013 00:07:44 +0000 (12 21:07 -0300)]
Release notes for wfSuppressWarnings change I backported to 1.20

See gerrit change 44165. I did the same thing for 1.19, since
no one told me I did it wrong (yay!) now doing it for 1.20.

Using separate commit for release notes in order to use
cherry-pick for the actual commit. Have no idea if that is
important or not.

Change-Id: I5b28b78d161653ce7e8da37be50c406e992b7354

9 years agoMake wfSuppressWarnings kill E_STRICT in PHP 5.4+
Brian Wolff [Thu, 13 Dec 2012 22:16:22 +0000 (13 18:16 -0400)]
Make wfSuppressWarnings kill E_STRICT in PHP 5.4+

Since PHP 5.4+ E_STRICT is now included in E_ALL. Hence
wfSuppressWarnings was not filtering E_STRICT.

There was some complaints on project:support_desk about
timezone warnings popping up. See also bug 43092

Change-Id: Ie1ace158dac1733e6b2b2c1d533004d9bcab8c80

9 years agojshint: Allow global mw to be set in mediawiki.js
Timo Tijhof [Mon, 15 Apr 2013 23:46:42 +0000 (16 01:46 +0200)]
jshint: Allow global mw to be set in mediawiki.js

In master this has been cleaned up, but in REL1_20 we still used
the 'mw' global directly in a bunch of placed so we need to tell
jshint that it is okay for it to be set in mediawiki.js

It is currently complaining about redefinition because of this.

Change-Id: Ifb55efae5f4ff10ffe1873bdf02d43aa2d61857a

9 years agoMerge "Updated release notes and version number" into REL1_201.20.4
Alex Monk [Mon, 15 Apr 2013 23:28:05 +0000 (15 23:28 +0000)]
Merge "Updated release notes and version number" into REL1_20

9 years agoMerge "Disable external entities in XMLReader" into REL1_20
Alex Monk [Mon, 15 Apr 2013 23:24:30 +0000 (15 23:24 +0000)]
Merge "Disable external entities in XMLReader" into REL1_20

9 years agoMerge "Sanitize $limitReport before outputting" into REL1_20
Alex Monk [Mon, 15 Apr 2013 23:22:53 +0000 (15 23:22 +0000)]
Merge "Sanitize $limitReport before outputting" into REL1_20

9 years agoUpdated release notes and version number
csteipp [Mon, 15 Apr 2013 16:11:43 +0000 (15 09:11 -0700)]
Updated release notes and version number

Change-Id: Ie497090ba774bbace342eb5cb4cd0809e8d9a8ed

9 years agoDisable external entities in Import
csteipp [Mon, 15 Apr 2013 20:47:10 +0000 (15 13:47 -0700)]
Disable external entities in Import

Temporarily disable loading entities in XMLReader when calling read()
during import.

bug: 47251

Change-Id: I0b39386e6cf4ec0244aab8ebc4095922511e2964

9 years agoSanitize $limitReport before outputting
csteipp [Mon, 15 Apr 2013 20:42:02 +0000 (15 13:42 -0700)]
Sanitize $limitReport before outputting

Prevents possible injection of "-->" and other HTML by extensions using
the ParserLimitReport hook.

(cherry-picked from 69f96f65dd99e54b84e489e7d957b7526653474c)

Bug: 46084
Change-Id: Id97b6668da6df3e5e4c0acefffa00c82cac3c44a

9 years agoDisable external entities in XMLReader
csteipp [Mon, 15 Apr 2013 20:44:23 +0000 (15 13:44 -0700)]
Disable external entities in XMLReader

Temporarily disable loading entities in XMLReader when calling read()
with libxml_disable_entity_loader(true).

bug: 46859

Change-Id: I0b2ef270f15c7b4da17edee680bf7e2410919915

9 years agoUpdated release notes and version number1.20.3
csteipp [Mon, 4 Mar 2013 22:46:29 +0000 (4 14:46 -0800)]
Updated release notes and version number

Change-Id: I3ca4455eeee788cc3345a810da8431e9764cd9df

9 years agoMerge "(Bug 45355) Read of arbitrary files through mwdoc-filter.php" into REL1_20
jenkins-bot [Mon, 4 Mar 2013 20:02:47 +0000 (4 20:02 +0000)]
Merge "(Bug 45355) Read of arbitrary files through mwdoc-filter.php" into REL1_20

9 years ago(bug 43518) API action=unblock should return the user name, not the full user object
Alex Monk [Sun, 30 Dec 2012 13:59:48 +0000 (30 13:59 +0000)]
(bug 43518) API action=unblock should return the user name, not the full user object

Change-Id: I830e210122a6608b4b599bb0b59c1c99b073c06d

9 years agoMerge "Preserve caller expectations for behaviour of sslVerifyHost" into REL1_20
Platonides [Sun, 3 Mar 2013 18:24:20 +0000 (3 18:24 +0000)]
Merge "Preserve caller expectations for behaviour of sslVerifyHost" into REL1_20

9 years agoPreserve caller expectations for behaviour of sslVerifyHost
Tim Starling [Thu, 28 Feb 2013 01:58:52 +0000 (27 17:58 -0800)]
Preserve caller expectations for behaviour of sslVerifyHost

(bug 42441) The previous patch unnecessarily broke backwards
compatibility in the Http::request() API, following cURL's broken
conventions for sslVerifyHost instead of the boolean interpretation
expected by all existing callers. This change reverts that one, and
fixes the bug in another way. See Ia6535f10.

Also don't bother wrapping the $this->sslVerifyHost access with isset()
since it's always set.

Change-Id: Id8d9374d9e9cbda87539ae725b1d3edfc728f449

9 years agoPreserve caller expectations for behaviour of sslVerifyHost
Tim Starling [Thu, 28 Feb 2013 01:58:52 +0000 (27 17:58 -0800)]
Preserve caller expectations for behaviour of sslVerifyHost

(bug 42441) The previous patch unnecessarily broke backwards
compatibility in the Http::request() API, following cURL's broken
conventions for sslVerifyHost instead of the boolean interpretation
expected by all existing callers. This change reverts that one, and
fixes the bug in another way. See Ia6535f10.

Also don't bother wrapping the $this->sslVerifyHost access with isset()
since it's always set.

Change-Id: Ia4e1689249b6ac515b859ea2eca1dcff3e63098c

9 years ago(Bug 45355) Read of arbitrary files through mwdoc-filter.php
Platonides [Mon, 25 Feb 2013 15:07:43 +0000 (25 16:07 +0100)]
(Bug 45355) Read of arbitrary files through mwdoc-filter.php

The file maintenance/mwdoc-filter.php can be abused under certain server
configurations to read the contents of arbitrary files.

In case you
 - you have deleted the maintenance folder or
 - you have that folder denied in the server configuration or
 - the server is processing .htaccess overrides or
 - you are using PHP 5.4.0 (or later) or
 - you have register_globals disabled
it is believed that you are not vulnerable.

See https://bugzilla.wikimedia.org/45355 for details.

Change-Id: I3c49439b25896a6100ce415629353bccfc84490a

9 years agoAdd missing release notes for various commits.
Timo Tijhof [Sun, 24 Feb 2013 21:25:48 +0000 (24 22:25 +0100)]
Add missing release notes for various commits.

Follows-up Ibda2b49395, I0975e5c6a6, Ia6535f1090, Idc11b54752.

Change-Id: I7e8c78dd71fc6a8aaa630bec97c3ed08de99b720

9 years agoraise PHPUnit default timeouts
Antoine Musso [Tue, 29 Jan 2013 09:49:13 +0000 (29 10:49 +0100)]
raise PHPUnit default timeouts

default ..  2s -> 10s
medium ... 10s -> 30s

I originally thought that using PHPUnit timeout system was a good idea
but that is causing more harm than being helpful. Now default to ten
seconds.

Change-Id: If10a9b6df967130838a253d986b2ed623d8e3b0a

9 years agoMerge changes I6baf9723,I2e8c0627 into REL1_20
Siebrand [Sun, 10 Feb 2013 17:53:23 +0000 (10 17:53 +0000)]
Merge changes I6baf9723,I2e8c0627 into REL1_20

* changes:
  (bug 44010) FauxRequest leaks cookie data from primary request
  Weaken the recursion guard on RequestContext::getLanguage()

9 years agoMerge "(bug 40585) Don't drop 'step="any"' in HTML input fields." into REL1_20
jenkins-bot [Sun, 10 Feb 2013 17:29:23 +0000 (10 17:29 +0000)]
Merge "(bug 40585) Don't drop 'step="any"' in HTML input fields." into REL1_20

9 years ago(bug 44010) FauxRequest leaks cookie data from primary request
Niklas Laxström [Wed, 16 Jan 2013 09:45:36 +0000 (16 09:45 +0000)]
(bug 44010) FauxRequest leaks cookie data from primary request

Change-Id: I6baf972352fd69660c09a5d413ff55b81aa31305

9 years agoWeaken the recursion guard on RequestContext::getLanguage()
Tim Starling [Fri, 8 Feb 2013 05:38:41 +0000 (8 16:38 +1100)]
Weaken the recursion guard on RequestContext::getLanguage()

Just log and soldier on, since for some reason we are seeing a lot of
these exceptions at the moment, with multiple root causes. Based on Matt
Walker's I49dbc2d7. Updates Idc11b547. See bug 44754.

Change-Id: I2e8c062741c1b2ec2acd68dc76d3fb6efb113571

9 years ago(bug 44010) Pass context to UserGetLanguageObject
Niklas Laxström [Wed, 16 Jan 2013 09:47:06 +0000 (16 09:47 +0000)]
(bug 44010) Pass context to UserGetLanguageObject

Only way to avoid messing with wrong request contexts.
Had to add recursion guard too.

Change-Id: Idc11b54752450321e01d92004e08fc95fb6170e6

9 years agoAllow preferences that need not be rendered in Special:Preferences
Santhosh Thottingal [Fri, 7 Dec 2012 07:22:10 +0000 (7 12:52 +0530)]
Allow preferences that need not be rendered in Special:Preferences

Extensions can use their own interface for user preferences, with the
help of the action=options API.

For example, Universal Language Selector has a different UI to
allow anonymous and logged in users to set language related preferences.

Validation for the preference values is up to the extensions.

Change-Id: I18a5ffb5cc202c59ba76b86cfb63e49010cc1881

9 years agocomposer.json for REL1_20 branch
Antoine Musso [Tue, 5 Feb 2013 14:09:47 +0000 (5 15:09 +0100)]
composer.json for REL1_20 branch

https://packagist.org/packages/mediawiki/core

Change-Id: I7eb00b98a0e3574b2709c6d0e8cec9df9b661a4a

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

Change-Id: I92d1a5b7e111997e8b9cb5d965d884897069eae0

9 years agoRemove unneeded translations
Siebrand Mazeland [Mon, 28 Jan 2013 17:57:52 +0000 (28 18:57 +0100)]
Remove unneeded translations

Falls back to 'bho' where the translation are.

Change-Id: Idcaa1fdb252f260f94166abd433a4fbf5d89f6f1

9 years agoBackport compatible message changes from master.
Siebrand Mazeland [Mon, 28 Jan 2013 17:38:16 +0000 (28 18:38 +0100)]
Backport compatible message changes from master.

Change-Id: I4c67e4f3e37ef99d594f3d191ff1af81428b9d53

9 years agoBackport compatible message changes from master.
Siebrand Mazeland [Mon, 28 Jan 2013 17:07:49 +0000 (28 18:07 +0100)]
Backport compatible message changes from master.

Change-Id: I9e3c03c3d6178a85169765abb04e8e9ca910f409

9 years agoMade SSL validation in Curl HTTP requests the default.
Tyler Anthony Romeo [Thu, 25 Oct 2012 17:08:28 +0000 (25 13:08 -0400)]
Made SSL validation in Curl HTTP requests the default.

Changed the default value for CURLOPT_SSL_VERIFYHOST
to 2 rather than true. This makes sure that hostname
validation occurs.

Change-Id: Ia6535f1090627ef2def360bda37c22bff10c7f31
(cherry picked from commit 5c8d6fa60f521073136012f67e66bdb72010e720)

9 years ago(bug 44024) ObjectCache changes break XCache 3.x support
Brent Garber [Sat, 19 Jan 2013 03:43:03 +0000 (19 03:43 +0000)]
(bug 44024) ObjectCache changes break XCache 3.x support

Changes in the 1.20.x branch altered the add method to check for the return value of get against
false.  Xcache 3.x returns NULL for unset values and so this check was erroneously determining that
all values are set when they were not.

This was causing basic ObjectCache usage to fail.

Change-Id: I0975e5c6a60c2813dc2d02aca84245807b8fb828
(cherry picked from commit 0072e0efeb8591a7761b3d573f8b71ef97fb96ec)

9 years ago(bug 40585) Don't drop 'step="any"' in HTML input fields.
Tim Landscheidt [Thu, 29 Nov 2012 12:12:35 +0000 (29 12:12 +0000)]
(bug 40585) Don't drop 'step="any"' in HTML input fields.

The default value for "step" is "1" which effectively bans any decimal
number from being entered into an 'type="number"' field and makes
HTMLFloatField unusable.

This is a backport of 6dc4039270af99413cc7c3bf85b136d9a79e7497.

Change-Id: Ibda2b49395705c5902c751525b75213653b0ea5d

9 years agoFix Release Notes1.20.2
csteipp [Tue, 4 Dec 2012 17:57:02 +0000 (4 09:57 -0800)]
Fix Release Notes

* A line from the 1.20.1 release notes was unintentionally removed
* Add missing punctuation

Change-Id: I56777a00e2fa62c2a25de8f8bf8c456b2c602d90

9 years agoMerge "Release notes and version number" into REL1_20
Krinkle [Tue, 4 Dec 2012 01:02:47 +0000 (4 01:02 +0000)]
Merge "Release notes and version number" into REL1_20

9 years agoRelease notes and version number
csteipp [Mon, 3 Dec 2012 19:55:02 +0000 (3 11:55 -0800)]
Release notes and version number

Updates for 1.20.2 release

Change-Id: Ib0eecc85bb84c06e0f9a9b2b53fba695073633bf

9 years ago(bug 42638) Fix API action=options&reset=1 & unit tests
Brad Jorsch [Mon, 3 Dec 2012 03:40:55 +0000 (2 22:40 -0500)]
(bug 42638) Fix API action=options&reset=1 & unit tests

Change I98df55f2 broke action=options&reset=1, causing it to return an
error "No changes were requested" rather than resetting the options as
it should. Unfortunately, that change also broke the unit test that
would have caught this regression.

This changeset fixes the bug and the unit tests.

Change-Id: I7fe63640d54efab4572538e9d08f5b75c61243a4

9 years agoFixed backport of 60cc060 to just use mDoneWrites.
Aaron Schulz [Fri, 30 Nov 2012 18:34:21 +0000 (30 10:34 -0800)]
Fixed backport of 60cc060 to just use mDoneWrites.

* The backported commit actually depended on 597167dc4829160af67921105b14f973f91cba9e,
  which was not backported. This works around that.

Change-Id: Id6e482ef7787fe73d5a517dd1b2aa2d9894cdff2

9 years agoUpdate release notes and incremented version1.20.1
csteipp [Wed, 28 Nov 2012 17:44:08 +0000 (28 09:44 -0800)]
Update release notes and incremented version

Change-Id: Icd5e61bfeb34519d65829944af201886fe7e6abc

9 years ago(bug 42202) Validate preference values in action=options
Catrope [Fri, 16 Nov 2012 18:19:15 +0000 (16 10:19 -0800)]
(bug 42202) Validate preference values in action=options

Previously, there was no validation whatsoever and the module would
happily write any preference you asked it to. This, combined with the
fact that the code using the 'editfont' preference didn't perform any
validation or escaping, led to a CSS injection vulnerability.

Change-Id: I3da32a2110b6f782ae1a62b0624c3d71af528fa2

9 years ago(bug 42202) Validate editfont before embedding it in CSS
Catrope [Fri, 16 Nov 2012 18:12:58 +0000 (16 10:12 -0800)]
(bug 42202) Validate editfont before embedding it in CSS

If the editfont preference somehow had a value like "foo; color: blue",
we have a CSS injection problem. Normally preference validation should
protect against that, but the API module for setting preferences doesn't
perform any validation.

Change-Id: I5c12aa9a48bf4f6ea4a8fb44554d13189e7757fb

9 years ago(bug 40995) Refresh SessionId on login
csteipp [Wed, 28 Nov 2012 17:25:58 +0000 (28 09:25 -0800)]
(bug 40995) Refresh SessionId on login

SpecialUserlogin updated to refresh the user's session_id on each
successful login.

Change-Id: Id0a2c80f490a92b37fc60ba34ceb8eb3866debba

9 years agoRemove the throw from Message::extractParam()
Kevin Israel [Wed, 31 Oct 2012 20:59:50 +0000 (31 16:59 -0400)]
Remove the throw from Message::extractParam()

Per Tim Starling's comment on bug 41400, I replaced the throw (when a
message parameter is invalid) with a call to trigger_error().

The string [INVALID] is used as a placeholder to make it clear from
the output that an error has occurred.

Change-Id: I974d55d44d392c956e7de6d243da9d8dc07d8833

9 years agoAdd comments to Linker::formatLinksInComment()
Kevin Israel [Tue, 30 Oct 2012 01:49:15 +0000 (29 21:49 -0400)]
Add comments to Linker::formatLinksInComment()

Per Tim Starling's suggestion, added comments to the regex in
Linker::formatLinksInComment().

Change-Id: If85567e5a2e57dd56f5f263f3512e9ed2f9c940c

9 years agoOptimized regex in Linker.php
Kevin Israel [Thu, 25 Oct 2012 13:54:52 +0000 (25 09:54 -0400)]
Optimized regex in Linker.php

Optimized the regex in Linker::formatLinksInComment().

Change-Id: Idea5554bcb8d7e78ddf972ce4c9827fa738ff837

9 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Wed, 28 Nov 2012 21:25:49 +0000 (28 21:25 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Ia61c9a95193236351b66cf64c6e193c5a07c790e

9 years agoBackport compatible message changes from master.
Siebrand Mazeland [Wed, 28 Nov 2012 20:28:38 +0000 (28 21:28 +0100)]
Backport compatible message changes from master.

Change-Id: If1a6116b4f43d621f9d5a36fad3558fb61b4527d

9 years agoBackport compatible message changes from master.
Siebrand Mazeland [Wed, 28 Nov 2012 19:33:17 +0000 (28 20:33 +0100)]
Backport compatible message changes from master.

Change-Id: I7a89c843623a435294e51c9027137bc3fafbe1cc

9 years ago[FileBackend] Added FileBackend::getWikiID() function.
Aaron [Mon, 24 Sep 2012 22:38:37 +0000 (24 15:38 -0700)]
[FileBackend] Added FileBackend::getWikiID() function.

Change-Id: Idd9be6c72d494fad37ac62e274c1e115ff97cdec
(cherry picked from commit dfb0d94c996aaac6f1be017ee7a5355059ec43ba)

9 years agoLint: REL1_20 js.
Timo Tijhof [Tue, 20 Nov 2012 21:13:10 +0000 (20 22:13 +0100)]
Lint: REL1_20 js.

Updated .jshintignore to include all third-party code.

Loosen rules to pass the older 1.20 js code base.

Only a handful of errors left that I fixed:
 mediawiki.special.preferences.js: line 68, col 39, Unescaped '-'.
 mediawiki.special.preferences.js: line 80, col 47, Unescaped '-'.
jquery.byteLength.test.js: line 20, col 23, Unnecessary escapement.
 jquery.byteLength.test.js: line 28, col 70, Unnecessary escapement.
 mediawiki.Uri.test.js: line 325, col 13, Do not use 'new' for side effects.
 mediawiki.Uri.test.js: line 335, col 13, Do not use 'new' for side effects.

Change-Id: Ia21330846ee0ca5e89eb99d3f2bba44949269bc5

9 years ago(bug 40632) Remove CleanupPresentationalAttributes feature
Timo Tijhof [Thu, 1 Nov 2012 18:08:54 +0000 (1 19:08 +0100)]
(bug 40632) Remove CleanupPresentationalAttributes feature

Removed $wgCleanupPresentationalAttributes, the associated
code it toggles and references to those in src and tests.

Also fixes bug 40329.

This was originally introduced in r94465 (released in REL1_19) but
disabled by default. Then enabled in r98053, after which several
bugs were filed and eventually the decision was made to remove
this feature.

Removed obsolete release-note entry, as this is to be backported
to REL1_20.

Change-Id: I4e86305520a3b22ef88381caab55d24abac932e3

9 years ago[Database] Fixed case where trx idle callbacks might be lost.
Aaron Schulz [Wed, 14 Nov 2012 19:40:36 +0000 (14 11:40 -0800)]
[Database] Fixed case where trx idle callbacks might be lost.

* (bug 41656) LoadBalancer always commits if there are callbacks pending.
  This works by checking a new DatabaseBase::writesOrCallbacksPending() function.
* Made transaction idle callbacks run in autocommit mode. Generally callers already
  want autocommit mode or do quick begin()/commit() calls anyway. The docs already
  state that callbacks should close any connections they start, but this makes
  it harder for people to forget about implicit transactions. Since the callbacks
  often may happen in commitMasterChanges(), if transactions are left open, they
  might not get committed by anything afterwards.
* Added sanity exceptions and warnings if callbacks get lost for some reason.
* Renamed trxIdleCallbacks -> mTrxIdleCallbacks for consistency.

Change-Id: I00e1e0fcdd7deeee1fbac6d0f295160479cb8962

9 years agoCommit changes from tarball for 1.20 to REL1_201.20.0
Reedy [Wed, 7 Nov 2012 16:44:38 +0000 (7 16:44 +0000)]
Commit changes from tarball for 1.20 to REL1_20

Change-Id: I5e64e19dcaeb7d8790aa8dfe626c621a5602caa3

9 years agoUpdate RELEASE-NOTES-1.20 from tarball
Reedy [Wed, 7 Nov 2012 16:46:08 +0000 (7 16:46 +0000)]
Update RELEASE-NOTES-1.20 from tarball

Change-Id: Iba9f0957c10f291aca0f89534e08457ff1c07bc7

9 years agoUpdating $wgVersion to 1.20.0
Chad Horohoe [Wed, 7 Nov 2012 16:23:55 +0000 (7 11:23 -0500)]
Updating $wgVersion to 1.20.0

Change-Id: I0dd063c211786e768c685eb21b61bba8e5fb7c45

9 years agomw.notification: fix error on notif. close with $.fx.off=true
MatmaRex [Wed, 3 Oct 2012 17:33:05 +0000 (3 19:33 +0200)]
mw.notification: fix error on notif. close with $.fx.off=true

I didn't investigate why, but apparently $placeholder being defined
lexically after it is first used causes it to be null when it shouldn't
be, causing at least Opera to blow up. This only appears when $.fx.off is
set to true (to disable all jQuery animations; there's a gadget that does
this on pl.wikipedia).

Change-Id: If0aa6279515694ef20337ef02a05562c5543b2e2

9 years agoBackport compatible message changes from master
Siebrand Mazeland [Wed, 31 Oct 2012 07:58:37 +0000 (31 08:58 +0100)]
Backport compatible message changes from master

Change-Id: Ice801841d8e5ee5ce4d8e8d27058dc7fd2ea0c27

9 years agoraise timeout for WikiPage tests
Antoine Musso [Fri, 2 Nov 2012 14:22:54 +0000 (2 15:22 +0100)]
raise timeout for WikiPage tests

The tests do lot of DB queries which are quiet slow when using a SQLite
backend. Marking the class as belonging to the 'medium' group should
raise the timeout to 10 seconds.

Change-Id: I7a779bf4e5f44e755055182e0feeb68c005a920c

9 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Wed, 31 Oct 2012 07:37:43 +0000 (31 07:37 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I32a6b4fc763b2787f0baaeae60a2aabc30e07722

9 years agoMerge "Backport compatible message changes from master." into REL1_20
Siebrand Mazeland [Tue, 30 Oct 2012 21:12:03 +0000 (30 21:12 +0000)]
Merge "Backport compatible message changes from " into REL1_20

9 years agoBackport compatible message changes from master.
Siebrand Mazeland [Tue, 30 Oct 2012 20:13:20 +0000 (30 21:13 +0100)]
Backport compatible message changes from master.

Change-Id: Ie351e99fcce8a11ff6816e8df8aa1f2dfec9596e

9 years agoBackport translations for installer.
Siebrand Mazeland [Tue, 30 Oct 2012 20:20:08 +0000 (30 21:20 +0100)]
Backport translations for installer.

Change-Id: I215cdb518666f575b19cd83b27b28c2aab950d4e

9 years agoMerge "(bug 40098) Don't parse the section's name in the summary when creating a...
Hashar [Mon, 29 Oct 2012 15:43:40 +0000 (29 15:43 +0000)]
Merge "(bug 40098) Don't parse the section's name in the summary when creating a new section" into REL1_20

9 years agoMerge "Back out config table and related code" into REL1_20
Reedy [Thu, 25 Oct 2012 21:21:16 +0000 (25 21:21 +0000)]
Merge "Back out config table and related code" into REL1_20

9 years ago(bug 41349) mediawiki.searchSuggest: Reorder code + fix selectors
MatmaRex [Wed, 24 Oct 2012 15:51:59 +0000 (24 17:51 +0200)]
(bug 41349) mediawiki.searchSuggest: Reorder code + fix selectors

The code for general suggestions wouldn't run at all if no primary
search box was found. I moved this check down, to where the box is
actually needed.

The selectors were hardcoded with no explanation. Added comments,
added selector .mw-searchInput (as a generic one to be used by
skins with multiple search boxes, currently only CologneBlue).

Change-Id: Ie22fb66926688b0fdb28a121cfa0fb61ead0246d

9 years ago(bug 41292) Fix "containing..." search option
Kevin Israel [Tue, 23 Oct 2012 03:30:24 +0000 (22 23:30 -0400)]
(bug 41292) Fix "containing..." search option

Line 132 of jquery.js checks '<input type="hidden"/>' against
rsingleTag. The 'type="hidden"' part causes the HTML to no longer match
the regex, so jQuery fails to add the braced attributes. The "val: '1'"
part was likely wrong anyway; the correct attribute name is "value".

The bug causes the absence of the fulltext=1 query string argument,
which leaves the title near-match logic enabled even when the user
tries to override it. This commit fixes the problem by just putting all
the attributes inside the HTML string.

Change-Id: Ibcc56f64967e55740c10fdca30c525d4afc8fb25

9 years agoBack out config table and related code
Reedy [Mon, 22 Oct 2012 22:51:26 +0000 (22 23:51 +0100)]
Back out config table and related code

Change-Id: I4fa180d45984a4ec2b2c7b1149015c6dad14c5f0

9 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Mon, 22 Oct 2012 18:45:25 +0000 (22 18:45 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I76c62858bb10694c86af6b1fd9594ad544ca4123

9 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Mon, 22 Oct 2012 00:00:20 +0000 (22 00:00 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Ibace3a305f02705a743b961f67af6c1caec34354

9 years agoBackport compatible messages changes.
Siebrand Mazeland [Sun, 21 Oct 2012 23:12:04 +0000 (22 01:12 +0200)]
Backport compatible messages changes.

Also have to update tests...

Change-Id: I70b30592d536d21a32b63a3853de711dd3efb021

9 years agoInfoAction: Update to latest version from master (100473d .. cbed68b)
Timo Tijhof [Mon, 15 Oct 2012 21:54:41 +0000 (15 17:54 -0400)]
InfoAction: Update to latest version from master (100473d .. cbed68b)

Applied these commits (git log-nice of InfoAction.php between REL1_20 and master):

cbed68b (bug 39688) action=info displays misleading edit history for redlinks
388df2e Tidy up InfoAction and note it's hook in docs/hooks.txt

5fc20f8 Removed useless $title parameter to InfoAction::pageInfo()
8945408 (bug 40820) Revert my changes to includes/actions/CreditsAction.php
9dfdfeb Add userToolLinks to action=info
6fcc477 (bug 38559) Add hook to info action to allow extensions to add extra information to a pages info
c32c322 A few action=info bugfixes and enhancements.
737b294 Convert valign HTML attribute into inline CSS
100473d (bug 40046) MediaWiki's info action should link first revision of a page

Change-Id: Ie264a50e37c1efb872327c7c64503ce6bec9f0c9

9 years agoFix up various issues leading to bug 40780.
Timo Tijhof [Wed, 10 Oct 2012 02:23:30 +0000 (10 04:23 +0200)]
Fix up various issues leading to bug 40780.

* jquery.autoEllipsis didn't return 'this', which means whenever it
  was used in a chain, it would return undefined.

  So in mediawiki.searchSuggest append( ... autoEllipsis() ) would
  apply it to a detached node that stays detached because it
  isn't passed to append.

* Remove redundant passing of this in jQuery context to $().
  On jQuery.prototype, 'this' is obviously a jQuery object. In
  jquery.highlightText, which is called from jquery.autoEllipsis.

* Remove redundant .empty() call before calling .text( .. ),
  .text() replaces all content and naturally is forced to empty
  the element first.

* Merge use of $el and $container in jquery.autoEllipsis.js. They
  were both pointing to the same object, having two names was only
  confusing.

* Spaces.

Change-Id: I4649ec0c89d38c4d79d1dceec28227902cd48d32

9 years agoUpdate jQuery to 1.8.2
Reedy [Tue, 9 Oct 2012 14:50:32 +0000 (9 15:50 +0100)]
Update jQuery to 1.8.2

http://blog.jquery.com/2012/09/20/jquery-1-8-2-released/

Change-Id: Ie127f95eae951c36f6c330b4bdaee05f59cd58e2

9 years ago(bug 40834) mw.loader: Fix comma-joined 404 error.
Timo Tijhof [Sat, 6 Oct 2012 09:05:36 +0000 (6 11:05 +0200)]
(bug 40834) mw.loader: Fix comma-joined 404 error.

It passed an array instead of a url to addLink so internally
Array.prototype.toString happened which joins by comma.

In debug mode modules with more than 1 stylesheet were 404 error
as it was trying to load 'http://.../foo.css,http://.../bar.css'.

Unit tests didn't catch it because they all only tested an array
with 1 url. Updated the test to assert this from now on.

Follows-up I3e8227ddb87fd9441071ca935439fc6467751dab.

Change-Id: I32a79af637acb782e07bbae413b0f007350096c3

9 years ago(bug 40660) Don't mangle &nbsp; in on-wiki JS.
Catrope [Tue, 2 Oct 2012 03:21:31 +0000 (1 20:21 -0700)]
(bug 40660) Don't mangle &nbsp; in on-wiki JS.

Fixed by no longer using MessageCache::get() in
ResourceLoaderWikiModule. The only reason I see for using it is to make
default values for .js pages in the MediaWiki: namespace work (by
specifying them in an .i18n.php file), but that's evil and no one was
doing that other than putting in descriptive comments like
/* Site scripts go here */. That, and the previous implementation of
MediaWiki namespace JS that RL replaced did it, so I kept it at the
time, assuming it must have been needed for some reason.

Change-Id: Ica7f35fefcc200f0b3daf1d06d98a0b8ea878f3a

9 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Wed, 3 Oct 2012 19:35:39 +0000 (3 19:35 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Ibf7b4ce030b1f81defd00a9dd1d6f2e09aec604d

9 years agoRemoved user-agent string from mw.feedback posts
Trevor Parscal [Tue, 2 Oct 2012 23:23:10 +0000 (2 16:23 -0700)]
Removed user-agent string from mw.feedback posts

Legal found this to be unacceptable

Change-Id: Ib8746ece3a34b5e577dc08596b0ff7b1b96b5d73

9 years agoMerge "Link the credits in Special:Version in all languages" into REL1_20
Siebrand [Wed, 3 Oct 2012 16:53:23 +0000 (3 16:53 +0000)]
Merge "Link the credits in Special:Version in all languages" into REL1_20

9 years agoLink the credits in Special:Version in all languages
Marius Hoch [Wed, 26 Sep 2012 23:35:08 +0000 (27 01:35 +0200)]
Link the credits in Special:Version in all languages

Add the link to {{SERVER}}{{SCRIPTPATH}}/CREDITS in Special:Version
in the code and not in the interface message, which is
way more straightforward, makes the message  easier and
assures that the developers are credited no matter of the current
interface language.

The following languages need interface changes after this is merged:
He, Ko, Bcl, Jv (the fact that this list is so short once again
proves the point that the link isn't set in many languages). I'll
take care of those.

Change-Id: If12c4eb8453da40ede4b9768b2dacfaf838aa2ab

9 years agoBackport compatible message changes from master.
Siebrand Mazeland [Wed, 3 Oct 2012 16:44:15 +0000 (3 18:44 +0200)]
Backport compatible message changes from master.

Change-Id: I3bd239f0946669c43a95f906d1d5e9564f02a5cb

9 years agoBackport compatible message changes from master.
Siebrand Mazeland [Wed, 3 Oct 2012 15:44:13 +0000 (3 17:44 +0200)]
Backport compatible message changes from master.

Change-Id: I6c8cc5d2eb061e16d929e7328b8670515dbb98e3

9 years agoUpdate messages.inc for Icd721011b4
Timo Tijhof [Wed, 3 Oct 2012 00:16:46 +0000 (3 02:16 +0200)]
Update messages.inc for Icd721011b4

Change-Id: I5b2fd3b3f913ee57cf26e2c079b2b3bece8df358

9 years agoResourceLoader: Refactor style loading
Timo Tijhof [Wed, 25 Jul 2012 21:20:21 +0000 (25 14:20 -0700)]
ResourceLoader: Refactor style loading

Fixes:
* bug 31676: Work around IE stylesheet limit.
* bug 35562: @import styles broken in modules that combine
  multiple stylesheets.
* bug 40498: Don't output empty "@media print { }" blocks.
* bug 40500: Don't ignore media-type for urls in debug mode.

Approach:
* Re-use the same <style> tag so that we stay under the 31
  stylesheet limit in IE. Unless the to-be-added css text from
  the being-loaded module contains @import, in which case we do
  create a new <style> tag and then re-use that one from that
  point on (bug 31676).

* Return stylesheets as arrays, instead of a concatenated string.
  This fixes bug 35562, because @import only works when at the
  top of a stylesheet. By not unconditionally concatenating files
  within a module on the server side already, @import will work
  in e.g. module 'site' that contains 2 wiki pages.

  This is normalized in ResourceLoader::makeCombinedStyles(),
  so far only ResourceLoaderWikiModule makes use of this.

Misc. clean up and bug fixes:
* Reducing usage of jQuery() and mw.html.element() where
  native DOM would be very simple and faster. Aside from
  simplicity and speed, this is also working towards a more
  stand-alone ResourceLoader.
* Trim server output a little bit more
  - Redundant new line after minify-css (it is now an array, so
    no need to keep space afterwards)
  - Redundant semi-colon after minify-js if it ends in a colon
* Allow space in styleTest.css.php
* Clean up and extend unit tests to cover for these features
  and bug fixes.
* Don't set styleEl.rel = 'stylesheet'; that has no business
  on a <style> tag.
* Fix bug in mw.loader's addStyleTag(). It turns out IE6
  has an odd security measure that does not allow manipulation
  of elements (at least style tags) that are created by a
  different script (even if that script was served from the same
  domain/origin etc.). We didn't ran into this before because
  we only created new style tags, never appended to them. Now
  that we do, this came up. Took a while to figure out because
  it was created by mediawiki.js but it calls jQuery which did
  the actual dom insertion. Odd thing is, we load jquery.js and
  mediawiki.js in the same request even...
  Without this all css-url related mw.loader tests would fail
  in IE6.
* mediawiki.js and mediawiki.test.js now pass jshint again.

Tested (and passing qunit/?module=mediawiki; 123 of 123):
* Chrome 14, 21
* Firefox 3.0, 3.6, 4, 7, 14, 15, 16beta
* IE 6, 7, 8, 9
* Safari 4.0, 5.0, 5.1
* Opera 10.0, 11.1, 11.5, 11.6, 12.0, 12.5beta
* iPhone 3GS / iOS 3.0 / Mobile Safari 4.0
  iPhone 4 / iOS 4.0.1 / Mobile Safari 4.0.5
  iPhone 4S / iOS 6.0 Beta / Mobile Safari 6.0

Change-Id: I3e8227ddb87fd9441071ca935439fc6467751dab

9 years ago(bug 40098) Don't parse the section's name in the summary when creating a new section
Alexandre Emsenhuber [Sun, 9 Sep 2012 13:37:17 +0000 (9 15:37 +0200)]
(bug 40098) Don't parse the section's name in the summary when creating a new section

Fix for Ifa80db1d (8d4913e)

Change-Id: I9a56b7c6d2e7d0997f92578cbfabbf532bfb07de

9 years agorelease note for bug 34495
Antoine Musso [Tue, 2 Oct 2012 08:37:31 +0000 (2 10:37 +0200)]
release note for bug 34495

When [r111965] got backported in 1.19wmf branch, it was not applied to
the REL1_19 branch and thus is missing from the 1.19 releases. The fix
is already in 1.20, this merely add the forgotten release notes entry.

[r111965]
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/111965

Change-Id: I2de04fbe22a0b18a15755eac2db9683e5e179b0a

9 years agoSync stand-alone release notes changes
Timo Tijhof [Tue, 2 Oct 2012 06:08:11 +0000 (2 08:08 +0200)]
Sync stand-alone release notes changes

Change-Id: Ic07c57c4b3fb27074ea8a0d85b56837f8db81bd1

9 years ago(bug 40448) Replace legacy mwsuggest with mediawiki.searchSuggest
Timo Tijhof [Sun, 23 Sep 2012 01:06:53 +0000 (23 03:06 +0200)]
(bug 40448) Replace legacy mwsuggest with mediawiki.searchSuggest

The module has been broken for a while now, but nobody noticed
because in plain core it is disabled by default, and in the
bundle we ship with Extension:Vector (and its SimpleSearch).

This commit removed the mediawiki.legacy.mwsuggest module (and
related components that become obsolete with its deletion) and
replaces it with the new mediawiki.searchSuggest module, which is
based on SimpleSearch from Extension:Vector (where it will be
removed soon).

The following and all references to it in core have been removed,
I also made sure that they weren't used in any of extensions/*.
Only matches in extensions/Settings and some file that dumped the startup module, and in extensions/Vector which are addressed in
I1d5bf81a8a0266c51c99d41eefacc0f4b3ae4b76.

Had to make a few updates to jquery.suggestions to make it work
in other skins. So far it was only used in Vector, but now that
it is used in mediawiki.searchSuggest, I noticed several issues
in other skins. Most importantly the fact that it assumed the
default offset was from the right corner, which isn't the case in
Monobook where the search bar is on the left (in the sidebar).

It now detects the appropiate origin corner automatically, and
also takes directionality of the page into account.

It also uses the correct font-size automatically. Previously it
used font-size: 0.8; but that only works in Vector. Every skin
seems to have its own way of making a sane font-size. In Monobook
the <body> has an extra small font-size which is then fixed in
div#globalWrapper, and in Vector it is extra large, which is then
fixed as well deeper in the document. Either way, the size on
<body> can't be used, and since this suggestions box is appended
to the <body> (it is a generic jQuery plugin without knowledge of
the document, and even if we could give it knowledge inside
the configuration, it'd have to be per-skin). So I removed the
Vector specific font-size and let it handle it automatically.
This was needed because it is now used in all skins.

Removed modules:
* mediawiki.legacy.mwsuggest:
  > Replaced with mediawiki.searchSuggest.

Removed messages:
* search-mwsuggest-enabled
* search-mwsuggest-disabled
  > No longer used.

Removed mw.config.values:
* wgMWSuggestTemplate
  > Obsolete.

* wgSearchNamespaces
  > Obsolete.

Removed server-side settings:
* $wgEnableMWSuggest
  > Suggestions are now enabled by default and can be disabled
    through the user preference `disablesuggest` still.
    They can be disabled by default site-wide or hidden from
    prefs through the standard mechanisms for that.

* $wgMWSuggestTemplate
  > Obsolete.

Removed methods
* SearchEngine::getMWSuggestTemplate()
  > Obsolete.

Filters:
 $ ack mwsuggest -i -Q --ignore-dir=languages/messages
 $ ack wgSearchNamespaces -Q

Message changes:
* vector-simplesearch-preference
  > It was wrong, it didn't activate search suggestions, that
    was handled by the Vector extension. This preference in
    MediaWiki core controls whether the SimpleSearch bar HTML
    and CSS will be used (e.g. the rectangle search box with
    the magnifying class instead of the browser-default input
    field with the plain submit buttons).

* searchsuggest-search
* searchsuggest-containing
  These come from Extension:Vector message and should be imported
  by translatewiki:
  - vector-simplesearch-search
  - vector-simplesearch-containing

Change-Id: Icd721011b40bb8d2c20aefa8b359a3e45413a07f

9 years agomediawiki.action.edit.preview: New module replacing preview.js
Timo Tijhof [Mon, 17 Sep 2012 17:35:04 +0000 (17 19:35 +0200)]
mediawiki.action.edit.preview: New module replacing preview.js

With all the recent improvements, it's time this module got
promoted away from legacy. Its no longer just an old script to
that provides preview functionality and is minimally
maintained within "legacy", its reborn!

Minor clean up follows-up:
e75054174c944d8a78a2c2822abe2fe161f7d6ad
b12dc64a1198f6b094a5a60307412ff91f0bbf49

Change-Id: I85ca97a1d8df25a09baad78030d6da379a06c0f1