lhc/web/wiklou.git
10 years agoAdded summary to Special:ProtectedPages and Special:ProtectedTitles.
Roman Tsukanov [Mon, 17 Feb 2014 16:26:39 +0000 (02:26 +1000)]
Added summary to Special:ProtectedPages and Special:ProtectedTitles.

Bug: 61454
Change-Id: I3a98f09458d4cb31b1ffe6ffd110b8515126fcea

10 years agoremove junk line that duplicates another line
kipod [Mon, 17 Feb 2014 17:31:05 +0000 (12:31 -0500)]
remove junk line that duplicates another line

Change-Id: I7fac4dd88b83ceeeca0a8964f55df0db47777cd8

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 17 Feb 2014 20:35:28 +0000 (20:35 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: I86c1c01411f82197c10f7c3cce25feede39f9166

10 years agoFix typo in Nikerabbit's surname
Federico Leva [Mon, 17 Feb 2014 18:19:25 +0000 (19:19 +0100)]
Fix typo in Nikerabbit's surname

Change-Id: Ia76f2635a3bffe962815dd6c848ae0b3280f3bc5

10 years agoMerge "Add ParserOutput::addJsConfigVars"
jenkins-bot [Mon, 17 Feb 2014 10:04:00 +0000 (10:04 +0000)]
Merge "Add ParserOutput::addJsConfigVars"

10 years agoMerge "Vector: Simplify text paths in tiny icons"
jenkins-bot [Mon, 17 Feb 2014 04:01:15 +0000 (04:01 +0000)]
Merge "Vector: Simplify text paths in tiny icons"

10 years agoVector: Simplify text paths in tiny icons
Bartosz Dziewoński [Sat, 8 Feb 2014 13:39:57 +0000 (14:39 +0100)]
Vector: Simplify text paths in tiny icons

document-icon.svg and news-icon.svg contained some text converted to
paths. As fonts are generally high-quality, the file size for both
icons was ridiculous (over 10 KB each). Used Inkscape's path simplify
function to smooth out the shapes – this isn't noticeable at the
sizes these icons are displayed at.

Bug: 59744
Change-Id: Ie0537a545c128665d9670bad92e22e9bf01cd59d

10 years agoRemove a HTML backwards-compatibility hack from 2011
Bartosz Dziewoński [Sat, 15 Feb 2014 19:29:13 +0000 (20:29 +0100)]
Remove a HTML backwards-compatibility hack from 2011

This reverts r97607.

Change-Id: Ic0659e42e54dd1f08a4dd36d32adb356c3c18ae8

10 years agoMerge "Remove unused setting $wgImageMagickIdentifyCommand"
jenkins-bot [Mon, 17 Feb 2014 03:05:09 +0000 (03:05 +0000)]
Merge "Remove unused setting $wgImageMagickIdentifyCommand"

10 years agoMerge "Fix comment for $wgUseImageResize"
jenkins-bot [Mon, 17 Feb 2014 02:44:28 +0000 (02:44 +0000)]
Merge "Fix comment for $wgUseImageResize"

10 years agoFix comment for $wgUseImageResize
This, that and the other [Sun, 16 Feb 2014 10:30:25 +0000 (21:30 +1100)]
Fix comment for $wgUseImageResize

It is not obsolete - it is used by the Bitmap class. I tested it and it
does indeed disable server-side image thumbnailing. The variable was
originally un-obsoleted in r48787, but accidentally re-marked obsolete
when merging upload-api/js2 branch in r53282.

Also moving it to a more logical location in DefaultSettings.

Change-Id: Ibb4d9784e997ea3b6ca7e2e0272635e6c8a30d26

10 years agoAdd ParserOutput::addJsConfigVars
umherirrender [Sun, 19 Jan 2014 15:39:46 +0000 (16:39 +0100)]
Add ParserOutput::addJsConfigVars

The OutputPage has variables for modules, moduleScripts, moduleStyles,
moduleMessages and the config vars, but the ParserOutput is missing the
last one.

With ParserOutput::addJsConfigVars it is possible to add scripts and it
config vars at one place and have not use the MakeGlobalVariablesScript
hook or other ways to get the needed javascript variable in the output.

Change-Id: I6ad61cca76805f6b9d76e053c98c7509c323d5da

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 16 Feb 2014 20:10:55 +0000 (20:10 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: Id3d35cd6092604494646483ef80a546b80d8fdb9

10 years agoActually write-back the container cache in SwiftFileBackend
Aaron Schulz [Sun, 16 Feb 2014 04:25:08 +0000 (20:25 -0800)]
Actually write-back the container cache in SwiftFileBackend

Change-Id: Ia072dd09c1fa5b4dec20a80e69425f7364488362

10 years agoRemove unused setting $wgImageMagickIdentifyCommand
This, that and the other [Sun, 16 Feb 2014 05:40:06 +0000 (16:40 +1100)]
Remove unused setting $wgImageMagickIdentifyCommand

No need to deprecate first, as it is simply unused.

It was added in r107351, and its only usage was removed in
r108141.

Change-Id: Ie95d8b707ac1ff2fe2a9bae6d5f77ba68b4291ad

10 years agoCologneBlue: Add class="mw-body" to div#article for consistency with other skins
Jack Phoenix [Sat, 15 Feb 2014 23:04:59 +0000 (01:04 +0200)]
CologneBlue: Add class="mw-body" to div#article for consistency with other skins

Change-Id: I93d25a60f3f9371a236ee3593186527815d356b7

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 15 Feb 2014 20:55:27 +0000 (20:55 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: I7b391e39e428d5e358d52770b58b36f56a891036

10 years agoMerge "Get rid of mw.loader.go and mw.loader.version"
jenkins-bot [Sat, 15 Feb 2014 19:18:20 +0000 (19:18 +0000)]
Merge "Get rid of mw.loader.go and mw.loader.version"

10 years agoGet rid of mw.loader.go and mw.loader.version
Ori Livneh [Sat, 15 Feb 2014 19:08:12 +0000 (11:08 -0800)]
Get rid of mw.loader.go and mw.loader.version

- loader#go: No longer required; never truly 'public'.
- loader#version: deprecated since 1.18.

No usage in the MediaWiki: NS on the Wikimedia cluster.

Change-Id: I57d340015621c8dd8dae57f9cbca05a03d44ee75

10 years agomediawiki.js: Add missing bug number reference
Bartosz Dziewoński [Sat, 15 Feb 2014 16:11:07 +0000 (17:11 +0100)]
mediawiki.js: Add missing bug number reference

Should have been added in 67d400e7.

Change-Id: Ide6d060fe2d32c463d84057a289ab1feab576310

10 years agoAdd preliminary MS SQL support
Skizzerz [Fri, 3 Jan 2014 03:04:26 +0000 (21:04 -0600)]
Add preliminary MS SQL support

This likely has outstanding bugs but basic wiki operations work just fine in it.

Change-Id: I25df82065a307b9abc30c694f8c8afff0996d7c1

10 years agoNote OOjs and OOjs-UI presence in the RELEASE-NOTES
James D. Forrester [Sat, 15 Feb 2014 02:22:02 +0000 (18:22 -0800)]
Note OOjs and OOjs-UI presence in the RELEASE-NOTES

Change-Id: I377304a70d19b87f35ea52ab2950f52fa1e72471

10 years agoMerge "Update OOjs UI to v0.1.0-pre (424b40373e)"
jenkins-bot [Sat, 15 Feb 2014 02:04:22 +0000 (02:04 +0000)]
Merge "Update OOjs UI to v0.1.0-pre (424b40373e)"

10 years agoUpdate OOjs UI to v0.1.0-pre (424b40373e)
James D. Forrester [Sat, 15 Feb 2014 01:59:15 +0000 (17:59 -0800)]
Update OOjs UI to v0.1.0-pre (424b40373e)

554683c Allow whitespace labels
3a9a4c1 Invert dependencies for OutlineItemWidget and PageLayout
51f7972 Fix occurrences of @mixin to be @mixins
424b403 FieldLayout, styling improvements and standardization

Change-Id: Iee8653d41c85d8f3a927e9a32587cdc3f42e0412

10 years agoUpdate OOjs to v1.0.7-pre (9c04f3e917)
James D. Forrester [Sat, 15 Feb 2014 01:54:19 +0000 (17:54 -0800)]
Update OOjs to v1.0.7-pre (9c04f3e917)

c723873 package.json: Set npm dependencies at fixed versions
d27e989 Set up node-jscs, pass it, and configure in local Gruntfile
e284c5f Update build notice and licence file for 2014
81d0f4a Tag v1.0.7
7b20b8a package.json: Update devDependencies
6c47d42 Implement generateDocs.sh script
9c04f3e core: Add a 'super' property to inheriting classes

Change-Id: I4c9d0bceed00ed290ac2454b54abe2e53a46857c

10 years agoTweak documentation for Title::getLocalUrl
Federico Leva [Tue, 4 Feb 2014 09:00:36 +0000 (10:00 +0100)]
Tweak documentation for Title::getLocalUrl

Because I was confused by the docs when I tried to use it.
https://gerrit.wikimedia.org/r/#/c/109945/1/specials/SpecialTranslationStash.php

Change-Id: Ic19704c6a57b633bb5ef1c8a06db9a562e67c6c9

10 years agoDeprecate wgSkipSkin in favor of wgSkipSkins
This, that and the other [Sat, 15 Feb 2014 00:04:24 +0000 (11:04 +1100)]
Deprecate wgSkipSkin in favor of wgSkipSkins

Per comments at
https://gerrit.wikimedia.org/r/#/c/110162/5/includes/DefaultSettings.php

Change-Id: I47e891464c9955e2ea8c655c8e2e19cb09f55baa

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 14 Feb 2014 20:11:54 +0000 (20:11 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: I276bff053ef2bfea3180abe56bc2e26b5fcbe89b

10 years agoShow 'Indexing by robots' status correct on action=info
umherirrender [Fri, 14 Feb 2014 14:21:12 +0000 (15:21 +0100)]
Show 'Indexing by robots' status correct on action=info

When $wgNamespaceRobotPolicies contains a noindex for a namespace and
the page contains __INDEX__, the index status on action=info was
"Disallowed", but that is wrong, because the page is indexed.

Pass the 'index' to the robot policy logic.

Change-Id: Ib77c3e73968cdc72f657e50371a2372564a1c618

10 years agoMoved Release notes for Ia0dc5895
umherirrender [Fri, 14 Feb 2014 13:59:48 +0000 (14:59 +0100)]
Moved Release notes for Ia0dc5895

Was filled under configuration, but new features is better.

Change-Id: I63f13700f9e7a7082ff3586aa03ecdb47937eaee

10 years agoPerformance of mediawiki.searchSuggest.js
Thiemo Mättig [Fri, 14 Feb 2014 12:58:44 +0000 (13:58 +0100)]
Performance of mediawiki.searchSuggest.js

Two tiny performance improvements.

The complexity of a regular expression is not needed to check if a
string contains a character. string.match() returns an array of
matches which is not used anyway in this case. Either
string.indexOf() or RegExp.test() should be used.

Duplicate jQuery call merged.

Change-Id: Ifec79eada70181df0d56c583ef832ee82594620e

10 years agoUpdate OOjs UI to v0.1.0-pre (7d3223b8f4)
James D. Forrester [Fri, 14 Feb 2014 02:43:07 +0000 (18:43 -0800)]
Update OOjs UI to v0.1.0-pre (7d3223b8f4)

6c3e183 Add icons demo
f285a06 build: Concatenation task should not include 'default' in a variant
7d3223b Fix for clearing items in a group element

Change-Id: I8f1b59806b25f5d6a1431e77d654259385245b91

10 years agoMerge "mediawiki.jqueryMsg: Deprecate window.gM"
jenkins-bot [Fri, 14 Feb 2014 01:08:45 +0000 (01:08 +0000)]
Merge "mediawiki.jqueryMsg: Deprecate window.gM"

10 years agomediawiki.jqueryMsg: Deprecate window.gM
Bartosz Dziewoński [Thu, 13 Feb 2014 18:19:22 +0000 (19:19 +0100)]
mediawiki.jqueryMsg: Deprecate window.gM

The comment already said it was.  Make this more obvious with mw.log.deprecate.

Change-Id: I60af043eb7a136a0f52618fdbc9bb76b17788b83

10 years agoMerge "Return jqXHR from mw.Api calls"
jenkins-bot [Fri, 14 Feb 2014 00:47:58 +0000 (00:47 +0000)]
Merge "Return jqXHR from mw.Api calls"

10 years agoMerge "Update OOjs UI to v0.1.0-pre (7788dc6700)"
jenkins-bot [Thu, 13 Feb 2014 22:40:57 +0000 (22:40 +0000)]
Merge "Update OOjs UI to v0.1.0-pre (7788dc6700)"

10 years agoMerge "mediawiki.jqueryMsg: Support {{GENDER:}} with empty first parameter"
jenkins-bot [Thu, 13 Feb 2014 22:25:14 +0000 (22:25 +0000)]
Merge "mediawiki.jqueryMsg: Support {{GENDER:}} with empty first parameter"

10 years agoMerge "Add jquery-throttle-debounce to core"
jenkins-bot [Thu, 13 Feb 2014 22:00:15 +0000 (22:00 +0000)]
Merge "Add jquery-throttle-debounce to core"

10 years agoUpdate OOjs UI to v0.1.0-pre (7788dc6700)
James D. Forrester [Thu, 13 Feb 2014 21:58:18 +0000 (13:58 -0800)]
Update OOjs UI to v0.1.0-pre (7788dc6700)

27832b1 Moved PNG icons to their own variant
06cf9a3 Make disabled state inheritable
4dd81c9 Removed some of the drop-shadows on buttons
88efa8e Localisation updates from https://translatewiki.net.

Change-Id: Ie66d907e8edabe722e2c2d2662a902e2aec1e1a7

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 13 Feb 2014 21:30:58 +0000 (21:30 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: Icc129087a7b93326b24c5921b2a0046392689f7a

10 years agoAdd jquery-throttle-debounce to core
Gergő Tisza [Wed, 12 Feb 2014 21:18:08 +0000 (21:18 +0000)]
Add jquery-throttle-debounce to core

This is currently used by MultimediaViewer, but it is also needed
by UploadWizard (and probably useful to several other projects).

Similar to jquery.delayedBind (which is already in core), but has
several advantages:
* can also do throttling (fire event every N ms) which is better
  suited to some events (e.g. scroll) than debouncing (check every
  N ms if there are still events, only fire once they stopped)
* not coupled with event binding, it just takes a function and
  returns a throttled/debounced function. This means it can be used
  in ways delayedBind cannot (e.g. event delegation), or with non-
  event-based callbacks.
* widely used external project with good documentation, tests etc:
  https://github.com/cowboy/jquery-throttle-debounce

On the minus side, the project has been inactive for years and
originally written for jQuery 1.3. Given that it is extremely simple
and does not depend on jQuery at all (just registers itself in the
jQuery namespace), that should not be a problem.

Change-Id: I008f46cc97af10e93ad9cad35924aaf251b99aa6

10 years agoMerge "Use TablePager on Special:ProtectedPages (using log_search)"
jenkins-bot [Thu, 13 Feb 2014 20:02:22 +0000 (20:02 +0000)]
Merge "Use TablePager on Special:ProtectedPages (using log_search)"

10 years agoUse TablePager on Special:ProtectedPages (using log_search)
umherirrender [Thu, 13 Feb 2014 19:48:53 +0000 (20:48 +0100)]
Use TablePager on Special:ProtectedPages (using log_search)

Adding the pr_id to log_search table and use a join to get the user,
timestamp and comment from the logging table. For logs without the pr_id
a placeholder text is shown.
The code for page protection is changed from a replace to delete/insert
to have for each pr_id a log_id and not reusing pr_ids which was used
for the first protection on a protection change.
The log_deleted field is checked to avoid showing revision deleted data
from the logging table.

This is a alternative patch for
Ie40057398a7829c698df3d68813006798a72dccb
and Iade82653999ca770586762b3c1383f73dfe3a5ee to avoid a schema change
on table page_restriction.
Idea by Aaron Schulz.

Change-Id: Ia0dc5895ec672896fe4b75c2e0f76da2474bd6e4

10 years agoMerge "Tweaked generated paths for ExternalStoreMwstore"
jenkins-bot [Thu, 13 Feb 2014 19:02:04 +0000 (19:02 +0000)]
Merge "Tweaked generated paths for ExternalStoreMwstore"

10 years agoTweaked generated paths for ExternalStoreMwstore
Aaron Schulz [Thu, 13 Feb 2014 18:15:13 +0000 (10:15 -0800)]
Tweaked generated paths for ExternalStoreMwstore

* This improve the object store case (with B-Tree container listings
  and 2-level sharding set up).

Change-Id: If75f51fb07cd5df0da455d4e6eafe06d69e8b941

10 years agooojs-ui: Fix up addition to core
Timo Tijhof [Thu, 13 Feb 2014 01:53:09 +0000 (17:53 -0800)]
oojs-ui: Fix up addition to core

Follows-up I0736601e04a15c8.

* Move to its own directory instead of mixing in the oojs.js dir.
* This also fixes the jsduck errors as it was immediately being
  indexed with settings for oojs, eventhough oojs-ui correctly
  does not index without errors with core's jsduck config.
* Remove spurious .gitignore file.

Change-Id: I01f99deb3967d731d7b0e8bca2a2497b3c0151ac

10 years agoMerge "mediawiki.feedback: Add jsduck documentation"
jenkins-bot [Thu, 13 Feb 2014 17:58:23 +0000 (17:58 +0000)]
Merge "mediawiki.feedback: Add jsduck documentation"

10 years agomediawiki.feedback: Add jsduck documentation
Mark Holmquist [Wed, 5 Feb 2014 22:51:35 +0000 (14:51 -0800)]
mediawiki.feedback: Add jsduck documentation

Change-Id: Idec212381a904f174de7ae63ef57f26c92db6449

10 years agoExplicitely return null from WikiPage::newFromID()
Alexandre Emsenhuber [Thu, 13 Feb 2014 17:50:50 +0000 (18:50 +0100)]
Explicitely return null from WikiPage::newFromID()

Follow-up I8943b4dec5 (d7f465f).

To match the documentation.

Change-Id: I7b960704d6b3a83e389ece182bf94142341ea88c

10 years agomediawiki.jqueryMsg: Support {{GENDER:}} with empty first parameter
Bartosz Dziewoński [Thu, 13 Feb 2014 13:10:17 +0000 (14:10 +0100)]
mediawiki.jqueryMsg: Support {{GENDER:}} with empty first parameter

(That is, gender for the user viewing the page.)

This is a bit hacky – it would be cleaner to allow empty parameters
instead of creating a separate construction for first-parameter-less
brace expansion – but this one works and the cleaner one was throwing
exceptions all over when I tried to do that.

Bug: 61320
Change-Id: I0f273951b2f8cebd50dffc6ef23520bb6fa72ccf

10 years agoMerge "Vector: Consistently use lowercase in #rrggbb colors"
jenkins-bot [Thu, 13 Feb 2014 16:24:26 +0000 (16:24 +0000)]
Merge "Vector: Consistently use lowercase in #rrggbb colors"

10 years agoMerge "Vector: Remove misleading comment"
jenkins-bot [Thu, 13 Feb 2014 16:24:25 +0000 (16:24 +0000)]
Merge "Vector: Remove misleading comment"

10 years agoMerge "Actually make Parser::pstPass2() private"
jenkins-bot [Thu, 13 Feb 2014 00:47:16 +0000 (00:47 +0000)]
Merge "Actually make Parser::pstPass2() private"

10 years agoMerge "Return early when page id is less than 1"
jenkins-bot [Thu, 13 Feb 2014 00:33:31 +0000 (00:33 +0000)]
Merge "Return early when page id is less than 1"

10 years agoMerge "Remove undocumented and unused searchx parameter"
jenkins-bot [Thu, 13 Feb 2014 00:33:30 +0000 (00:33 +0000)]
Merge "Remove undocumented and unused searchx parameter"

10 years agoMerge "Added some lock()/unlock() support for SQLite using lock file emulation"
jenkins-bot [Thu, 13 Feb 2014 00:32:32 +0000 (00:32 +0000)]
Merge "Added some lock()/unlock() support for SQLite using lock file emulation"

10 years agoLimit attempts to render the same thumbnail after failures
Aaron Schulz [Tue, 14 Jan 2014 19:36:26 +0000 (11:36 -0800)]
Limit attempts to render the same thumbnail after failures

bug: 49118
Change-Id: I9379ec445bf2e77bd3b085c00182c5e406ed300d

10 years agoUpdate OOjs UI to c0f5658
James D. Forrester [Wed, 12 Feb 2014 21:53:25 +0000 (13:53 -0800)]
Update OOjs UI to c0f5658

e5ecea2 Refactor labels and titles to be consistent
53ec329 Fix indicator vs icon typo in IconedElement
dc93c91 Fix positioning in TextInputMenuWidget
c0f5658 Localisation updates from https://translatewiki.net.

Change-Id: Idb2f1b4929f4afc417054221a243134fee6ae017

10 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Wed, 12 Feb 2014 21:38:51 +0000 (21:38 +0000)]
Merge "Localisation updates from https://translatewiki.net."

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 12 Feb 2014 21:29:59 +0000 (21:29 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib0b47d701a358e314f802fa6163966f3618c6863

10 years agoAdd external things to the JSDuck config
Mark Holmquist [Wed, 12 Feb 2014 21:21:01 +0000 (13:21 -0800)]
Add external things to the JSDuck config

oojs-ui relies on these, so the MW doc publish will be broken until we
merge this change.

Change-Id: Ib724b6e937e09749928317b8d56c286bb2d1f7f9

10 years agoAdd OOjs UI v0.1.0-pre (3b61a8d77c) to MW core
James D. Forrester [Thu, 16 Jan 2014 23:43:24 +0000 (15:43 -0800)]
Add OOjs UI v0.1.0-pre (3b61a8d77c) to MW core

Just adding code for now, not actually used for anything in core yet.

Note that OOjs and OOjs UI do not work in older browsers, and will
actually cause JS errors when loaded in browsers that don't support
ES5. We'll resolve this by adding an ES5 shim later.

Bug: 56572
Change-Id: I0736601e04a15c84d2ac1994febbf1a17bc1399a

10 years agoMerge "New hook MessageCache::get"
jenkins-bot [Wed, 12 Feb 2014 15:23:59 +0000 (15:23 +0000)]
Merge "New hook MessageCache::get"

10 years agoAdd llprop=langname and llprop=autonym for action=query&prop=langlinks
umherirrender [Tue, 11 Feb 2014 19:04:32 +0000 (20:04 +0100)]
Add llprop=langname and llprop=autonym for action=query&prop=langlinks

This can helps the client to build a language html.

Change-Id: I54c66c8935b0dbbf3bf8e292236119597f1cbe41

10 years agoAdded simpler handleError() method in RedisConnectionPool
Aaron Schulz [Wed, 18 Dec 2013 00:55:09 +0000 (16:55 -0800)]
Added simpler handleError() method in RedisConnectionPool

* Callers should not need to give $server since it is stored in RedisConnRef

Change-Id: I902d984d6a7f19dd0d8c71ee374cbed359de378e

10 years agoReduce the amount of Swift auth cache keys used on wiki farms
Aaron Schulz [Wed, 12 Feb 2014 06:38:06 +0000 (22:38 -0800)]
Reduce the amount of Swift auth cache keys used on wiki farms

Change-Id: Ic0a2f744d5d94bfb22286a19be3de0c37ecdf519

10 years agoFixed broken auth caching for Swift
Aaron Schulz [Wed, 12 Feb 2014 06:13:17 +0000 (22:13 -0800)]
Fixed broken auth caching for Swift

* A set() call was missing since 2af7ad8

Change-Id: I62b277e886c7ce6142a4d20f705b8337c3e4be58

10 years agoOnly call ->clearInstanceCache() if $targetUser instanceof User
Kunal Mehta [Wed, 12 Feb 2014 05:44:34 +0000 (21:44 -0800)]
Only call ->clearInstanceCache() if $targetUser instanceof User

Bug: 61252
Change-Id: Ibb79ca9a27e50b58fdd5dd541e243054fb095753

10 years agoMultiHttpClient tweaks
Aaron Schulz [Wed, 29 Jan 2014 22:44:54 +0000 (14:44 -0800)]
MultiHttpClient tweaks

* Reference handling cleanup for loops in MultiHttpClient
* Support a slightly more convenient request array format for MultiHttpClient
* Added missing license header to MultiHttpClient

Change-Id: I0a2eef02c06d9c900c4a1ae1b0eeb292755d6cd9

10 years agoSimplified Swift backend to use maxConns flag in MultiHttpClient
Aaron Schulz [Fri, 17 Jan 2014 21:38:49 +0000 (13:38 -0800)]
Simplified Swift backend to use maxConns flag in MultiHttpClient

Change-Id: Iee3756a490243511be86676c01d0a47940529e0b

10 years agoMerge "Cleanups to LoadMonitor"
jenkins-bot [Tue, 11 Feb 2014 21:53:38 +0000 (21:53 +0000)]
Merge "Cleanups to LoadMonitor"

10 years agoMerge "Added pipelining and max connection support to MultiHttpClient"
jenkins-bot [Tue, 11 Feb 2014 20:57:09 +0000 (20:57 +0000)]
Merge "Added pipelining and max connection support to MultiHttpClient"

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 11 Feb 2014 19:51:19 +0000 (19:51 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie1af90b203186077bf9675749c1a4f8ac979861b

10 years agoMerge "Deprecate llurl= in favour of llprop=url for action=query&prop=langlinks"
jenkins-bot [Tue, 11 Feb 2014 18:47:52 +0000 (18:47 +0000)]
Merge "Deprecate llurl= in favour of llprop=url for action=query&prop=langlinks"

10 years agoDeprecate llurl= in favour of llprop=url for action=query&prop=langlinks
umherirrender [Tue, 11 Feb 2014 18:29:10 +0000 (19:29 +0100)]
Deprecate llurl= in favour of llprop=url for action=query&prop=langlinks

New props will be added with I54c66c8935b0dbbf3bf8e292236119597f1cbe41

Change-Id: I1340b18b51bccdfaaddec6a16df320d5f6e5acfa

10 years agoRemove undocumented and unused searchx parameter
Chad Horohoe [Tue, 11 Feb 2014 02:19:29 +0000 (18:19 -0800)]
Remove undocumented and unused searchx parameter

It dates from early implementations of Special:Search but is
no longer used by anything anymore.

Change-Id: Ib6ed378242558aa332e453357510932310546f8b

10 years agoMerge "Revert "Limit searches at 500 per page""
jenkins-bot [Tue, 11 Feb 2014 18:05:05 +0000 (18:05 +0000)]
Merge "Revert "Limit searches at 500 per page""

10 years agoAPI: Fix PHP warning in action=parse help output
Brad Jorsch [Tue, 11 Feb 2014 15:34:27 +0000 (10:34 -0500)]
API: Fix PHP warning in action=parse help output

Change I0f41c837 removed a variable while it was still in use.

Bug: 61210
Change-Id: I91ad2e374a85e149303c6e8da7c3d94c1285a72a

10 years agoVector: Consistently use lowercase in #rrggbb colors
Bartosz Dziewoński [Tue, 11 Feb 2014 15:07:06 +0000 (16:07 +0100)]
Vector: Consistently use lowercase in #rrggbb colors

Change-Id: I174781b199260790d18aac2a6c270282396f2812

10 years agoVector: Remove misleading comment
Bartosz Dziewoński [Tue, 11 Feb 2014 15:06:17 +0000 (16:06 +0100)]
Vector: Remove misleading comment

What it says it's true, but it's now abstracted away in the mixin.

Change-Id: If4761b5b9c2153553cc293d7ecf4fdd5a28c47da

10 years agoMerge "Indicator for menuForceShow in skin vector"
jenkins-bot [Tue, 11 Feb 2014 14:52:08 +0000 (14:52 +0000)]
Merge "Indicator for menuForceShow in skin vector"

10 years agoMerge "Use current preference overriding for live preview"
jenkins-bot [Tue, 11 Feb 2014 14:44:26 +0000 (14:44 +0000)]
Merge "Use current preference overriding for live preview"

10 years agomediawiki.api.test: Use sinon sandbox for unit tests
Timo Tijhof [Wed, 5 Feb 2014 20:52:56 +0000 (12:52 -0800)]
mediawiki.api.test: Use sinon sandbox for unit tests

Make the unit tests faster and more standalone:

* Don't make a request to the actual API, instead provide the
  response via the fake server and purely test the mw.Api interface.

* No need for promise aggregration since the process is now
  synchronous.

* No arbitrary delays for async or animations etc. as sinon
  artificially fast-forwards setTimeout, Date and others for us.

Also:

* Move assertion for API error handling to separate test.

Change-Id: I20b17f256bc5114c6c2c3185653973076c15bc02

10 years agoqunit: Add SinonJS utility
Timo Tijhof [Wed, 5 Feb 2014 05:18:28 +0000 (21:18 -0800)]
qunit: Add SinonJS utility

To be used in mediawiki.api tests and elsewhere.

For now they are opt-in and disabled by default,
individual tests can enable fake timers, servers and/or
xhrs by calling this.sandbox to access the dedicated
sinon sandbox for that test.

Clock example:

    QUnit.test( 'example', function ( assert ) {
        var clock = this.sandbox.useFakeTimers();

        setTimeout( function () {
            assert.ok( true, 'test' );
        } );

        clock.tick(1);
    } );

Server example:

    QUnit.test( 'example', function ( assert ) {
        this.server = this.sandbox.useFakeServer();

        new mw.Api().getToken( 'foo' ).done( function ( token ) {
            assert.equal( token, '0123abc', 'Token' );
        } );

        // assert.equal( this.server.requests.length, 1, 'Requests' );

        this.server.respond( function ( request ) {
            request.respond( 200, { 'Content-Type': 'application/json' },
                '{ "tokens": { "testactiontoken": "0123abc" } }'
            );
        } );
    } );

Change-Id: I789fb71903f26dbbfe781f010dc5cd3756759943

10 years agoCleanups to LoadMonitor
Aaron Schulz [Tue, 11 Feb 2014 03:03:05 +0000 (19:03 -0800)]
Cleanups to LoadMonitor

* Use ProfileSection
* Removed redundant doc blocks
* Added method visibility

Change-Id: I76cd666c28b8bea7d5997a9f2b7d1c39539f7c5e

10 years agoReturn early when page id is less than 1
Chad Horohoe [Tue, 11 Feb 2014 05:52:01 +0000 (21:52 -0800)]
Return early when page id is less than 1

Wasteful DB query when we know the page won't exist.

Bug: 61166
Change-Id: I8943b4dec5088dadffefbd74f54653cb09043b7c

10 years agoMerge "Do not use OutputPage to output exceptions in Installer"
jenkins-bot [Tue, 11 Feb 2014 03:54:20 +0000 (03:54 +0000)]
Merge "Do not use OutputPage to output exceptions in Installer"

10 years agoRemove $wgMaintenanceScripts and friends
Chad Horohoe [Tue, 11 Feb 2014 01:59:47 +0000 (17:59 -0800)]
Remove $wgMaintenanceScripts and friends

Nothing ever used it--and rightly so--as it's completely useless.

Change-Id: I2746500c8156cc4e7834f2b811581144a35cb6e0

10 years agoAdded pipelining and max connection support to MultiHttpClient
Aaron Schulz [Fri, 17 Jan 2014 21:32:46 +0000 (13:32 -0800)]
Added pipelining and max connection support to MultiHttpClient

* Also added timeout options to the run()/runMulti() methods

Change-Id: I2b080567e17fa29804c36e3b259b1ce214e6f465

10 years agoRevert "Limit searches at 500 per page"
Chad [Tue, 11 Feb 2014 01:03:45 +0000 (01:03 +0000)]
Revert "Limit searches at 500 per page"

People seem to like large slow search pages.

This reverts commit 42d4f35696852b2d72089dce86034792fdf4de8e.

Change-Id: I52ee602a81c1b6ec4e124008806271b0c74c581c

10 years agoMerge "Move clearing of $i down a bit in LoadBalancer"
jenkins-bot [Mon, 10 Feb 2014 22:59:07 +0000 (22:59 +0000)]
Merge "Move clearing of $i down a bit in LoadBalancer"

10 years agoMerge "Show the pool counter key and use English for the debug logging"
jenkins-bot [Mon, 10 Feb 2014 22:53:15 +0000 (22:53 +0000)]
Merge "Show the pool counter key and use English for the debug logging"

10 years agoMove clearing of $i down a bit in LoadBalancer
Aaron Schulz [Mon, 10 Feb 2014 22:50:08 +0000 (14:50 -0800)]
Move clearing of $i down a bit in LoadBalancer

* Fixes 56b22fbea8cdd6fcd31c94e6b4bb01be49fa9683

Change-Id: I6b99d93562743270dbb65c60facdd503f470ab14

10 years agoAvoid fatal error in LoadBalancer when all servers are busy
Aaron Schulz [Mon, 10 Feb 2014 22:37:42 +0000 (14:37 -0800)]
Avoid fatal error in LoadBalancer when all servers are busy

* Fixes bug from b3c9653

Change-Id: Ida22f0ee3e97f98e4a1de6f7260a9a9f8aa08a39

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 10 Feb 2014 20:42:35 +0000 (20:42 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: I97bdb2a6d7351a1f60ad83d71e3ea18f38c40e54

10 years agoMerge "Revert "Only pass strings to mysqli::real_escape_string""
jenkins-bot [Mon, 10 Feb 2014 20:09:07 +0000 (20:09 +0000)]
Merge "Revert "Only pass strings to mysqli::real_escape_string""

10 years agoRevert "Only pass strings to mysqli::real_escape_string"
Chad [Mon, 10 Feb 2014 19:58:22 +0000 (19:58 +0000)]
Revert "Only pass strings to mysqli::real_escape_string"

hhvm already has a patch in master for fixing this, making the workaround unnecessary

This reverts commit de808f57a90c9c6f7bc4dbc4e4b544a07e0daa0f.

Change-Id: I504e5bd5025ec12430ce670e05da0158b06822c9

10 years agoMerge "Only pass strings to mysqli::real_escape_string"
jenkins-bot [Mon, 10 Feb 2014 19:17:47 +0000 (19:17 +0000)]
Merge "Only pass strings to mysqli::real_escape_string"

10 years agoOnly pass strings to mysqli::real_escape_string
Erik Bernhardson [Mon, 10 Feb 2014 19:03:10 +0000 (11:03 -0800)]
Only pass strings to mysqli::real_escape_string

HHVM will throw a fatal error when passing integer and other non-string
values to mysqli::real_escape_string.  A bug has been filed against
hhvm as https://github.com/facebook/hhvm/issues/1782.

Change-Id: I80eccbe8d872e74b8efc9b8c8f37ebce756bdcee

10 years agoNew hook MessageCache::get
Niklas Laxström [Thu, 28 Nov 2013 09:43:00 +0000 (09:43 +0000)]
New hook MessageCache::get

Example usage:

$wgHooks['MessageCache::get'][] = function( &$key ) {
static $keys = null;
if ( $keys === null ) {
global $wgExtensionMessagesFiles;
require( $wgExtensionMessagesFiles['OverrideMessages'] );
$keys = array_flip( array_keys( $messages['en'] ) );
}

if ( isset( $keys["myprefix-$key"] ) ) {
$key = "myprefix-$key";
}

return true;
}

Pros:
* Easy way to override standard core and extension messages without
  any changes to them
* Messages can be stored in a standard i18n file
* Messages can be translated easily with Translate
* Messages can be shared accross multiple wikis easily
* Takes advantage of the normal message cache behavior unlike the
  MessagePreLoad hook
* Missing translations fallback to the override, not to the
  uncustomized standard translation
* Do not need to handle conflicting message keys at translatewiki.net
  if adopted by WMF

Cons:
* This method is called often, so there will be small performance
  impact if no hooks are registered. Impact can be big if the
  implementation of hook subscriber is inefficient.

This can help with bugs like 36149. It doesn't remove the manual work
needed to detect those messages and adding them to the i18n file.

I have been using this patch in a wiki farm for months.

Change-Id: Ib39937a440e71ae7292cf992ab37a569189741e4