Commit graph

9 commits

Author SHA1 Message Date
addshore
fe87b6575a Add getSkinFactory to MediaWikiServices
Change-Id: Ife79aca542e0e85405976de7be7acebfa3359569
2016-04-27 11:18:56 +01:00
Bartosz Dziewoński
667522795b Fix trivial PHPCS violations in */skins/* directories
Due to T127238, files in various */skins/* directories are not checked
by PHPCS. Temporarily removed the exclude rule from phpcs.xml and ran:

  composer fix includes/skins/* tests/phpunit/includes/skins/* tests/phpunit/skins/*

Change-Id: I9240c1cee825920b6634903282be6252cce55686
2016-03-02 21:02:15 +01:00
Bartosz Dziewoński
5b11fa4146 Completely remove skin autodiscovery
Also update documentation.

Bug: 65748
Change-Id: I393896281e901de2000c09c0abd16ee2a0f41e2f
2014-09-19 19:12:56 -07:00
umherirrender
63dc5abc9a Fixed spacing
- Added space after reserved words: function, foreach, if
- Combined 'else if' into elseif
- Added braces to one-line statements
- Added spaces after comma, before parentheses

Change-Id: Ie5bbf680d6fbe0f0872dab2700c16b1394906a72
2014-08-27 18:31:50 +02:00
umherirrender
cd80906d4a Change @return to start with type
MediaWiki default is "@return type Description", so set a type after
return and start the description with a capital letter. Also use the
more common spelling of boolean.

See http://phpdoc.org/docs/latest/references/phpdoc/tags/return.html for
more about @return

Change-Id: I4e5198822fe92836f9cef9918a9fc1a1a1e0a043
2014-08-20 20:35:41 +02:00
Daniel Friesen
9f75d9c63c Fix documentation.
It's true that right now the internal skin name doesn't have to be all-lowercase,
however not doing so leads to side effects such as the changing of case of i18n message keys,
if the documentation makes programmers aware that something other than all-lowercase can
be used, they should also be aware of the side effects of doing so.

Change-Id: Ib1ed192b1ba83ae864313c34b450a1151485750b
2014-08-13 12:36:28 -07:00
Bartosz Dziewoński
0300b5af49 SkinFactory: Improve documentation and comments
* Document parameters to register()
* Document what the "human-readable name" does
* Document the distinction between autodiscovery and $wgValidSkinNames
  skins

Change-Id: Iee5bd18b3e68f3e48ccd28e386109e60fee31085
2014-08-13 13:55:55 +02:00
Kunal Mehta
1154e1848f SkinFactory: register skins in Setup.php
This un-makes $wgValidSkinNames a legacy thing, and is
more backwards-compatible friendly.

Change-Id: I5c442f3c9e4ee7a4a3980fd02138ee756ef9fa7a
2014-08-13 13:43:09 +02:00
Kunal Mehta
eb37e9d1ff Introduce SkinFactory
Modeled similar to ConfigFactory, this lets skins
register themselves via a callback, allowing for
proper dependency injection.

Loading via $wgValidSkinNames is still supported,
but considered "legacy", not deprecated though.

Skin::newFromKey is now deprecated (and had only
one caller in an extension, which I'll update
afterwards).

Change-Id: I1960483f87c2ef55c994545239b728fa376f17f4
2014-08-09 21:40:54 +01:00