Permalink
Browse files

Fatal error: Cannot redeclare class WFBC in ...

  • Loading branch information...
yama committed Jul 14, 2016
1 parent 292cb71 commit 93c3d46f237a8fdc81ca6b515656ec4a2f42491e
@@ -0,0 +1,30 @@
<?php
class WFBC
{
function __construct()
{
}
function fetch($tpl)
{
global $modx;
$template = '';
if(substr($tpl, 0, 5) == "@FILE")
{
$template = file_get_contents(ltrim(substr($tpl, 6)));
}
elseif(substr($tpl, 0, 5) == "@CODE")
{
$template = substr($tpl, 6);
}
elseif ($modx->getChunk($tpl) != "")
{
$template = $modx->getChunk($tpl);
}
else
{
$template = $tpl;
}
return $template;
}
}
@@ -5,6 +5,7 @@
if(!isset($startId)) $startId = 0;
////////////////// template
include_once('breadcrumb.class.inc.php');
$wfbc = new WFBC();
if(!isset($outerTpl)) $outerTpl = '<div id="breadcrumbnav">[+home+][+wf.wrapper+]</div>';
else $outerTpl = $wfbc->fetch($outerTpl);
@@ -46,33 +47,3 @@
$hereTpl = '@CODE:' . $hereTpl;
$activeParentRowTpl = '@CODE:' . $activeParentRowTpl;
class WFBC
{
function __construct()
{
}
function fetch($tpl)
{
global $modx;
$template = '';
if(substr($tpl, 0, 5) == "@FILE")
{
$template = file_get_contents(ltrim(substr($tpl, 6)));
}
elseif(substr($tpl, 0, 5) == "@CODE")
{
$template = substr($tpl, 6);
}
elseif ($modx->getChunk($tpl) != "")
{
$template = $modx->getChunk($tpl);
}
else
{
$template = $tpl;
}
return $template;
}
}

0 comments on commit 93c3d46

Please sign in to comment.