X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Finstaller%2FWebInstaller.php;h=0d5ea576a69a42549d132ef5da3c52bae607b976;hb=7ba6480152bafddc9f20811a9b2871165531106f;hp=4f31195e8495b6b7400b550b97d2efdbfb3308c4;hpb=bb52be9f3da314361cdb90642f941aea669a1d3e;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php
index 4f31195e84..0d5ea576a6 100644
--- a/includes/installer/WebInstaller.php
+++ b/includes/installer/WebInstaller.php
@@ -362,14 +362,14 @@ class WebInstaller extends Installer {
$url = $m[1];
}
return md5( serialize( array(
- 'local path' => dirname( dirname( __FILE__ ) ),
+ 'local path' => dirname( __DIR__ ),
'url' => $url,
'version' => $GLOBALS['wgVersion']
) ) );
}
/**
- * Show an error message in a box. Parameters are like wfMsg().
+ * Show an error message in a box. Parameters are like wfMessage().
* @param $msg
*/
public function showError( $msg /*...*/ ) {
@@ -540,7 +540,7 @@ class WebInstaller extends Installer {
$s .= $this->getPageListItem( 'Restart', true, $currentPageName );
$s .= "\n"; // end list pane
$s .= Html::element( 'h2', array(),
- wfMsg( 'config-page-' . strtolower( $currentPageName ) ) );
+ wfMessage( 'config-page-' . strtolower( $currentPageName ) )->text() );
$this->output->addHTMLNoFlush( $s );
}
@@ -556,7 +556,7 @@ class WebInstaller extends Installer {
*/
private function getPageListItem( $pageName, $enabled, $currentPageName ) {
$s = "
";
- $name = wfMsg( 'config-page-' . strtolower( $pageName ) );
+ $name = wfMessage( 'config-page-' . strtolower( $pageName ) )->text();
if ( $enabled ) {
$query = array( 'page' => $pageName );
@@ -609,7 +609,7 @@ class WebInstaller extends Installer {
/**
* Get HTML for an error box with an icon.
*
- * @param $text String: wikitext, get this with wfMsgNoTrans()
+ * @param $text String: wikitext, get this with wfMessage()->plain()
*
* @return string
*/
@@ -620,7 +620,7 @@ class WebInstaller extends Installer {
/**
* Get HTML for a warning box with an icon.
*
- * @param $text String: wikitext, get this with wfMsgNoTrans()
+ * @param $text String: wikitext, get this with wfMessage()->plain()
*
* @return string
*/
@@ -631,7 +631,7 @@ class WebInstaller extends Installer {
/**
* Get HTML for an info box with an icon.
*
- * @param $text String: wikitext, get this with wfMsgNoTrans()
+ * @param $text String: wikitext, get this with wfMessage()->plain()
* @param $icon String: icon name, file in skins/common/images
* @param $class String: additional class name to add to the wrapper div
*
@@ -640,13 +640,13 @@ class WebInstaller extends Installer {
public function getInfoBox( $text, $icon = false, $class = false ) {
$text = $this->parse( $text, true );
$icon = ( $icon == false ) ? '../skins/common/images/info-32.png' : '../skins/common/images/'.$icon;
- $alt = wfMsg( 'config-information' );
+ $alt = wfMessage( 'config-information' )->text();
return Html::infoBox( $text, $icon, $alt, $class, false );
}
/**
* Get small text indented help for a preceding form field.
- * Parameters like wfMsg().
+ * Parameters like wfMessage().
*
* @param $msg
* @return string
@@ -659,14 +659,15 @@ class WebInstaller extends Installer {
$html = $this->parse( $text, true );
return "\n" .
- "" . wfMsgHtml( 'config-help' ) . "\n" .
+ "" . wfMessage( 'config-help' )->escaped() .
+ "\n" .
"" . $html . "\n" .
"
\n";
}
/**
* Output a help box.
- * @param $msg String key for wfMsg()
+ * @param $msg String key for wfMessage()
*/
public function showHelpBox( $msg /*, ... */ ) {
$args = func_get_args();
@@ -713,7 +714,7 @@ class WebInstaller extends Installer {
if ( strval( $msg ) == '' ) {
$labelText = ' ';
} else {
- $labelText = wfMsgHtml( $msg );
+ $labelText = wfMessage( $msg )->escaped();
}
$attributes = array( 'class' => 'config-label' );
@@ -893,7 +894,7 @@ class WebInstaller extends Installer {
if( isset( $params['rawtext'] ) ) {
$labelText = $params['rawtext'];
} else {
- $labelText = $this->parse( wfMsg( $params['label'] ) );
+ $labelText = $this->parse( wfMessage( $params['label'] )->text() );
}
return
@@ -969,7 +970,7 @@ class WebInstaller extends Installer {
Xml::radio( $params['controlName'], $value, $checked, $itemAttribs ) .
' ' .
Xml::tags( 'label', array( 'for' => $id ), $this->parse(
- wfMsgNoTrans( $params['itemLabelPrefix'] . strtolower( $value ) )
+ wfMessage( $params['itemLabelPrefix'] . strtolower( $value ) )->plain()
) ) .
"\n";
}
@@ -1077,7 +1078,7 @@ class WebInstaller extends Installer {
) );
$anchor = Html::rawElement( 'a',
array( 'href' => $this->getURL( array( 'localsettings' => 1 ) ) ),
- $img . ' ' . wfMsgHtml( 'config-download-localsettings' ) );
+ $img . ' ' . wfMessage( 'config-download-localsettings' )->escaped() );
return Html::rawElement( 'div', array( 'class' => 'config-download-link' ), $anchor );
}