Commit graph

2041 commits

Author SHA1 Message Date
Ori Livneh
ba59cfd0bb Correct URL in comment; currently points to wrong post
I'm not 100% this is the post that was intended, but it
seems most plausible to me.

Change-Id: I8fded0ffe5956cea8140f4c5d13ccbc1eb33299d
2012-11-01 23:27:14 -07:00
Nikerabbit
31069e3989 Merge "Use LogFormatter to format rights log." 2012-11-01 18:51:09 +00:00
Aaron Schulz
e2cac9d977 [JobQueue] Added a test job that just replaces itself.
Change-Id: I257d68099660a9c95e68f7662ae8d5cf1ebefe27
2012-10-31 12:47:52 -07:00
Niklas Laxström
bda755617e Rewritten $wgAdaptiveMessageCache
This was developed for translatewiki.net, which has but
millions of messages in MediaWiki namespace. To avoid
exploding the message cache, not all of them can be
loaded. Instead of logging what messages have been
requested, now it uses the fact that if the
message has not been customised in the
site language, there is most likely
no reason to load it in any other
language either.

Change-Id: I6dd81b3858acfd2b73332e46668d46015e99c748
2012-10-26 12:48:52 -07:00
umherirrender
82375631c2 Fix tabs inside/between statements/text
This tabs are strange and a space there is better

Change-Id: I0885dff575ee2fcd0668d08fef3226e132c5b319
2012-10-26 18:18:59 +02:00
Brion VIBBER
c399e0073c Merge "[JobQueue] Added support for approximate FIFO job queues." 2012-10-25 21:07:07 +00:00
Timo Tijhof
a4aef7d495 Fix warnings and enforce conventions in ContentHandler tests.
Syntax:
* Call parent setUp from setUp.
* Set required globals for the test inside the test class instead
  of assuming the default settings.
* Data providers are called statically and outside setUp/tearDown
  ("public static function")
* Test function names should be prefixed with "test"
  ("testIsRedirect")
* Marked 2 functions as unused. JavascriptContentTest has 2 data
  providers for tests that don't exist in it (nor in TextContentText)
  but do exist in WikitextContentTest.

Style:
* Single quotes
* Remove odd comment "# =====" lines
* Consistent tree wrapping with arrays.
  array(
      array(
          .. ) );
  array(
      array(
          ..
      )
  );
  Some were closing on the previous line instead.
  Made it consistent now.
* Remove odd indentation to make nested arrays line up:
  array( 'foo' => array(  'bar' => true,
                          'baz' => array() ) )
  array( 'foo' => array(
      'bar' => true,
      'baz' => array()
  ) )

  We don't do this kind of indentation because it is fragile
  and becomes outdates when any of the earlier keys ("foo")
  change. Converted to a regular tree instead.

  Also triggered git warnings for mixing spaces with tabs, which
  is almost always an detector for this style.

* Not using @annotations in inline comments, reserved (and only
  parsed/meaningful) for block comments.

Follows-up 8b568be5e2

Change-Id: Ic55d539b9a58f448b550bcd98894d389764e0694
2012-10-25 22:37:32 +02:00
Aaron Schulz
59da375cd9 [JobQueue] Added support for approximate FIFO job queues.
Change-Id: Icd8c084174e26a2a69f370e7bf6f858eba76e520
2012-10-25 11:19:09 -07:00
Alexandre Emsenhuber
4c69cd3ad6 Use LogFormatter to format rights log.
* Has to keep actual messages for IRC notification
* Catch really old log entries with no parameters and use an
  appropriate message in that case to not always display erroneous
  "X changed group membership for Y from (none) to (none)".

Change-Id: Ie188bc6fcdf672fe31f0f389a158aab6256031fa
2012-10-22 19:28:32 +02:00
umherirrender
9d19d7342a Remove a bunch of trailing spaces and unneeded newlines
Change-Id: I7db616db8c969567d420c0161fa207b366e292b6
2012-10-19 22:03:05 +02:00
daniel
8b568be5e2 [Bug 41155] Record links on CSS/JS pages in the DB.
ContentHandler removed wikitext parsing for CSS and JS pages.
However, people seem to rely on links and categories embedded
in script comments.

Change-Id: I0736f15878fbd3292e75854bf16f04df656ce363
2012-10-18 20:21:04 +02:00
Siebrand
2e84188892 Merge "Set $wgContentHandlerUseDB to false by default for now" 2012-10-18 06:14:09 +00:00
Kaldari
5c8057bdcd Merge "reinstating Change Ifb1f6125..." 2012-10-18 00:32:56 +00:00
Kaldari
18fabfaa3e reinstating Change Ifb1f6125...
A setting to have uploading by URL, but not on Special:Upload.
Reverted this out when I thought we were going to be able to
support more widespread URL uploading, but currently, it is only
reliable for some domains, so although we can theoretically support
the new Flickr interface in UploadWizard, it probably isn't reliable
enough to add general URL uploading from Special:Upload.

Change-Id: I66b287bf173a4ea0b23f43180505d4c7de5acb26
2012-10-17 17:25:52 -07:00
Chad Horohoe
f5e2145413 Set $wgContentHandlerUseDB to false by default for now
We'll eventually want to set this to true by default, but right now
the content handler stuff is still semi-experimental stuff that isn't
widely used yet.

Before we turn this back on, let's make sure to give some notice
since it's a pretty major schema change they'll have to make.

Change-Id: If501a065a410a31a4232cd8386b498d7d18a73a4
2012-10-17 17:00:45 -04:00
Tim Starling
93e7778b13 Merge "[JobQueue] Job queue refactoring and generalizing." 2012-10-15 22:46:54 +00:00
ASchulz
b567f3602e [JobQueue] Job queue refactoring and generalizing.
* Added support for different queue types and methods for storing queues.
* Treat each job type as being on its own queue, at least logically.
* Added $wgJobTypeConf to configure queue types for each job type.
* Improved the job DB table so that duplicate job checks actually work
  and are faster. Also improved the method for popping rows of the table.
* Disabled duplicate job removal for everything except refreshLinks.
  The DELETE statements just add DB overhead and are not useful for cheap
  jobs, especially ones with start/end params (which are unlikely to have
  exact duplicates).

Change-Id: I49824c7fa855fea4ddcac5c9901ece8c2c0101d0
2012-10-16 09:39:58 +11:00
Tim Starling
0771d643c3 Rename $wgPurgeHttp11 to $wgSquidPurgeUseHostHeader
Rename $wgPurgeHttp11 to $wgSquidPurgeUseHostHeader, set it to true by
default, and update the documentation per the research I've done on
Squid's behaviour. See bug 39005.

Rewrote the release note and moved it to the correct section.

Change-Id: I9ef6a0c43fc1ba4547b34124a47815296f45b20e
2012-10-15 00:58:07 +00:00
Daniel Friesen
a8b3feec11 (bug 39005) Add $wgPurgeHttp11.
Allow SquidPurgeClient to send HTTP/1.1 PURGE requests with a Host header instead of
only sending HTTP/1.0 requests with the whole url in the PURGE line.

This is necessary to support some other reverse caching proxies like Varnish.

Change-Id: I85fe93a8ca97c5169f250967540e29fc70725119
2012-10-15 00:57:51 +00:00
daniel
41b0a79455 Support plain text content.
Made TextContent and TextContentHandler usable directly.
CONTENT_MODEL_TEXT is unused in core, but may be used by extensions.

Change-Id: I8963c968800b98e286cd917a1038a9905b3a0fef
2012-10-14 23:27:00 +00:00
Reedy
7358afdde1 (bug 39665) optimize API query generator list
List of query generators is now not built using reflection, instead it
is defined in code. Per Domas, make this a hard coded list instead of
loading all the child classes.

Added $wgAPIGeneratorModules for people to register their API generator
modules.

Change-Id: I12da92da33527e414c9b125a50b82c9bdbb3ed99
2012-10-12 20:24:15 +00:00
jeroendedauw
7389d7c690 Added sites functionality, a much more generic and flexible version of the existing interwiki code
This code is meant to replace the current interwiki code, but does not do so just yet. It is however used by the Wikibase extension. This allows us to try out some more things and have the code stabilize more before we migrate over existing interwiki functionality.

Change-Id: I23c47c2c3909a1500350fb560a5f2ec654e2c37e
2012-10-12 17:47:44 +02:00
Brion Vibber
966cda2f80 Initial stab at responsive images for screen densities.
* adds $wgResponsiveImages setting, defaulting to true, to enable the feature
* adds 'srcset' attribute with 1.5x and 2x URLs to image links and image thumbs
* adds jquery.hidpi plugin to check pixel density and implement partial 'srcset' polyfill
** $.devicePixelRatio() returns window.devicePixelRatio, with compat fallback for IE 10
** $().hidpi() performs a 'srcset' polyfill for browsers with no native 'srcset' support
* adds mediawiki.hidpi RL script to trigger hidpi loads after main images load

Note that this is a work in progress. There will be places where this doesn't yet work which output their imgs differently. If moving from a low to high-DPI screen on a MacBook Pro Retina display, you won't see images load until you reload.

Confirmed basic images and thumbs in wikitext appear to work in Safari 6, Chrome 21, Firefox 18 nightly on MacBook Pro Retina display, and IE 10 in Windows 8 at 150% zoom, 200% zoom, and 140% and 180%-ratio Metro tablet sizes.

Internally this is still a bit of a hack; Linker::makeImageLink and Linker::makeThumbLink explicitly ask for 1.5x and 2x scaled versions and insert their URLs, if different, into the original thumbnail object which (in default handler) outputs the srcset. This means that a number of places that handle images differently won't see the higher-resolution versions, such as <gallery> and the large thumbnail on the File: description page.

At some point we may wish to redo some of how the MediaHandler stuff works so that requesting a single thumbnail automatically produces the extra sizes in all circumstances. We might also consider outputting a 'srcset' or multiple src sizes in 'imageinfo' API requests, which would make ApiForeignRepo/InstantCommons more efficient. (Currently it has to make three requests for each image to get the three sizes.)

Change-Id: Id80ebd07a1a9f401a2c2bfeb21aae987e5aa863b
2012-10-11 10:54:21 -07:00
daniel
329d5b3516 Merge branch 'Wikidata' into master.
This introduces the ContentHandler facility into MediaWiki,
see docs/contenthandler.txt.

For convenient review, a squashed version is available at
https://gerrit.wikimedia.org/r/27191

The ContentHandler facility is a major building block of the Wikidata project.
It has been discussed repeatedly on wikitech-l.

Change-Id: I3804e2d5f6f59e6a39db80744bdf61bfe8c14f98
2012-10-09 11:34:24 +02:00
umherirrender
d73e90c99c Add version number to deprecated setting
Fix one doc

Change-Id: I527639c3694d7b72d9f3bff62fb8b0b7eb6ee126
2012-10-09 08:25:01 +02:00
daniel
bb51a58e57 Cleanup of Wikidata branch.
This cleans up several issues raised in comments to I3b2dad3a,
mostly style and merge artifacts.

Change-Id: I99f5e300a671db1353db151cd187ffd2e4478d03
2012-10-08 17:34:47 +02:00
daniel
c546fae8ed merge latest master into Wikidata branch
Change-Id: Id4e0f40c03679c13d8934a6add99b5cd86d0437d
2012-10-08 13:58:54 +02:00
Tim Starling
ac3a0a58a7 Deprecate $wgSharedDB
Deprecate $wgSharedDB in response to it accidentally being used in
Wikidata. It was always an ugly hack.

Change-Id: I68f3bfe7afc49a49cd310b66dc03cf52507d3e58
2012-10-08 15:47:24 +11:00
umherirrender
cdbf6c434d Remove deprecated $wgAllowRealName
Deprecated since 1.16, which is out of lifecycle since August 2011

Change-Id: Ie48a4116eab9d07bc435ea9ce784762313b757cb
2012-10-05 20:53:22 +02:00
Siebrand
b4d9ec4c3a Merge "Fix documentation of $wgProxyList" 2012-10-03 15:04:36 +00:00
Timo Tijhof
1f987fb5ee (bug 40448) Replace legacy mwsuggest with mediawiki.searchSuggest
The module has been broken for a while now, but nobody noticed
because in plain core it is disabled by default, and in the
bundle we ship with Extension:Vector (and its SimpleSearch).

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

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

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

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

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

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

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

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

* wgSearchNamespaces
  > Obsolete.

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

* $wgMWSuggestTemplate
  > Obsolete.

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

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

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

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

Change-Id: Icd721011b40bb8d2c20aefa8b359a3e45413a07f
2012-10-02 04:51:51 +02:00
Alexandre Emsenhuber
3a02e56bbe Fix documentation of $wgProxyList
Change-Id: Iaac13bee34a978061605182123a90b3167e78129
2012-10-01 21:11:21 +02:00
Reedy
bf4e932349 Updates for MW 1.21
Change-Id: I582c1bcc50d694705b560fea893d0b2984072c08
2012-09-28 16:19:19 +01:00
Reedy
7476057925 Add $wgCopyUploadProxy to be used for copy uploads only.
Means we don't break stuff on the cluster such as search by setting $wgHTTPProxy

Change-Id: I094b2bfd097e7e5c1c45b6332357d959ed95ac99
2012-09-28 01:33:48 +01:00
Timo Tijhof
10ebc81cdf (bug 29374) Enabled $wgVectorUseSimpleSearch by default.
Change-Id: I418cd5424c26bbd6bc9df455557c3904fa55ab2e
2012-09-23 04:38:44 +02:00
Tim Starling
d485418278 More documentation for node count limit
Change-Id: I6b35ee3ee6b9f8a84e997bbf09aa72c807caf71e
2012-09-20 16:05:11 +10:00
daniel
b6b686c13b merged master
Change-Id: I0ef7c7f33a5dc5855f38b20c03ddc5306f38ec66
2012-09-19 12:34:10 +02:00
Tim Starling
2caa7829fc Generated node count limit
To prevent large template DOM caches from sending servers into swap,
throw an exception when more than some number of DOM elements are
parsed. Unfortunately, it wasn't possible to return a normal error
message, because it broke PST and extractSections and corrupted the
article text. It's safer to refuse to save the edit, and we don't
have decent ways to do that short of throwing an exception.

Ideally we would like to have an upstream patch that hooks libxml to
allocate memory from PHP's request pool, then a fatal error would be
raised instead of swapping.

Change-Id: I4cb4f6fd313e1e0940b56cc5e586afd1bea9267a
2012-09-15 14:51:58 -07:00
Daniel Friesen
53b6fc7000 Set $wgUseCombinedLoginLink to false by default.
See: http://thread.gmane.org/gmane.science.linguistics.wikipedia.technical/61489

Change-Id: I5a6761b5648d36581848372e456832ef15e097b4
2012-09-14 14:12:38 +02:00
daniel
b6fe213226 merge latest master.
some tests fail due to logical changes, will fix that in a follow-up

Change-Id: I8a5e4087ecf674fbcf6327c5d168cd401be12400
2012-09-05 17:50:13 +02:00
Aaron
303d8be8ee [FileRepo] Added option to shorten long file names.
Change-Id: Id36e787192b32b72d3b49e2afbe41335b81ae732
2012-08-31 16:33:59 -07:00
robin
5a3316f383 Add @since to new variables, fix variable name
Add @since 1.20 to new configuration variables and fix variable name wgLocalTimezone -> wgLocaltimezone

(New variables per https://www.mediawiki.org/wiki/Category:MediaWiki_configuration_settings_1.20.0 )

Change-Id: I97f373e9760f5b4966ae064965ec6cfd8dff2498
2012-08-31 19:23:38 +02:00
Reedy
f6c21c607c (bug 38451) remove $wgAllowPageInfo
InfoAction needs a bit of work, so this might want to wait a little
while. The patch removes $wgAllowPageInfo which was used to enable the
action=info action (which was disabled by default).

https://gerrit.wikimedia.org/r/#/c/15847 is needed to disable the
counter query.

Change-Id: I467e688090919b627bf1fb124ef712821c2257f6
2012-08-31 18:17:51 +02:00
Demon
944e196c02 Merge "(bug 39180) Set x-frame-options='DENY' for api" 2012-08-31 14:47:28 +00:00
Kaldari
987319a54a Merge "Revert "Setting up a way to have uploading by URL, but not on Special:Upload"" 2012-08-31 00:06:33 +00:00
Kaldari
ae67fae0bf Revert "Setting up a way to have uploading by URL, but not on Special:Upload"
This reverts commit 8c6c29b3fc

I erroneously assumed there was a practical reason why
wgAllowCopyUploads was turned off on Commons, i.e. it was
too easy to abuse, causing too many copyvios, etc. I didn't
realize that the reason it was turned off was purely
technical (since the apaches on the cluster have no
external internet access). So there's no reason we need a
separate config.

Change-Id: I293a59d756335909898fd647edd6eddb68f06e17
2012-08-30 17:02:55 -07:00
Catrope
ddfce8feb0 Merge "Setting up a way to have uploading by URL, but not on Special:Upload" 2012-08-29 19:25:13 +00:00
daniel
9994968774 merged master
Change-Id: Ib2b879c4daa17401eeeb50767c0e5a54254855c3
2012-08-29 15:20:15 +02:00
Daniel Kinzler
392af46809 Revert "merged master"
This reverts commit 67bfdc7a68
2012-08-29 13:14:49 +00:00
daniel
67bfdc7a68 merged master
Change-Id: Ib2b879c4daa17401eeeb50767c0e5a54254855c3
2012-08-29 12:06:38 +02:00