From 9a74090db5c297b4261bc3a548b79738275d28a9 Mon Sep 17 00:00:00 2001 From: Slim Amamou Date: Sun, 10 Feb 2008 11:27:22 +0100 Subject: [PATCH] j'ai ajoute le message d'erreur WARNING you have not selected a database --- bazdig/console/index.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/bazdig/console/index.php b/bazdig/console/index.php index 7f86847..f951c49 100644 --- a/bazdig/console/index.php +++ b/bazdig/console/index.php @@ -50,15 +50,21 @@
name; - $dbLocation = $work_db->host; - if ($work_db->type == 'sqlite' || $work_db->type == 'sqlite2') { - $dbLocation = dirname($dbName); - $dbName = basename($dbName); - } - echo "

".$dbName."

"; - echo " @". $dbLocation; - echo $work_db->httpGet($bazdig->get('/db/schema/')); + + if ($work_db->name) { + $dbName = $work_db->name; + $dbLocation = $work_db->host; + if ($work_db->type == 'sqlite' || $work_db->type == 'sqlite2') { + $dbLocation = dirname($dbName); + $dbName = basename($dbName); + } + echo "

".$dbName."

"; + echo " @". $dbLocation; + echo $work_db->httpGet($bazdig->get('/db/schema/')); + } else { + $error = "WARNING you have not selected a database"; + echo "
$error
"; + } ?>
-- 2.11.4.GIT