mirror of
https://github.com/e107inc/e107.git
synced 2025-04-21 21:21:54 +02:00
Some basic queries were failing during cron mode due to failure of the 'menu' query. Also added getLastQuery() function for easier debugging.
This commit is contained in:
parent
aa3e4bd7b1
commit
e07843c238
@ -9,8 +9,8 @@
|
||||
* e107 Menu Class
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/menu_class.php,v $
|
||||
* $Revision: 1.16 $
|
||||
* $Date: 2009-11-18 01:04:43 $
|
||||
* $Revision: 1.17 $
|
||||
* $Date: 2009-12-27 10:52:22 $
|
||||
* $Author: e107coders $
|
||||
*/
|
||||
|
||||
@ -60,6 +60,13 @@ class e_menu
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
global $_E107;
|
||||
|
||||
if(vartrue($_E107['cli']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$menu_layout_field = THEME_LAYOUT!=e107::getPref('sitetheme_deflayout') ? THEME_LAYOUT : "";
|
||||
$menu_data = e107::getCache()->retrieve_sys("menus_".USERCLASS_LIST."_".md5(e_LANGUAGE.$menu_layout_field));
|
||||
$menu_data = e107::getArrayStorage()->ReadArray($menu_data);
|
||||
|
@ -9,9 +9,9 @@
|
||||
* mySQL Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $
|
||||
* $Revision: 1.72 $
|
||||
* $Date: 2009-12-26 23:20:21 $
|
||||
* $Author: e107steved $
|
||||
* $Revision: 1.73 $
|
||||
* $Date: 2009-12-27 10:52:22 $
|
||||
* $Author: e107coders $
|
||||
*/
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
*
|
||||
* @package e107
|
||||
* @subpackage e107_handlers
|
||||
* @version $Id: mysql_class.php,v 1.72 2009-12-26 23:20:21 e107steved Exp $;
|
||||
* @version $Id: mysql_class.php,v 1.73 2009-12-27 10:52:22 e107coders Exp $;
|
||||
*
|
||||
* @todo separate cache for db type tables
|
||||
*/
|
||||
@ -77,6 +77,7 @@ class e_db_mysql
|
||||
|
||||
protected $mySQLlastErrNum = 0; // Number of last error - now protected, use getLastErrorNumber()
|
||||
protected $mySQLlastErrText = ''; // Text of last error - now protected, use getLastErrorText()
|
||||
protected $mySQLlastQuery = '';
|
||||
|
||||
public $mySQLcurTable;
|
||||
public $mySQLlanguage;
|
||||
@ -246,6 +247,8 @@ class e_db_mysql
|
||||
{
|
||||
global $db_time,$db_mySQLQueryCount,$queryinfo;
|
||||
$db_mySQLQueryCount++;
|
||||
|
||||
$this->mySQLlastQuery = $query;
|
||||
|
||||
if ($debug == 'now')
|
||||
{
|
||||
@ -883,10 +886,10 @@ class e_db_mysql
|
||||
*/
|
||||
public function db_Select_gen($query, $debug = FALSE, $log_type = '', $log_remark = '')
|
||||
{
|
||||
global $db_mySQLQueryCount;
|
||||
|
||||
$this->tabset = FALSE;
|
||||
|
||||
|
||||
|
||||
|
||||
$query .= " "; // temp fix for failing regex below, when there is no space after the table name;
|
||||
|
||||
if(strpos($query,'`#') !== FALSE)
|
||||
@ -1466,6 +1469,11 @@ class e_db_mysql
|
||||
{
|
||||
return $this->mySQLlastErrText; // Text of last error (empty string if no error)
|
||||
}
|
||||
|
||||
function getLastQuery()
|
||||
{
|
||||
return $this->mySQLlastQuery;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if MySQL version is utf8 compatible and may be used as it accordingly to the user choice
|
||||
|
Loading…
x
Reference in New Issue
Block a user