From a569701e9e43b4582bea07b9c8cb7a56f2823aad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Mon, 27 Nov 2006 19:49:48 +0000 Subject: [PATCH] * Xmlify a little --- includes/SpecialPreferences.php | 59 +++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/includes/SpecialPreferences.php b/includes/SpecialPreferences.php index ec1a957e4f..b7f275d364 100644 --- a/includes/SpecialPreferences.php +++ b/includes/SpecialPreferences.php @@ -612,16 +612,15 @@ class PreferencesForm { * with an Afrikaans interface since it's first in the list. */ $selectedLang = isset( $languages[$this->mUserLanguage] ) ? $this->mUserLanguage : $wgContLanguageCode; - $selbox = null; - foreach($languages as $code => $name) { - global $IP; - $sel = ($code == $selectedLang)? ' selected="selected"' : ''; - $selbox .= "\n"; + $options = "\n"; + foreach( $languages as $code => $name ) { + $selected = ($code == $selectedLang); + $options .= Xml::option( "$code - $name", $code, $selected ) . "\n"; } $wgOut->addHTML( $this->addRow( '', - "" + "" ) ); @@ -638,15 +637,16 @@ class PreferencesForm { } } - $selbox = null; - foreach($variantArray as $code => $name) { - $sel = $code == $this->mUserVariant ? 'selected="selected"' : ''; - $selbox .= ""; + $options = "\n"; + foreach( $variantArray as $code => $name ) { + $selected = ($code == $this->mUserVariant); + $options .= Xml::option( "$code - $name", $code, $selected ) . "\n"; } if(count($variantArray) > 1) { $wgOut->addHtml( - $this->addRow( wfMsg( 'yourvariant' ), "" ) + $this->addRow( wfMsg( 'yourvariant' ), + "" ) ); } } @@ -768,24 +768,41 @@ class PreferencesForm { # Files # - $wgOut->addHTML("
- " . wfMsg( 'files' ) . " -
-
\n\n"); + + $thumbSizeId = 'wpThumbSize'; + $wgOut->addHTML( + "
" . Xml::label( wfMsg('thumbsize'), $thumbSizeId ) . " " . + Xml::openElement( 'select', array( 'name' => $thumbSizeId, 'id' => $thumbSizeId ) ) . + $imageThumbOptions . + Xml::closeElement( 'select' ) . "
\n" + ); + + $wgOut->addHTML( "\n\n" ); # Date format # -- 2.20.1