dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace infobox usages and extend successbox, warningbox and errorbox
[lhc/web/wiklou.git]
/
includes
/
installer
/
WebInstallerOptions.php
diff --git
a/includes/installer/WebInstallerOptions.php
b/includes/installer/WebInstallerOptions.php
index
2412319
..
3521fa1
100644
(file)
--- a/
includes/installer/WebInstallerOptions.php
+++ b/
includes/installer/WebInstallerOptions.php
@@
-104,7
+104,8
@@
class WebInstallerOptions extends WebInstallerPage {
$this->getFieldsetEnd()
);
$this->getFieldsetEnd()
);
- $skins = $this->parent->findExtensions( 'skins' );
+ $skins = $this->parent->findExtensions( 'skins' )->value;
+ '@phan-var array[] $skins';
$skinHtml = $this->getFieldsetStart( 'config-skins' );
$skinNames = array_map( 'strtolower', array_keys( $skins ) );
$skinHtml = $this->getFieldsetStart( 'config-skins' );
$skinNames = array_map( 'strtolower', array_keys( $skins ) );
@@
-136,7
+137,7
@@
class WebInstallerOptions extends WebInstallerPage {
}
} else {
$skinHtml .=
}
} else {
$skinHtml .=
-
$this->parent->getWarningBox( wfMessage( 'config-skins-missing' )->plain()
) .
+
Html::warningBox( wfMessage( 'config-skins-missing' )->plain(), 'config-warning-box'
) .
Html::hidden( 'config_wgDefaultSkin', $chosenSkinName );
}
Html::hidden( 'config_wgDefaultSkin', $chosenSkinName );
}
@@
-144,7
+145,8
@@
class WebInstallerOptions extends WebInstallerPage {
$this->getFieldsetEnd();
$this->addHTML( $skinHtml );
$this->getFieldsetEnd();
$this->addHTML( $skinHtml );
- $extensions = $this->parent->findExtensions();
+ $extensions = $this->parent->findExtensions()->value;
+ '@phan-var array[] $extensions';
$dependencyMap = [];
if ( $extensions ) {
$dependencyMap = [];
if ( $extensions ) {
@@
-324,11
+326,16
@@
class WebInstallerOptions extends WebInstallerPage {
return null;
}
return null;
}
+ /**
+ * @param string $name
+ * @param array $screenshots
+ */
private function makeScreenshotsLink( $name, $screenshots ) {
global $wgLang;
if ( count( $screenshots ) > 1 ) {
$links = [];
$counter = 1;
private function makeScreenshotsLink( $name, $screenshots ) {
global $wgLang;
if ( count( $screenshots ) > 1 ) {
$links = [];
$counter = 1;
+
foreach ( $screenshots as $shot ) {
$links[] = Html::element(
'a',
foreach ( $screenshots as $shot ) {
$links[] = Html::element(
'a',
@@
-448,7
+455,7
@@
class WebInstallerOptions extends WebInstallerPage {
* @return bool
*/
public function submitSkins() {
* @return bool
*/
public function submitSkins() {
- $skins = array_keys( $this->parent->findExtensions( 'skins' ) );
+ $skins = array_keys( $this->parent->findExtensions( 'skins' )
->value
);
$this->parent->setVar( '_Skins', $skins );
if ( $skins ) {
$this->parent->setVar( '_Skins', $skins );
if ( $skins ) {
@@
-498,7
+505,7
@@
class WebInstallerOptions extends WebInstallerPage {
$this->setVar( 'wgRightsIcon', '' );
}
$this->setVar( 'wgRightsIcon', '' );
}
- $skinsAvailable = array_keys( $this->parent->findExtensions( 'skins' ) );
+ $skinsAvailable = array_keys( $this->parent->findExtensions( 'skins' )
->value
);
$skinsToInstall = [];
foreach ( $skinsAvailable as $skin ) {
$this->parent->setVarsFromRequest( [ "skin-$skin" ] );
$skinsToInstall = [];
foreach ( $skinsAvailable as $skin ) {
$this->parent->setVarsFromRequest( [ "skin-$skin" ] );
@@
-519,7
+526,7
@@
class WebInstallerOptions extends WebInstallerPage {
$retVal = false;
}
$retVal = false;
}
- $extsAvailable = array_keys( $this->parent->findExtensions() );
+ $extsAvailable = array_keys( $this->parent->findExtensions()
->value
);
$extsToInstall = [];
foreach ( $extsAvailable as $ext ) {
$this->parent->setVarsFromRequest( [ "ext-$ext" ] );
$extsToInstall = [];
foreach ( $extsAvailable as $ext ) {
$this->parent->setVarsFromRequest( [ "ext-$ext" ] );