summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2006-09-08 16:38:20 +0000
committerChristian Fowler <spider@viovio.com>2006-09-08 16:38:20 +0000
commit5f3417ff8a3201124d21762d800839186652f619 (patch)
tree0a9687f9ebddd2e1e6da844b47b77c6f6914cc72
parent69f44cd3f986773835c15157f45e6e4d3ad574e9 (diff)
downloadliberty-5f3417ff8a3201124d21762d800839186652f619.tar.gz
liberty-5f3417ff8a3201124d21762d800839186652f619.tar.bz2
liberty-5f3417ff8a3201124d21762d800839186652f619.zip
move gLibertySystem object creation to bit_setup_inc.php for safety
-rwxr-xr-xLibertySystem.php5
-rw-r--r--bit_setup_inc.php25
2 files changed, 14 insertions, 16 deletions
diff --git a/LibertySystem.php b/LibertySystem.php
index ba2921c..77e66e0 100755
--- a/LibertySystem.php
+++ b/LibertySystem.php
@@ -3,7 +3,7 @@
* System class for handling the liberty package
*
* @package liberty
-* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.42 2006/09/03 20:10:40 squareing Exp $
+* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.43 2006/09/08 16:38:20 spiderr Exp $
* @author spider <spider@steelsun.com>
*/
@@ -580,7 +580,4 @@ function parse_data_plugins( &$data, &$preparsed, &$noparsed, &$pParser, &$pComm
}
}
-global $gLibertySystem;
-$gLibertySystem = new LibertySystem();
-
?>
diff --git a/bit_setup_inc.php b/bit_setup_inc.php
index b602115..44f6708 100644
--- a/bit_setup_inc.php
+++ b/bit_setup_inc.php
@@ -3,7 +3,7 @@
* base package include
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.8 $
+ * @version $Revision: 1.9 $
* @package liberty
* @subpackage functions
*/
@@ -15,20 +15,21 @@ $registerHash = array(
);
$gBitSystem->registerPackage( $registerHash );
- require_once( LIBERTY_PKG_PATH.'LibertySystem.php' );
+require_once( LIBERTY_PKG_PATH.'LibertySystem.php' );
- global $gLibertySystem;
+global $gLibertySystem;
+$gLibertySystem = new LibertySystem();
- // load only the active plugins unless this is the first run after an install
- $current_default_format_guid = $gBitSystem->getConfig( 'default_format' );
- $plugin_status = $gBitSystem->getConfig( 'liberty_plugin_status_'.$current_default_format_guid );
- if( empty( $current_default_format_guid ) || empty( $plugin_status ) || $plugin_status != 'y' ) {
- $gLibertySystem->scanAllPlugins();
- } else {
- $gLibertySystem->loadActivePlugins();
- }
+// load only the active plugins unless this is the first run after an install
+$current_default_format_guid = $gBitSystem->getConfig( 'default_format' );
+$plugin_status = $gBitSystem->getConfig( 'liberty_plugin_status_'.$current_default_format_guid );
+if( empty( $current_default_format_guid ) || empty( $plugin_status ) || $plugin_status != 'y' ) {
+ $gLibertySystem->scanAllPlugins();
+} else {
+ $gLibertySystem->loadActivePlugins();
+}
- $gBitSmarty->assign_by_ref( 'gLibertySystem', $gLibertySystem );
+$gBitSmarty->assign_by_ref( 'gLibertySystem', $gLibertySystem );
?>