Do not use "wgMainCacheType" form variable
name that contains values that cannot be
assigned to $wgMainCacheType
Bug: T116375
Change-Id: I83459c8006cc4c1bcdeaa0d78a1230687c95db46
Instead of using .mw-help-field-container from mediawiki.legacy to style help
tooltips, use a class that is specific to the WebInstaller and which is styled
in its stylesheet. This allows us to stop embedding it in mediawiki.legacy
(which is loaded on every page).
The CSS is copied directly from the styles for mw-help-field-container et al.
in mediawiki.legacy.
Change-Id: I8e092e9d2c91b5f70499d93c1134f43f2e96348c
Continues the path of deprecating $wgScriptExtension and all of
the related baggage.
You'll only end up with sadness when we rip out of the rest of
this later so don't let people shoot themselves in the foot.
Change-Id: I34cd1d2c266405ebc761a271e3740e972fb7cf2f
This way, if someone tries to install MediaWiki via
either web installer or install.php maintenance script,
after obtaining from git, they get some useful information
on what to do.
Put the checks alongside the php version check, as
stuff installed via composer (mustache / lightncandy)
is used for NoLocalSettings.php and install.php
attempts to use logging stuff.
Also tried to make PHPVersionError look slightly nicer,
with some <h2> elements and more padding for the <p>
elements.
and centralized this code in one place, as much as possible,
for improved ease of maintenance.
Bug: T90438
Bug: T88951
Change-Id: Iae4eb42c4266dbe9213c5de8a96fccfbeaa9acb0
* Added in 40e18e4534.
* Removed in 648bed9f83 (r87494).
The latter left the Installer::values array still populating this
variable eventhough it was no longer used in the generators output.
The example in overrides.php is also outdated as modifying this
variable there would have no effect.
Change-Id: I0c86e94a004c034702c5fcd83257c0f4c3d15a57
Quite a few reasons:
* There is a bug in IE 8 and below where the startIndex argument
does not support negative values, contrary to the ECMAScript
spec and implementations in other browsers.
IE8:
'faux'.substr( -1 ); // "faux"
Standards:
'faux'.substr( -1 ); // "x"
Code written for ES5 (and using the es5-shim) works as expected
since the shim repairs this method.
* String#substr and String#substring both exist but have
different signatures which are easily mixed up.
String.prototype.substr( start [, length] )
> Supports negative start, but not in IE8 and below.
> Takes length, *not* second index. E.g. `substr( 2, 3 )`
returns `slice( 2, 5 )`.
String.prototype.substring( indexA [, indexB] )
> Doesn't support negative indices.
> If indexA is larger than indexB, they are silently swapped!
String.prototype.slice( start [, end] )
> Supports negative indices.
'faux'.substr( 0, 2 ); // "fa"
'faux'.substring( 0, 2 ); // "fa"
'faux'.slice( 0, 2 ); // "fa"
'faux'.substr( -2 ); // "ux"
'faux'.substring( -2 ); // "faux"
'faux'.slice( -2 ); // "ux"
'faux'.substr( 1, 2 ); // "au"
'faux'.substring( 1, 2 ); // "a"
'faux'.slice( 1, 2 ); // "a"
'faux'.substr( 1, -1 ); // ""
'faux'.substring( 1, -1 ); // "f"
'faux'.slice( 1, -1 ); // "au"
'faux'.substr( 2, 1 ); // "u"
'faux'.substring( 2, 1 ); // "a"
'faux'.slice( 2, 1 ); // ""
* String#slice works the same way as Array#slice and slice
methods elsewhere (jQuery, PHP, ..).
* Also simplify calls:
- Omit second argument where it explicitly calculated the length
and passed it as is (default behaviour)
- Pass negative values instead of length - x.
- Use chatAt to extract a single character.
* Change:
- Replace all uses of substring() with slice().
- Replace all uses of substr() with slice() where only one
parameter is passed or where the first parameter is 0.
- Using substr()'s unique behaviour (length instead of endIndex)
is fine, though there's only one instances of that, in
mediawiki.jqueryMsg.js
Change-Id: I9b6dd682a64fa28c7ea0da1846ccd3b42f9430cf
Previously we used the regular logo, which could prove confusing when
one switched back-and-forth between the installed and mediawiki.org
pages.
The new one is "half-drawn", evoking the image that we are in the
process of creating something (a new wiki). I like that.
Source: <https://commons.wikimedia.org/wiki/File:Wikitech-logo.png>,
authored by Brion, GFDL 1.2+. It was previously used as a logo of the
Wikitech wiki, but that has unicorns instead now.
Change-Id: Ic5c83bb85e6b6a11978d452fbe46d2dad9c5a553
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
- Added/removed spaces around parenthesis
- Added space after switch/if/foreach
- changed else if to elseif
Change-Id: I99cda543e0e077320091addd75c188cb6e3a42c2
Web installer was not checking for unsupported PHP versions.
In those cases the script should terminate or the
installation will break (e.g. syntax errors for PHP4).
Installer::doEnvironmentChecks() no longer checks for PHP
version since it has already been done by the entry scripts
(both in cli and web modes)
Installer::MINIMUM_PHP_VERSION has been removed since it is
no longer used.
Message config-env-php-toolow is no longer used and it has
been removed
Change-Id: I9227868bd2bd4e13bad6b95ad581be3ada71c94e
CSS was not showing correctly when session errors occurred.
This was caused because mw-config/index.php was not taking
into account the "css" parameter passed in the URL.
Change-Id: I500c7340ab6826d428e9e3be28bcfc7ca5ed8466
* Harmonize spacing
* Use // for comments rather than #
* Harmonize call style for 'require', 'include' etc.
* Add missing profileinfo.php5
* Use "./" for path to api.php in api.php5 (to match other php5 files).
* Move documentation related to Setup.php from index.php to WebStart.php
* Remove "Initialise common code." comment in api.php (was already remove
in most entry points)
Change-Id: I8dc4a79fd13cee49e34f250a4039b3666bd42aca
Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81.
Also updated usage in text in documentation and the
installer LocalSettingsGenerator.
Most of them were handled by this regex:
- find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$
- replace: $1 $2;
Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
hphpc has been superseded by hhvm, so support for hphpc is no longer
needed.
* Continue to use Preprocessor_Hash under HipHop since it is still
faster under hhvm
* Keep $wgCompiledFiles for now, so that wikihiero doesn't give an error
before Ic9d1e795 is merged
* Migrate the run-server script and associated configuration file to
hhvm. Enable EnableStaticContentFromDisk since it doesn't seem
ridiculously inefficient at first glance. Run from $IP rather than
$IP/.. since hhvm is apparently not picky about sourcing files from
outside of the current directory.
Change-Id: Ic3e769f1fbad4f7ad26dd819406796fee48c6b45
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
...after a discussion with Debian packagers. They can now override installer
classes and change LocalSettings.php the installer generates. The file
intended for such overrides, mw-config/overrides.php, has intentionally been
placed outside of includes to underline the "don't change includes" paradigm.
Change-Id: Id82b90f6740307609bc6c6f4fb8765bc3484dbe7
* Added the ability to compile extensions. The build process is bootstrapped by running MediaWiki in interpreted mode. Extension setup file inclusions are slightly modified in a way that makes them register themselves for compilation. Then the same LocalSettings.php uses the compiled extension setup file when the compiled binary runs.
* Tested with Cite and ParserFunctions. The code which lets you have an extensions directory in a place other than $IP/../extensions is untested.
* Simplified WebStart.php slightly by using a custom $_SERVER variable to mark compiled mode. It will break if you don't use the supplied server.conf, but that will break a lot of things so don't do that.
* Fixed the core web entry points to include WebStart.php in compiled mode instead of interpreted.
* Made the build directory configurable. This is mostly so that I can grep the source tree without seeing loads of generated C++.
* In server.conf, added a rewrite rule allowing a /wiki/$1 article path.
* Removed server.conf log file location "/dev/stdout", breaks when you switch user
* Disable static content cache, breaks horribly when you set SourceRoot to a directory containing 7GB of files.
* Rewrote the run-server script in PHP, mostly to support the configurable build directory feature.
* Added an option to the run-server script to allow running in interpreted (hphpi) mode.