Skip to content

Commit

Permalink
Removed unecessary calls for Twig TE Autoloader
Browse files Browse the repository at this point in the history
  • Loading branch information
NorHei committed Jul 27, 2017
1 parent ca23b99 commit 95f5459
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 29 deletions.
13 changes: 2 additions & 11 deletions wbce/modules/addon_monitor/tool.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,7 @@
require_once((dirname(__FILE__)) . '/functions.php');

$sAddonDir = $module_directory;
// register TWIG autoloader if not done already
// this is of importance for WebsiteBaker Versions prior to 2.8.4. or derivate systems
if(!class_exists('Twig_Autoloader')) {
$sTwigAutoloader = dirname(__FILE__) . '/TwigTE/Twig/Autoloader.php';

if(file_exists($sTwigAutoloader)){
include($sTwigAutoloader);
Twig_Autoloader::register();
}
}

/**
* Create Twig template object and configure it
*/
Expand Down Expand Up @@ -99,4 +90,4 @@
<noscript>You should turn on JavaScript in your browser for full benefit of this Admin Tool</noscript>
<script type="text/javascript" language="javascript">
var TOOL_URL = WB_URL + "/modules/<?php echo $sAddonDir ?>";
</script>
</script>
5 changes: 1 addition & 4 deletions wbce/modules/droplets/functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
}
}

if(!class_exists('Twig_Autoloader',false)) {
require_once WB_PATH.'/modules/twig/initialize.php';
}

global $HEADING;
global $TEXT;
Expand Down Expand Up @@ -597,4 +594,4 @@ function wbce_unpack_and_import( $temp_file, $temp_unzip )

return array( 'count' => $count, 'errors' => $errors, 'imported' => $imports );

} // end function wbce_unpack_and_import()
} // end function wbce_unpack_and_import()
14 changes: 0 additions & 14 deletions wbce/modules/wbSeoTool/view_pageTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,6 @@ function exportPageTreeToTwig() {
/**
* Create Twig template object and configure it
*/
if(!class_exists('Twig_Autoloader')) {
$sTmp = dirname(__FILE__) . '/TwigTE/Twig/Autoloader.php';

if(file_exists($sTmp)){
include($sTmp);
Twig_Autoloader::register();
}else{
if(LANGUAGE == "DE"){
echo '<b>TWIG ist nicht initialisiert!</b><br />Bitte installieren Sie das TWIG Patch oder das TWIG Snippet. Siehe WebsiteBaker Forum Thread zu diesem Modul für weitere Information';
} else {
echo '<b>TWIG is not initialized!</b><br />Please install the TWIG Patch or the TWIG Snippet; see the WebsiteBaker Forum Thread of this Module for further information';
}
}
}
$oTwigLoader = new Twig_Loader_Filesystem(dirname(__FILE__) . '/skel'); // tell Twig where templates will come from
$oTwig = new Twig_Environment($oTwigLoader, array(
'autoescape' => false,
Expand Down

0 comments on commit 95f5459

Please sign in to comment.