From 47896e35e74fff44c12c9812728ee0aa64a07e83 Mon Sep 17 00:00:00 2001 From: Christian Fowler Date: Mon, 8 Jan 2007 07:58:43 +0000 Subject: make sure getConfig( "{$this->mSystem}_plugin_file_$pluginGuid" ) actually returns something before we process it --- LibertySystem.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'LibertySystem.php') diff --git a/LibertySystem.php b/LibertySystem.php index f74f4ae..db49e6a 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.54 2006/12/31 13:01:15 squareing Exp $ +* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.55 2007/01/08 07:58:43 spiderr Exp $ * @author spider */ @@ -107,16 +107,17 @@ class LibertySystem extends LibertyBase { $active_plugins = $gBitSystem->getConfigMatch( "/^{$this->mSystem}_plugin_status_/i", 'y' ); foreach( $active_plugins as $key=>$value ) { $pluginGuid = preg_replace( "/^{$this->mSystem}_plugin_status_/", '', $key,1 ); - $pluginFile = $gBitSystem->getConfig( "{$this->mSystem}_plugin_file_$pluginGuid" ); - // check for the plugin in the default location - in case bitweaver root path changed. - if ( file_exists( $pluginFile ) ) { - $this->mPluginFileName = $pluginFile; - include_once( $pluginFile ); - } else { - $defaultFile = LIBERTY_PKG_PATH.'plugins/'.basename( $pluginFile ); - if( file_exists( $defaultFile ) ) { - $this->mPluginFileName = $defaultFile; - include_once( $defaultFile ); + if( $pluginFile = $gBitSystem->getConfig( "{$this->mSystem}_plugin_file_$pluginGuid" ) ) { + // check for the plugin in the default location - in case bitweaver root path changed. + if ( file_exists( $pluginFile ) ) { + $this->mPluginFileName = $pluginFile; + include_once( $pluginFile ); + } else { + $defaultFile = LIBERTY_PKG_PATH.'plugins/'.basename( $pluginFile ); + if( file_exists( $defaultFile ) ) { + $this->mPluginFileName = $defaultFile; + include_once( $defaultFile ); + } } } } -- cgit v1.3