Index: trunk/extensions/CentralNotice/special/SpecialBannerAllocation.php |
— | — | @@ -47,37 +47,37 @@ |
48 | 48 | CentralNotice::printHeader(); |
49 | 49 | |
50 | 50 | // Begin Banners tab content |
51 | | - $wgOut->addHTML( Xml::openElement( 'div', array( 'id' => 'preferences' ) ) ); |
| 51 | + $wgOut->addHTML( Html::openElement( 'div', array( 'id' => 'preferences' ) ) ); |
52 | 52 | |
53 | 53 | $htmlOut = ''; |
54 | 54 | |
55 | 55 | // Begin Allocation selection fieldset |
56 | | - $htmlOut .= Xml::openElement( 'fieldset', array( 'class' => 'prefsection' ) ); |
| 56 | + $htmlOut .= Html::openElement( 'fieldset', array( 'class' => 'prefsection' ) ); |
57 | 57 | |
58 | | - $htmlOut .= Xml::openElement( 'form', array( 'method' => 'get' ) ); |
59 | | - $htmlOut .= Xml::element( 'h2', null, wfMsg( 'centralnotice-view-allocation' ) ); |
| 58 | + $htmlOut .= Html::openElement( 'form', array( 'method' => 'get' ) ); |
| 59 | + $htmlOut .= Html::element( 'h2', null, wfMsg( 'centralnotice-view-allocation' ) ); |
60 | 60 | $htmlOut .= Xml::tags( 'p', null, wfMsg( 'centralnotice-allocation-instructions' ) ); |
61 | 61 | |
62 | | - $htmlOut .= Xml::openElement( 'table', array ( 'id' => 'envpicker', 'cellpadding' => 7 ) ); |
63 | | - $htmlOut .= Xml::openElement( 'tr' ); |
| 62 | + $htmlOut .= Html::openElement( 'table', array ( 'id' => 'envpicker', 'cellpadding' => 7 ) ); |
| 63 | + $htmlOut .= Html::openElement( 'tr' ); |
64 | 64 | $htmlOut .= Xml::tags( 'td', |
65 | 65 | array( 'style' => 'width: 20%;' ), |
66 | 66 | wfMsg( 'centralnotice-project-name' ) ); |
67 | | - $htmlOut .= Xml::openElement( 'td' ); |
68 | | - $htmlOut .= Xml::openElement( 'select', array( 'name' => 'project' ) ); |
| 67 | + $htmlOut .= Html::openElement( 'td' ); |
| 68 | + $htmlOut .= Html::openElement( 'select', array( 'name' => 'project' ) ); |
69 | 69 | |
70 | 70 | foreach ( $wgNoticeProjects as $value ) { |
71 | 71 | $htmlOut .= Xml::option( $value, $value, $value === $this->project ); |
72 | 72 | } |
73 | 73 | |
74 | | - $htmlOut .= Xml::closeElement( 'select' ); |
75 | | - $htmlOut .= Xml::closeElement( 'td' ); |
76 | | - $htmlOut .= Xml::closeElement( 'tr' ); |
77 | | - $htmlOut .= Xml::openElement( 'tr' ); |
| 74 | + $htmlOut .= Html::closeElement( 'select' ); |
| 75 | + $htmlOut .= Html::closeElement( 'td' ); |
| 76 | + $htmlOut .= Html::closeElement( 'tr' ); |
| 77 | + $htmlOut .= Html::openElement( 'tr' ); |
78 | 78 | $htmlOut .= Xml::tags( 'td', |
79 | 79 | array( 'valign' => 'top' ), |
80 | 80 | wfMsg( 'centralnotice-project-lang' ) ); |
81 | | - $htmlOut .= Xml::openElement( 'td' ); |
| 81 | + $htmlOut .= Html::openElement( 'td' ); |
82 | 82 | |
83 | 83 | // Make sure the site language is in the list; a custom language code |
84 | 84 | // might not have a defined name... |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | } |
89 | 89 | |
90 | 90 | ksort( $languages ); |
91 | | - $htmlOut .= Xml::openElement( 'select', array( 'name' => 'language' ) ); |
| 91 | + $htmlOut .= Html::openElement( 'select', array( 'name' => 'language' ) ); |
92 | 92 | |
93 | 93 | foreach( $languages as $code => $name ) { |
94 | 94 | $htmlOut .= Xml::option( |
— | — | @@ -95,34 +95,34 @@ |
96 | 96 | $code, $code === $this->language ); |
97 | 97 | } |
98 | 98 | |
99 | | - $htmlOut .= Xml::closeElement( 'select' ); |
100 | | - $htmlOut .= Xml::closeElement( 'td' ); |
101 | | - $htmlOut .= Xml::closeElement( 'tr' ); |
102 | | - $htmlOut .= Xml::openElement( 'tr' ); |
| 99 | + $htmlOut .= Html::closeElement( 'select' ); |
| 100 | + $htmlOut .= Html::closeElement( 'td' ); |
| 101 | + $htmlOut .= Html::closeElement( 'tr' ); |
| 102 | + $htmlOut .= Html::openElement( 'tr' ); |
103 | 103 | $htmlOut .= Xml::tags( 'td', array(), wfMsg( 'centralnotice-country' ) ); |
104 | | - $htmlOut .= Xml::openElement( 'td' ); |
| 104 | + $htmlOut .= Html::openElement( 'td' ); |
105 | 105 | |
106 | 106 | $countries = CentralNoticeDB::getCountriesList(); |
107 | 107 | |
108 | | - $htmlOut .= Xml::openElement( 'select', array( 'name' => 'country' ) ); |
| 108 | + $htmlOut .= Html::openElement( 'select', array( 'name' => 'country' ) ); |
109 | 109 | |
110 | 110 | foreach( $countries as $code => $name ) { |
111 | 111 | $htmlOut .= Xml::option( $name, $code, $code === $this->location ); |
112 | 112 | } |
113 | 113 | |
114 | | - $htmlOut .= Xml::closeElement( 'select' ); |
115 | | - $htmlOut .= Xml::closeElement( 'td' ); |
116 | | - $htmlOut .= Xml::closeElement( 'tr' ); |
117 | | - $htmlOut .= Xml::closeElement( 'table' ); |
| 114 | + $htmlOut .= Html::closeElement( 'select' ); |
| 115 | + $htmlOut .= Html::closeElement( 'td' ); |
| 116 | + $htmlOut .= Html::closeElement( 'tr' ); |
| 117 | + $htmlOut .= Html::closeElement( 'table' ); |
118 | 118 | |
119 | 119 | $htmlOut .= Xml::tags( 'div', |
120 | 120 | array( 'class' => 'cn-buttons' ), |
121 | 121 | Xml::submitButton( wfMsg( 'centralnotice-modify' ) ) |
122 | 122 | ); |
123 | | - $htmlOut .= Xml::closeElement( 'form' ); |
| 123 | + $htmlOut .= Html::closeElement( 'form' ); |
124 | 124 | |
125 | 125 | // End Allocation selection fieldset |
126 | | - $htmlOut .= Xml::closeElement( 'fieldset' ); |
| 126 | + $htmlOut .= Html::closeElement( 'fieldset' ); |
127 | 127 | |
128 | 128 | $wgOut->addHTML( $htmlOut ); |
129 | 129 | |
— | — | @@ -132,7 +132,7 @@ |
133 | 133 | } |
134 | 134 | |
135 | 135 | // End Banners tab content |
136 | | - $wgOut->addHTML( Xml::closeElement( 'div' ) ); |
| 136 | + $wgOut->addHTML( Html::closeElement( 'div' ) ); |
137 | 137 | } |
138 | 138 | |
139 | 139 | /** |
— | — | @@ -145,7 +145,7 @@ |
146 | 146 | $htmlOut = ''; |
147 | 147 | |
148 | 148 | // Begin Allocation list fieldset |
149 | | - $htmlOut .= Xml::openElement( 'fieldset', array( 'class' => 'prefsection' ) ); |
| 149 | + $htmlOut .= Html::openElement( 'fieldset', array( 'class' => 'prefsection' ) ); |
150 | 150 | |
151 | 151 | $bannerLister = new SpecialBannerListLoader(); |
152 | 152 | $bannerLister->project = $wgRequest->getVal( 'project' ); |
— | — | @@ -193,7 +193,7 @@ |
194 | 194 | } |
195 | 195 | |
196 | 196 | // End Allocation list fieldset |
197 | | - $htmlOut .= Xml::closeElement( 'fieldset' ); |
| 197 | + $htmlOut .= Html::closeElement( 'fieldset' ); |
198 | 198 | |
199 | 199 | $wgOut->addHTML( $htmlOut ); |
200 | 200 | } |
— | — | @@ -205,27 +205,27 @@ |
206 | 206 | $viewBanner = $this->getTitleFor( 'NoticeTemplate', 'view' ); |
207 | 207 | $viewCampaign = $this->getTitleFor( 'CentralNotice' ); |
208 | 208 | |
209 | | - $htmlOut = Xml::openElement( 'table', |
| 209 | + $htmlOut = Html::openElement( 'table', |
210 | 210 | array ( 'cellpadding' => 9, 'class' => 'wikitable sortable', 'style' => 'margin: 1em;' ) |
211 | 211 | ); |
212 | | - $htmlOut .= Xml::element( 'caption', array( 'style' => 'font-size: 1.2em;' ), $type ); |
213 | | - $htmlOut .= Xml::openElement( 'tr' ); |
214 | | - $htmlOut .= Xml::element( 'th', array( 'width' => '20%' ), |
| 212 | + $htmlOut .= Html::element( 'caption', array( 'style' => 'font-size: 1.2em;' ), $type ); |
| 213 | + $htmlOut .= Html::openElement( 'tr' ); |
| 214 | + $htmlOut .= Html::element( 'th', array( 'width' => '20%' ), |
215 | 215 | wfMsg ( 'centralnotice-percentage' ) ); |
216 | | - $htmlOut .= Xml::element( 'th', array( 'width' => '30%' ), |
| 216 | + $htmlOut .= Html::element( 'th', array( 'width' => '30%' ), |
217 | 217 | wfMsg ( 'centralnotice-banner' ) ); |
218 | | - $htmlOut .= Xml::element( 'th', array( 'width' => '30%' ), |
| 218 | + $htmlOut .= Html::element( 'th', array( 'width' => '30%' ), |
219 | 219 | wfMsg ( 'centralnotice-notice' ) ); |
220 | | - $htmlOut .= Xml::closeElement( 'tr' ); |
| 220 | + $htmlOut .= Html::closeElement( 'tr' ); |
221 | 221 | |
222 | 222 | foreach ( $banners as $banner ) { |
223 | | - $htmlOut .= Xml::openElement( 'tr' ); |
224 | | - $htmlOut .= Xml::openElement( 'td' ); |
| 223 | + $htmlOut .= Html::openElement( 'tr' ); |
| 224 | + $htmlOut .= Html::openElement( 'td' ); |
225 | 225 | |
226 | 226 | $percentage = round( ( $banner['weight'] / $weight ) * 100, 2 ); |
227 | 227 | |
228 | 228 | $htmlOut .= wfMsg ( 'percent', $wgLang->formatNum( $percentage ) ); |
229 | | - $htmlOut .= Xml::closeElement( 'td' ); |
| 229 | + $htmlOut .= Html::closeElement( 'td' ); |
230 | 230 | $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ), |
231 | 231 | |
232 | 232 | $sk->makeLinkObj( $viewBanner, htmlspecialchars( $banner['name'] ), |
— | — | @@ -238,10 +238,10 @@ |
239 | 239 | 'method=listNoticeDetail¬ice=' . urlencode( $banner['campaign'] ) ) |
240 | 240 | ); |
241 | 241 | |
242 | | - $htmlOut .= Xml::closeElement( 'tr' ); |
| 242 | + $htmlOut .= Html::closeElement( 'tr' ); |
243 | 243 | } |
244 | 244 | |
245 | | - $htmlOut .= Xml::closeElement( 'table' ); |
| 245 | + $htmlOut .= Html::closeElement( 'table' ); |
246 | 246 | |
247 | 247 | return $htmlOut; |
248 | 248 | } |