r19063 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r19062‎ | r19063 | r19064 >
Date:15:23, 10 January 2007
Author:leon
Status:old
Tags:
Comment:
* Added SkinTemplateOutputPageBeforeExec hook before SkinTemplate::outputPage()
starts page output (http://lists.wikimedia.org/pipermail/wikitech-l/2007-January/028554.html)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -436,6 +436,10 @@
437437 &$siteNotice: HTML sitenotice
438438 Alter the contents of $siteNotice to add to/alter the sitenotice/anonnotice.
439439
 440+'SkinTemplateOutputPageBeforeExec': Before SkinTemplate::outputPage() starts page output
 441+&$sktemplate: SkinTemplate object
 442+&$tpl: Template engine object
 443+
440444 'TitleMoveComplete': after moving an article (title)
441445 $old: old title
442446 $nt: new title
Index: trunk/phase3/includes/SkinTemplate.php
@@ -458,6 +458,11 @@
459459 $tpl->set( 'sidebar', $this->buildSidebar() );
460460 $tpl->set( 'nav_urls', $this->buildNavUrls() );
461461
 462+ // original version by hansm
 463+ if( !wfRunHooks( 'SkinTemplateOutputPageBeforeExec', array( &$this, &$tpl ) ) ) {
 464+ wfDebug( __METHOD__ . ': Hook SkinTemplateOutputPageBeforeExec broke outputPage execution!' );
 465+ }
 466+
462467 // execute template
463468 wfProfileIn( "$fname-execute" );
464469 $res = $tpl->execute();
Index: trunk/phase3/RELEASE-NOTES
@@ -35,6 +35,8 @@
3636 * Made the PLURAL: parser function return singular on -1 per default.
3737 * Fixed up the AjaxSearch
3838 * (bugs 5051, 5376) Tooltips and accesskeys no longer require JavaScript
 39+* Added SkinTemplateOutputPageBeforeExec hook before SkinTemplate::outputPage()
 40+ starts page output (http://lists.wikimedia.org/pipermail/wikitech-l/2007-January/028554.html)
3941
4042 == Languages updated ==
4143