1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

db_Query needs to be public for now. menu_class and plugin manager now use loadLanFiles()

This commit is contained in:
CaMer0n
2009-09-10 15:24:57 +00:00
parent 5be62389c8
commit 83a50ef2d3
4 changed files with 34 additions and 38 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_admin/plugin.php,v $ | $Source: /cvs_backup/e107_0.8/e107_admin/plugin.php,v $
| $Revision: 1.41 $ | $Revision: 1.42 $
| $Date: 2009-09-02 17:45:02 $ | $Date: 2009-09-10 15:24:57 $
| $Author: e107coders $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -751,7 +751,10 @@ class pluginManager{
foreach($pluginList as $plug) foreach($pluginList as $plug)
{ {
e107::loadLanFiles($plug['plugin_path'],'admin');
$_path = e_PLUGIN.$plug['plugin_path'].'/'; $_path = e_PLUGIN.$plug['plugin_path'].'/';
$plug_vars = false; $plug_vars = false;
$plugin_config_icon = ""; $plugin_config_icon = "";

View File

@@ -9,8 +9,8 @@
* e107 Menu Class * e107 Menu Class
* *
* $Source: /cvs_backup/e107_0.8/e107_handlers/menu_class.php,v $ * $Source: /cvs_backup/e107_0.8/e107_handlers/menu_class.php,v $
* $Revision: 1.13 $ * $Revision: 1.14 $
* $Date: 2009-09-06 20:04:03 $ * $Date: 2009-09-10 15:24:57 $
* $Author: e107coders $ * $Author: e107coders $
*/ */
@@ -247,23 +247,7 @@ class e_menu
} }
else else
{ {
//FIXME - oldy e107::loadLanFiles($mpath);
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");
}
//include once is not an option anymore //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 will break many old menus (evel globals), so we'll wait for a while...

View File

@@ -9,9 +9,9 @@
* mySQL Handler * mySQL Handler
* *
* $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $ * $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $
* $Revision: 1.49 $ * $Revision: 1.50 $
* $Date: 2009-09-10 12:06:39 $ * $Date: 2009-09-10 15:24:57 $
* $Author: secretr $ * $Author: e107coders $
*/ */
if(defined('MYSQL_LIGHT')) if(defined('MYSQL_LIGHT'))
@@ -34,9 +34,10 @@ elseif(defined('E107_INSTALL')) //TODO Remove the need for this if possible
{ {
class dummyTraffic { class dummyTraffic {
function Bump() { return; } function Bump() { return; }
function BumpWho($val,$val) { } function BumpWho($val,$val) { return; }
function TimeDelta() { return; } function TimeDelta() { return; }
} }
global $eTraffic; global $eTraffic;
$eTraffic = new dummyTraffic; $eTraffic = new dummyTraffic;
define('E107_DEBUG_LEVEL', 0); define('E107_DEBUG_LEVEL', 0);
@@ -62,8 +63,8 @@ $db_ConnectionID = NULL; // Stores ID for the first DB connection used - which s
* *
* @package e107 * @package e107
* @category e107_handlers * @category e107_handlers
* @version $Revision: 1.49 $ * @version $Revision: 1.50 $
* @author $Author: secretr $ * @author $Author: e107coders $
* *
*/ */
class e_db_mysql { class e_db_mysql {
@@ -235,7 +236,7 @@ class e_db_mysql {
* @param unknown $rli * @param unknown $rli
* @return unknown * @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; global $db_time,$db_mySQLQueryCount,$queryinfo, $eTraffic;
$db_mySQLQueryCount++; $db_mySQLQueryCount++;

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $ | $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $
| $Revision: 1.79 $ | $Revision: 1.80 $
| $Date: 2009-09-06 20:04:03 $ | $Date: 2009-09-10 15:24:57 $
| $Author: e107coders $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -137,6 +137,8 @@ class e107plugin
{ {
while ($row = $sql->db_Fetch(MYSQL_ASSOC)) while ($row = $sql->db_Fetch(MYSQL_ASSOC))
{ {
$pluginDBList[$row['plugin_path']] = $row; $pluginDBList[$row['plugin_path']] = $row;
$pluginDBList[$row['plugin_path']]['status'] = 'read'; $pluginDBList[$row['plugin_path']]['status'] = 'read';
// echo "Found plugin: ".$row['plugin_path']." in DB<br />"; // echo "Found plugin: ".$row['plugin_path']." in DB<br />";
@@ -165,22 +167,28 @@ class e107plugin
} }
$p_installed = e107::getPref('plug_installed',array()); // load preference; $p_installed = e107::getPref('plug_installed',array()); // load preference;
require_once(e_HANDLER."message_handler.php");
$emessage = &eMessage::getInstance();
foreach($pluginList as $p) foreach($pluginList as $p)
{ {
$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); $p['path'] = substr(str_replace(e_PLUGIN,"",$p['path']),0,-1);
$plugin_path = $p['path']; $plugin_path = $p['path'];
if(strpos($plugin_path,'e107_')!==FALSE)
{
$emessage->add("Folder error: <i>{$p['path']}</i>. '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
if(!$this->parse_plugin($p['path'])) if(!$this->parse_plugin($p['path']))
{ {
//parsing of plugin.php/plugin.xml failed. //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); $emessage->add("Parsing failed - file format error: {$p['path']}", E_MESSAGE_ERROR);
continue; // Carry on and do any others that are OK continue; // Carry on and do any others that are OK
} }