lhc/web/wiklou.git
9 years agoReally allow Extensions to make a new gallery format
Florianschmidtwelzow [Mon, 22 Dec 2014 15:39:52 +0000 (16:39 +0100)]
Really allow Extensions to make a new gallery format

Adjust GalleryGetModes call to fit Hooks::run() signature.

Follow up: I33462a8b52502ed76aeb163b66e3704c8618ba23

Change-Id: I916dade31d6d67de4bb82582cc71585e83fec1c9

9 years agoMoved "nowait:" key code to PoolCounter in core
Aaron Schulz [Fri, 19 Dec 2014 23:27:59 +0000 (15:27 -0800)]
Moved "nowait:" key code to PoolCounter in core

Change-Id: I5286e6c6052289e1107314a04d72703b44a8fbc6

9 years agoFix NS invert on SpecialNewPages
Florianschmidtwelzow [Mon, 22 Dec 2014 18:25:58 +0000 (19:25 +0100)]
Fix NS invert on SpecialNewPages

Follow up: I5c03dc543b910aab27a26a5a223341be50893cf3

Bug: T85145
Change-Id: Ia5cec6db48c3e900ebb07169015e55a2fb72b792

9 years agoDon't allow embedded newlines in magic links, but do allow  
C. Scott Ananian [Fri, 16 May 2014 00:35:59 +0000 (17:35 -0700)]
Don't allow embedded newlines in magic links, but do allow  

This continues the work started in T67278 to make magic link parsing
more consistent with wiki text parsing in general, and closes two
long-standing bugs.

Bug: T30950
Bug: T31025
Change-Id: I71f8b337543163569c64bbfdec154eb9b69d7264

9 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 21 Dec 2014 16:02:52 +0000 (17:02 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I27b0e2b659c880905f9bc6988d0c41f84616b480

9 years agoFix AutoloadGenerator to work on MediaWiki-Vagrant (again)
Bryan Davis [Sat, 20 Dec 2014 19:05:29 +0000 (12:05 -0700)]
Fix AutoloadGenerator to work on MediaWiki-Vagrant (again)

The patch set from I5d502b5 re-introduced the use of realpath() within
AutoloadGenerator::readFile() as part of a set of changes to ensure that
path separators are normalized across Unix and Windows systems. As noted
previously in I4623b3d, the use of realpath() in this function will
cause fatal exceptions to be thrown when a file such as
LocalSettings.php is a symlink to a file outside to $IP.

This patch separates the path normalization functionality from
realpath() expansion and uses only the path normalization component
within AutoloadGenerator::readFile(). It also introduces a cautionary
comment in AutoloadGenerator::readFile() that will hopefully keep
realpath() from being reintroduced there.

Change-Id: I4923dfa8370a7bd6077f42ff4c437d7293fdad66

9 years agoEscape message 'word-separator' on Special:FileDuplicateSearch
umherirrender [Sat, 20 Dec 2014 21:36:43 +0000 (22:36 +0100)]
Escape message 'word-separator' on Special:FileDuplicateSearch

Change-Id: Ib00cbca264d5723434e5db476293364267a13a85

9 years agomonolog: MWLoggerMonologSamplingHandler
Bryan Davis [Sat, 20 Dec 2014 21:15:59 +0000 (14:15 -0700)]
monolog: MWLoggerMonologSamplingHandler

Introduce the MWLoggerMonologSamplingHandler which can
be used to probabilistically sample the log event stream.

Bug: T85067
Change-Id: Icd14fc8c44ca9eef0f3f5cc4f1d1d8b68d517f07

9 years agoMerge "Fix redirect page for RTL"
jenkins-bot [Sat, 20 Dec 2014 21:26:21 +0000 (21:26 +0000)]
Merge "Fix redirect page for RTL"

9 years agoEscape retrievedfrom message in the skin
Niklas Laxström [Sat, 6 Dec 2014 09:52:47 +0000 (10:52 +0100)]
Escape retrievedfrom message in the skin

Change-Id: Ifd696ecd93c76e56cb21b3f2645367beeeeb5ba0

9 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 20 Dec 2014 20:45:39 +0000 (21:45 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ic37ef1c92e555d471595a05c2d4b0d7b520d3e0c

9 years agoFix redirect page for RTL
Ebrahim Byagowi [Sat, 20 Dec 2014 19:47:00 +0000 (19:47 +0000)]
Fix redirect page for RTL

Change-Id: Ic101356245247c745daa2f58428de22b08be5289

9 years agoMerge "Remove unneeded fields from query in Special:ListUsers"
jenkins-bot [Sat, 20 Dec 2014 10:10:59 +0000 (10:10 +0000)]
Merge "Remove unneeded fields from query in Special:ListUsers"

9 years agoMerge "Ensure integer compare in Special:WantedCategories"
jenkins-bot [Sat, 20 Dec 2014 10:02:47 +0000 (10:02 +0000)]
Merge "Ensure integer compare in Special:WantedCategories"

9 years agoRemove unneeded fields from query in Special:ListUsers
umherirrender [Fri, 7 Nov 2014 16:35:20 +0000 (17:35 +0100)]
Remove unneeded fields from query in Special:ListUsers

Since r72864 the fields numgroup and singlegroups are unused.

Change-Id: Ifc2f6c77ec54a9c9e72c4a7a4b8a9c8f9f90013a

9 years agoMerge "Add batch lookup for user groups on Special:ListUsers"
jenkins-bot [Sat, 20 Dec 2014 09:42:35 +0000 (09:42 +0000)]
Merge "Add batch lookup for user groups on Special:ListUsers"

9 years agoAdd batch lookup for user groups on Special:ListUsers
umherirrender [Fri, 7 Nov 2014 16:28:56 +0000 (17:28 +0100)]
Add batch lookup for user groups on Special:ListUsers

At the moment for each user on the list a new user object is created and
than the getGroups method is called, which fully init the user object,
which is done in 3 queries (user table, user_properties and
user_groups).
Removed the user object with one query for all the userids and cache the
result.

Also added the group page to the LinkBatch, because now the necessary
pages can be determined easily.

Change-Id: I4a945f83ad28edf5cc040139943cf743cb3d133c

9 years agoMerge "jquery.tipsy: Unbreak the 'live' option for now"
jenkins-bot [Sat, 20 Dec 2014 02:04:17 +0000 (02:04 +0000)]
Merge "jquery.tipsy: Unbreak the 'live' option for now"

9 years agojquery.tipsy: Unbreak the 'live' option for now
Bartosz Dziewoński [Sat, 20 Dec 2014 00:17:17 +0000 (01:17 +0100)]
jquery.tipsy: Unbreak the 'live' option for now

It used jQuery.fn.live, which stopped existing when we removed jQuery
Migrate (c393f874). This patch basically reimplements it.

Both .context and .selector properties used here are deprecated and
will be removed in the future, so we should come up with a better
solution at some point (or intentionally disallow using this option,
rather than breaking it by accident). For now, re-added the tracking
and logging, like what jQuery Migrate provided.

https://api.jquery.com/context/
https://api.jquery.com/selector/

Bug: T69989
Change-Id: Ib1a908dc60ca23c354fb05484d9b00cf54a05ebe

9 years agoMerge "Hide file links in action=info's 'Number of redirects to this page'"
jenkins-bot [Sat, 20 Dec 2014 01:27:18 +0000 (01:27 +0000)]
Merge "Hide file links in action=info's 'Number of redirects to this page'"

9 years agoHide file links in action=info's 'Number of redirects to this page'
Ricordisamoa [Wed, 10 Dec 2014 01:29:14 +0000 (01:29 +0000)]
Hide file links in action=info's 'Number of redirects to this page'

Special:WhatLinksHere gets now passed hideimages=1
if the concerned page is in the File namespace.

A bit of history:
the 'hideimages' parameter has been added to Special:WhatLinksHere
with commit 06ad0d25 (r34267), then removed with commit cdc7e22d
(r34277), and finally added back with 725cb284 (r34320).

Change-Id: I0f358e52c38bb525cee8085ca206118ee276889d

9 years agoMerge "Update jQuery from v1.11.1 to v1.11.2"
jenkins-bot [Sat, 20 Dec 2014 00:26:36 +0000 (00:26 +0000)]
Merge "Update jQuery from v1.11.1 to v1.11.2"

9 years agoMerge "Fix error in docs of VirtualRESTServiceClient and MultiHttpClient"
jenkins-bot [Sat, 20 Dec 2014 00:13:29 +0000 (00:13 +0000)]
Merge "Fix error in docs of VirtualRESTServiceClient and MultiHttpClient"

9 years agoMerge "EditPage: Optimise loading of mediawiki.toolbar module"
jenkins-bot [Sat, 20 Dec 2014 00:06:14 +0000 (00:06 +0000)]
Merge "EditPage: Optimise loading of mediawiki.toolbar module"

9 years agoEditPage: Optimise loading of mediawiki.toolbar module
Timo Tijhof [Fri, 19 Dec 2014 04:39:33 +0000 (04:39 +0000)]
EditPage: Optimise loading of mediawiki.toolbar module

Follows-up b3830611c4.

Unlike getEditToolbar(), which only runs if the user preference
is enabled, the loading of mediawiki.action.edit is unconditional.

As mediawiki.toolbar has already been separated from mediawiki.action.edit,
it's easy to load it conditionally instead of via a dependency
(mediawiki.action.edit doesn't depend on it for anything else).

Also:
* Remove odd 'false' values passed to User::getOption(). These
  options are part of MediaWiki core and always exist. The default
  value 'false' was ignored.
* Remove redundant closure. The domready callback already provides
  a closure and 'mw' is not used here (similar to jquery.mw-jump).

Change-Id: Ib2f4633b328cf8090df43b8d286cfcd77f95c5ea

9 years agoReject out-of-range output when converting to TS_MW
Brad Jorsch [Fri, 19 Dec 2014 22:06:38 +0000 (17:06 -0500)]
Reject out-of-range output when converting to TS_MW

TS_MW is a 14-character string "YYYYMMDDHHIISS", and thus cannot
represent timestamps earlier than 00000101000000 or later than
99991231235959.

MWTimestamp should throw an exception if asked to represent out-of-range
times in this format, rather than returning invalid values that are
likely to be truncated by the database.

Bug: T51580
Change-Id: I744e446356f3ed9193dfaaaec5dc81c611dab4a3

9 years agoFix error in docs of VirtualRESTServiceClient and MultiHttpClient
Alex Monk [Fri, 19 Dec 2014 21:49:57 +0000 (21:49 +0000)]
Fix error in docs of VirtualRESTServiceClient and MultiHttpClient

err -> error

Change-Id: I758c026599367b282150a513b09d6f6c837a3a80

9 years agoUpdate jQuery from v1.11.1 to v1.11.2
paladox [Fri, 19 Dec 2014 20:28:44 +0000 (15:28 -0500)]
Update jQuery from v1.11.1 to v1.11.2

Source

* https://code.jquery.com/jquery-1.11.2.js

Release notes

* http://blog.jquery.com/2014/12/18/jquery-1-11-2-and-2-1-3-released-safari-fail-safe-edition/

Change-Id: Ic972e272be9deea6b44b2375fa31ac128e452dac

9 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 19 Dec 2014 21:04:20 +0000 (22:04 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Id19350a7d65938614fba54f5eefb6a0051027626

9 years agoSync up with Parsoid parserTests.
C. Scott Ananian [Fri, 19 Dec 2014 20:28:44 +0000 (15:28 -0500)]
Sync up with Parsoid parserTests.

This now aligns with Parsoid commit 2711026e89948a99f85182228563fdab8e2dfad3

Change-Id: I7e1e562273d2cdd5a4199971a975c2e674a519e9

9 years agoFix VirtualRESTServiceClient::run
Alex Monk [Fri, 19 Dec 2014 20:06:44 +0000 (20:06 +0000)]
Fix VirtualRESTServiceClient::run

runMulti returns an array of response arrays, not request arrays.

Change-Id: I1d57ff24c43c033d533630c23fe3e1e85b448013

9 years agomediawiki.notification: Use link syntax for URL in documentation
Timo Tijhof [Fri, 19 Dec 2014 18:49:25 +0000 (18:49 +0000)]
mediawiki.notification: Use link syntax for URL in documentation

The url was rendered as plain text instead of a clickable link.
https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.Notification_

Change-Id: Ic7bd0e3765a53f5e4072124333d02417b7e47940

9 years agoMerge "maintenance: Don't copy the Apex styles when importing OOjs UI"
jenkins-bot [Fri, 19 Dec 2014 18:29:39 +0000 (18:29 +0000)]
Merge "maintenance: Don't copy the Apex styles when importing OOjs UI"

9 years agoMerge "Don't create Language objects during ResourceLoader tests"
jenkins-bot [Fri, 19 Dec 2014 18:25:04 +0000 (18:25 +0000)]
Merge "Don't create Language objects during ResourceLoader tests"

9 years agomaintenance: Don't copy the Apex styles when importing OOjs UI
James D. Forrester [Fri, 5 Dec 2014 22:13:03 +0000 (14:13 -0800)]
maintenance: Don't copy the Apex styles when importing OOjs UI

Also remove the existing ones.

Change-Id: I60450f5ce3d8e5b1136f9ffa3557aaf3687ca814

9 years agoSpecialImport: Don't access $this->getConfig() in the constructor
Kunal Mehta [Mon, 15 Dec 2014 17:38:11 +0000 (09:38 -0800)]
SpecialImport: Don't access $this->getConfig() in the constructor

The context is only set later on, so call it in the main
execute() function.

Bug: T73376
Change-Id: I34229877df6a8960756565f7df1d680aa8951cba

9 years agoMerge "Use more pretty output in ResourceLoader debug mode for arrays"
jenkins-bot [Fri, 19 Dec 2014 17:14:12 +0000 (17:14 +0000)]
Merge "Use more pretty output in ResourceLoader debug mode for arrays"

9 years agoSet mw.config wgFileExtensions only on Upload instead of site-wide
umherirrender [Fri, 19 Dec 2014 17:08:05 +0000 (18:08 +0100)]
Set mw.config wgFileExtensions only on Upload instead of site-wide

It is just used by mediawiki.special.upload

Change-Id: I433e29866fe184ba80c5dda35722e228e79f9307

9 years agoMerge "Make HTMLForm::formatErrors non-static to can parse message in context"
Legoktm [Fri, 19 Dec 2014 16:59:27 +0000 (16:59 +0000)]
Merge "Make HTMLForm::formatErrors non-static to can parse message in context"

9 years agoUse more pretty output in ResourceLoader debug mode for arrays
umherirrender [Fri, 19 Dec 2014 16:55:46 +0000 (17:55 +0100)]
Use more pretty output in ResourceLoader debug mode for arrays

Effected:
- mw.language.data
- mw.language.names
- mw.config.set
- mw.user.options.set for defaults
- mw.toolbar

Change-Id: I8a9e718ab15f0b3f80e12b817295c6843a570d46

9 years agoMake the autoload generator use forward slashes on all OSs
This, that and the other [Tue, 9 Dec 2014 00:05:29 +0000 (11:05 +1100)]
Make the autoload generator use forward slashes on all OSs

It was previously using the platform-specific directory separator, meaning
that we got backslashes on Windows and forward slashes on other OSs.

Bug: T77004
Change-Id: I5d502b54fddd55272e63d4a2a14b6d5de541263a

9 years agoChange case of class names to match declarations
Kevin Israel [Sun, 24 Aug 2014 06:52:38 +0000 (02:52 -0400)]
Change case of class names to match declarations

Found by running tests under a version of PHP patched to report
case mismatches as E_STRICT errors.

User classes:
* MIMEsearchPage
* MostlinkedTemplatesPage
* SpecialBookSources
* UnwatchedpagesPage

Internal classes:
* DOMXPath
* stdClass
* XMLReader

Did not change:
* testautoLoadedcamlCLASS
* testautoloadedserializedclass

Change-Id: Idc8caa82cd6adb7bab44b142af2b02e15f0a89ee

9 years agoMake HTMLForm::formatErrors non-static to can parse message in context
umherirrender [Sat, 13 Dec 2014 11:08:45 +0000 (12:08 +0100)]
Make HTMLForm::formatErrors non-static to can parse message in context

One call in core already called it non-static

Avoid:
[GlobalTitleFail] MessageCache::parse called by
Message::toString/Message::parseText/MessageCache::parse with no title
set

Change-Id: Ic91e715177c0a4578825640a31ec68ecba3176e0

9 years agotables.sql: Improve description of old_flags
Kevin Israel [Mon, 15 Dec 2014 07:42:34 +0000 (02:42 -0500)]
tables.sql: Improve description of old_flags

* Changed the name of the 'utf8' flag to 'utf-8', as that is what
  Revision stores. (This was already corrected in the mediawiki.org
  manual page by RichF.) Noted that 'utf8' was, however, mistakenly
  used in an old version of recompressTracked.php.
* Added 'external' to the list of flags. This was already added
  to the manual page (by GreenReaper) yet not here. Copied the
  description from there and added a couple of clarifications.

Change-Id: If15b49a28d7d4b0397481d21e30d877298fc7955

9 years agoAdd documentation for SiteListFileCache
aude [Tue, 2 Dec 2014 22:50:58 +0000 (17:50 -0500)]
Add documentation for SiteListFileCache

Change-Id: I6c5b7fdfbbd6a4e6d67bd0f4aff539ce4d97cfda

9 years agoautoloader: Remove incorrect documentation comment
Timo Tijhof [Tue, 18 Nov 2014 13:57:28 +0000 (14:57 +0100)]
autoloader: Remove incorrect documentation comment

Follows-up I8b1bdb84a969. This is not generated by that script,
the autoload.php file is, but that one has a similar comment
in it already.

Change-Id: Icb44f3dab356820f1e3aa5ba56949219af1b5719

9 years agoRe-emit unknown tags from #tag
Jackmcbarn [Fri, 6 Jun 2014 19:56:19 +0000 (15:56 -0400)]
Re-emit unknown tags from #tag

When #tag is given a tag that it doesn't recognize, re-emit it as a
regular tag instead of giving an error. This allows for it to be used with
transparent tags and HTML tags.

Change-Id: I0ceee8a4fdaf2d3142054a108f445ff06597c31a

9 years agoFixed comment typo and other docs tweaks
Aaron Schulz [Fri, 19 Dec 2014 01:28:34 +0000 (17:28 -0800)]
Fixed comment typo and other docs tweaks

Change-Id: I0368561611071f0e4722661e7f7c146618f3364a

9 years agoDon't create Language objects during ResourceLoader tests
Kunal Mehta [Fri, 19 Dec 2014 00:52:28 +0000 (16:52 -0800)]
Don't create Language objects during ResourceLoader tests

Mock calls to ResourceLoaderContext::getDirection(), which creates
Language objects to get the directionality of a language.

Change-Id: Ibe6da3013e658aa7cf596c1da2f8ca1314b7cdd3

9 years agoMerge "Don't break autolinks by stripping the final semicolon from an entity."
jenkins-bot [Fri, 19 Dec 2014 00:41:56 +0000 (00:41 +0000)]
Merge "Don't break autolinks by stripping the final semicolon from an entity."

9 years agoAPI: Avoid MySQL filesort with list=allpages&apfilterlanglinks=withlanglinks
Brad Jorsch [Thu, 11 Dec 2014 15:56:36 +0000 (10:56 -0500)]
API: Avoid MySQL filesort with list=allpages&apfilterlanglinks=withlanglinks

I'm not sure whether r44584 didn't go far enough or if MySQL's behavior
has changed since 2008, but MySQL is now filesorting when a
constant-in-WHERE field is included in GROUP BY.

If all our supported databases used the 1999 SQL standard rules for
GROUP BY[1] this would be an easy fix. But PostgreSQL before 9.1 uses
the older 1992 rules.[2] And then there's Oracle and MSSQL, which aren't
listed as supported[1] but are still in the code. Simplest thing to do
is probably to check if we're on MySQL, Sqlite, or Postgres >= 9.1 and
use the 1999 rules, and otherwise use the older rules.

 [1]: Basically "any non-aggregate field in the SELECT must be
      functionally dependent on the grouped-by fields", meaning if you
      include the primary key you're good.
 [2]: Basically "any non-aggregate field in the SELECT must be in the
      GROUP BY".
 [3]: https://www.mediawiki.org/wiki/Manual:Installation_requirements#Database_server

Bug: T78276
Change-Id: I80b515bb06d194b146897155b318a3d1c908e8b6

9 years agoMerge "Use generalizeSQL for DBPerformance log entries"
jenkins-bot [Thu, 18 Dec 2014 23:34:45 +0000 (23:34 +0000)]
Merge "Use generalizeSQL for DBPerformance log entries"

9 years agoUse generalizeSQL for DBPerformance log entries
Aaron Schulz [Thu, 18 Dec 2014 23:00:57 +0000 (15:00 -0800)]
Use generalizeSQL for DBPerformance log entries

Change-Id: I6612e01ba6382bcdc1642848009f6b8e13bd79f2

9 years agoRevert "Simplify MWTidy"
Ori Livneh [Thu, 18 Dec 2014 22:10:25 +0000 (14:10 -0800)]
Revert "Simplify MWTidy"

This is broken, for reasons indicated in
<https://gerrit.wikimedia.org/r/#/c/180384/>. It was broken before, but I made
it more broken. So revert for now, and I'll give this another stab.

Change-Id: I7e67a61f7d6370f90487be6470bebe1449432a4c

9 years agoSet $wgInternalTidy to false in unit tests when running under HHVM
Ori Livneh [Thu, 18 Dec 2014 22:56:58 +0000 (14:56 -0800)]
Set $wgInternalTidy to false in unit tests when running under HHVM

The Tidy extension for HHVM is nominally usable, but does not provide error
text returns. Tests should use TidySupport to determine whether they should use
the Tidy extension or not.

Change-Id: I0f842ddf8484206fc2a8b01289bc0a6750f34fed

9 years agoDon't break autolinks by stripping the final semicolon from an entity.
C. Scott Ananian [Thu, 11 Dec 2014 20:15:28 +0000 (15:15 -0500)]
Don't break autolinks by stripping the final semicolon from an entity.

Autolinking free external links is clever about making sure that trailing
punctuation isn't included in the link.  But if an HTML entity happens to
terminate the URL, the semicolon from the entity is stripped from the url,
breaking it.

Fix this corner case.  This also unifies autolink parsing with Parsoid.

See: I5ae8435322c78dd1df170d7a3543fff3642759b1
Change-Id: I5482782c25e12283030b0fd2150ac55092f7979b

9 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 18 Dec 2014 21:40:35 +0000 (22:40 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I23b96b0ea12c96c9b6fa9f2bfc6a24856986e4bd

9 years agoMerge "Remove double escaping in Special:Block"
jenkins-bot [Thu, 18 Dec 2014 20:18:34 +0000 (20:18 +0000)]
Merge "Remove double escaping in Special:Block"

9 years agoRemove double escaping in Special:Block
Niklas Laxström [Sat, 6 Dec 2014 10:47:19 +0000 (11:47 +0100)]
Remove double escaping in Special:Block

This function is used in two extensions, which also pass it to
HtmlForm, so no underescaping there either.

Change-Id: I93325051b3a6ef8fc242437a736b5c84bda56b7d

9 years agoEscape unescaped messages shown on a diff page
Niklas Laxström [Sat, 6 Dec 2014 10:16:15 +0000 (11:16 +0100)]
Escape unescaped messages shown on a diff page

Change-Id: I05c07625a2dbb3c5d3ab46d1cfafeaed6a248bba

9 years agoMerge "Make PHPCS pass on JsonContentTest"
jenkins-bot [Thu, 18 Dec 2014 19:47:09 +0000 (19:47 +0000)]
Merge "Make PHPCS pass on JsonContentTest"

9 years agoMerge "Use Context in Article::delete for messages"
jenkins-bot [Thu, 18 Dec 2014 19:19:01 +0000 (19:19 +0000)]
Merge "Use Context in Article::delete for messages"

9 years agoMerge "Change bugzilla -> phabricator"
jenkins-bot [Thu, 18 Dec 2014 17:23:59 +0000 (17:23 +0000)]
Merge "Change bugzilla -> phabricator"

9 years agoChange bugzilla -> phabricator
Florianschmidtwelzow [Thu, 18 Dec 2014 11:35:12 +0000 (12:35 +0100)]
Change bugzilla -> phabricator

Bug: T84855
Change-Id: Ic71206f5c0c8b7c6c56a350a136eb3f0ae7bc229

9 years agoMerge "Skip ApiFormatWddxTest under HHVM"
jenkins-bot [Thu, 18 Dec 2014 17:06:25 +0000 (17:06 +0000)]
Merge "Skip ApiFormatWddxTest under HHVM"

9 years agoMerge "Avoid GlobalTitleFail in HTMLFormField::__construct"
jenkins-bot [Thu, 18 Dec 2014 16:58:45 +0000 (16:58 +0000)]
Merge "Avoid GlobalTitleFail in HTMLFormField::__construct"

9 years agoSkip ApiFormatWddxTest under HHVM
Brad Jorsch [Tue, 16 Dec 2014 16:52:52 +0000 (11:52 -0500)]
Skip ApiFormatWddxTest under HHVM

wddx_serialize_value() fails to escape the ampersand under HHVM. It has
been fixed upstream https://github.com/facebook/hhvm/issues/4283 but
has not been released yet.

When running under HHVM and detecting the ampersand is not escaped, skip
the test..

Bug: T75531
Change-Id: Ia58ec20b4daf78cd90da1bdf8af6cac86015c5d7

9 years agoxhprof: Guard against division by 0
Bryan Davis [Thu, 18 Dec 2014 16:29:36 +0000 (09:29 -0700)]
xhprof: Guard against division by 0

Warning: Division by zero in
/srv/mediawiki/php-1.25wmf12/includes/profiler/ProfilerXhprof.php on
line 143

Change-Id: Ibb3d0ce836d30663c511809b6e1dece4baa4da92

9 years agoMake PHPCS pass on JsonContentTest
Christian Aistleitner [Thu, 18 Dec 2014 13:13:07 +0000 (14:13 +0100)]
Make PHPCS pass on JsonContentTest

Change-Id: I1054d7d0e903e3be7cb815035dddb0f34bcd6334

9 years agoMerge "Run structure tests on extensions"
jenkins-bot [Thu, 18 Dec 2014 09:14:14 +0000 (09:14 +0000)]
Merge "Run structure tests on extensions"

9 years agoxhprof: discard section profiler running totals
Bryan Davis [Thu, 18 Dec 2014 00:48:58 +0000 (17:48 -0700)]
xhprof: discard section profiler running totals

The '-total' record from the section profiler used for measuring
sub-function timing is not useful in the cumulative xhprof report data.

Change-Id: Ieb79b0e82e0bed54653fab016c133cc74ec4f637

9 years agohygiene: small special:search refactor
Rob Moen [Wed, 17 Dec 2014 22:09:02 +0000 (14:09 -0800)]
hygiene: small special:search refactor

* removed some unneeded members
** Grepped for usage through repo and extensions
* added isPowerSearch method
* pull search options out of search profile tabs
  and into its own method
* consistent creation of did you mean html

Change-Id: I0da81609e3bc685c971b85a08e228cdda4455c18

9 years agoxhprof: Fix magnitude of %real measurements from scoped profiler
Bryan Davis [Wed, 17 Dec 2014 23:36:04 +0000 (16:36 -0700)]
xhprof: Fix magnitude of %real measurements from scoped profiler

Change-Id: I06e5b3d82cfddd1a407c56819c9bdd91f160e928

9 years agoMerge "ImagePage: Use $this->getContext()->msg() instead of wfMessage"
jenkins-bot [Wed, 17 Dec 2014 23:26:35 +0000 (23:26 +0000)]
Merge "ImagePage: Use $this->getContext()->msg() instead of wfMessage"

9 years agocontent: Refactor and fix various bugs in JsonContent
Timo Tijhof [Wed, 3 Dec 2014 02:10:50 +0000 (02:10 +0000)]
content: Refactor and fix various bugs in JsonContent

Follows-up d2a82fcb60. These issues weren't previously exposed
as nothing uses JsonContent by default in core, and the extensions
using it (e.g. EventLogging) lock it down very early. As are
most of these methods were never really put to use (they were
called after the extension does its superset of checking, or
too early and WikiPage ignores it).

Bug fixes

* Empty JSON object was converted to an array by PST conversion.
  The beautifyJSON method is intended for prettify purposes but
  actually modified the content stored in the database and made
  it no longer roundtrip ({} != []).

  We can't change getJsonData to return an object since it's
  a public method and people use it as an array. So we can't cast
  it to a PHP object as that would break back-compat.

  Turns out the class doesn't even support non-objects anyway (a
  primitive in JSON can trivially cause a fatal as it wasn't
  consistently considered invalid, though it didn't actually fatal
  due to some lucky spaghetti code in WikiPage).

* Fix beautifyJSON by checking for empty objects to prevent
  implicit {} to [] conversion.

* Add isValid() check to fillParserOutput() as it's called early
  on. Otherwise it throws a warning that 'foreach' (in objectTable)
  iterates over null. In practice it doesn't matter since the
  entire parser output is rejected when WikiPage eventually
  checks isValid (through Content::prepareSave).

* Consider all non- (PHP) array values invalid instead of just
  non-null values.

Enhancements

* Display message "Empty object" instead of a completely blank page
  for an empty object.

* Display message "Empty object" or "Empty array" instead of an
  empty table cell.

* Render arrays as a list of values (without indices).

* Remove italics from table cells for values. The monospace font
  should be enough. It also offsets it from the "Empty"
  placeholders (which are italicised).

Refactoring and clean up

* Use FormatJson::parse so that we can use Status to distinguish
  between null parse result and thus reliably cache it.

  Ideally we wouldn't need to cache it, but right now this code
  is pulled apart and called in so many strange ways that we end
  up calling this several times.

* Improve fairly meaningless test (testBeautifyJson) that was
  calling FormatJson in its data provider, exactly what the method
  being tested did. It also provided the test with data that could
  never end up in normal usage (a PHP-style associated array with
  implied numerical indices).

* Document that this class rejects non-array values.

* Document the problem with WikiPage assumming PST can run on any
  content. WikiPage fundamentally still assumes wikitext, in that
  there's no concept of invalid content.

* Fix incorrect documentation for getJsonData's return value
  (It may return null.)

* Fix incorrect documentation for beautifyJSON's return value.
  (It never returned boolean.)

Bug: T76553
Change-Id: Ifed379ba4674a8289b554a95953951886bf2cbfd

9 years agoImagePage: Use $this->getContext()->msg() instead of wfMessage
Kunal Mehta [Wed, 17 Dec 2014 22:49:11 +0000 (14:49 -0800)]
ImagePage: Use $this->getContext()->msg() instead of wfMessage

For the GlobalTitleFail entries coming from ImagePage.

Change-Id: I54409b53a4b19f08848e8558877d069f69947393

9 years agoMerge "Fix some stuttering in comments and documentation"
jenkins-bot [Wed, 17 Dec 2014 22:28:27 +0000 (22:28 +0000)]
Merge "Fix some stuttering in comments and documentation"

9 years agoAvoid GlobalTitleFail in HTMLFormField::__construct
Kunal Mehta [Wed, 17 Dec 2014 22:19:06 +0000 (14:19 -0800)]
Avoid GlobalTitleFail in HTMLFormField::__construct

Pass the HTMLForm parent instance in the constructor so context
is available when parsing a message.

Change-Id: I532c0d95698cbcc57294b9bd2725f33838f393a9

9 years agoMade a new SectionProfileCallback class that extends ScopedCallback
Aaron Schulz [Wed, 17 Dec 2014 21:16:06 +0000 (13:16 -0800)]
Made a new SectionProfileCallback class that extends ScopedCallback

* This is now used by SectionProfiler and avoids the high overhead of call_user_func_array().

Change-Id: I7ff2c9a35c7cd8ee462f2368b655e766ad33dd63

9 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 17 Dec 2014 20:28:47 +0000 (21:28 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Icf1de242546dc5a459bc4de4ad1dd185a329f1d1

9 years agoFix some stuttering in comments and documentation
Ricordisamoa [Tue, 16 Dec 2014 00:41:45 +0000 (00:41 +0000)]
Fix some stuttering in comments and documentation

Change-Id: I9c0088b9aab37335203cad45a1d6fa8ac3f43321

9 years agoSECURITY: Fix CORS origin matching in the API
Brad Jorsch [Mon, 8 Dec 2014 15:43:50 +0000 (10:43 -0500)]
SECURITY: Fix CORS origin matching in the API

Bug: T77028
Change-Id: I68c1ee5b5a048af2aba4e710bc301b09748389bf

9 years agothumb.php: Set proper output formats for messages going into HTML
Kunal Mehta [Thu, 4 Dec 2014 22:06:55 +0000 (14:06 -0800)]
thumb.php: Set proper output formats for messages going into HTML

* Use ->parse() instead of ->text() for wikitext messages that were
  being treated as HTML
* Explicitly specify ->parse() if no output format was set
* Document that wfThumbError() takes HTML

Bug: T76686
Change-Id: Id6e7548b2e081cfda7803772ed0395a15feb1f84

9 years agoMerge "Logging related comment updates"
jenkins-bot [Wed, 17 Dec 2014 16:37:11 +0000 (16:37 +0000)]
Merge "Logging related comment updates"

9 years agoRun structure tests on extensions
Antoine Musso [Wed, 17 Dec 2014 16:15:57 +0000 (17:15 +0100)]
Run structure tests on extensions

The tests in the structure PHPUnit testsuite are used to verify the
Autoloader, ResourceLoader definitions and some basic other tests.

They are not run by Jenkins for MediaWiki extensions since we invoke:

 phpunit.php --testsuite extensions

Add the structure directory to the 'extensions' testsuite.  That will
start enforcing them on all extensions, so need to be merged with care.

We will want to backport this patch on all release branches we support
and make sure they pass for all extensions/branches :-/

Bug: T78798
Change-Id: Icb88fb3f10d203cfcb61c36c9c92864b92d6739c

9 years agoMerge "Remove $wgJavaScriptTestConfig"
jenkins-bot [Wed, 17 Dec 2014 10:38:51 +0000 (10:38 +0000)]
Merge "Remove $wgJavaScriptTestConfig"

9 years agoUse getHtmlCode() instead of getCode() to set the lang attribute
Fomafix [Wed, 17 Dec 2014 08:10:26 +0000 (08:10 +0000)]
Use getHtmlCode() instead of getCode() to set the lang attribute

The lang attribute of HTML elements should conform to BCP 47.

Change-Id: Ia8a088add29daea39e90bb277279a6485990d18a

9 years agoSimplify JsonContent::beautifyJSON()
Ori Livneh [Wed, 17 Dec 2014 05:44:39 +0000 (21:44 -0800)]
Simplify JsonContent::beautifyJSON()

Change-Id: I406d5c2967615f818c9ac42abc19ab8a49e1da8d

9 years agoRemove $wgJavaScriptTestConfig
Timo Tijhof [Tue, 16 Dec 2014 01:18:16 +0000 (01:18 +0000)]
Remove $wgJavaScriptTestConfig

The config variable itself and the documentation property were added
in MediaWiki 1.19 (r107919 / c447423593).

The testswarm-injectjs propert was added in MediaWiki 1.20 (5e590be3d6).

We never actually ended up using TestSwarm, and this variable
is not used anywhere I can see.

Having a configuration variable for a documentation page seems
odd. I can't find another instance of this. As it's tied to development
(not for users of the wiki), link to mediawiki.org direcly.

Change-Id: Ib16607683a293b6d6661ed0411dad9a3ff551a08

9 years agoLogging related comment updates
Bryan Davis [Wed, 17 Dec 2014 00:12:23 +0000 (17:12 -0700)]
Logging related comment updates

* Pretty up some logging related comments.
* Send wfDebugLog messages to logger at info level

Change-Id: I97b8629095e8d6168dbeb791dfb5e7753d281cbe

9 years agoUpdate OOjs UI to v0.6.0 in composer.json too
James D. Forrester [Tue, 16 Dec 2014 21:43:02 +0000 (13:43 -0800)]
Update OOjs UI to v0.6.0 in composer.json too

Change-Id: I0cbeaa6421a940b12ccc3a8df42b743537258e84

9 years agoMerge "Add findVariantLink to StubUserLang"
jenkins-bot [Tue, 16 Dec 2014 23:33:55 +0000 (23:33 +0000)]
Merge "Add findVariantLink to StubUserLang"

9 years agoUpdate OOjs UI to v0.6.0
James D. Forrester [Tue, 16 Dec 2014 21:29:32 +0000 (13:29 -0800)]
Update OOjs UI to v0.6.0

Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.6.0/History.md

Change-Id: I0386c3f622355de2d5771427fbcaeedd6d3bff04

9 years agoMerge "Move Test files under same folder structure where class is (/includes/)"
jenkins-bot [Tue, 16 Dec 2014 21:11:00 +0000 (21:11 +0000)]
Merge "Move Test files under same folder structure where class is (/includes/)"

9 years agoMerge "Destroy session after running api tests"
jenkins-bot [Tue, 16 Dec 2014 21:10:56 +0000 (21:10 +0000)]
Merge "Destroy session after running api tests"

9 years agoMerge "Normalize "\r" newlines in preSaveTransform"
jenkins-bot [Tue, 16 Dec 2014 21:07:50 +0000 (21:07 +0000)]
Merge "Normalize "\r" newlines in preSaveTransform"

9 years agoMove Test files under same folder structure where class is (/includes/)
umherirrender [Mon, 8 Dec 2014 19:29:30 +0000 (20:29 +0100)]
Move Test files under same folder structure where class is (/includes/)

Change-Id: I95f1aa6f0ed2cc3306aa6e588a11f359854315c1

9 years agoDestroy session after running api tests
umherirrender [Tue, 9 Dec 2014 20:35:40 +0000 (21:35 +0100)]
Destroy session after running api tests

ApiLogin and ApiCreateAccount calling wfSetupSession, which leaks a
session over the test.
The test RequestContextText needs a clear session to work, so the api
tests should avoid leaking the session.
Doing this in the ApiTestCase because some tests calling ApiLogin over
FauxRequest and that also starts a session.

Change-Id: Icf5cb4d4a2c24c96698cac5bf32147c0c9149ef3

9 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Tue, 16 Dec 2014 20:39:15 +0000 (20:39 +0000)]
Merge "Localisation updates from https://translatewiki.net."

9 years agoMerge "Move advanced search inputs back into the form"
jenkins-bot [Tue, 16 Dec 2014 20:35:31 +0000 (20:35 +0000)]
Merge "Move advanced search inputs back into the form"