The API output for help and 'fm' formats will soon have need of
including ResourceLoader modules on an otherwise-bare page. The easiest
way to do this is to use OutputPage, but that requires a skin. So let's
add a skin that outputs a basic page without any navigation elements or
other chrome (that may be added later, but that can wait for Design to
decide they want to design it).
Change-Id: Ifa95fae5acaa3cfbf2ca58a15f8d0c51d84b455a
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
Bonus: actually make $wgResourceBasePath default to $wgScriptPath, rather than
special-casing it in ResourceLoaderFileModule.
Change-Id: I608435cef00d3e77a5bbdb0a0122d3e7e1a4eb78
While it's "semantically" incorrect (these files are not
ResourceLoader resources), putting them in that subdirectory is a lot
less hassle than introducing a new toplevel directory.
Follow-up to 2b4b9a3f. Discussion that resulted in the toplevel
assets/ took place on I6268d663 (now abandoned).
Change-Id: Iedbfd802457fe35803899e3479540177760ec30b
poweredby_mediawiki_88x31.png is straightforward, just need to update
some paths.
The six license icons are more problematic, as the paths to them are saved
in users' LocalSettings. We're remapping them in Setup.php.
Bug: 69277
Change-Id: Ic7c32e56043cfbf94ef2271de4ff41ef18fbeee7
- 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
Callers should instead use DeferredUpdates::addUpdate. The
function is superior because it is able to enforce type-hinting
rather than throwing a fatal error. Also it's not a global :)
The only extension still using the global is FlaggedRevs,
for which I've submitted I1a7c6540b2.
Change-Id: Ic59c90c0d0131039295bd785280dc70ebde6e40f
Since this doesn't rely on functions defined in GlobalFunctions.php;
this can be in the first "defaults" section of the file.
Change-Id: I24f1a14322d90d053adf51716516001477364e16
This feature was necessary when it was only possible to specify the
name of the class a skin used, this was the only way for one class to
dynamically serve multiple skins (such as if the skins were purely
template based with no PHP or if one skin had different themes to it).
It also provided an option for other skins to set $this->skinname dynamically.
See code review on I5c442f3c9e.
Change-Id: I7315fadf2e26d164ccc4f47b6d883945fa2570da
Removing the hack added in Ib4bdda5e.
This will cause an error message to be shown to almost every MediaWiki
user who upgrades their installation (including us developers) until
they add entries for their skins to LocalSettings. This is deemed an
acceptable trade-off, and the message makes it easy to resolve the
issue.
Bug: 68402
Change-Id: I2596ef73088ce94d78ce3dc3ae4da9d81023a2cb
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
- Move the overrides of e-mail settings along with other
configuration corrections instead of being near global object
definitions
- Also force $wgUseEnotif to false if $wgEnableEmail;
previously it could remain true since $wgEnotifUserTalk
and $wgEnotifWatchlist were forced to false after they
were checked to set $wgUseEnotif
- Also put the removal of 'enotifminoredits' preference nearby
Change-Id: I9af6bb78d34ce053fc36eaa7cc3852de3ecbee8e
- Removed spaces after not operator (!)
- Removed spaces inside array index
- use tab as indent instead of spaces
- Add newline at end of file
- Removed spaces after casts
Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b
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
Some of the setup code in some of the configurations apparently depends
on all extensions and skins being already required by the point
Setup.php is being loaded. We ran into issues with LocalisationCache.
Bug: 67318
Change-Id: Idde13c2e835a9969593a4716a62b392d4c1388d6
Special page PageLanguage to set the page language of a page.
To enable the feature, set $wgPageLanguageUseDB to true
and assign the 'pagelang' user right to a user group.
Bug: 35489
Change-Id: I0f82b146fbe948f917c1c5d29f7469644d797e80
This makes it behave exactly like a custom skin.
* 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.
Change-Id: Ife9926d12b6baaa84cd2aa9a415f1183415863c8
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
Step one on the way to killing the autodiscovery mechanism and making
the core skins less intertwined with core.
This only moves the files and fixes hardcoded paths throughout core.
Any further changes will be done in separate patch(es).
Moved files:
* skins/MonoBook.php → skins/monobook/MonoBook.php
* skins/Vector.php → skins/vector/Vector.php
Bug: 65748
Change-Id: Ib4bdda5ed3c133fce0113eb17fa39950aa812f87
This variable is useless since there is the check "session_id() !== ''"
to do the same, that works correctly if the session has been started
during the request.
Change-Id: I5081e79e30e01c97aa0e59b106cc75e9d1ba951a
This partially reverts r73950 which removed $wgServerName on the ground that it
was only used for {{SERVERNAME}}. When it was pointed out that $wgServerName was
also used by several extensions, the response was not to restore the variable, but
to proceed to remove it from extensions as well.
It is a useful variable to have, as the discussion on Id819246a9 makes clear
(see Tim's comment on PS12 and Timo's reply). So let's reintroduce it, and expose
it in mw.config and ApiQuerySiteInfo as well.
Change-Id: I40a6fd427d38c64c628f70a2f407b145443ea204
- Changed "#" to "//" for non-block comments
- Put the inline comment describing the file back
in the file description
Change-Id: I0aec0f4c10def58b608a8f08455fccb2317e4538
I always found out the debug message listing the cache being in use to
be slightly confusing:
MemcachedPeclBagOStuff[main] MemcachedPeclBagOStuff[message]
MemcachedPhpBagOStuff[parser]
Swap the class name and identifier to output:
main: MemcachedPeclBagOStuff, message: MemcachedPeclBagOStuff,
parser: MemcachedPhpBagOStuff
Change-Id: If069dec70eb31ed2dafe0e88ec4d4653005ff7e3
And deprecate $wgProfileOnly in the same time.
This has the advantage of allowing profiler output to be separated
from the main debug log file; or even be completely disabled while
keeping the other debugging messages.
Also updated the checks in wfLogProfilingData() to detect the cases
where the output would not be sent anywhere to not execute the
last part of the method which would be useless otherwise.
Backward compatibility with installations having $wgProfileOnly
set to true is kept by moving the log file from $wgDebugLogFile
to $wgDebugLogGroups['profileoutput'] in Setup.php in that case.
Change-Id: I7b35195e527dfa7978b710126ed4599e75dab46b
- Added spaces after if/foreach/catch
- Added new line before end of file
- Added or removed spaces before/after parenthesis, comma
- Added spaces around string concat
Change-Id: I0590070f1b3542108e242730e8d9a3ba9831e94f
This is akin to $wgSkipSkin/$wgSkipSkins. It is quite plausible for a wiki
to have more than one self prefix (e.g. enwiki has w: en: wikipedia: and
maybe others).
Some recent changes code seems to use $wgLocalInterwiki for quite unclear
purposes:
- I removed the line using $wgLocalInterwiki from the RecentChange
class, as the 'lang' field of $mExtra is not used anywhere in core code.
Extensions may use it, but it would seem more appropriate for them to
use something like $wgDBname (or indeed to consult $wgLocalInterwikis
directly) if they need to identify a particular wiki.
- In the IRC formatter, the first prefix in the array is used (if set).
Appropriate documentation is added to DefaultSettings.php.
Related to bug 954 comment 3.
Bug: 954
Bug: 955
Change-Id: I9dbb566385b464402c5e78510b95dd2ffb4d9489