Make TemplatePlugin compatible with PHP 5.3

This commit is contained in:
Mike Sheldon 2010-07-31 23:10:22 +01:00
parent ac005adbb2
commit a31d977b43
1 changed files with 12 additions and 12 deletions

View File

@ -46,7 +46,7 @@ class TemplatePlugin extends Plugin {
// <%feeds%> // <%feeds%>
// <%description%> // <%description%>
// <%head%> // <%head%>
function onStartShowHead( &$act ) { function onStartShowHead( $act ) {
$this->clear_xmlWriter($act); $this->clear_xmlWriter($act);
$act->extraHead(); $act->extraHead();
$this->blocks['head'] = $act->xw->flush(); $this->blocks['head'] = $act->xw->flush();
@ -64,29 +64,29 @@ class TemplatePlugin extends Plugin {
} }
// <%bodytext%> // <%bodytext%>
function onStartShowContentBlock( &$act ) { function onStartShowContentBlock( $act ) {
$this->clear_xmlWriter($act); $this->clear_xmlWriter($act);
return true; return true;
} }
function onEndShowContentBlock( &$act ) { function onEndShowContentBlock( $act ) {
$this->blocks['bodytext'] = $act->xw->flush(); $this->blocks['bodytext'] = $act->xw->flush();
} }
// <%localnav%> // <%localnav%>
function onStartShowLocalNavBlock( &$act ) { function onStartShowLocalNavBlock( $act ) {
$this->clear_xmlWriter($act); $this->clear_xmlWriter($act);
return true; return true;
} }
function onEndShowLocalNavBlock( &$act ) { function onEndShowLocalNavBlock( $act ) {
$this->blocks['localnav'] = $act->xw->flush(); $this->blocks['localnav'] = $act->xw->flush();
} }
// <%export%> // <%export%>
function onStartShowExportData( &$act ) { function onStartShowExportData( $act ) {
$this->clear_xmlWriter($act); $this->clear_xmlWriter($act);
return true; return true;
} }
function onEndShowExportData( &$act ) { function onEndShowExportData( $act ) {
$this->blocks['export'] = $act->xw->flush(); $this->blocks['export'] = $act->xw->flush();
} }
@ -102,7 +102,7 @@ class TemplatePlugin extends Plugin {
// <%groupsbyposts%> // <%groupsbyposts%>
// <%featuredusers%> // <%featuredusers%>
// <%groupsbymembers%> // <%groupsbymembers%>
function onStartShowSections( &$act ) { function onStartShowSections( $act ) {
global $action; global $action;
$this->clear_xmlWriter($act); $this->clear_xmlWriter($act);
switch ($action) { switch ($action) {
@ -155,7 +155,7 @@ class TemplatePlugin extends Plugin {
// <%nav%> // <%nav%>
// <%notice%> // <%notice%>
// <%noticeform%> // <%noticeform%>
function onStartShowHeader( &$act ) { function onStartShowHeader( $act ) {
$this->clear_xmlWriter($act); $this->clear_xmlWriter($act);
$act->showLogo(); $act->showLogo();
$this->blocks['logo'] = $act->xw->flush(); $this->blocks['logo'] = $act->xw->flush();
@ -174,7 +174,7 @@ class TemplatePlugin extends Plugin {
// <%secondarynav%> // <%secondarynav%>
// <%licenses%> // <%licenses%>
function onStartShowFooter( &$act ) { function onStartShowFooter( $act ) {
$this->clear_xmlWriter($act); $this->clear_xmlWriter($act);
$act->showSecondaryNav(); $act->showSecondaryNav();
$this->blocks['secondarynav'] = $act->xw->flush(); $this->blocks['secondarynav'] = $act->xw->flush();
@ -242,13 +242,13 @@ class TemplatePlugin extends Plugin {
} }
// catching the StartShowHTML event to halt the rendering // catching the StartShowHTML event to halt the rendering
function onStartShowHTML( &$act ) { function onStartShowHTML( $act ) {
$this->clear_xmlWriter($act); $this->clear_xmlWriter($act);
return true; return true;
} }
// clear the xmlWriter // clear the xmlWriter
function clear_xmlWriter( &$act ) { function clear_xmlWriter( $act ) {
$act->xw->openMemory(); $act->xw->openMemory();
$act->xw->setIndent(true); $act->xw->setIndent(true);
} }