From 1dbcaf54116967929ab01e7c184c9fa7cd21a484 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 29 Aug 2005 20:24:57 +0000 Subject: [PATCH] * disabled="disabled" attribute for headers * title="" attribute for items * increased indent level * avoiding warning on "*\n" input --- includes/Licenses.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/includes/Licenses.php b/includes/Licenses.php index 1925e8690b..eedc2cd39e 100644 --- a/includes/Licenses.php +++ b/includes/Licenses.php @@ -86,9 +86,11 @@ class Licenses { function makeIndexes( $arr ) { $str = ''; + wfSuppressWarnings(); foreach ( $arr as $item ) $str .= '["' . addslashes( $item ) . '"]'; + wfRestoreWarnings(); return $str; } @@ -99,7 +101,8 @@ class Licenses { $this->html .= $this->outputOption( $this->msg( $key ), array( - 'value' => '' + 'value' => '', + 'disabled' => 'disabled', ), $depth ); @@ -108,7 +111,8 @@ class Licenses { $this->html .= $this->outputOption( $this->msg( $val->text ), array( - 'value' => $val->template + 'value' => $val->template, + 'title' => $val->template ), $depth ); @@ -116,7 +120,7 @@ class Licenses { } function outputOption( $val, $attribs = null, $depth ) { - $val = str_repeat( /*   */ "\xc2\xa0", $depth ) . $val; + $val = str_repeat( /*   */ "\xc2\xa0", $depth * 2 ) . $val; return str_repeat( "\t", $depth ) . wfElement( 'option', $attribs, $val ) . "\n"; } -- 2.20.1