From 3760ea860859665025429544526337f6aa7dfae6 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 10 Mar 2008 21:32:13 +0000 Subject: [PATCH] fixed not found tabledefinition if no app-name given and a search of the table was requested (type in var-name) --- phpgwapi/inc/class.egw_db.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.egw_db.inc.php b/phpgwapi/inc/class.egw_db.inc.php index 1fa962128e..043e125d01 100644 --- a/phpgwapi/inc/class.egw_db.inc.php +++ b/phpgwapi/inc/class.egw_db.inc.php @@ -1417,11 +1417,11 @@ class egw_db { if ($app === true && $table && isset($GLOBALS['egw_info']['apps'])) { - foreach($GLOBALS['egw_info']['apps'] as $app => $app_data) + foreach($GLOBALS['egw_info']['apps'] as $app => &$app_data) { - if (isset($data['table_defs'][$table])) + if (isset($app_data['table_defs'][$table])) { - return $data['table_defs'][$table]; + return $app_data['table_defs'][$table]; } } $app = false; @@ -1452,8 +1452,10 @@ class egw_db } if ($table && (!$this->app_data['table_defs'] || !isset($this->app_data['table_defs'][$table]))) { + if ($this->Debug) echo "

!!!get_table_definitions($app,$table) failed!!!

\n"; return False; } + if ($this->Debug) echo "

get_table_definitions($app,$table) succeeded

\n"; return $table ? $this->app_data['table_defs'][$table] : $this->app_data['table_defs']; }