X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FWebInstallerOptions.php;h=3521fa188f4d753dbb59354f4e6b677de6695319;hb=a9252abb1cf0ad52ee25dc8c56d76a29a71d7045;hp=2412319ea38934b16844a1b28fd3043eba8780e8;hpb=47cb68bd09264ab7281db6aa714681203fd51efc;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/WebInstallerOptions.php b/includes/installer/WebInstallerOptions.php index 2412319ea3..3521fa188f 100644 --- a/includes/installer/WebInstallerOptions.php +++ b/includes/installer/WebInstallerOptions.php @@ -104,7 +104,8 @@ class WebInstallerOptions extends WebInstallerPage { $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 ) ); @@ -136,7 +137,7 @@ class WebInstallerOptions extends WebInstallerPage { } } 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 ); } @@ -144,7 +145,8 @@ class WebInstallerOptions extends WebInstallerPage { $this->getFieldsetEnd(); $this->addHTML( $skinHtml ); - $extensions = $this->parent->findExtensions(); + $extensions = $this->parent->findExtensions()->value; + '@phan-var array[] $extensions'; $dependencyMap = []; if ( $extensions ) { @@ -324,11 +326,16 @@ class WebInstallerOptions extends WebInstallerPage { return null; } + /** + * @param string $name + * @param array $screenshots + */ private function makeScreenshotsLink( $name, $screenshots ) { global $wgLang; if ( count( $screenshots ) > 1 ) { $links = []; $counter = 1; + foreach ( $screenshots as $shot ) { $links[] = Html::element( 'a', @@ -448,7 +455,7 @@ class WebInstallerOptions extends WebInstallerPage { * @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 ) { @@ -498,7 +505,7 @@ class WebInstallerOptions extends WebInstallerPage { $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" ] ); @@ -519,7 +526,7 @@ class WebInstallerOptions extends WebInstallerPage { $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" ] );