Merge "Http::getProxy() method to get proxy configuration"
[lhc/web/wiklou.git] / includes / skins / BaseTemplate.php
1 <?php
2 /**
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 * http://www.gnu.org/copyleft/gpl.html
17 *
18 * @file
19 */
20
21 /**
22 * New base template for a skin's template extended from QuickTemplate
23 * this class features helper methods that provide common ways of interacting
24 * with the data stored in the QuickTemplate
25 */
26 abstract class BaseTemplate extends QuickTemplate {
27
28 /**
29 * Get a Message object with its context set
30 *
31 * @param string $name Message name
32 * @return Message
33 */
34 public function getMsg( $name ) {
35 return $this->getSkin()->msg( $name );
36 }
37
38 function msg( $str ) {
39 echo $this->getMsg( $str )->escaped();
40 }
41
42 function msgHtml( $str ) {
43 echo $this->getMsg( $str )->text();
44 }
45
46 function msgWiki( $str ) {
47 echo $this->getMsg( $str )->parseAsBlock();
48 }
49
50 /**
51 * Create an array of common toolbox items from the data in the quicktemplate
52 * stored by SkinTemplate.
53 * The resulting array is built according to a format intended to be passed
54 * through makeListItem to generate the html.
55 * @return array
56 */
57 function getToolbox() {
58
59 $toolbox = [];
60 if ( isset( $this->data['nav_urls']['whatlinkshere'] )
61 && $this->data['nav_urls']['whatlinkshere']
62 ) {
63 $toolbox['whatlinkshere'] = $this->data['nav_urls']['whatlinkshere'];
64 $toolbox['whatlinkshere']['id'] = 't-whatlinkshere';
65 }
66 if ( isset( $this->data['nav_urls']['recentchangeslinked'] )
67 && $this->data['nav_urls']['recentchangeslinked']
68 ) {
69 $toolbox['recentchangeslinked'] = $this->data['nav_urls']['recentchangeslinked'];
70 $toolbox['recentchangeslinked']['msg'] = 'recentchangeslinked-toolbox';
71 $toolbox['recentchangeslinked']['id'] = 't-recentchangeslinked';
72 }
73 if ( isset( $this->data['feeds'] ) && $this->data['feeds'] ) {
74 $toolbox['feeds']['id'] = 'feedlinks';
75 $toolbox['feeds']['links'] = [];
76 foreach ( $this->data['feeds'] as $key => $feed ) {
77 $toolbox['feeds']['links'][$key] = $feed;
78 $toolbox['feeds']['links'][$key]['id'] = "feed-$key";
79 $toolbox['feeds']['links'][$key]['rel'] = 'alternate';
80 $toolbox['feeds']['links'][$key]['type'] = "application/{$key}+xml";
81 $toolbox['feeds']['links'][$key]['class'] = 'feedlink';
82 }
83 }
84 foreach ( [ 'contributions', 'log', 'blockip', 'emailuser',
85 'userrights', 'upload', 'specialpages' ] as $special
86 ) {
87 if ( isset( $this->data['nav_urls'][$special] ) && $this->data['nav_urls'][$special] ) {
88 $toolbox[$special] = $this->data['nav_urls'][$special];
89 $toolbox[$special]['id'] = "t-$special";
90 }
91 }
92 if ( isset( $this->data['nav_urls']['print'] ) && $this->data['nav_urls']['print'] ) {
93 $toolbox['print'] = $this->data['nav_urls']['print'];
94 $toolbox['print']['id'] = 't-print';
95 $toolbox['print']['rel'] = 'alternate';
96 $toolbox['print']['msg'] = 'printableversion';
97 }
98 if ( isset( $this->data['nav_urls']['permalink'] ) && $this->data['nav_urls']['permalink'] ) {
99 $toolbox['permalink'] = $this->data['nav_urls']['permalink'];
100 if ( $toolbox['permalink']['href'] === '' ) {
101 unset( $toolbox['permalink']['href'] );
102 $toolbox['ispermalink']['tooltiponly'] = true;
103 $toolbox['ispermalink']['id'] = 't-ispermalink';
104 $toolbox['ispermalink']['msg'] = 'permalink';
105 } else {
106 $toolbox['permalink']['id'] = 't-permalink';
107 }
108 }
109 if ( isset( $this->data['nav_urls']['info'] ) && $this->data['nav_urls']['info'] ) {
110 $toolbox['info'] = $this->data['nav_urls']['info'];
111 $toolbox['info']['id'] = 't-info';
112 }
113
114 Hooks::run( 'BaseTemplateToolbox', [ &$this, &$toolbox ] );
115 return $toolbox;
116 }
117
118 /**
119 * Create an array of personal tools items from the data in the quicktemplate
120 * stored by SkinTemplate.
121 * The resulting array is built according to a format intended to be passed
122 * through makeListItem to generate the html.
123 * This is in reality the same list as already stored in personal_urls
124 * however it is reformatted so that you can just pass the individual items
125 * to makeListItem instead of hardcoding the element creation boilerplate.
126 * @return array
127 */
128 function getPersonalTools() {
129 $personal_tools = [];
130 foreach ( $this->get( 'personal_urls' ) as $key => $plink ) {
131 # The class on a personal_urls item is meant to go on the <a> instead
132 # of the <li> so we have to use a single item "links" array instead
133 # of using most of the personal_url's keys directly.
134 $ptool = [
135 'links' => [
136 [ 'single-id' => "pt-$key" ],
137 ],
138 'id' => "pt-$key",
139 ];
140 if ( isset( $plink['active'] ) ) {
141 $ptool['active'] = $plink['active'];
142 }
143 foreach ( [ 'href', 'class', 'text', 'dir' ] as $k ) {
144 if ( isset( $plink[$k] ) ) {
145 $ptool['links'][0][$k] = $plink[$k];
146 }
147 }
148 $personal_tools[$key] = $ptool;
149 }
150 return $personal_tools;
151 }
152
153 function getSidebar( $options = [] ) {
154 // Force the rendering of the following portals
155 $sidebar = $this->data['sidebar'];
156 if ( !isset( $sidebar['SEARCH'] ) ) {
157 $sidebar['SEARCH'] = true;
158 }
159 if ( !isset( $sidebar['TOOLBOX'] ) ) {
160 $sidebar['TOOLBOX'] = true;
161 }
162 if ( !isset( $sidebar['LANGUAGES'] ) ) {
163 $sidebar['LANGUAGES'] = true;
164 }
165
166 if ( !isset( $options['search'] ) || $options['search'] !== true ) {
167 unset( $sidebar['SEARCH'] );
168 }
169 if ( isset( $options['toolbox'] ) && $options['toolbox'] === false ) {
170 unset( $sidebar['TOOLBOX'] );
171 }
172 if ( isset( $options['languages'] ) && $options['languages'] === false ) {
173 unset( $sidebar['LANGUAGES'] );
174 }
175
176 $boxes = [];
177 foreach ( $sidebar as $boxName => $content ) {
178 if ( $content === false ) {
179 continue;
180 }
181 switch ( $boxName ) {
182 case 'SEARCH':
183 // Search is a special case, skins should custom implement this
184 $boxes[$boxName] = [
185 'id' => 'p-search',
186 'header' => $this->getMsg( 'search' )->text(),
187 'generated' => false,
188 'content' => true,
189 ];
190 break;
191 case 'TOOLBOX':
192 $msgObj = $this->getMsg( 'toolbox' );
193 $boxes[$boxName] = [
194 'id' => 'p-tb',
195 'header' => $msgObj->exists() ? $msgObj->text() : 'toolbox',
196 'generated' => false,
197 'content' => $this->getToolbox(),
198 ];
199 break;
200 case 'LANGUAGES':
201 if ( $this->data['language_urls'] ) {
202 $msgObj = $this->getMsg( 'otherlanguages' );
203 $boxes[$boxName] = [
204 'id' => 'p-lang',
205 'header' => $msgObj->exists() ? $msgObj->text() : 'otherlanguages',
206 'generated' => false,
207 'content' => $this->data['language_urls'],
208 ];
209 }
210 break;
211 default:
212 $msgObj = $this->getMsg( $boxName );
213 $boxes[$boxName] = [
214 'id' => "p-$boxName",
215 'header' => $msgObj->exists() ? $msgObj->text() : $boxName,
216 'generated' => true,
217 'content' => $content,
218 ];
219 break;
220 }
221 }
222
223 // HACK: Compatibility with extensions still using SkinTemplateToolboxEnd
224 $hookContents = null;
225 if ( isset( $boxes['TOOLBOX'] ) ) {
226 ob_start();
227 // We pass an extra 'true' at the end so extensions using BaseTemplateToolbox
228 // can abort and avoid outputting double toolbox links
229 Hooks::run( 'SkinTemplateToolboxEnd', [ &$this, true ] );
230 $hookContents = ob_get_contents();
231 ob_end_clean();
232 if ( !trim( $hookContents ) ) {
233 $hookContents = null;
234 }
235 }
236 // END hack
237
238 if ( isset( $options['htmlOnly'] ) && $options['htmlOnly'] === true ) {
239 foreach ( $boxes as $boxName => $box ) {
240 if ( is_array( $box['content'] ) ) {
241 $content = '<ul>';
242 foreach ( $box['content'] as $key => $val ) {
243 $content .= "\n " . $this->makeListItem( $key, $val );
244 }
245 // HACK, shove the toolbox end onto the toolbox if we're rendering itself
246 if ( $hookContents ) {
247 $content .= "\n $hookContents";
248 }
249 // END hack
250 $content .= "\n</ul>\n";
251 $boxes[$boxName]['content'] = $content;
252 }
253 }
254 } else {
255 if ( $hookContents ) {
256 $boxes['TOOLBOXEND'] = [
257 'id' => 'p-toolboxend',
258 'header' => $boxes['TOOLBOX']['header'],
259 'generated' => false,
260 'content' => "<ul>{$hookContents}</ul>",
261 ];
262 // HACK: Make sure that TOOLBOXEND is sorted next to TOOLBOX
263 $boxes2 = [];
264 foreach ( $boxes as $key => $box ) {
265 if ( $key === 'TOOLBOXEND' ) {
266 continue;
267 }
268 $boxes2[$key] = $box;
269 if ( $key === 'TOOLBOX' ) {
270 $boxes2['TOOLBOXEND'] = $boxes['TOOLBOXEND'];
271 }
272 }
273 $boxes = $boxes2;
274 // END hack
275 }
276 }
277
278 return $boxes;
279 }
280
281 /**
282 * @param string $name
283 */
284 protected function renderAfterPortlet( $name ) {
285 $content = '';
286 Hooks::run( 'BaseTemplateAfterPortlet', [ $this, $name, &$content ] );
287
288 if ( $content !== '' ) {
289 echo "<div class='after-portlet after-portlet-$name'>$content</div>";
290 }
291
292 }
293
294 /**
295 * Makes a link, usually used by makeListItem to generate a link for an item
296 * in a list used in navigation lists, portlets, portals, sidebars, etc...
297 *
298 * @param string $key Usually a key from the list you are generating this
299 * link from.
300 * @param array $item Contains some of a specific set of keys.
301 *
302 * The text of the link will be generated either from the contents of the
303 * "text" key in the $item array, if a "msg" key is present a message by
304 * that name will be used, and if neither of those are set the $key will be
305 * used as a message name.
306 *
307 * If a "href" key is not present makeLink will just output htmlescaped text.
308 * The "href", "id", "class", "rel", and "type" keys are used as attributes
309 * for the link if present.
310 *
311 * If an "id" or "single-id" (if you don't want the actual id to be output
312 * on the link) is present it will be used to generate a tooltip and
313 * accesskey for the link.
314 *
315 * The keys "context" and "primary" are ignored; these keys are used
316 * internally by skins and are not supposed to be included in the HTML
317 * output.
318 *
319 * If you don't want an accesskey, set $item['tooltiponly'] = true;
320 *
321 * @param array $options Can be used to affect the output of a link.
322 * Possible options are:
323 * - 'text-wrapper' key to specify a list of elements to wrap the text of
324 * a link in. This should be an array of arrays containing a 'tag' and
325 * optionally an 'attributes' key. If you only have one element you don't
326 * need to wrap it in another array. eg: To use <a><span>...</span></a>
327 * in all links use array( 'text-wrapper' => array( 'tag' => 'span' ) )
328 * for your options.
329 * - 'link-class' key can be used to specify additional classes to apply
330 * to all links.
331 * - 'link-fallback' can be used to specify a tag to use instead of "<a>"
332 * if there is no link. eg: If you specify 'link-fallback' => 'span' than
333 * any non-link will output a "<span>" instead of just text.
334 *
335 * @return string
336 */
337 function makeLink( $key, $item, $options = [] ) {
338 if ( isset( $item['text'] ) ) {
339 $text = $item['text'];
340 } else {
341 $text = $this->translator->translate( isset( $item['msg'] ) ? $item['msg'] : $key );
342 }
343
344 $html = htmlspecialchars( $text );
345
346 if ( isset( $options['text-wrapper'] ) ) {
347 $wrapper = $options['text-wrapper'];
348 if ( isset( $wrapper['tag'] ) ) {
349 $wrapper = [ $wrapper ];
350 }
351 while ( count( $wrapper ) > 0 ) {
352 $element = array_pop( $wrapper );
353 $html = Html::rawElement( $element['tag'], isset( $element['attributes'] )
354 ? $element['attributes']
355 : null, $html );
356 }
357 }
358
359 if ( isset( $item['href'] ) || isset( $options['link-fallback'] ) ) {
360 $attrs = $item;
361 foreach ( [ 'single-id', 'text', 'msg', 'tooltiponly', 'context', 'primary',
362 'tooltip-params' ] as $k ) {
363 unset( $attrs[$k] );
364 }
365
366 if ( isset( $item['id'] ) && !isset( $item['single-id'] ) ) {
367 $item['single-id'] = $item['id'];
368 }
369
370 $tooltipParams = [];
371 if ( isset( $item['tooltip-params'] ) ) {
372 $tooltipParams = $item['tooltip-params'];
373 }
374
375 if ( isset( $item['single-id'] ) ) {
376 if ( isset( $item['tooltiponly'] ) && $item['tooltiponly'] ) {
377 $title = Linker::titleAttrib( $item['single-id'], null, $tooltipParams );
378 if ( $title !== false ) {
379 $attrs['title'] = $title;
380 }
381 } else {
382 $tip = Linker::tooltipAndAccesskeyAttribs( $item['single-id'], $tooltipParams );
383 if ( isset( $tip['title'] ) && $tip['title'] !== false ) {
384 $attrs['title'] = $tip['title'];
385 }
386 if ( isset( $tip['accesskey'] ) && $tip['accesskey'] !== false ) {
387 $attrs['accesskey'] = $tip['accesskey'];
388 }
389 }
390 }
391 if ( isset( $options['link-class'] ) ) {
392 if ( isset( $attrs['class'] ) ) {
393 $attrs['class'] .= " {$options['link-class']}";
394 } else {
395 $attrs['class'] = $options['link-class'];
396 }
397 }
398 $html = Html::rawElement( isset( $attrs['href'] )
399 ? 'a'
400 : $options['link-fallback'], $attrs, $html );
401 }
402
403 return $html;
404 }
405
406 /**
407 * Generates a list item for a navigation, portlet, portal, sidebar... list
408 *
409 * @param string $key Usually a key from the list you are generating this link from.
410 * @param array $item Array of list item data containing some of a specific set of keys.
411 * The "id", "class" and "itemtitle" keys will be used as attributes for the list item,
412 * if "active" contains a value of true a "active" class will also be appended to class.
413 *
414 * @param array $options
415 *
416 * If you want something other than a "<li>" you can pass a tag name such as
417 * "tag" => "span" in the $options array to change the tag used.
418 * link/content data for the list item may come in one of two forms
419 * A "links" key may be used, in which case it should contain an array with
420 * a list of links to include inside the list item, see makeLink for the
421 * format of individual links array items.
422 *
423 * Otherwise the relevant keys from the list item $item array will be passed
424 * to makeLink instead. Note however that "id" and "class" are used by the
425 * list item directly so they will not be passed to makeLink
426 * (however the link will still support a tooltip and accesskey from it)
427 * If you need an id or class on a single link you should include a "links"
428 * array with just one link item inside of it. If you want to add a title
429 * to the list item itself, you can set "itemtitle" to the value.
430 * $options is also passed on to makeLink calls
431 *
432 * @return string
433 */
434 function makeListItem( $key, $item, $options = [] ) {
435 if ( isset( $item['links'] ) ) {
436 $links = [];
437 foreach ( $item['links'] as $linkKey => $link ) {
438 $links[] = $this->makeLink( $linkKey, $link, $options );
439 }
440 $html = implode( ' ', $links );
441 } else {
442 $link = $item;
443 // These keys are used by makeListItem and shouldn't be passed on to the link
444 foreach ( [ 'id', 'class', 'active', 'tag', 'itemtitle' ] as $k ) {
445 unset( $link[$k] );
446 }
447 if ( isset( $item['id'] ) && !isset( $item['single-id'] ) ) {
448 // The id goes on the <li> not on the <a> for single links
449 // but makeSidebarLink still needs to know what id to use when
450 // generating tooltips and accesskeys.
451 $link['single-id'] = $item['id'];
452 }
453 $html = $this->makeLink( $key, $link, $options );
454 }
455
456 $attrs = [];
457 foreach ( [ 'id', 'class' ] as $attr ) {
458 if ( isset( $item[$attr] ) ) {
459 $attrs[$attr] = $item[$attr];
460 }
461 }
462 if ( isset( $item['active'] ) && $item['active'] ) {
463 if ( !isset( $attrs['class'] ) ) {
464 $attrs['class'] = '';
465 }
466 $attrs['class'] .= ' active';
467 $attrs['class'] = trim( $attrs['class'] );
468 }
469 if ( isset( $item['itemtitle'] ) ) {
470 $attrs['title'] = $item['itemtitle'];
471 }
472 return Html::rawElement( isset( $options['tag'] ) ? $options['tag'] : 'li', $attrs, $html );
473 }
474
475 function makeSearchInput( $attrs = [] ) {
476 $realAttrs = [
477 'type' => 'search',
478 'name' => 'search',
479 'placeholder' => wfMessage( 'searchsuggest-search' )->text(),
480 'value' => $this->get( 'search', '' ),
481 ];
482 $realAttrs = array_merge( $realAttrs, Linker::tooltipAndAccesskeyAttribs( 'search' ), $attrs );
483 return Html::element( 'input', $realAttrs );
484 }
485
486 function makeSearchButton( $mode, $attrs = [] ) {
487 switch ( $mode ) {
488 case 'go':
489 case 'fulltext':
490 $realAttrs = [
491 'type' => 'submit',
492 'name' => $mode,
493 'value' => $this->translator->translate(
494 $mode == 'go' ? 'searcharticle' : 'searchbutton' ),
495 ];
496 $realAttrs = array_merge(
497 $realAttrs,
498 Linker::tooltipAndAccesskeyAttribs( "search-$mode" ),
499 $attrs
500 );
501 return Html::element( 'input', $realAttrs );
502 case 'image':
503 $buttonAttrs = [
504 'type' => 'submit',
505 'name' => 'button',
506 ];
507 $buttonAttrs = array_merge(
508 $buttonAttrs,
509 Linker::tooltipAndAccesskeyAttribs( 'search-fulltext' ),
510 $attrs
511 );
512 unset( $buttonAttrs['src'] );
513 unset( $buttonAttrs['alt'] );
514 unset( $buttonAttrs['width'] );
515 unset( $buttonAttrs['height'] );
516 $imgAttrs = [
517 'src' => $attrs['src'],
518 'alt' => isset( $attrs['alt'] )
519 ? $attrs['alt']
520 : $this->translator->translate( 'searchbutton' ),
521 'width' => isset( $attrs['width'] ) ? $attrs['width'] : null,
522 'height' => isset( $attrs['height'] ) ? $attrs['height'] : null,
523 ];
524 return Html::rawElement( 'button', $buttonAttrs, Html::element( 'img', $imgAttrs ) );
525 default:
526 throw new MWException( 'Unknown mode passed to BaseTemplate::makeSearchButton' );
527 }
528 }
529
530 /**
531 * Returns an array of footerlinks trimmed down to only those footer links that
532 * are valid.
533 * If you pass "flat" as an option then the returned array will be a flat array
534 * of footer icons instead of a key/value array of footerlinks arrays broken
535 * up into categories.
536 * @param string $option
537 * @return array|mixed
538 */
539 function getFooterLinks( $option = null ) {
540 $footerlinks = $this->get( 'footerlinks' );
541
542 // Reduce footer links down to only those which are being used
543 $validFooterLinks = [];
544 foreach ( $footerlinks as $category => $links ) {
545 $validFooterLinks[$category] = [];
546 foreach ( $links as $link ) {
547 if ( isset( $this->data[$link] ) && $this->data[$link] ) {
548 $validFooterLinks[$category][] = $link;
549 }
550 }
551 if ( count( $validFooterLinks[$category] ) <= 0 ) {
552 unset( $validFooterLinks[$category] );
553 }
554 }
555
556 if ( $option == 'flat' ) {
557 // fold footerlinks into a single array using a bit of trickery
558 $validFooterLinks = call_user_func_array(
559 'array_merge',
560 array_values( $validFooterLinks )
561 );
562 }
563
564 return $validFooterLinks;
565 }
566
567 /**
568 * Returns an array of footer icons filtered down by options relevant to how
569 * the skin wishes to display them.
570 * If you pass "icononly" as the option all footer icons which do not have an
571 * image icon set will be filtered out.
572 * If you pass "nocopyright" then MediaWiki's copyright icon will not be included
573 * in the list of footer icons. This is mostly useful for skins which only
574 * display the text from footericons instead of the images and don't want a
575 * duplicate copyright statement because footerlinks already rendered one.
576 * @param string $option
577 * @return array
578 */
579 function getFooterIcons( $option = null ) {
580 // Generate additional footer icons
581 $footericons = $this->get( 'footericons' );
582
583 if ( $option == 'icononly' ) {
584 // Unset any icons which don't have an image
585 foreach ( $footericons as &$footerIconsBlock ) {
586 foreach ( $footerIconsBlock as $footerIconKey => $footerIcon ) {
587 if ( !is_string( $footerIcon ) && !isset( $footerIcon['src'] ) ) {
588 unset( $footerIconsBlock[$footerIconKey] );
589 }
590 }
591 }
592 // Redo removal of any empty blocks
593 foreach ( $footericons as $footerIconsKey => &$footerIconsBlock ) {
594 if ( count( $footerIconsBlock ) <= 0 ) {
595 unset( $footericons[$footerIconsKey] );
596 }
597 }
598 } elseif ( $option == 'nocopyright' ) {
599 unset( $footericons['copyright']['copyright'] );
600 if ( count( $footericons['copyright'] ) <= 0 ) {
601 unset( $footericons['copyright'] );
602 }
603 }
604
605 return $footericons;
606 }
607
608 /**
609 * Get the suggested HTML for page status indicators: icons (or short text snippets) usually
610 * displayed in the top-right corner of the page, outside of the main content.
611 *
612 * Your skin may implement this differently, for example by handling some indicator names
613 * specially with a different UI. However, it is recommended to use a `<div class="mw-indicator"
614 * id="mw-indicator-<id>" />` as a wrapper element for each indicator, for better compatibility
615 * with extensions and user scripts.
616 *
617 * The raw data is available in `$this->data['indicators']` as an associative array (keys:
618 * identifiers, values: contents) internally ordered by keys.
619 *
620 * @return string HTML
621 * @since 1.25
622 */
623 public function getIndicators() {
624 $out = "<div class=\"mw-indicators\">\n";
625 foreach ( $this->data['indicators'] as $id => $content ) {
626 $out .= Html::rawElement(
627 'div',
628 [
629 'id' => Sanitizer::escapeId( "mw-indicator-$id" ),
630 'class' => 'mw-indicator',
631 ],
632 $content
633 ) . "\n";
634 }
635 $out .= "</div>\n";
636 return $out;
637 }
638
639 /**
640 * Output the basic end-page trail including bottomscripts, reporttime, and
641 * debug stuff. This should be called right before outputting the closing
642 * body and html tags.
643 */
644 function printTrail() {
645 ?>
646 <?php echo MWDebug::getDebugHTML( $this->getSkin()->getContext() ); ?>
647 <?php $this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?>
648 <?php $this->html( 'reporttime' ) ?>
649 <?php
650 }
651 }