mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Quick query fix and some debug info added.
This commit is contained in:
@@ -2285,10 +2285,12 @@ class e_admin_ui extends e_admin_controller_ui
|
|||||||
$ftable = vartrue($var['table'], $this->getTableName());
|
$ftable = vartrue($var['table'], $this->getTableName());
|
||||||
if(($var['type'] == 'text' || $var['type'] == 'method') && $searchQuery)
|
if(($var['type'] == 'text' || $var['type'] == 'method') && $searchQuery)
|
||||||
{
|
{
|
||||||
$filter[] = "(`{$ftable}`.`".$key."` REGEXP ('".$searchQuery."'))";
|
$filter[] = "(`#{$ftable}`.`".$key."` REGEXP ('".$searchQuery."'))";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//$qry = $this->listQry;
|
//$qry = $this->listQry;
|
||||||
// We dont need list qry anymore!
|
// We dont need list qry anymore!
|
||||||
$jwhere = array();
|
$jwhere = array();
|
||||||
@@ -2378,6 +2380,12 @@ class e_admin_ui extends e_admin_controller_ui
|
|||||||
|
|
||||||
public function getPrimaryName()
|
public function getPrimaryName()
|
||||||
{
|
{
|
||||||
|
if(!varset($this->pid))
|
||||||
|
{
|
||||||
|
$mes = e107::getMessage();
|
||||||
|
$mes->add("There is no <b>pid</b> set.", E_MESSAGE_WARNING);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->pid;
|
return $this->pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2738,6 +2746,7 @@ class e_admin_form_ui extends e_form
|
|||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
$controller = $this->getController();
|
$controller = $this->getController();
|
||||||
|
|
||||||
$request = $controller->getRequest();
|
$request = $controller->getRequest();
|
||||||
$tree = $controller->getTreeModel();
|
$tree = $controller->getTreeModel();
|
||||||
$options = array(
|
$options = array(
|
||||||
|
@@ -9,8 +9,8 @@
|
|||||||
* 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.61 $
|
* $Revision: 1.62 $
|
||||||
* $Date: 2009-11-08 12:08:24 $
|
* $Date: 2009-11-09 03:03:41 $
|
||||||
* $Author: e107coders $
|
* $Author: e107coders $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ $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.61 $
|
* @version $Revision: 1.62 $
|
||||||
* @author $Author: e107coders $
|
* @author $Author: e107coders $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -853,6 +853,9 @@ class e_db_mysql {
|
|||||||
$query = preg_replace_callback("/\s#([\w]*?)\W/", array($this, 'ml_check'), $query);
|
$query = preg_replace_callback("/\s#([\w]*?)\W/", array($this, 'ml_check'), $query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//FIXME - this is a quick Fix for REGEXP queries, as used in admin_ui.
|
||||||
|
$query = str_replace("`#","`".$this->mySQLPrefix,$query);
|
||||||
|
|
||||||
if (($this->mySQLresult = $this->db_Query($query, NULL, 'db_Select_gen', $debug, $log_type, $log_remark)) === TRUE)
|
if (($this->mySQLresult = $this->db_Query($query, NULL, 'db_Select_gen', $debug, $log_type, $log_remark)) === TRUE)
|
||||||
{ // Successful query which doesn't return a row count
|
{ // Successful query which doesn't return a row count
|
||||||
$this->dbError('db_Select_gen');
|
$this->dbError('db_Select_gen');
|
||||||
|
Reference in New Issue
Block a user