lhc/web/wiklou.git
10 years agoMerge "Update README"
jenkins-bot [Sun, 29 Sep 2013 16:29:25 +0000 (16:29 +0000)]
Merge "Update README"

10 years agoless: Use new addParsedFile method, replacing embeddedFiles hack
Timo Tijhof [Fri, 27 Sep 2013 12:29:38 +0000 (14:29 +0200)]
less: Use new addParsedFile method, replacing embeddedFiles hack

Follows-up b67b9e1, lessphp now has a public method to add to the
list of files for compilation cache.

Change-Id: I62a6c7cdeb34ea742fa7547e3ca10e24ee484b97

10 years agoAllow descending-order sort of Special:ListUsers
Jackmcbarn [Sat, 28 Sep 2013 15:05:38 +0000 (11:05 -0400)]
Allow descending-order sort of Special:ListUsers

Add an option to Special:ListUsers allowing it to be sorted in descending
order.

Change-Id: Icfff90a18a62f8f0b70e42313fc3285cf7e44c82

10 years agoFix grammar of action-patrol message
This, that and the other [Sat, 28 Sep 2013 12:18:37 +0000 (22:18 +1000)]
Fix grammar of action-patrol message

Now I look at it, this one is just plain ungrammatical.
"Others' edit" is nonsense in English. It's either "another's edit"
(i.e. "another user's edit") or "others' edits".

Change-Id: I659c04592fbc199bbf440ec959d742824535ec49

10 years agoMerge "Fix wording of action-import/action-importupload messages"
jenkins-bot [Sat, 28 Sep 2013 11:41:59 +0000 (11:41 +0000)]
Merge "Fix wording of action-import/action-importupload messages"

10 years agoFix wording of action-import/action-importupload messages
This, that and the other [Sat, 28 Sep 2013 08:57:25 +0000 (18:57 +1000)]
Fix wording of action-import/action-importupload messages

Bug: 54420
Change-Id: Ib85b8ca05bb6721ba2742859567c246750838244

10 years agoless: Add '@since 1.22' comments
Timo Tijhof [Fri, 27 Sep 2013 09:32:41 +0000 (11:32 +0200)]
less: Add '@since 1.22' comments

Change-Id: I673705423cf7618e207c0ee47b01761d6c89ce5f

10 years agolessphp: Update to upstream 6e8e724fc7
Timo Tijhof [Fri, 27 Sep 2013 12:23:09 +0000 (14:23 +0200)]
lessphp: Update to upstream 6e8e724fc7

Summary of changes:

- lessphp throws errors when referencing undeclared variables and mixins.
- lessc::addParsedFile is now public.

See <https://github.com/leafo/lessphp/compare/785ad53840...6e8e724fc7>.

Change-Id: Idffe6946f4029659e677f9dfb62566096cc8d5b5

10 years agoMerge "Capitalized bullet points and updated last sentence to say MediaWiki instead...
Adamw [Sat, 28 Sep 2013 06:02:40 +0000 (06:02 +0000)]
Merge "Capitalized bullet points and updated last sentence to say MediaWiki instead of WikiMedia"

10 years agoMerge "Deprecate wfDebugDieBacktrace"
jenkins-bot [Sat, 28 Sep 2013 04:44:50 +0000 (04:44 +0000)]
Merge "Deprecate wfDebugDieBacktrace"

10 years agoUpdate README
Arcane21 [Sat, 14 Sep 2013 05:58:00 +0000 (00:58 -0500)]
Update README

slight revision of introduction

GitHub: https://github.com/wikimedia/mediawiki-core/pull/9
Change-Id: Ibeff01313618346414f3c03a00f77a25fbe04e6d

10 years agoCapitalized bullet points and updated last sentence to say MediaWiki instead of WikiMedia
ExplosiveHippo [Sun, 22 Sep 2013 13:04:23 +0000 (09:04 -0400)]
Capitalized bullet points and updated last sentence to say MediaWiki instead of WikiMedia

Change-Id: I2961f9b07e71f9dcf3e05bce11371562e74c602f

10 years agoMerge "In wfArrayDiff2_cmp only compare $a and $b as string if they both are strings"
Adamw [Sat, 28 Sep 2013 01:03:40 +0000 (01:03 +0000)]
Merge "In wfArrayDiff2_cmp only compare $a and $b as string if they both are strings"

10 years agoDeprecate wfDebugDieBacktrace
Kevin Israel [Fri, 27 Sep 2013 23:57:41 +0000 (19:57 -0400)]
Deprecate wfDebugDieBacktrace

Change-Id: I12336983e29524a450fc61ed9df4d840066be9b6

10 years agoMerge "Hide filebackend listing exceptions for thumbnail purges"
jenkins-bot [Fri, 27 Sep 2013 22:54:55 +0000 (22:54 +0000)]
Merge "Hide filebackend listing exceptions for thumbnail purges"

10 years agoMerge "Clean up language test cases objection construction"
jenkins-bot [Fri, 27 Sep 2013 22:08:23 +0000 (22:08 +0000)]
Merge "Clean up language test cases objection construction"

10 years agoMerge "CSSJanus: Support text-shadow and box-shadow flipping"
jenkins-bot [Fri, 27 Sep 2013 20:35:16 +0000 (20:35 +0000)]
Merge "CSSJanus: Support text-shadow and box-shadow flipping"

10 years agoIn wfArrayDiff2_cmp only compare $a and $b as string if they both are strings
Reedy [Fri, 27 Sep 2013 19:10:33 +0000 (20:10 +0100)]
In wfArrayDiff2_cmp only compare $a and $b as string if they both are strings

Noticed during bug 54662

Warning: strcmp() expects parameter 2 to be string, array given in
/usr/local/apache/common-local/php-1.22wmf19/includes/GlobalFunctions.php on
line 127

Bug: 54662
Change-Id: Icdd7fa229e49d7e83aa2a7992895f497806448e1

10 years agoHide filebackend listing exceptions for thumbnail purges
Aaron Schulz [Fri, 27 Sep 2013 18:36:59 +0000 (11:36 -0700)]
Hide filebackend listing exceptions for thumbnail purges

bug: 54674
Change-Id: I20db9004fc8b5509f7731b1e678efc6f0aed6cdb

10 years agoMerge "resourceloader: Never defer execution for top loading modules"
jenkins-bot [Fri, 27 Sep 2013 18:03:48 +0000 (18:03 +0000)]
Merge "resourceloader: Never defer execution for top loading modules"

10 years agoMerge "Title: Add byte class to unicode class conversion for js"
jenkins-bot [Fri, 27 Sep 2013 17:58:45 +0000 (17:58 +0000)]
Merge "Title: Add byte class to unicode class conversion for js"

10 years agoMerge "Remove duplicate file extensions from output messages"
jenkins-bot [Fri, 27 Sep 2013 17:56:24 +0000 (17:56 +0000)]
Merge "Remove duplicate file extensions from output messages"

10 years agoresourceloader: Never defer execution for top loading modules
Roan Kattouw [Tue, 23 Jul 2013 01:18:01 +0000 (18:18 -0700)]
resourceloader: Never defer execution for top loading modules

There was a bug where if a module was in the top queue but had CSS,
its execution would be deferred until its CSS was ready. This would
cause the module's execution to occur after document ready and after
user scripts had run.

This is bad because top-loaded modules are supposed to be guaranteed
to run before document ready.

Fix this by skipping the wait-for-CSS logic when loading synchronously.
Top-loading modules' execution is now guaranteed to block loading the
rest of the page, but their CSS isn't guaranteed to be ready at this
point. Which is fine, because they shouldn't be measuring things in the
DOM before document ready anyway.

Change-Id: I5779cdef336be184741ad97ea84113eb7790dd39

10 years agoRemove duplicate file extensions from output messages
Brion Vibber [Wed, 25 Sep 2013 19:52:00 +0000 (12:52 -0700)]
Remove duplicate file extensions from output messages

If a file type was added to $wgFileExtensions by both local configuration
and defaults in an extension (eg TimedMediaHandler and LocalSettings.php
both adding 'ogg' and 'ogv') it was being listed twice in the UI messages
listing acceptable types.

Runs array_unique() over the array on various outputs.

Bug: 54378
Change-Id: I14cd098d8b27099f8f803630535f33549740295c

10 years agoMerge "Added new MWTimestamp::getRelativeTimestamp for pure relative."
jenkins-bot [Fri, 27 Sep 2013 17:45:26 +0000 (17:45 +0000)]
Merge "Added new MWTimestamp::getRelativeTimestamp for pure relative."

10 years agoTitle: Add byte class to unicode class conversion for js
Timo Tijhof [Fri, 30 Aug 2013 21:00:40 +0000 (14:00 -0700)]
Title: Add byte class to unicode class conversion for js

The upcoming rewrite of mw.Title needs to use wgLegalTitleChars,
but for that to work, it needs to be converted into something
that can work in javascript.

Signed-off-by: Timo Tijhof <krinklemail@gmail.com>
Signed-off-by: David Chan <david@sheetmusic.org.uk>
Change-Id: I163f3d7e3a680d52640a93f4bd195d8209669918

10 years agoindex.php: Remove copyright line and use HTTPS url for mediawiki.org
Timo Tijhof [Fri, 2 Aug 2013 06:47:51 +0000 (08:47 +0200)]
index.php: Remove copyright line and use HTTPS url for mediawiki.org

None of the other entry points (or any file for that matter)
lists the main MediaWiki copyright holders. This is already in
README and SpecialVersion. Afaik there is no special value for
index.php to have this as well (plus, it has become outdated
and incomplete).

Change-Id: Ic3e1ab5b452002160563750fa1537dfbdd66e312

10 years agoMerge "OutputPage->getJSVars: Maintain symmetry between JS & PHP vars"
jenkins-bot [Fri, 27 Sep 2013 09:49:49 +0000 (09:49 +0000)]
Merge "OutputPage->getJSVars: Maintain symmetry between JS & PHP vars"

10 years agoMerge "Remove legacy scripts from .jshintignore"
jenkins-bot [Fri, 27 Sep 2013 09:43:40 +0000 (09:43 +0000)]
Merge "Remove legacy scripts from .jshintignore"

10 years agoOutputPage->getJSVars: Maintain symmetry between JS & PHP vars
Ori Livneh [Thu, 26 Sep 2013 05:03:16 +0000 (22:03 -0700)]
OutputPage->getJSVars: Maintain symmetry between JS & PHP vars

The function is more difficult to read than it need be by dint of some things
two names. I can't be the only one who finds 'wgCurRevisionId' => $latestRevID
ugly, right? Anyhow, lots of JS code depends on the JS variable names, whereas
the PHP variables exist only in the scope of that method, so it's clear that
it's the PHP names that should be brought in line.

Change-Id: Ibddd5d2fc8d75e0ade18ff3433714d52605f2911

10 years agoMerge "Clean-up of skins/common/IEFixes.js"
jenkins-bot [Fri, 27 Sep 2013 09:39:54 +0000 (09:39 +0000)]
Merge "Clean-up of skins/common/IEFixes.js"

10 years agoRemove legacy scripts from .jshintignore
Ori Livneh [Sun, 22 Sep 2013 18:56:07 +0000 (11:56 -0700)]
Remove legacy scripts from .jshintignore

- skins/common/config.js only needed a singlequote fix to pass JSHint.
- skins/common/IEFixes.js passes thanks to I1ee94b184.

Change-Id: If23ff6e13ea1e0060e7366346196ee61c4cbb841

10 years agoClean-up of skins/common/IEFixes.js
Ori Livneh [Sun, 22 Sep 2013 19:30:27 +0000 (12:30 -0700)]
Clean-up of skins/common/IEFixes.js

- Wrap script code in an IIFE.
- Create scope-local bindings for global vars.
- Use strict comparisons.
- Use single var statement to declare variables.

Change-Id: I1ee94b184f5bb2355d01fae554c50ef314147298

10 years agoSupport rate limiting backlink purges, including null edits
Aaron Schulz [Fri, 20 Sep 2013 22:26:08 +0000 (15:26 -0700)]
Support rate limiting backlink purges, including null edits

Change-Id: I86e45b7d0eba7d87f65150b34e190e04d8342b3e

10 years agoClean up language test cases objection construction
Chad Horohoe [Thu, 26 Sep 2013 18:40:07 +0000 (11:40 -0700)]
Clean up language test cases objection construction

I have no clue how this ever actually worked under Zend, but it
definitely didn't with HHVM. Now it works on both.

Change-Id: I521dfb74f30306736adda5662598fd036ad9849b

10 years agoMerge "Move LESS function definitions from DefaultSettings to ResourceLoaderLESSFunct...
jenkins-bot [Thu, 26 Sep 2013 23:04:11 +0000 (23:04 +0000)]
Merge "Move LESS function definitions from DefaultSettings to ResourceLoaderLESSFunctions.php"

10 years agoMove LESS function definitions from DefaultSettings to ResourceLoaderLESSFunctions.php
Brion Vibber [Thu, 26 Sep 2013 18:55:57 +0000 (11:55 -0700)]
Move LESS function definitions from DefaultSettings to ResourceLoaderLESSFunctions.php

Intermittent error in production from top-level lambda functions:
https://bugs.php.net/bug.php?id=52144

Change-Id: I9785a601fd5d57c9d8d84b90ee29eef61a6f2e77

10 years agoMerge "Use utf8 charset for searchindex MySQL table"
jenkins-bot [Thu, 26 Sep 2013 22:47:22 +0000 (22:47 +0000)]
Merge "Use utf8 charset for searchindex MySQL table"

10 years agoAdd explicit plural support for limit report messages
Translation updater bot [Thu, 26 Sep 2013 16:54:28 +0000 (16:54 +0000)]
Add explicit plural support for limit report messages

Requested by Purodha Blissenbach in
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Limitreport-postexpandincludesize-value/ksh
and
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Limitreport-templateargumentsize-value/en

Change-Id: I39bea8a45bdd941ebe417b823936aa599185ae03

10 years agoMerge "Clear legacy restriction field on page restriction update"
jenkins-bot [Thu, 26 Sep 2013 16:05:22 +0000 (16:05 +0000)]
Merge "Clear legacy restriction field on page restriction update"

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Thu, 26 Sep 2013 08:45:04 +0000 (08:45 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I643a45c8f96b3c530a488c4a5ed2a0bbf6d7aa24

10 years agoFix typo in comment block in mediawiki.js
Ori Livneh [Thu, 26 Sep 2013 06:43:36 +0000 (23:43 -0700)]
Fix typo in comment block in mediawiki.js

asynchrounous -> asynchronous.

Change-Id: I65cf79c14fdc8359875e7dda3821678e99712cb1

10 years agoUse utf8 charset for searchindex MySQL table
Kevin Israel [Thu, 26 Sep 2013 05:38:02 +0000 (01:38 -0400)]
Use utf8 charset for searchindex MySQL table

This prevents the DB error "1283 Column 'si_title' cannot be part of
FULLTEXT index", which happens when the "binary" charset is used.

Note that 2ab7c9ec3b fixed the problem for creation of new DBs, though
not for reuse of existing DBs. It is still necessary to specify the
character set for the table itself.

Bug: 47191
Change-Id: Ib4f30fd2730839af1323295898e6dce47b27068d

10 years agoMerge "Add wgRevisionId variable to ResourceLoader"
jenkins-bot [Thu, 26 Sep 2013 02:43:26 +0000 (02:43 +0000)]
Merge "Add wgRevisionId variable to ResourceLoader"

10 years agoMerge "Rename lessc->embeddedImages to lessc->embeddedFiles"
Brion VIBBER [Thu, 26 Sep 2013 00:38:59 +0000 (00:38 +0000)]
Merge "Rename lessc->embeddedImages to lessc->embeddedFiles"

10 years agoMerge "Vary on forceHTTPS cookie"
jenkins-bot [Wed, 25 Sep 2013 23:22:05 +0000 (23:22 +0000)]
Merge "Vary on forceHTTPS cookie"

10 years agoVary on forceHTTPS cookie
csteipp [Wed, 25 Sep 2013 22:42:02 +0000 (15:42 -0700)]
Vary on forceHTTPS cookie

Varnish seems to be returning the cached version of pages for users
after they have logged in over https, but access an http page. This
seems to occure because only the forceHTTPS cookie is sent on the
request, but varnish doesn't vary the cache based on that cookie.

Bug: 54513
Change-Id: Ia97ed80622191669ee5ca37af809d307bbdb61ae

10 years agoMerge "Replace Pakaran with Punjabi"
jenkins-bot [Wed, 25 Sep 2013 22:24:24 +0000 (22:24 +0000)]
Merge "Replace Pakaran with Punjabi"

10 years agoReplace Pakaran with Punjabi
Amir E. Aharoni [Wed, 25 Sep 2013 22:11:53 +0000 (15:11 -0700)]
Replace Pakaran with Punjabi

These are Punjabi digits. I couldn't find a "Pakaran" language.

This was added in 5d00cad9.

Change-Id: I94649b7e5c3c6c9666accee561b12166552d50cb

10 years agoClear legacy restriction field on page restriction update
Marius Hoch [Wed, 25 Sep 2013 20:50:54 +0000 (22:50 +0200)]
Clear legacy restriction field on page restriction update

This causes problems where some pages can't be unprotected
as we still take the legacy field into account. See also
bug 33334.

Change-Id: Ibaec827289b1070ee110635d6c9d7b60e061384b

10 years agoMerge "ResourceLoader: expose registry as mediaWiki.loader.moduleRegistry"
jenkins-bot [Wed, 25 Sep 2013 18:09:28 +0000 (18:09 +0000)]
Merge "ResourceLoader: expose registry as mediaWiki.loader.moduleRegistry"

10 years agoResourceLoader: expose registry as mediaWiki.loader.moduleRegistry
Ori Livneh [Wed, 25 Sep 2013 16:06:41 +0000 (09:06 -0700)]
ResourceLoader: expose registry as mediaWiki.loader.moduleRegistry

This patch exports the ResourceLoader registry object as a public member of
mw.loader. I understand that it is not properly a part of the public API
ResourceLoader exposes to JavaScript code; it is an internal data structure and
ResourceLoader does not expect to have anything modify it except ResourceLoader
itself. At the same time, it provides a trove of extremely valuable data for
debugging and profiling, and it's annoying as hell not to be able to poke and
prod it from the JS console. So my hope is that we do the Python thing of
treating 'private' as a tip and social convention rather than something that is
enforced by the code.

Change-Id: I1c47970aa9fceb0b2ded9008efc926b46fa08f51

10 years agoMerge "Add Special:CreateAccount to Special:Specialpages"
jenkins-bot [Wed, 25 Sep 2013 17:42:24 +0000 (17:42 +0000)]
Merge "Add Special:CreateAccount to Special:Specialpages"

10 years agoMerge "bug 23839: "Refreshing links table" -> "Refreshing links tables""
jenkins-bot [Wed, 25 Sep 2013 16:25:19 +0000 (16:25 +0000)]
Merge "bug 23839: "Refreshing links table" -> "Refreshing links tables""

10 years agobug 23839: "Refreshing links table" -> "Refreshing links tables"
Brion Vibber [Wed, 25 Sep 2013 16:14:27 +0000 (09:14 -0700)]
bug 23839: "Refreshing links table" -> "Refreshing links tables"

There's not a single links table; there are several tables. :)

Change-Id: Ie2a76da3d047a41d102442be1919796bcd7bf2d2

10 years agoMerge "Add option to chose what language to fetch file description in."
jenkins-bot [Wed, 25 Sep 2013 15:51:13 +0000 (15:51 +0000)]
Merge "Add option to chose what language to fetch file description in."

10 years agoAdded new MWTimestamp::getRelativeTimestamp for pure relative.
Tyler Anthony Romeo [Thu, 24 Jan 2013 22:38:36 +0000 (17:38 -0500)]
Added new MWTimestamp::getRelativeTimestamp for pure relative.

Since MWTimestamp::getHumanTimestamp just makes a pretty
timestamp, and not a purely relative one, this commit adds
MWTimestamp::getRelativeTimestamp, which does just that.

Change-Id: I8b3e3fc6eeb4afd58f85fa7d05b5ea1a51b0afb6

10 years agoAdd wgRevisionId variable to ResourceLoader
parent5446 [Mon, 26 Aug 2013 18:52:23 +0000 (14:52 -0400)]
Add wgRevisionId variable to ResourceLoader

mw.config provides wgCurRevisionId, which has the latest
revision number. This adds wgRevisionId, which indicates
the revision number currently being viewed. This is useful
when looking at old revisions.

Bug: 51594
Change-Id: Ie0d00f3a9a8af8533ab28204b5bb483a0092c710

10 years agoAdd option to chose what language to fetch file description in.
Brian Wolff [Sat, 31 Aug 2013 05:45:43 +0000 (23:45 -0600)]
Add option to chose what language to fetch file description in.

I want to get the file description in a language other then
the user language in an extension (I5e6bc45f9751).

Change-Id: Ifcae821a51f4207e7816e710d3b3857c7ed438b6

10 years agoMerge "API: Check for nosuchsection in all code paths"
jenkins-bot [Tue, 24 Sep 2013 22:46:01 +0000 (22:46 +0000)]
Merge "API: Check for nosuchsection in all code paths"

10 years agoUpdate lessphp to upstream head (785ad53840)
Ori Livneh [Tue, 24 Sep 2013 19:31:17 +0000 (12:31 -0700)]
Update lessphp to upstream head (785ad53840)

This patch updates lessc.inc.php to 785ad53840:
<https://github.com/leafo/lessphp/commit/785ad53840b1777ef2120a10dcb2a5d5e6699f36>.

Differences from our version:

- Updated year in copyright notice
- Added support for 'precision' parameter to round().

Change-Id: If22afea96741c6d8fedefc05c49b24ae6e7809b0

10 years agoMerge "MysqlInstaller: use default character set of utf8"
jenkins-bot [Tue, 24 Sep 2013 16:22:48 +0000 (16:22 +0000)]
Merge "MysqlInstaller: use default character set of utf8"

10 years agoMerge "Improve wfEscapeWikiText, part 2"
jenkins-bot [Tue, 24 Sep 2013 15:55:36 +0000 (15:55 +0000)]
Merge "Improve wfEscapeWikiText, part 2"

10 years agoMysqlInstaller: use default character set of utf8
Karun Dambiec [Fri, 7 Jun 2013 13:53:12 +0000 (15:53 +0200)]
MysqlInstaller: use default character set of utf8

Bug: 14931
Change-Id: Ied512a75d17b401206b6439f289fe36c01536cec

10 years agoRemove LanguageEo::checkTitleEncoding()
Kevin Israel [Sat, 21 Sep 2013 06:55:16 +0000 (02:55 -0400)]
Remove LanguageEo::checkTitleEncoding()

In 2005, the code to perform the conversion from the Esperanto
x-system to Unicode was recognized as problematic and commented
out (bug 1512, r10997). Hence this function has done nothing
useful in the last eight years.

Change-Id: I9f4351c638645024b17a828144bba8575db14195

10 years agoRename lessc->embeddedImages to lessc->embeddedFiles
Ori Livneh [Mon, 23 Sep 2013 21:46:41 +0000 (14:46 -0700)]
Rename lessc->embeddedImages to lessc->embeddedFiles

'embeddedImages' is a custom property we set on lessc compiler instances to
track the set of files that were embedded in the generated source as data URIs.
This is so done so we know to regenerate the CSS if the source file for an
embedded asset changes. (If my pull request[1] is merged, we won't have to use
a custom property at all.)

I realized that the property name should be 'embeddedFiles' rather than
'embeddedImages', because it's not just images that can be usefully embedded in
CSS, but fonts as well.

  [1]: https://github.com/leafo/lessphp/pull/472

Change-Id: Ief3afaa23e4532f4a536e0dfef943d4fa20db80d

10 years agoMerge "Implement LESS image embedding"
Brion VIBBER [Mon, 23 Sep 2013 20:02:52 +0000 (20:02 +0000)]
Merge "Implement LESS image embedding"

10 years agoMerge "Support LESS stylesheets in ResourceLoader"
Brion VIBBER [Mon, 23 Sep 2013 19:59:49 +0000 (19:59 +0000)]
Merge "Support LESS stylesheets in ResourceLoader"

10 years agoImplement LESS image embedding
Ori Livneh [Thu, 19 Sep 2013 23:43:46 +0000 (16:43 -0700)]
Implement LESS image embedding

This patch adds two custom LESS functions: embeddable() and embed(). Both
functions take a single image file reference as their sole argument.

- embeddable() is a predicate function (= returns a LESS boolean value) that
  checks whether an image is suitable for embedding. An image is suitable if it
  exists, has an appropriate MIME type, and is not too large.
- embed() generates a CSS url() value that contains the reference image encoded
  as a data URI.

The existence of the predicate function allows embeddable() to be used as a
mixin guard. This provides an elegant means of generating a single rule when
the image is not embeddable and multiple rules (the data URI & fallback) when
it is. This technique is used to implement a .background-image mixin, included
in this patch.

Change-Id: I3e06b6d6e8630b7923fa42b3daf1ced3e656bbe7

10 years agoSupport LESS stylesheets in ResourceLoader
Ori Livneh [Sun, 11 Aug 2013 16:40:20 +0000 (00:40 +0800)]
Support LESS stylesheets in ResourceLoader

This patch adds support for the LESS stylesheet language to ResourceLoader.
LESS is a stylesheet language that compiles into CSS. The patch includes
lessphp, a LESS compiler implemented in PHP. The rationale for choosing LESS is
explained in a MediaWiki RFC which accompanies this patch, available at
<https://www.mediawiki.org/wiki/Requests_for_comment/LESS>.

LESS support is provided for ResourceLoader file modules. It is triggered by
the presence of the '.less' extension in stylesheet filenames. LESS files are
compiled by lessc, and the resultant CSS is subjected to the standard set of
transformations (CSSJanus & CSSMin). The immediate result of LESS compilation
is encoded as an array, which includes the list of LESS files that were
compiled and their mtimes. This array is cached. Cache invalidation is
performed by comparing the cached mtimes with the mtimes of the files on disk.
If the compiler itself throws an exception, ResourceLoader constructs a
compilation result which consists of the error message encoded as a CSS
comment. Failed compilation results are cached too, but with an expiration time
of five minutes. The expiration time is required because the full list of
referenced files is not known.

Three configuration variables configure the global environment for LESS
modules: $wgResourceLoaderLESSVars, $wgResourceLoaderLESSFunctions, and
$wgResourceLoaderLESSImportPaths. $wgResourceLoaderLESSVars maps variable names
to CSS values, specified as strings. Variables declared in this array are
available in all LESS files. $wgResourceLoaderLESSFunctions is similar, except
it maps custom function names to PHP callables. These functions can be called
from within LESS to transform values. Read more about custom functions at
<http://leafo.net/lessphp/docs/#custom_functions>. Finally,
$wgResourceLoaderLESSImportPaths specifies file system paths in addition to the
current module's path where the LESS compiler should look up files referenced
in @import statements.

The issue of handling of /* @embed */ and /* @noflip */ annotations is left
unresolved. Earlier versions of this patch included an @embed analog
implemented as a LESS custom function, but there was enough ambiguity about
whether the strategy it took was optimal to merit discussing it in a separate,
follow-up patch.

Bug: 40964
Change-Id: Id052a04dd2f76a1f4aef39fbd454bd67f5fd282f

10 years agoMerge "Localisation updates from http://translatewiki.net."
Translation updater bot [Mon, 23 Sep 2013 19:52:34 +0000 (19:52 +0000)]
Merge "Localisation updates from translatewiki.net."

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

Change-Id: I80c44c7678b86b6890e1afda2924b986c39d52a0

10 years agoMerge "libxml_disable_entity_loader() just in case..."
jenkins-bot [Mon, 23 Sep 2013 19:44:22 +0000 (19:44 +0000)]
Merge "libxml_disable_entity_loader() just in case..."

10 years agolibxml_disable_entity_loader() just in case...
Max Semenik [Mon, 23 Sep 2013 19:17:34 +0000 (23:17 +0400)]
libxml_disable_entity_loader() just in case...

Change-Id: I5c6394f811f9cd14dc549d005b4583d7575e85aa

10 years agoFix missing wfProfileOut call in HtmlFormatter
Brion Vibber [Mon, 23 Sep 2013 19:14:45 +0000 (12:14 -0700)]
Fix missing wfProfileOut call in HtmlFormatter

Followup to missing call in Ic276e1604c5718e8568e120ddfb9a8fc13a682fc

Change-Id: I69623d565826aacaa884c1c0a3ffec46ca1fb465

10 years agoFix doc for HtmlFormatter
Brion Vibber [Mon, 23 Sep 2013 17:43:31 +0000 (10:43 -0700)]
Fix doc for HtmlFormatter

Bug: 54473
Change-Id: I96d76eb2d372fb3997c432196e7c4cc4e2984bfb

10 years agoMerge "Move HtmlFormatter from MobileFrontend"
jenkins-bot [Mon, 23 Sep 2013 16:59:47 +0000 (16:59 +0000)]
Merge "Move HtmlFormatter from MobileFrontend"

10 years agoMerge "Changing default copyright notice per WMF Legal's suggestion."
jenkins-bot [Mon, 23 Sep 2013 13:36:58 +0000 (13:36 +0000)]
Merge "Changing default copyright notice per WMF Legal's suggestion."

10 years agoMerge "Replace single to double-quotation marks"
jenkins-bot [Mon, 23 Sep 2013 13:06:17 +0000 (13:06 +0000)]
Merge "Replace single to double-quotation marks"

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Sun, 22 Sep 2013 19:57:23 +0000 (19:57 +0000)]
Localisation updates from translatewiki.net.

Change-Id: If490bc68434b06359037fac93ec613d0e7265f44

10 years agoReplace single to double-quotation marks
shirayuki [Sun, 22 Sep 2013 02:33:50 +0000 (11:33 +0900)]
Replace single to double-quotation marks

Give grep a chance to find the usages

Change-Id: I95431f8e5cc684c322fdd7cda041388120b7c49b

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Sat, 21 Sep 2013 19:29:18 +0000 (19:29 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I82effb99c8a9b2f7bedc874008835e29f1d9ae4d

10 years agoMerge "Deprecate assertException in MediaWikiTestCase as it adds no value"
jenkins-bot [Sat, 21 Sep 2013 19:00:49 +0000 (19:00 +0000)]
Merge "Deprecate assertException in MediaWikiTestCase as it adds no value"

10 years agoMerge "SearchEngine::userHighlightPrefs needs no user"
jenkins-bot [Sat, 21 Sep 2013 18:56:18 +0000 (18:56 +0000)]
Merge "SearchEngine::userHighlightPrefs needs no user"

10 years agoMerge "Simplified some code and broke lines in thumb.php"
jenkins-bot [Sat, 21 Sep 2013 16:08:06 +0000 (16:08 +0000)]
Merge "Simplified some code and broke lines in thumb.php"

10 years agoupdate.php clears caches twice
umherirrender [Fri, 13 Sep 2013 17:55:36 +0000 (19:55 +0200)]
update.php clears caches twice

There was a bad rebase on I96b4cfd4c02e9cbf46cc6a0499b87fb3b89020a0,
because it partically reverts Ice42a31dee1e6b41da4aa0a47e8786579382aff1

Bug: 44690
Change-Id: Iff2c8d3cb1a10da7cd0ab18ee189454761d7db6f

10 years agoAdded {{REVISIONSIZE}} variable to get the current size of a revision.
umherirrender [Wed, 4 Sep 2013 19:09:36 +0000 (21:09 +0200)]
Added {{REVISIONSIZE}} variable to get the current size of a revision.

This avoids giving the own page name to {{PAGESIZE:}} and allows
PAGESIZE on subst: to give the size before save.

Viewing a oldid page will give the corresponding size to that revision.
(Like REVISIONUSER or REVISIONTIMESTAMP)

This partially reverts Idfac13de37d05317f65e4131534543e66cf74873
because there is no need to let PAGESIZE handle extra, when the given
title is the own page.

Change-Id: If9e608d54904c21ac6b095e91ff6e0a15da0fb4c

10 years agodrop unused fields rc_moved_to_ns/rc_moved_to_title
Jesús Martínez Novo [Sun, 1 Sep 2013 11:05:10 +0000 (13:05 +0200)]
drop unused fields rc_moved_to_ns/rc_moved_to_title

Follow-up I68e8c0bb23f185c0f996a8905f6d437db3080aa1

Deleting those fields also from tables.sql definition
for mssql, oracle and postgres

Bug: 34960
Change-Id: I1867536c9161abed0b23428d3c840d16a05cba56

10 years agoTidy up log deletion rows which didn't get subpages
Alex Monk [Sun, 6 Jan 2013 13:06:44 +0000 (13:06 +0000)]
Tidy up log deletion rows which didn't get subpages

Bug: 37714

Change-Id: I904988c864d777d039b2aae956aef7b19092cf83

10 years agoCleanup Preprocessor_DOM::preprocessToObj wfProfileOut()s
Platonides [Wed, 5 Jun 2013 01:07:42 +0000 (03:07 +0200)]
Cleanup Preprocessor_DOM::preprocessToObj wfProfileOut()s

Simplify the multiple if levels used for profiling out.

Change-Id: Id0530207f99daca49a6a76ce256476b677a4108f

10 years agoAdd a way to redact certain function parameters from exception stack traces
Alex Monk [Fri, 17 May 2013 20:27:18 +0000 (21:27 +0100)]
Add a way to redact certain function parameters from exception stack traces

Bug: 30714
Change-Id: I0a9e92448f8d9009dd594cb4d7f5dc6fdd4bcc86

10 years agoRemove reduntant regex from calls to StringUtils::isUtf8()
lwelling [Fri, 3 May 2013 20:29:03 +0000 (16:29 -0400)]
Remove reduntant regex from calls to StringUtils::isUtf8()

I've cautiously moved the regex out of the most used code path.
There is no string that will match that regex check that will not also be
passed by mb_check_encoding.  I think the regex was intended as a shortcut
evaluation, but it is no faster than mb_check_encoding which will often
need to be run anyway.

I think it could just be deleted, but I have limited motivation to
risk introducing a bug to improve performance on old PHP vesions and
unusual configurations, so I've moved it to the fallback code path.

Change-Id: Ie9425cc23ba032e5aff42beeb44cbb1146050452

10 years agooptipng -o7 "$png" && advpng -z -4 "$png" && advdef -z -4 "$png"
Max Semenik [Sun, 1 Sep 2013 10:26:02 +0000 (14:26 +0400)]
optipng -o7 "$png" && advpng -z -4 "$png" && advdef -z -4 "$png"

Change-Id: I2b267d23da582e4daf95c6898e3c687ad63d6e6b

10 years agoChanging default copyright notice per WMF Legal's suggestion.
kaldari [Fri, 20 Sep 2013 18:35:58 +0000 (11:35 -0700)]
Changing default copyright notice per WMF Legal's suggestion.

Changing from "Content is available under $1." to...
"Content is available under $1 unless otherwise noted."

This is especially relavent to wikis that use InstantCommons.

Change-Id: I878372de6c42bcb7660b111911d0e12bb351d2c5

10 years agoNote about removing portal-url, currentevents-url and helppage from default Sidebar
Quim Gil [Fri, 20 Sep 2013 22:26:12 +0000 (15:26 -0700)]
Note about removing portal-url, currentevents-url and helppage from default Sidebar

A note about the removal of portal-url, currentevents-url and helppage from
the default Sidebar as requested at the related bug report.
Follows up: Icb0e1b91e40bd682629f8a6f7291dbf8588b586

Bug: 53862
Change-Id: If7a624cd3a62c31af84a711f79ea396b53868fd2

10 years agoDeprecate assertException in MediaWikiTestCase as it adds no value
jeroendedauw [Sat, 18 May 2013 17:38:24 +0000 (19:38 +0200)]
Deprecate assertException in MediaWikiTestCase as it adds no value

setExpectedException, provided by PHPUnit itself, can and should be used instead

Change-Id: I06833eeeb492d2cc4e66b14aaebd5b2061a29e3a

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Fri, 20 Sep 2013 19:28:49 +0000 (19:28 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I4d3fce0836a6e2bd2c7c79159fb74411a02b40b6

10 years agoSearchEngine::userHighlightPrefs needs no user
umherirrender [Fri, 20 Sep 2013 18:54:19 +0000 (20:54 +0200)]
SearchEngine::userHighlightPrefs needs no user

Was removed with r87215 from the function,
but not from the function call

Change-Id: Iacb247d5962fe77db5a29084ece941261bf306ec

10 years agoMove HtmlFormatter from MobileFrontend
Max Semenik [Mon, 16 Sep 2013 16:54:32 +0000 (09:54 -0700)]
Move HtmlFormatter from MobileFrontend

This class is needed by CirrusSearch, another application will be API
prop=extracts which doesn't really belong to MobileFrontend and will also
be integrated into core soon.

Change-Id: Ic276e1604c5718e8568e120ddfb9a8fc13a682fc

10 years agoSimplified some code and broke lines in thumb.php
Aaron Schulz [Thu, 29 Aug 2013 20:31:12 +0000 (13:31 -0700)]
Simplified some code and broke lines in thumb.php

Change-Id: I99fc63ab473a3f2fe33e0227e5e283e0c195f01b