I searched for /\$(\S+) = (.+?\(.*?\);)\n.*?\$\1\[/, ignored
everything involving isset(), unset() or array assigments, then
skimmed through the remaining results and changed things where they
made sense. These changes were not automated, so please review them.
Change-Id: Ib37b4c66fc57648470f151ad412210b3629c2538
When an entry point specifies MW_NO_SESSION, actually enforce that by
having both SessionManager and PHP's session handling (session_start()
and friends) throw exceptions.
If an entry point needs the old behavior of using PHP's default session
handling (as defined in php.ini), it should define
MW_NO_SESSION_HANDLER instead of or in addition to MW_NO_SESSION.
This also makes PHPSessionHandler be installed in CLI mode, where it
wasn't installed before.
Bug: T127233
Change-Id: I2a3db06ee8e44a044096c57a819b5fd5e51c5c5c
The feature no longer exists starting in PHP 5.4.0, and MediaWiki
now only supports PHP 5.5.9 or newer.
Change-Id: I3f2d1b564c50f0a28ec1ec0abd7d1b242e26953b
SessionManager cannot work in the installer since it depends on
ObjectCache which is just an EmptyBagOStuff and so doesn't store
anything. So, introduce a custom SessionProvider which pretends to
persist sessions but actually doesn't.
Bug: T126177
Change-Id: I13d8aa1453c519df7c19ca2f1fb052c99ade043c
Set the context language early, even before the session is loaded, to
avoid attempting to call User::loadFromSession(). Also update the things
that set $wgLang to also set it in RequestContext.
Passing $wgUser through to the ParserOptions constructor isn't strictly
necessary right now, but it does at least show the intended data flow
and is more robust to future changes in the way the language is passed
through to ParserOptions.
Fixes bug T126177 independently of my other two patches.
Bug: T126177
Change-Id: I15eb9cdce7805382d96b6fc6ffb9b25855876417
This hack to prevent $wgUser being loaded was apparently not updated
when RequestContext was introduced.
Fixes T126177 independently of I13d8aa1453c
Bug: T126177
Change-Id: Iedceec3044352e433710d97d5c7c81fff1a6a3e5
Pre-PHP 5.5 the extension was called "APC", and provided opcode caching
and userland object caching. In 5.5, the opcode caching was built-in to
PHP, and the userland object caching was moved into an extension named
"APCu".
Bug: T61998
Change-Id: Id6f4a87bfdb59b2592a56aea9450611238e313ad
When installing without an explicit `--dbname` argument on the command
line, the database is installed with the default value of $wgDBname
from DefaultSettings.php (which is `my_wiki`), but then the
LocalSettings.php file is written with the line:
$wgDBname = "";
which overrides the default value and makes the wiki unable to
connect to the database created by the installer.
Adding `wgDBname` to the `$defaultVarNames` list fixes this problem.
Change-Id: I3792be9675aabe00b5497ed4203b12b89da8dc3a
Do not use "wgMainCacheType" form variable
name that contains values that cannot be
assigned to $wgMainCacheType
Bug: T116375
Change-Id: I83459c8006cc4c1bcdeaa0d78a1230687c95db46
There is no need to store session variables
(that also include user-supplied arguments)
as $wgXXX global variables.
Bug: T116375
Change-Id: I880d4299566beaf99ed1fc21c690cdda64149b0e
Just because some defined object caches are problematic in the installer, it
doesn't mean, that all others are problematic, too. Disable only the object
caches, which are known problematic ones by preserving the others.
Follow up: I1c1938b3fac395d
Bug: T113843
Change-Id: I951ef22d97b4c66d3b781a9bc4a30e7e2fca1395
It's used to e.g. cache less files in ResourceLoader, which would throw
an exception if the installer is used (while it requests the installer
styles), if the object cache isn't defined.
Follow up: I1ff61153ddb9
Bug: T113843
Change-Id: I1c1938b3fac395dda5b42dd68b675a67bdd30261
Changed some old bugzilla links to new phabricator links in comments,
test data and error message. This reduces the need for redirects from
old bugzilla to new phabricator from our source code.
Change-Id: Id98278e26ce31656295a23f3cadb536859c4caa5
When having $wgExtensionDirectory or $wgStyleDirectory set to a
different location in LocalSettings.php, the load of LocalSettings.php
can give fatal, because the called functions wfLoadSkin and
wfLoadExtensions need at least this globals to be set correctly.
This does not bring the vector skin back to the updater, when having the
globals set, but it avoids a fatal about "MonoBook/skin.json does not
exist!" or similar.
Change-Id: I095c545f77aa50d6be4cd48588bd1ae1c82cf343
wfSuppressWarnings() and wfRestoreWarnings() were split out into a
separate library. All usages in core were replaced with the new
functions, and the wf* global functions are marked as deprecated.
Additionally, some uses of @ were replaced due to composer's autoloader
being loaded even earlier.
Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to
mediawiki/vendor.
Bug: T100923
Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
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
wgRightsIcon uses wgResourceBasePath in its value, therefore it
must be exported first. Otherwise $wgResourceBasePath will still
be null (as from DefaultSettings.php) and cause an incorrect
value to be assigned.
Also fix $wgLogo to use wgResourceBasePath instead of wgScriptPath,
to match what Setup.php does already.
Bug: T75031
Change-Id: I6f18895f3caa50871327eec108fc7d70c1077f1e
We still have to keep in the hacky include code to support extensions
not using extension registration yet.
Bug: T94668
Change-Id: Ifedbf8026d46e376181e957725cd91d365295fcb
This drops support for the custom utf8 normal PHP extension in favor
of the intl extension.
Bug: T90825
Change-Id: Ifbaeb2ef684217cf6187ccc4fb4d303f89608300
* 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
The message config-no-db contains a comma separated list of items.
Adding the count of this list allows use of plural for better i18n.
Change-Id: I07ccbd3f664709d1a6234cb1e268ff8d7ddfabd9
The bug only affects people installing from Git, not tarball releases.
* Make sure getDefaultSkin() never returns null and just uses 'vector'
when no skins are available (so the user just has to install it).
* Produce a hidden input field to pass the generated value to the next
installer page.
Change-Id: I025f1aeb182a818de59a42df01591e01fc9e6236
The problem here is that the path to 'wiki.png' is saved in users'
LocalSettings.
We likely should not remap the path, like we did for footer license
icons in Ic7c32e56:
* It's likely that users changed their logo image by overwriting the
file in skins/common/.
* If the normal upgrade process is followed (overwrite-uploading new
files), the old file will still be there with the skins/common/
directory.
* If it does cause problems, they'll be rather easy to notice and fix.
On the other hand, maybe we should?
* This is going to be annoying for git users.
* It will bite anyone who deletes all MediaWiki files when upgrading
via tarball, which is more likely with the recent skin system
changes encouraging users to remove old cruft from skins/ directory.
Bug: 69277
Change-Id: I175fe57048ebf9d348fb2fe67bf62cf5df389003
Custom LESS functions are problematic for us for a number of reasons,
as outlined by Timo on bug 67368. We should get rid of them.
The only use case was implementing CSSMin data: URI embedding in LESS,
which used to be impossible due to lessc not preserving comments (bug
54673). However, thanks to new syntax added in f3779e06 we can insert
the annotations in such a way that the compiler won't mess with them.
The same technique is used in OOjs UI since 584ed144.
The LESS-function-based embedding implementation also meant that we
were unable to flip images for RTL (bug 66091 and friends: bug 66773,
bug 68326). The annotation one doesn't have this limitation.
Bug: 67368
Bug: 66091
Bug: 66773
Bug: 68326
Change-Id: I3062346ed63272a1c22b5df27b4cc1de2a699d9a