From 1d35493bc6686eb36456c16adeea988f84d0b915 Mon Sep 17 00:00:00 2001 From: spiderr Date: Thu, 25 Apr 2013 12:00:36 -0400 Subject: tweak verifyCompileDir locations; fix getStyle in compile dir for in logic style changes --- BitSmarty.php | 5 ++--- BitThemes.php | 4 +--- bit_setup_inc.php | 5 ++++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/BitSmarty.php b/BitSmarty.php index a1e6e13..b85bef3 100644 --- a/BitSmarty.php +++ b/BitSmarty.php @@ -107,7 +107,6 @@ class BitSmarty extends SmartyBC { } } } - return parent::fetch($template, $cache_id, $compile_id, $parent, $display, $merge_tpl_vars, $no_output_filter); } @@ -132,14 +131,14 @@ class BitSmarty extends SmartyBC { * @return void */ function verifyCompileDir() { - global $gBitSystem, $gBitLanguage, $bitdomain; + global $gBitThemes, $gBitLanguage, $bitdomain; if( !defined( "TEMP_PKG_PATH" )) { $temp = BIT_ROOT_PATH . "temp/"; } else { $temp = TEMP_PKG_PATH; } - $endPath = $bitdomain.'/'.$gBitSystem->getConfig('style').'/'.$gBitLanguage->mLanguage; + $endPath = $bitdomain.'/'.$gBitThemes->getStyle().'/'.$gBitLanguage->mLanguage; // Compile directory $compDir = $temp . "templates_c/$endPath"; diff --git a/BitThemes.php b/BitThemes.php index 119703c..89333cf 100644 --- a/BitThemes.php +++ b/BitThemes.php @@ -51,12 +51,10 @@ class BitThemes extends BitSingleton { * @return void */ function __construct() { - global $gBitSmarty; parent::__construct(); // start up caching engine $this->mThemeCache = new BitCache( 'themes', TRUE ); - $gBitSmarty->verifyCompileDir(); } @@ -144,7 +142,7 @@ class BitThemes extends BitSingleton { function setStyle( $pStyle ) { global $gBitSmarty; $this->mStyle = $pStyle; - $gBitSmarty->assign( 'style', $pStyle ); + $gBitSmarty->verifyCompileDir(); } /** diff --git a/bit_setup_inc.php b/bit_setup_inc.php index a2d8b43..ed30bfe 100644 --- a/bit_setup_inc.php +++ b/bit_setup_inc.php @@ -22,7 +22,10 @@ $gLibertySystem->registerService( require_once( THEMES_PKG_PATH."BitThemes.php" ); BitThemes::loadSingleton(); -global $gBitThemes; +global $gBitThemes, $gBitSmarty; + +$gBitSmarty->verifyCompileDir(); + // setStyle first, in case package decides it wants to reset the style in it's own /bit_setup_inc.php if( !$gBitThemes->getStyle() ) { -- cgit v1.3