fixed not found tabledefinition if no app-name given and a search of the table was requested (type in var-name)

This commit is contained in:
Ralf Becker 2008-03-10 21:32:13 +00:00
parent 8b235d1e2c
commit 3760ea8608

View File

@ -1417,11 +1417,11 @@ class egw_db
{ {
if ($app === true && $table && isset($GLOBALS['egw_info']['apps'])) 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; $app = false;
@ -1452,8 +1452,10 @@ class egw_db
} }
if ($table && (!$this->app_data['table_defs'] || !isset($this->app_data['table_defs'][$table]))) if ($table && (!$this->app_data['table_defs'] || !isset($this->app_data['table_defs'][$table])))
{ {
if ($this->Debug) echo "<p>!!!get_table_definitions($app,$table) failed!!!</p>\n";
return False; return False;
} }
if ($this->Debug) echo "<p>get_table_definitions($app,$table) succeeded</p>\n";
return $table ? $this->app_data['table_defs'][$table] : $this->app_data['table_defs']; return $table ? $this->app_data['table_defs'][$table] : $this->app_data['table_defs'];
} }