Made cdnPath define conditionally; fixed common_cli not properly loading plugins
authorDan
Mon, 28 Jul 2008 13:05:41 -0600
changeset 666 402adf8ea719
parent 665 af7e8ec6aef7
child 667 72818d2bf336
Made cdnPath define conditionally; fixed common_cli not properly loading plugins
includes/common.php
includes/common_cli.php
--- a/includes/common.php	Mon Jul 28 13:01:53 2008 -0600
+++ b/includes/common.php	Mon Jul 28 13:05:41 2008 -0600
@@ -264,7 +264,8 @@
 }
 
 // Set our CDN path
-define('cdnPath', getConfig('cdn_path', scriptPath));
+if ( !defined('cdnPath') )
+  define('cdnPath', getConfig('cdn_path', scriptPath));
 
 //
 // Low level maintenance
--- a/includes/common_cli.php	Mon Jul 28 13:01:53 2008 -0600
+++ b/includes/common_cli.php	Mon Jul 28 13:05:41 2008 -0600
@@ -76,7 +76,8 @@
 }
 
 // Set our CDN path
-define('cdnPath', getConfig('cdn_path', scriptPath));
+if ( !defined('cdnPath') )
+  define('cdnPath', getConfig('cdn_path', scriptPath));
 
 //
 // Low level maintenance
@@ -137,13 +138,15 @@
 // Obtain list of plugins
 $plugins->loadAll();
 
+profiler_log('Fetched plugin list');
+
 global $plugins;
 
 // Load plugins from common because we can't give plugins full abilities in object context
 foreach ( $plugins->load_list as $f )
 {
-  if ( file_exists($f) )
-    include_once $f;
+  if ( file_exists(ENANO_ROOT . '/plugins/' . $f) )
+    include_once ENANO_ROOT . '/plugins/' . $f;
 }
 
 profiler_log('Loaded plugins');