diff options
| author | spider@app1 <spiderr@bitweaver.org> | 2016-06-21 11:49:28 -0400 |
|---|---|---|
| committer | spider@app1 <spiderr@bitweaver.org> | 2016-06-21 11:49:28 -0400 |
| commit | 8c0715a73d7aee4d981544a4cbe9fa3165696549 (patch) | |
| tree | e5b940725ca988e180854a44ce4315aaa1751078 | |
| parent | 852193e6d044413c832d77cd71c9112f9440505e (diff) | |
| download | themes-8c0715a73d7aee4d981544a4cbe9fa3165696549.tar.gz themes-8c0715a73d7aee4d981544a4cbe9fa3165696549.tar.bz2 themes-8c0715a73d7aee4d981544a4cbe9fa3165696549.zip | |
update for BitSystem::get(set)ActivePackage() instead of ACTIVE_PACKAGE
| -rw-r--r-- | BitThemes.php | 13 | ||||
| -rw-r--r-- | smartyplugins/function.alphabar.php | 3 | ||||
| -rw-r--r-- | smartyplugins/function.smartlink.php | 3 |
3 files changed, 10 insertions, 9 deletions
diff --git a/BitThemes.php b/BitThemes.php index e0b3c4e..8785b58 100644 --- a/BitThemes.php +++ b/BitThemes.php @@ -452,8 +452,8 @@ class BitThemes extends BitSingleton { foreach( $areas as $layout => $area ) { if( $gBitSystem->isFeatureActive( "{$this->mDisplayMode}_hide_{$area}_col" ) || - $gBitSystem->isFeatureActive( "{$gBitSystem->mActivePackage}_hide_{$area}_col" ) || - $gBitSystem->isFeatureActive( "{$gBitSystem->mActivePackage}_{$this->mDisplayMode}_hide_{$area}_col" ) + $gBitSystem->isFeatureActive( "{$gBitSystem->getActivePackage()}_hide_{$area}_col" ) || + $gBitSystem->isFeatureActive( "{$gBitSystem->getActivePackage()}_{$this->mDisplayMode}_hide_{$area}_col" ) ) { unset( $this->mLayout[$layout] ); } @@ -599,9 +599,7 @@ class BitThemes extends BitSingleton { if( !empty( $pParamHash['fallback_layout'] )) { $layouts[] = $pParamHash['fallback_layout']; } - if( defined( 'ACTIVE_PACKAGE') ) { - $layouts[] = ACTIVE_PACKAGE; - } + $layouts[] = $gBitSystem->getActivePackage(); $layouts[] = DEFAULT_PACKAGE; foreach( $layouts AS $l ) { @@ -616,8 +614,8 @@ class BitThemes extends BitSingleton { } if( !empty( $result ) && $result->RecordCount() ) { $row = $result->fetchRow(); - // Check to see if we have ACTIVE_PACKAGE modules at the top of the results - if( isset( $row['layout'] ) && ( $row['layout'] != DEFAULT_PACKAGE ) && ( ACTIVE_PACKAGE != DEFAULT_PACKAGE )) { + // Check to see if we have active package modules at the top of the results + if( isset( $row['layout'] ) && ( $row['layout'] != DEFAULT_PACKAGE ) && ( $gBitSystem->getActivePackage() != DEFAULT_PACKAGE )) { $skipDefaults = TRUE; } else { $skipDefaults = FALSE; @@ -712,6 +710,7 @@ class BitThemes extends BitSingleton { $row = $result->fetchRow(); } } + return $ret; } diff --git a/smartyplugins/function.alphabar.php b/smartyplugins/function.alphabar.php index 3ff97e4..b4fce89 100644 --- a/smartyplugins/function.alphabar.php +++ b/smartyplugins/function.alphabar.php @@ -20,6 +20,7 @@ * Example - {alphabar} */ function smarty_function_alphabar( $params, &$gBitSmarty ) { + global $gBitSystem; extract( $params ); // work out what the url is @@ -31,7 +32,7 @@ function smarty_function_alphabar( $params, &$gBitSmarty ) { $url = constant( strtoupper( $ipackage ).'_PKG_URL' ).$ifile; } } else { - $url = constant( strtoupper( ACTIVE_PACKAGE ).'_PKG_URL' ).$ifile; + $url = constant( strtoupper( $gBitSystem->getActivePackage() ).'_PKG_URL' ).$ifile; } } else { $url = $_SERVER['SCRIPT_NAME']; diff --git a/smartyplugins/function.smartlink.php b/smartyplugins/function.smartlink.php index b48cbc2..7c4ca2a 100644 --- a/smartyplugins/function.smartlink.php +++ b/smartyplugins/function.smartlink.php @@ -47,6 +47,7 @@ * Note Be careful if ititle is generated dynamically since it is passed through tra() by default, use itra to override<br> */ function smarty_function_smartlink( $params, &$gBitSmarty ) { + global $gBitSystem; if( !empty( $params['ihash'] ) ) { $hash = array_merge( $params['ihash'], $params ); $hash['ihash'] = NULL; @@ -70,7 +71,7 @@ function smarty_function_smartlink( $params, &$gBitSmarty ) { $url = constant( strtoupper( $hash['ipackage'] ).'_PKG_URL' ).$hash['ifile']; } } else { - $url = constant( strtoupper( ACTIVE_PACKAGE ).'_PKG_URL' ).$hash['ifile']; + $url = constant( strtoupper( $gBitSystem->getActivePackage() ).'_PKG_URL' ).$hash['ifile']; } } else { $url = $_SERVER['SCRIPT_NAME']; |
