20 $styleDirectory = $this->config->get(
'StyleDirectory' );
22 $possibleSkins = scandir( $styleDirectory );
23 $possibleSkins = array_filter( $possibleSkins,
function ( $maybeDir )
use ( $styleDirectory ) {
24 return $maybeDir !==
'.' && $maybeDir !==
'..' && is_dir(
"$styleDirectory/$maybeDir" );
28 $possibleSkins = array_filter( $possibleSkins,
function ( $skinDir )
use ( $styleDirectory ) {
30 is_file(
"$styleDirectory/$skinDir/skin.json" )
31 || is_file(
"$styleDirectory/$skinDir/$skinDir.php" );
34 return $possibleSkins;
43 $defaultSkin = $this->config->get(
'DefaultSkin' );
46 $enabledSkins = array_change_key_case( $enabledSkins, CASE_LOWER );
48 if ( $installedSkins ) {
49 $skinsInstalledText = [];
50 $skinsInstalledSnippet = [];
52 foreach ( $installedSkins
as $skin ) {
53 $normalizedKey = strtolower( $skin );
54 $isEnabled = array_key_exists( $normalizedKey, $enabledSkins );
56 $skinsInstalledText[] = $this->
getMsg(
'default-skin-not-found-row-enabled' )
57 ->params( $normalizedKey, $skin )->plain();
59 $skinsInstalledText[] = $this->
getMsg(
'default-skin-not-found-row-disabled' )
60 ->params( $normalizedKey, $skin )->plain();
65 return $this->
getMsg(
'default-skin-not-found' )->params(
67 implode(
"\n", $skinsInstalledText ),
68 implode(
"\n", $skinsInstalledSnippet ) )->numParams(
69 count( $skinsInstalledText ),
70 count( $skinsInstalledSnippet )
73 return $this->
getMsg(
'default-skin-not-found-no-skins' )->params(
87 if ( file_exists(
"$IP/skins/$skin/skin.json" ) ) {
88 return "wfLoadSkin( '$skin' );";
90 return "require_once \"\$IP/skins/$skin/$skin.php\";";
99 $this->
html(
'headelement' ) ?>
101 <div
class=
"warningbox">
105 <
form action=
"<?php $this->text( 'wgScript' ) ?>">
106 <input
type=
"hidden" name=
"title" value=
"<?php $this->text( 'searchtitle' ) ?>" />
107 <h3><label
for=
"searchInput"><?
php $this->
msg(
'search' ) ?></label></h3>
112 <div
class=
"mw-body" role=
"main">
113 <h1
class=
"firstHeading"><?
php $this->
html(
'title' ) ?></h1>
115 <div
class=
"mw-body-content">
116 <?
php $this->
html(
'bodytext' ) ?>
117 <?
php $this->
html(
'catlinks' ) ?>
BaseTemplate class for the fallback skin.
null means default in associative array form
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
New base template for a skin's template extended from QuickTemplate this class features helper method...
buildHelpfulInformationMessage()
Inform the user why they are seeing this skin.
makeSearchButton($mode, $attrs=[])
execute()
Outputs the entire contents of the page.
getSnippetForSkin($skin)
Get the appropriate LocalSettings.php snippet to enable the given skin.
when a variable name is used in a it is silently declared as a new local masking the global
getMsg($name)
Get a Message object with its context set.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned $skin
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
This document describes the state of Postgres support in and is fairly well maintained The main code is very well while extensions are very hit and miss it is probably the most supported database after MySQL Much of the work in making MediaWiki database agnostic came about through the work of creating Postgres as and are nearing end of but without copying over all the usage comments General notes on the but these can almost always be programmed around *Although Postgres has a true BOOLEAN type
makeSearchInput($attrs=[])
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at name
static getDefaultInstance()
printTrail()
Output the basic end-page trail including bottomscripts, reporttime, and debug stuff.