Commit graph

75 commits

Author SHA1 Message Date
Kunal Mehta
3c1d3e2bc6 installer: Read styles from Vector's skin.json
Vector now has a skin.json and the PHP entry point is just a stub, so
including it doesn't do anything. We can read from the skin.json file
and register the module properly instead of depending upon implicit
globals.

Also make ExtensionRegistry::__construct() not fail if $wgObjectCaches
is not set up properly, which is the case sometimes in the installer.

Bug: T98043
Change-Id: I5a653b095665092f8a27416b8a7f28ebf7d4d8c1
2015-05-04 11:41:13 -07:00
umherirrender
489d793882 Fixed spacing
- Added/removed spaces around parenthesis
- Added newline in empty blocks
- Added space after switch/foreach/function
- Use tabs at begin of line
- Add newline at end of file

Change-Id: I244cdb2c333489e1020931bf4ac5266a87439f0d
2014-12-05 22:28:07 +01:00
m4tx
6345e8aea5 Fix group separator in installer's sidebar
Uses explode() to split the sections and puts correct separators between them.

Bug: T39362
Change-Id: I9a287b6ac206debb9bd93dbfad0703a8fad0931f
2014-12-01 20:31:36 +01:00
Fomafix
78f103fdec WebInstallerOutput: Apply wfBCP47() to lang attribute
Change-Id: I7dce46380f56ff2960de7f6d9644c4cdc972a372
2014-11-13 22:43:52 +00:00
saper
8ac77bfbd3 Installer: Do not use Vector skin if not installed
MediaWiki installer works fine in a bareskin
mode without Vector features, so do not
throw errors in the PHP error log just because
we don't have "skins" project extracted.

The message in the PHP error log:

Warning:  include_once(w/skins/Vector/Vector.php): failed to open stream: No such file or directory in w/includes/installer/WebInstallerOutput.php on line 135
Stack trace:
  1. {main}() w/mw-config/index.php:0
  2. wfInstallerMain() w/mw-config/index.php:38
  3. WebInstaller->execute() w/mw-config/index.php:79
  4. WebInstaller->outputCss() w/includes/installer/WebInstaller.php:185
  5. WebInstallerOutput->getCSS() w/includes/installer/WebInstaller.php:1200

Change-Id: I7b8bd77f5868af2ccf464e48db771f2e8e0472ff
2014-08-31 00:34:53 +02:00
Florianschmidtwelzow
33fd7765b8 Fix WebInstaller style
The WebInstaller don't use classes, so it broke after Vector skin changed
to use classes instead of ID's

See: Iae873906abcd8b2a986e5f728f0ce207256de770

Bug: 70190
Change-Id: Ia70498a0ee7c99d000790223c44feddce73a5416
2014-08-29 23:13:32 +02:00
Bartosz Dziewoński
a8e474c1f2 Move installer files from skins/common/ to mw-config/
The CSS and JS files are definitely used only by the installer.

As for the images:
* mediawiki.png is still used directly by some error pages
  (includes/PHPVersionError.php, includes/templates/NoLocalSettings.php)
* ajax-loader.gif is still used by shared.css
* bullet.gif is mysteriously used by *something*, according to the
  logs at bug 69277 comment 11; I currently have no idea what, so
  let's keep it here for a while
* All other ones don't grep (outside of the installer itself) and
  don't appear in the logs on bug 69277.

Bug: 69277
Change-Id: I9146d9211a807911a5e0cfaa1dd3ab8170f333ca
2014-08-17 22:32:25 +00:00
Bartosz Dziewoński
c1c334efa5 WebInstallerOutput: Restore 'global $wgResourceModules'
Deleted in 301a7f3d, previously added in a96afeb2.

Change-Id: If0889bc003320abd0b74fc57b8975255f0efcc7e
2014-08-17 19:18:52 +00:00
umherirrender
301a7f3d1d Remove unused global declarations
Change-Id: I05a9bc5c0c0447c045714a445b0ed44f001db1dc
2014-07-19 22:44:54 +02:00
Bartosz Dziewoński
a96afeb262 Separate Vector skin from core
This makes it behave exactly like a custom skin, with the caveat that
it is still hardcoded in several places :(, most notably lots of
skinStyles in Resources.php, the installer and some tests.

* Renamed directory to reflect skin name.
* Split skin classes to separate PHP files.
* Removed core autoloader entries for skin classes.
* Changed the hack in Setup.php to require_once the skin PHP file, as
  the skin is now registered there.
* Extracted skin-specific localisation messages.
* Extracted skin-specific resources. Did not touch skinStyles yet.
* Hacked up the installer not to fall over entirely if Vector is
  missing.
* Adjusted hardcoded paths in some more places...

Change-Id: Idfffc1430790b3a104cc9835a6367137bcbf0e4e
2014-06-21 00:01:04 +02:00
Timo Tijhof
0888ccbcad Installer: Re-use ResourceLoader methods instead of duplicating
Also:
* Fix incorrect documentation comment of ResourceLoaderModule::getStyles(),
  it doesn't return a string, it never has.
* Remove spurious space in count() call.
* Fix spelling of in "proper".

Change-Id: I000393636f7b9015ad1bacfbb3eb8a6ad8695d72
2014-06-07 10:02:55 +02:00
Timo Tijhof
81e74e8d69 Installer: Simplify css request
Instead of passing around the direction in the request, just set
'css=1'. We already have the language code and directionality
available and even rely on it between requests to set other
localisation-related things.

Change-Id: I717cb299b3639024e79880039e0d1f2ff273ab44
2014-06-04 21:25:55 +02:00
Bartosz Dziewoński
fc69e6c645 Rename basic skinning modules: skins.common.* → mediawiki.skinning.*
For consistency in module naming: skins.* contains the modules for
particular skins, mediawiki.* contains the modules for core MediaWiki
itself. Clearly this belongs more to the latter than the former.
'skinning' is probably the best thing to name these to not sound silly
and avoid confusion with actual skins.

(The fact that there are files in skins/ that are not skin-related is
a remnant of bad decisions in the past. I want to clean that up as
well this year.)

Updated release notes and usages, kept old definitions for HTML
backwards-compatibility (for 30 days on WMF deployment).

I intend to backport this to 1.23 (sans the compatibility modules).
Otherwise the current module names become "public API" and we either
break compatibility later or support them forever.

Change-Id: I3947eaacd389eaba32f6fc8370395caec4aa1edb
2014-05-02 17:24:09 +00:00
umherirrender
f5f1e38b9a Fixed some @params documentation (includes/[db|installer])
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.

Change-Id: I3595e9aac69ac42fbb74b0783fae0ad9bcc831aa
2014-04-19 13:55:27 +02:00
Bartosz Dziewoński
ebcfbdfd87 WebInstallerOutput: Fix path to jquery.js
Follow-up to Id5ead145 and I335e4c08.

Bug: 64091
Change-Id: If40f479df7d68071d6ce5d2f3b8251e6bf3eb80e
2014-04-18 15:31:49 +00:00
Fomafix
d1176624a4 Fix Webinstaller after file move
Follow-Up to Id5ead1453412e763bdb3763084e43694517088fd

Change-Id: I335e4c08bbafd136c3a8734c9b077a62cb9d989d
2014-04-09 17:47:34 +00:00
Thiemo Mättig
6419dc7e26 WebInstaller inline documentation cleanup
This is a follow-up to Ide17d5af13c416c62a40029848ac17ba24eb5563.
However, I could not fix the "minor style" issue mentioned there
because this would make the line to long.

I fixed lots and lots of other issues instead, e.g.:

* "void" isn't a thing. Added "return null" instead.
* Removed documentation that said "a constructor is a constructor".
* Use "string[]" and such instead of "array" if possible.

Change-Id: I9658c2af58862f1d634cf1b2ba4c9d0f27ee7608
2014-04-08 12:22:43 +02:00
Ladsgroup
1ba0445c12 Changing URLs of mediawiki.org in scripts to the SSL-based website
http://www.mediawiki.org --> https://www.mediawiki.org

Part 2

Change-Id: I3be61fe3dfb502cc20180486eb1a8016eac151df
2014-03-12 23:24:03 +00:00
Daniel Friesen
baa79c7045 Split skins.common up into a proper trio of .elements, .content, and .interface modules.
Ideally it would be possible to add these as dependencies and also make them depend on each other
instead of partially duplicating the list of stylesheets, but ResourceLoader’s dependencies are
completely broken for skin stylesheets.

Followup to Ia193571afffff36ecb1f14ee9036fb9bb98347e7

Change-Id: I56758908c2f41430c7301a0ea6a4cf8b1eaa7fd8
2013-12-21 15:14:20 -08:00
jrobson
1d5ec4a6a1 Move VectorBeta modules to VectorBeta extension
* Remove duplication of styles in skins.monobook and skins.vector by
  creating skins.common.
* At same time allow VectorBeta to replace Vector-specific skin styles
  without having to worry about common styles.

Dependency: Ie32a28f8f8c5fc8e4d0890a3d7d96bc82b39c481
Change-Id: Ia193571afffff36ecb1f14ee9036fb9bb98347e7
2013-12-19 23:07:25 +00:00
Siebrand Mazeland
abd4247019 Remove unused local variables, update formatting and documentation
Change-Id: Ib17f5f05d6cc48ac448df0ea8515d570713df9b5
2013-11-25 14:42:34 +01:00
umherirrender
5dbfd5bf80 Fixed spacing
- Removed trailing spaces in comments
- Removed multiple empty lines
- Removed space after object operator

Change-Id: I9fd3256ab490c7cd2034de3fd94e6be6e6d6d8f2
2013-11-21 18:52:25 +00:00
Siebrand Mazeland
00ba1c542e Add close elements through code
Change-Id: I517221ebcc062477f315c6716e74056c754988a0
2013-11-07 17:30:36 +00:00
Kevin Israel
8cc7208753 installer: Run the LESS compiler for *.less files
Includes the following improvements:

* Use the ResourceLoader module definitions (with a hardcoded list of
  module names) instead of a hardcoded list of filenames.
* Make the errors more discoverable like we do in load.php, prepending
  them instead of burying them in the middle somewhere.

Bug: 55589
Change-Id: Iab78a60209ab46a10d4c492c75527e717f36f803
2013-10-24 01:02:47 -04:00
Siebrand Mazeland
751e70d1f8 Remove unused local variable
Change-Id: I93ce25fe158f7a82ade102953d6a2453620b7e0e
2013-10-09 16:11:21 +00:00
Siebrand Mazeland
626addab9e Update formatting
With some manual corrections.

Change-Id: Icd947288c32fdb90a0f35388963ef5a17ffa58e7
2013-10-09 09:35:18 +00:00
Kevin Israel
ea60cd90a6 Installer: remove dependency on JSON extension
* Remove one of the two uses of Xml::encodeJsVar(): to encode an
  unused JS variable dbTypes. The remaining use is only after
  installation is complete.
* Add an environmental check to ensure the JSON functions are
  available before attempting installation.

Bug: 54774
Change-Id: Ifb8859026b853ef3f328b796945a973c4add7eeb
2013-09-30 13:59:42 -04:00
umherirrender
ee31d37821 Fixed spacing in context/installer/media/templates/upload folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: I9761be9fa47adc3554852a97b19792b4648466ad
2013-04-21 06:22:06 +00:00
umherirrender
15abcf71ca Added/Removed spaces around string concatenation
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !

Fixed windows newline style

Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
2013-04-13 13:36:24 +02:00
umherirrender
926d2ee143 Remove spaces between parentheses in function calls
Change-Id: If8ec665a01b566fa5189dfcc810b2d9a17f371e1
2013-03-17 16:13:22 +01:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.

Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
2013-03-11 13:15:01 -04:00
umherirrender
48cd72819e fix some spacing
Change-Id: Ia9650be8b791fd2f0ccbc099436918a9d12d9968
2013-02-04 20:04:26 +00:00
btongminh
db759c2acb (bug 39941) Add missing stylesheet common/shared.css to the installer
pages


Change-Id: I802840fc39bc55a2d135168f9e0139622e68e17d
2012-09-14 21:27:35 +02:00
jeroendedauw
38c7f444e1 Use __DIR__ instead of dirname( __FILE__ )
We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :)

Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
2012-08-27 21:45:00 +02:00
Siebrand Mazeland
c848f486bc Replace deprecated wfMsg* calls with Message class calls.
Doing this in steps of roughly 100 changes per commit, so that it remains
reviewable. This should be the one but last change set with the "easy"
ones for core.

Change-Id: If894a92dd65b2f5f4f096b9133685eb3b067a1d8
2012-08-21 21:58:47 +02:00
Antoine Musso
aab43dd495 escape tags and entity in doxygen comments
When inserting XML elements inline <such as this one>, doxygen chokes
about it not being known. Simply enclosing the tag in double quotes
prevents doxygen from emitting a warning.

Also enclosed a few invalid functions calls such as \. and double quoted
the HTML entities such as &foobar;

Change-Id: I4019637145e683c2bec3d17b2fd98b0c50a932f1
2012-07-10 17:08:32 +02:00
Timo Tijhof
6540260001 (bug 36669) Installer CSS outdated
Change-Id: I7ac606f2e8538eb5fd10a3944cf9d8b42bbc5ed5
2012-05-09 02:20:03 +02:00
Alexandre Emsenhuber
09bb6975c5 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I1615bf268515ed7169e33173cea6ec30402451dc
2012-05-06 07:50:15 +02:00
Amir E. Aharoni
82cdfc864c (bug 31236) Refactor CSS loading and apply CSSJanus to all CSS files.
This commit is supposed to fix bug 31236.
Refactored getCSS to load files more generically.
Applied CSSJanus transform to all CSS files.
Updated release notes.

Change-Id: I4418a0dcb40fe181dc62a14a9f65b658e3c0d473
2012-04-03 12:59:05 -07:00
Krinkle
2b3733ecab [Core JS] wikibits.js / IEFixes clean up
* fix on-the-loose fixalpha() call
-- Calls should not be dangling loose like that
-- Removed local calls from skins and installer
-- instead calling from the IEFixes script (which is loaded raw by wikibits which is loaded from the bottom, as are all legacy scripts)
* Removing usage of 'skinpath' and 'skin' globals in wikibits.js, those aren't globals per se since introduction of mw.config and $wgLegacyJavaScriptGlobals
* Wrapping wikibits.js in closure to avoid leakage of "local" variables. This shouldn't break anything as it is loaded through resource loader which, in production mode, wraps it in a closure anyway.
* adding explicit posision=>bottom for wikibits. 'bottom' is default but repeating here since it must not change for legacy reasons.
2011-12-26 16:12:07 +00:00
Robin Pepermans
679970382a Simplify code (minor) 2011-12-12 21:56:26 +00:00
Chad Horohoe
5b67b14b5f Reduce some duplication 2011-07-07 16:52:47 +00:00
Tim Starling
6fec4e3fde Revert r87635, r87637, r87639, r87643 (MW_MIN_PHP_VERSION etc.): breaks HipHop support. 2011-05-15 13:21:16 +00:00
Happy-melon
fd34d0354b * Implement MW_VERSION constant in Defines.php and use it in preference to $wgVersion. Defines.php will have been loaded anywhere that DefaultSettings.php has been loaded.
* Move the declaration of $wgFeedClasses from Defines.php to WebStart.php
2011-05-07 14:53:08 +00:00
Sam Reed
f675c6bf05 Documentation 2011-05-02 16:58:29 +00:00
Brion Vibber
d3005cfbd5 * (bug 27170) [Installer] Install now completes when choosing a CC license with the picker
There were two things breaking this:
* X-Frame-Options forbade our final step of the license selector, or the license selection shower, from being loaded properly. This lead to it looking wrong.
* The installation URL fingerprinting broke on the long query string that's on the final step. As a result, the user's selection got saved into a different session subkey, thinking it belonged to a different installation. It would then not get seen by the surrounding page's installer instance, causing the confusion.

Fix removes the X-Frame-Options for the CC bit, and drops query strings before the rest of URL normalization in the fingerprint check so the CC bits now see the same session key as the rest.
2011-03-27 20:13:30 +00:00
Tim Starling
ccfe5ad97b Fix for bug 26561: clickjacking attacks. See the bug report for full documentation. 2011-01-04 06:12:33 +00:00
Mark A. Hershberger
aa08646a71 Misc whitespace changes, mostly EOL w/s and indention fixes so TAB = 4 spaces 2010-12-19 04:31:15 +00:00
Chad Horohoe
fab6200fc6 Fix r77650, notice about undefined $css; was causing the serif font issue too 2010-12-07 01:42:38 +00:00
Brandon Harris
44a91da53a * Fix issues brought up in r75832
* Really and truly add in a couple files that were supposed to go in with r77898, and fully revert r77860 (which was a reversion of r75832). (Ran previous commit for r77898 from wrong directory. Oops.)
* Fixed issue with help box text not being parsed.
* Modified help system to remove tooltips and instead open/show hidden boxes.
  - I am not happy with this design and future revisions will iterate upon it.
  - The biggest problem is everything sitting "on top" of itself.  I dislike this a great deal and plan on changing it to be more aesthetic and natural; however, I wanted to get a version of this in that allowed for cut-and-pasting and solved the text parsing issue.
  - With javascript disabled, help text is visible by default.
* Remove redundancy in checkboxes
* Added i18n entry for "help", which wasn't there for some reason.
* Removed references to tipsy library in installer html
  - Kept tipsy library in core; this is being used elsewhere.
2010-12-06 23:13:35 +00:00