From: Ævar Arnfjörð Bjarmason Date: Mon, 29 Aug 2005 20:24:57 +0000 (+0000) Subject: * disabled="disabled" attribute for headers X-Git-Tag: 1.6.0~1758 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=1dbcaf54116967929ab01e7c184c9fa7cd21a484;p=lhc%2Fweb%2Fwiklou.git * disabled="disabled" attribute for headers * title="" attribute for items * increased indent level * avoiding warning on "*\n" input --- 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"; }