diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php
index f3f169804..97cc023b5 100644
--- a/e107_admin/plugin.php
+++ b/e107_admin/plugin.php
@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/plugin.php,v $
-| $Revision: 1.41 $
-| $Date: 2009-09-02 17:45:02 $
+| $Revision: 1.42 $
+| $Date: 2009-09-10 15:24:57 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -750,8 +750,11 @@ class pluginManager{
$text = "";
foreach($pluginList as $plug)
- {
+ {
+ e107::loadLanFiles($plug['plugin_path'],'admin');
+
$_path = e_PLUGIN.$plug['plugin_path'].'/';
+
$plug_vars = false;
$plugin_config_icon = "";
diff --git a/e107_handlers/menu_class.php b/e107_handlers/menu_class.php
index cace10b47..190648786 100644
--- a/e107_handlers/menu_class.php
+++ b/e107_handlers/menu_class.php
@@ -9,8 +9,8 @@
* e107 Menu Class
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/menu_class.php,v $
- * $Revision: 1.13 $
- * $Date: 2009-09-06 20:04:03 $
+ * $Revision: 1.14 $
+ * $Date: 2009-09-10 15:24:57 $
* $Author: e107coders $
*/
@@ -247,24 +247,8 @@ class e_menu
}
else
{
- //FIXME - oldy
- if(is_readable(e_PLUGIN.$mpath."/languages/".e_LANGUAGE.".php"))
- {
- include_once (e_PLUGIN.$mpath."/languages/".e_LANGUAGE.".php");
- }
- elseif(is_readable(e_PLUGIN.$mpath."/languages/".e_LANGUAGE."/".e_LANGUAGE.".php"))
- {
- include_once (e_PLUGIN.$mpath."/languages/".e_LANGUAGE."/".e_LANGUAGE.".php");
- }
- elseif(is_readable(e_PLUGIN.$mpath."/languages/English.php"))
- {
- include_once (e_PLUGIN.$mpath."/languages/English.php");
- }
- elseif(is_readable(e_PLUGIN.$mpath."/languages/English/English.php"))
- {
- include_once (e_PLUGIN.$mpath."/languages/English/English.php");
- }
-
+ e107::loadLanFiles($mpath);
+
//include once is not an option anymore
//e107_include will break many old menus (evel globals), so we'll wait for a while...
//e107_include(e_PLUGIN.$mpath."/".$mname.".php");
diff --git a/e107_handlers/mysql_class.php b/e107_handlers/mysql_class.php
index 4aaefcc48..a1a0418e9 100644
--- a/e107_handlers/mysql_class.php
+++ b/e107_handlers/mysql_class.php
@@ -9,9 +9,9 @@
* mySQL Handler
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $
- * $Revision: 1.49 $
- * $Date: 2009-09-10 12:06:39 $
- * $Author: secretr $
+ * $Revision: 1.50 $
+ * $Date: 2009-09-10 15:24:57 $
+ * $Author: e107coders $
*/
if(defined('MYSQL_LIGHT'))
@@ -34,9 +34,10 @@ elseif(defined('E107_INSTALL')) //TODO Remove the need for this if possible
{
class dummyTraffic {
function Bump() { return; }
- function BumpWho($val,$val) { }
+ function BumpWho($val,$val) { return; }
function TimeDelta() { return; }
}
+
global $eTraffic;
$eTraffic = new dummyTraffic;
define('E107_DEBUG_LEVEL', 0);
@@ -62,8 +63,8 @@ $db_ConnectionID = NULL; // Stores ID for the first DB connection used - which s
*
* @package e107
* @category e107_handlers
- * @version $Revision: 1.49 $
- * @author $Author: secretr $
+ * @version $Revision: 1.50 $
+ * @author $Author: e107coders $
*
*/
class e_db_mysql {
@@ -235,7 +236,7 @@ class e_db_mysql {
* @param unknown $rli
* @return unknown
*/
- protected function db_Query($query, $rli = NULL, $qry_from = '', $debug = FALSE, $log_type = '', $log_remark = '')
+ public function db_Query($query, $rli = NULL, $qry_from = '', $debug = FALSE, $log_type = '', $log_remark = '')
{
global $db_time,$db_mySQLQueryCount,$queryinfo, $eTraffic;
$db_mySQLQueryCount++;
diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php
index 3586f38f8..e95b25002 100644
--- a/e107_handlers/plugin_class.php
+++ b/e107_handlers/plugin_class.php
@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $
-| $Revision: 1.79 $
-| $Date: 2009-09-06 20:04:03 $
+| $Revision: 1.80 $
+| $Date: 2009-09-10 15:24:57 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@@ -137,6 +137,8 @@ class e107plugin
{
while ($row = $sql->db_Fetch(MYSQL_ASSOC))
{
+
+
$pluginDBList[$row['plugin_path']] = $row;
$pluginDBList[$row['plugin_path']]['status'] = 'read';
// echo "Found plugin: ".$row['plugin_path']." in DB
";
@@ -165,22 +167,28 @@ class e107plugin
}
$p_installed = e107::getPref('plug_installed',array()); // load preference;
-
+ require_once(e_HANDLER."message_handler.php");
+ $emessage = &eMessage::getInstance();
foreach($pluginList as $p)
{
-
+ $p['path'] = substr(str_replace(e_PLUGIN,"",$p['path']),0,-1);
+ $plugin_path = $p['path'];
+
+ if(strpos($plugin_path,'e107_')!==FALSE)
+ {
+ $emessage->add("Folder error: {$p['path']}. 'e107_' is not permitted within plugin folder names.", E_MESSAGE_WARNING);
+ continue;
+ }
$plug['plug_action'] = 'scan'; // Make sure plugin.php knows what we're up to
- $p['path'] = substr(str_replace(e_PLUGIN,"",$p['path']),0,-1);
- $plugin_path = $p['path'];
+
if(!$this->parse_plugin($p['path']))
{
//parsing of plugin.php/plugin.xml failed.
- require_once(e_HANDLER."message_handler.php");
- $emessage = &eMessage::getInstance();
+
$emessage->add("Parsing failed - file format error: {$p['path']}", E_MESSAGE_ERROR);
continue; // Carry on and do any others that are OK
}