mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-27 15:50:34 +00:00
refactor(core): normalize PHP namespaces used in Citizen
Related: T303102
This commit is contained in:
parent
572e376b06
commit
58d85ff426
|
@ -20,7 +20,7 @@
|
|||
* @file
|
||||
*/
|
||||
|
||||
namespace Citizen\Api;
|
||||
namespace MediaWiki\Skins\Citizen\Api;
|
||||
|
||||
use ApiBase;
|
||||
use ApiFormatJson;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Citizen;
|
||||
namespace MediaWiki\Skins\Citizen;
|
||||
|
||||
use ConfigException;
|
||||
use OutputPage;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Citizen\Hooks;
|
||||
namespace MediaWiki\Skins\Citizen\Hooks;
|
||||
|
||||
use Config;
|
||||
use ResourceLoaderContext;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Citizen\Hooks;
|
||||
namespace MediaWiki\Skins\Citizen\Hooks;
|
||||
|
||||
use MediaWiki\Hook\BeforePageDisplayHook;
|
||||
use MediaWiki\Skins\Hook\SkinPageReadyConfigHook;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Citizen\Partials;
|
||||
namespace MediaWiki\Skins\Citizen\Partials;
|
||||
|
||||
use DOMDocument;
|
||||
use DOMElement;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Citizen\Partials;
|
||||
namespace MediaWiki\Skins\Citizen\Partials;
|
||||
|
||||
use Exception;
|
||||
use ExtensionRegistry;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Citizen\Partials;
|
||||
namespace MediaWiki\Skins\Citizen\Partials;
|
||||
|
||||
/**
|
||||
* Footer partial of Skin Citizen
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Citizen\Partials;
|
||||
namespace MediaWiki\Skins\Citizen\Partials;
|
||||
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use MWException;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Citizen\Partials;
|
||||
namespace MediaWiki\Skins\Citizen\Partials;
|
||||
|
||||
use ResourceLoaderSkinModule;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Citizen\Partials;
|
||||
namespace MediaWiki\Skins\Citizen\Partials;
|
||||
|
||||
use Exception;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Citizen\Partials;
|
||||
namespace MediaWiki\Skins\Citizen\Partials;
|
||||
|
||||
use Action;
|
||||
use Exception;
|
||||
|
|
|
@ -23,11 +23,11 @@
|
|||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Citizen\Partials;
|
||||
namespace MediaWiki\Skins\Citizen\Partials;
|
||||
|
||||
use Citizen\GetConfigTrait;
|
||||
use MediaWiki\Skins\Citizen\GetConfigTrait;
|
||||
use MediaWiki\Skins\Citizen\SkinCitizen;
|
||||
use OutputPage;
|
||||
use SkinCitizen;
|
||||
use Title;
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Citizen\Partials;
|
||||
namespace MediaWiki\Skins\Citizen\Partials;
|
||||
|
||||
use Title;
|
||||
use User;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Citizen\Partials;
|
||||
namespace MediaWiki\Skins\Citizen\Partials;
|
||||
|
||||
/**
|
||||
* Theme switcher partial of Skin Citizen
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Citizen\Partials;
|
||||
namespace MediaWiki\Skins\Citizen\Partials;
|
||||
|
||||
use Html;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
|
|
|
@ -21,17 +21,23 @@
|
|||
* @ingroup Skins
|
||||
*/
|
||||
|
||||
use Citizen\GetConfigTrait;
|
||||
use Citizen\Partials\BodyContent;
|
||||
use Citizen\Partials\Drawer;
|
||||
use Citizen\Partials\Footer;
|
||||
use Citizen\Partials\Header;
|
||||
use Citizen\Partials\Logos;
|
||||
use Citizen\Partials\Metadata;
|
||||
use Citizen\Partials\PageTools;
|
||||
use Citizen\Partials\Tagline;
|
||||
use Citizen\Partials\Theme;
|
||||
use Citizen\Partials\Title;
|
||||
namespace MediaWiki\Skins\Citizen;
|
||||
|
||||
use Linker;
|
||||
use MediaWiki\Skins\Citizen\GetConfigTrait;
|
||||
use MediaWiki\Skins\Citizen\Partials\BodyContent;
|
||||
use MediaWiki\Skins\Citizen\Partials\Drawer;
|
||||
use MediaWiki\Skins\Citizen\Partials\Footer;
|
||||
use MediaWiki\Skins\Citizen\Partials\Header;
|
||||
use MediaWiki\Skins\Citizen\Partials\Logos;
|
||||
use MediaWiki\Skins\Citizen\Partials\Metadata;
|
||||
use MediaWiki\Skins\Citizen\Partials\PageTools;
|
||||
use MediaWiki\Skins\Citizen\Partials\Tagline;
|
||||
use MediaWiki\Skins\Citizen\Partials\Theme;
|
||||
use MediaWiki\Skins\Citizen\Partials\Title;
|
||||
use Sanitizer;
|
||||
use SkinMustache;
|
||||
use Xml;
|
||||
|
||||
/**
|
||||
* Skin subclass for Citizen
|
||||
|
@ -99,7 +105,7 @@ class SkinCitizen extends SkinMustache {
|
|||
'msg-sitetitle' => $this->msg( 'sitetitle' )->text(),
|
||||
'html-mainpage-attributes' => Xml::expandAttributes(
|
||||
Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) + [
|
||||
'href' => Skin::makeMainPageUrl(),
|
||||
'href' => parent::makeMainPageUrl(),
|
||||
]
|
||||
),
|
||||
'data-logos' => $logos->getLogoData(),
|
||||
|
|
14
skin.json
14
skin.json
|
@ -16,8 +16,7 @@
|
|||
},
|
||||
"ValidSkinNames": {
|
||||
"citizen": {
|
||||
"class": "SkinCitizen",
|
||||
"@args": "See SkinCitizen::__construct for more detail.",
|
||||
"class": "MediaWiki\\Skins\\Citizen\\SkinCitizen",
|
||||
"args": [
|
||||
{
|
||||
"name": "citizen",
|
||||
|
@ -54,23 +53,20 @@
|
|||
"i18n"
|
||||
]
|
||||
},
|
||||
"AutoloadClasses": {
|
||||
"SkinCitizen": "includes/SkinCitizen.php"
|
||||
},
|
||||
"AutoloadNamespaces": {
|
||||
"Citizen\\": "includes/"
|
||||
"MediaWiki\\Skins\\Citizen\\": "includes/"
|
||||
},
|
||||
"ConfigRegistry": {
|
||||
"Citizen": "GlobalVarConfig::newInstance"
|
||||
"citizen": "GlobalVarConfig::newInstance"
|
||||
},
|
||||
"APIModules": {
|
||||
"webapp-manifest": {
|
||||
"class": "Citizen\\Api\\ApiWebappManifest"
|
||||
"class": "MediaWiki\\Skins\\Citizen\\Api\\ApiWebappManifest"
|
||||
}
|
||||
},
|
||||
"HookHandlers": {
|
||||
"SkinHooks": {
|
||||
"class": "Citizen\\Hooks\\SkinHooks"
|
||||
"class": "MediaWiki\\Skins\\Citizen\\Hooks\\SkinHooks"
|
||||
}
|
||||
},
|
||||
"Hooks": {
|
||||
|
|
Loading…
Reference in a new issue