Commit graph

2418 commits

Author SHA1 Message Date
Bartosz Dziewoński
05047791f1 Fix documentation for $wgResourceLoaderLESSVars
* These aren't string values, but LESS code snippets. This rarely
  matters, but it matters very much when it does.
* Changes to the values do not actually trigger cache invalidation.
  Hashed contents are only used for "second-level" cache keys and do
  not make it possible to invalidate module cache.

Change-Id: I373dfedac1e43db4d0aa709384eee7f7e7f1808c
2014-08-23 00:37:26 +00:00
James D. Forrester
c45b456725 Set default setting for thumbsize to 300px (index 5) not 180px
Bug: 67703
Change-Id: I172ccc0128747090a199695d3bce04388b3bef57
2014-08-20 22:23:12 +00:00
This, that and the other
569c3e862b Allow two-tier setup of transwiki import sources
There has been some demand, particularly in the Wikimedia cluster, for the
ability to import from any wiki of a cluster. For this to occur, the
transwiki import user interface needs a bit of a rethink.

This patch replaces the existing single dropdown with a pair of dropdowns:
the first to select the wiki project, and the second to select the
subproject (e.g. a Wikipedia/Wiktionary language, or a Wikia site).
The second one is optional (to support single-wiki sites like Meta, or
for backwards compatibility with existing setups).

$wgImportSources is now treated as a mixed array/associated array (see
comment in DefaultSettings.php). Existing configurations will still work
but will receive no new functionality.

The non-JavaScript fallback is not pretty, but (a) it works, (b) I don't
see an easy way to make it nicer, and (c) wiki sysops should probably be
using a JavaScript-enabled browser for admin actions like importing...

The intention is to alter the WMF configuration to automatically populate
$wgImportSources with all public cluster wikis. I'm not exactly sure how
this will be set up, but this patch is an important first step. I expect
some non-WMF users of MediaWiki will find it helpful as well.

Change-Id: Icdb655500c1ae5374dc7a9f4d99e6738b2269b14
2014-08-19 21:59:27 +10:00
jenkins-bot
552125ee38 Merge "Special:Version: Link to tree instead of commit for git hashes" 2014-08-18 18:26:55 +00:00
jdlrobson
aa15d5287d Add blanket support for mediawiki ui via globals
This provides better mobile experiences on various pages
and a more consistent UI across both mobile and desktop.

It does this in two ways.

1) Forces HTMLForms to not use table based layouts so as
not to interfere with responsive nature of mediawiki ui elements

2) Applies MediaWiki.UI classes to most pages
If a page is created via Xml or Html classes it will use mediawiki ui
Where possible I've added classes unconditionally, but for cases of buttons
this is behind the $wgUseMediaWikiUIEverywhere global since button styling is
enabled on pages by default and for checkboxes since it is changes HTML markup.

3) Adds all MediaWiki.UI styles to pages which can use it
When enabled:
* Apply these styles to all pages which use HTMLForms
* Apply to EditPage
* Apply to anything that uses certain elements outputted by the
Xml or HTML helper classes
* Apply to History page
* Apply to protection page
* Apply to move page
* Apply to deletion page

Currently kept behind a global to allow us time to finetune
existing elements. After further testing we will look to kill the
globals and make mediawiki.ui the default

See: I430c0fbb79d2a33bb828b2427bda0ee01115d73f
Change-Id: I47db5eab4569514d039261d11b6dedb0eeae17b5
2014-08-15 14:48:00 -07:00
Tyler Romeo
6f458cfba3 Changed password default to PBKDF2
Bug: 28419
Change-Id: I096a862c884f6a6adbb381c0fcc70844bf007c63
2014-08-14 12:08:03 -07:00
jenkins-bot
ab972997ee Merge "Remove various functions and globals deprecated since 1.22 from RecentChange" 2014-08-14 18:06:35 +00:00
jenkins-bot
723a597307 Merge "Allow to send the memory usage with UDP profiler." 2014-08-13 22:24:39 +00:00
Aaron Schulz
c202712d19 Enabled $wgUseLinkNamespaceDBFields
Change-Id: I7aa64c3ef50cd0bc210ea755a0c9d6ee1b7abb7c
2014-08-13 21:33:56 +00:00
withoutaname
557b2cf3ef Remove various functions and globals deprecated since 1.22 from RecentChange
Change-Id: I5200892e75ffa894133e2e386d53c09536547de9
2014-08-12 22:19:36 -07:00
withoutaname
0eed71b776 Remove deprecated $wgHTCPMulticastAddress, $wgHTCPMulticastRouting and $wgHTCPPort
Change-Id: Icfbc178d823e59f2e305cbc4bca0b194d2786026
2014-08-12 21:52:40 -07:00
Kunal Mehta
d2a82fcb60 Add JSONContent and handler from EventLogging
As was discussed at the architecture summit, a basic JSON content
class which handles validation and basic display. Not intended to
be used directly, but for extensions to subclass.

Co-Authored-By: addshore <addshorewiki@gmail.com>
Change-Id: Ifcde9bcd0efcf15a3ab692dd2a0a3038559e0254
2014-08-08 23:31:26 +00:00
rillke
c31fbf073e Unify the spelling of MIME in documentation
Writing MIME as written in Wikipedia and some documentation clean up.

Change-Id: I9dfc36d2bf55d72d9374c4075bd6d45eef0415a4
2014-08-07 23:38:45 +02:00
Bartosz Dziewoński
9f1e4b117f Move Vector's $wg configuration options to Vector.php
Change-Id: Ic1801bff707ebfb3fccdbf4ac257ed6593ca3178
2014-08-07 14:07:41 +00:00
jenkins-bot
57ec9e0669 Merge "Allow factory functions for creating API modules." 2014-08-07 08:07:48 +00:00
daniel
baa11f7430 Allow factory functions for creating API modules.
This enables factory functions to be registered for API modules,
in addition to the module class itself. This allows modules to
use proper dependency injection via the modules constructor.

Example:

  $wgAPIModules['foo'] = array(
    'class' => 'ApiFoo',
    'factory' => function( $main, $action ) { ... }
  )

Change-Id: Ieb85493a7765f466317f5fa74b0b0e262220deab
2014-08-06 22:58:14 +02:00
Bartosz Dziewoński
0b191ba970 Use a special fallback skin when selected skin is unavailable
It just displays a helpful message that explains why and how to
install and enable skins. There is no navigation nor other basic page
elements (like the logo or site notice), since this is not intended to
be a fully functional skin.

Bug: 68332
Change-Id: Id14fbb8733cd8fbb912a724ac658f5e7244364b5
2014-08-06 16:41:36 +00:00
Kunal Mehta
0a97b26c11 Remove $wgSortSpecialPages
This is a silly option, and there's no reason you wouldn't
want them sorted.

Change-Id: Iec1598fce2278d2d8d7b89a75f888e3de9801d17
2014-08-06 15:54:41 +01:00
umherirrender
7e08a8b742 Add gender for upload log entries
With Icd8662ecb9eb0f6c0ff9841bdbd5736d6dd0d015 the log for uploads was
migrated to the new system, but no formatter was set to use the new
system also on Special:Log.
There is no need for an extra formatter class, because at the moment
there is nothing extra to format.

Added the new messages and adjust them. Now upload logs supports gender.
The old messages are kept for IRC where there were already in use.
This also hide the params added with
Icd8662ecb9eb0f6c0ff9841bdbd5736d6dd0d015 on Special:Log, because there
are not needed for i18n.

Change-Id: Idf281898d8a5a023a0b9ce3bc90b3ca55c1a6376
2014-08-04 17:25:11 +02:00
jenkins-bot
839663f3c5 Merge "Remove deprecated $wgCompiledFiles configuration setting" 2014-07-31 21:43:56 +00:00
Étienne Beaulé
b230bdce16 Create preference to watchlist pages after rollbacking
This change adds a  preference in the 'watchlist' section to
automatically watchlist a page after rollbacking.

The setting is only visible, if the user has the 'rollback'-right.
I have removed the watch reverts function per advice by Vogone.

Bug: 4488
Change-Id: I3aa831c9c04d627684641af0ca5a332795c87062
2014-07-30 21:51:41 +00:00
withoutaname
57cccdb71f Remove deprecated $wgCompiledFiles configuration setting
Change-Id: I6a220291e6ebd9354e12898a77b7dc52fd59e63f
2014-07-30 13:46:53 -07:00
jenkins-bot
ae089d79d1 Merge "Define fallback skin using $wgFallbackSkin instead of hardcoding Vector" 2014-07-30 00:26:38 +00:00
withoutaname
67defa3b68 Documentation: Update $wgPasswordDefault and BcryptPassword
Slight syntax code change for $wgPasswordDefault in DefaultSettings.php
and fixed reference to global in BcryptPassword.php.

Change-Id: I8d1d12c09ecd2f422f21a586e948f314e29fa605
2014-07-29 01:57:30 -07:00
Bartosz Dziewoński
3971d0646c resourceloader: Allow skins to provide additional styles for any module
The newly introduced $wgResourceModuleSkinStyles global enables skins to
provide additional stylesheets to existing ResourceLoader module.

This both makes it easier (or at all possible) to override default
styles and lowers the style footprint by making it possible not to
load styles unused on most pages.

----

Example:

Use the file 'foo-styles.css' for the 'mediawiki.foo' module when using
the MySkin skin:

  $wgResourceModuleSkinStyles['myskin'] = array(
    'mediawiki.foo' => 'foo-styles.css',
    'remoteSkinPath' => 'MySkin',
    'localBasePath' => __DIR__,
  );

For detailed documentation, see the doc comment in DefaultSettings.php.
For a practical usage example, see Vector.php.

----

Implementation notes:

* The values defined in $wgResourceModuleSkinStyles are embedded into
  the modules as late as possible (in ResourceLoader::register()).
* Only plain file modules are supported, setting module skin styles
  for other module types has no effect.
* ResourceLoader and ResourceLoaderFileModule now support loading
  files from arbitrary paths to make this possible, defined using
  ResourceLoaderFilePath objects.
  * This required some adjustments in seemingly unrelated places for
    code which didn't handle the paths fully correctly before.
* ResourceLoader and ResourceLoaderFileModule are now a bit more
  tightly coupled than before :(
* Included a tiny example change for the Vector skin, a lot more of
  similar cleanup is possible and planned for the future.
* Many of the non-essential mediawiki.* modules defined in
  Resources.php should be using `'skinStyles' => array( 'default' => … )`
  instead of `'styles' => …` to allow more customizations, this is
  also planned for the future after auditing which ones would actually
  benefit from this.

Change-Id: Ica4ff9696b490e35f60288d7ce1295766c427e87
2014-07-29 00:53:41 +02:00
Bartosz Dziewoński
25d75b36b0 Define fallback skin using $wgFallbackSkin instead of hardcoding Vector
Bug: 68332
Change-Id: Ibd7485dfa3123fb9ac3e9dd97cbe7129a0969c65
2014-07-27 22:42:24 +02:00
Tyler Anthony Romeo
95a8974c6b
Added password hashing API
Deprecated the old User::crypt, et. al password hashing
system and implemented an extensible password hashing
API.

The new Password class allows registering of child classes
and provides factory functions for creating new Password
objects. The built-in hash types are the old MediaWiki MD5
types, which are for backwards-compatibility only, and bcrypt.

Also included is support for wrapping existing hashes as well
as encrypting passwords with a configured encryption key.

Bug: 54948
Bug: 28419
Change-Id: I0a9c972931a0eff0cfb2619cef3ddffd03710285
2014-07-27 15:51:18 -04:00
Ori Livneh
8d6346930d Specify unit in doc-block for $wgHTTPTimeout and $wgAsyncHTTPTimeout
Change-Id: I01f7e2b3b2965bda6bf8728ce58160506873b596
2014-07-23 17:01:00 -07:00
jenkins-bot
1ce7d64af1 Merge "Add $wgDebugDumpSqlLength" 2014-07-23 22:32:06 +00:00
jenkins-bot
2900c4b297 Merge "DefaultSettings: Update documentation for skin-related variables" 2014-07-23 21:41:17 +00:00
Brad Jorsch
053c3c5fd4 Add $wgDebugDumpSqlLength
When $wgDebugDumpSql is set, the logged queries are truncated to 500
bytes. This is often not enough if you're wanting to actually debug
the queries instead of just seeing that queries were executed.

Change-Id: Iad3abd20c11d647834aa5546a1a9c82916c6519f
2014-07-23 11:15:49 +00:00
Bartosz Dziewoński
8b3d231cf5 DefaultSettings: Update documentation for skin-related variables
Change-Id: I646b737d225fd320181bb5fe86d548835c4f5357
2014-07-22 20:25:15 +02:00
jenkins-bot
a83900b360 Merge "Change the default for wgThumbnailMinimumBucketDistance" 2014-07-22 17:56:52 +00:00
Gilles Dubuc
09a0cd1da2 Change the default for wgThumbnailMinimumBucketDistance
This has no effect while $wgThumbnailBuckets is null (the default), 
but once buckets are enabled, 0 is a poor setting for the minimum
distance. 50 is arbitrary but definitely better than leaving it at 0.

Change-Id: I845af18cfd00627b26f6325c1d1a512a492a8f7c
2014-07-22 17:51:40 +00:00
Aaron Schulz
b8c038f678 Redo WhatLinksHere query and add a *_from_namespace field to link tables
* Also tweaked the query so MySQL avoids doing a page_name
  index scan when it should start with the link table index
* Added population script (triggered by update.php)
* Also removed uniqueness from some indexes where it is redundant
* Renamed two confusing variables

Bug: 60618
Change-Id: Icca99b6ae0ef76cb77695faf82c615516191da36
2014-07-21 12:04:56 -07:00
eikes
2f002458d5 Split "suppressrevision" into two user rights
In this change, a new passive user right named "viewsuppressed"
which can be used in order to view suppressed page content was added
to MediaWiki core.
Furthermore, this right was also added to the list of available rights,
to qqq.json and to en.json where also the description of the
"suppressrevision" right was adjusted in order to reflect reality.

Bug: 20476
Change-Id: Id1baacb9c782763db5e05ef8b5c1b761997efcc9
2014-07-19 18:11:15 +02:00
Kevin Israel
b3cee0610f DefaultSettings: Rewrap $wgThumbnailMinimumBucketDistance comment
To avoid a PHPCS warning. Also fixed some small errors in the text.

Change-Id: I7d9b1bde971b7ae66f93a1025a0cbcc1d809e69b
2014-07-18 02:49:05 -04:00
jenkins-bot
12b4d38602 Merge "Revert "Breaking out disallowed CSS into a global variable"" 2014-07-18 02:50:16 +00:00
Krinkle
d2c5a1c6e7 Revert "Breaking out disallowed CSS into a global variable"
This reverts commit ad4f512c74.

Change-Id: I1dbb927997693d686b4677b9c2107be99dedd7b2
2014-07-18 02:39:41 +00:00
jenkins-bot
a0864e85a2 Merge "Breaking out disallowed CSS into a global variable" 2014-07-18 00:13:11 +00:00
withoutaname
1163efdea9 Remove $wgEnableSorbs and $wgSorbsUrl
They were deprecated in version 1.17.

Change-Id: I8489c0cb4a041d081283fa3551377ef81ef36549
2014-07-13 00:51:26 +00:00
Rohan
3b57bd5fca Removes deprecated $wgUseCommaCount variable
Also sets the default value of $wgArticleCountMethod to 'link'

Bug: 60454
Change-Id: I31c3fe837b59e693d03ed403c8cb52e50beccddf
2014-07-11 07:34:03 +00:00
withoutaname
5842d0aa07 Remove $wgFileStore
Change-Id: I58cf67ac1f2754a472b49b0b6d7f2b289deb2d4a
2014-07-10 18:27:39 -07:00
Aaron Schulz
8c1932eba1 Give "mergehistory" to sysops
Follows-up cf8e994053 and 9b070bf461 (r27823).

Bug: 66155
Change-Id: Iaaa30afbdc834faf0fb5f68bc82c7d8aef8fcec8
2014-07-09 17:36:56 +00:00
jenkins-bot
b15bfd99a9 Merge "Generate thumbnails based on buckets" 2014-07-09 14:09:02 +00:00
Gilles Dubuc
7036e7b68d Generate thumbnails based on buckets
Instead of always generating thumbnails based on the original,
this adds the ability to generate thumbnails based on
references buckets. The buckets themselves have their
generation chained following the same process (smaller bucket
generated based on bigger bucket). In situations where no
suitable bucket is found, the original is used, like it used to.

This is entirely optional, as most non-WMF wikis would probably prefer
to keep generating all thumbnails based on originals.

The quality implications have been verified through a survey
aimed at Commons users and people actually preferred the chained version.
Presumably due to the multiple passes of sharpening which maintained
visual details better for small thumbnail sizes.

Change-Id: I285d56b2024c81365247338f85c1e0aa708cb21e
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/600
Bug: 67525
2014-07-08 20:03:38 +00:00
Bryan Davis
b6d18ab9f7 Fix GitInfo cache file path computation and storage location
Depending on the configuration used in LocalSettings.php, $IP can be
changed between the time that configuration is loaded and the wiki
runtime by logic in WebStart.php. Attempt to mitigate the effects of
such changes on the cache file name computation by canonicalizing both
$IP and the path using PHP's realpath() function.

Related but distinct is the possible need to configure the canonical
location for finding cache files on disk separately from
$wgCacheDirectory. This change introduces a new configuration variable
named $wgGitInfoCacheDirectory that can be set to a path that diverges
from the default location of $wgCacheDirectory/gitinfo. This will be
useful in the WMF cluster where $wgCacheDirectory points to a directory
that is not managed by the deployment system.

Finally add wfDebugLog logging to make tracking down issues such as
miscomputed cache paths easier.

Bug: 53972
Change-Id: Iceb9e1ce8d3b4bb08f89fa6ec5d5e7392aaafd46
2014-07-08 16:36:10 +00:00
Brian Wolff
8c953947ff rm $wgCountTotalSearchHits. It was broken.
If $wgCountTotalSearchHits was set to true, then the total
number of hits returned was zero, which caused Special:Search
to display no results.

I'm opting to remove the feature (although I don't have any
strong opinions about removal vs changing Special:Search), since
if someone both cares about performance and has a wiki where its
big enough to matter, they are going to need to use Cirrus anyways.

Change-Id: I1c3b908ae5423ce3dfbdc22b1a68dd81a85698aa
2014-07-08 03:41:13 -03:00
DanielRenfro
ad4f512c74 Breaking out disallowed CSS into a global variable
Bug: 11106
Change-Id: Iac6e9a3b1d0265dbd159509dd8938bddeb6f3bba
2014-07-07 21:28:53 -04:00
Reedy
2ec5cb61f5 Update $wgRCFeeds documentation
Added RedisPubSubFeedEngine, not added to docs in I846036c091c45059a8

Change-Id: Id38e7fef49318bdde2a8cf8719ede52fb7fdb551
2014-07-03 01:19:29 +00:00