r10832 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r10831‎ | r10832 | r10833 >
Date:20:24, 29 August 2005
Author:avar
Status:old
Tags:
Comment:
* disabled="disabled" attribute for headers
* title="" attribute for items
* increased indent level
* avoiding warning on "*\n" input
Modified paths:
  • /trunk/phase3/includes/Licenses.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Licenses.php
@@ -86,9 +86,11 @@
8787 function makeIndexes( $arr ) {
8888 $str = '';
8989
 90+ wfSuppressWarnings();
9091 foreach ( $arr as $item )
9192 $str .= '["' . addslashes( $item ) . '"]';
9293
 94+ wfRestoreWarnings();
9395 return $str;
9496 }
9597
@@ -99,7 +101,8 @@
100102 $this->html .= $this->outputOption(
101103 $this->msg( $key ),
102104 array(
103 - 'value' => ''
 105+ 'value' => '',
 106+ 'disabled' => 'disabled',
104107 ),
105108 $depth
106109 );
@@ -108,7 +111,8 @@
109112 $this->html .= $this->outputOption(
110113 $this->msg( $val->text ),
111114 array(
112 - 'value' => $val->template
 115+ 'value' => $val->template,
 116+ 'title' => $val->template
113117 ),
114118 $depth
115119 );
@@ -116,7 +120,7 @@
117121 }
118122
119123 function outputOption( $val, $attribs = null, $depth ) {
120 - $val = str_repeat( /* &nbsp */ "\xc2\xa0", $depth ) . $val;
 124+ $val = str_repeat( /* &nbsp */ "\xc2\xa0", $depth * 2 ) . $val;
121125 return str_repeat( "\t", $depth ) . wfElement( 'option', $attribs, $val ) . "\n";
122126 }
123127

Status & tagging log