do NEVER unset $table or $db;

no need to test for isset() on $db and $table;
always test with strlen() for valid $table or $db;
This commit is contained in:
Sebastian Mendel
2007-03-30 09:12:05 +00:00
parent 711eb76ce3
commit 008734f8b0
23 changed files with 82 additions and 91 deletions

View File

@@ -115,13 +115,13 @@ if (isset($_REQUEST['after_insert'])
} else {
$goto_include = $GLOBALS['goto'];
}
if ($GLOBALS['goto'] == 'db_sql.php' && isset($GLOBALS['table'])) {
unset($GLOBALS['table']);
if ($GLOBALS['goto'] == 'db_sql.php' && strlen($GLOBALS['table'])) {
$GLOBALS['table'] = '';
}
}
if (! $goto_include) {
if (! isset($GLOBALS['table']) || ! strlen($GLOBALS['table'])) {
if (! strlen($GLOBALS['table'])) {
$goto_include = 'db_sql.php';
} else {
$goto_include = 'tbl_sql.php';