From 8a9b882f0c1830b42c4836e7ddafd7ff74aa1191 Mon Sep 17 00:00:00 2001 From: nate Date: Tue, 1 Aug 2006 02:47:40 +0000 Subject: [PATCH] Making same fixes as [3336] git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3337 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/scripts/acl.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/cake/scripts/acl.php b/cake/scripts/acl.php index d3f3fbf43..425d60b59 100644 --- a/cake/scripts/acl.php +++ b/cake/scripts/acl.php @@ -355,7 +355,9 @@ class AclCLI { ".$db->name('rght')." ".$db->column($db->columns['integer'])." default NULL, PRIMARY KEY (".$db->name('id').") );"; - $db->query($sql); + if ($db->query($sql) === false) { + die("Error: " . $db->lastError() . "\n\n"); + } fwrite($this->stdout, "Creating access request objects table (aros)...\n"); $sql2 = "CREATE TABLE ".$db->fullTableName('aros')." ( @@ -366,7 +368,9 @@ class AclCLI { ".$db->name('rght')." ".$db->column($db->columns['integer'])." default NULL, PRIMARY KEY (".$db->name('id').") );"; - $db->query($sql2); + if ($db->query($sql) === false) { + die("Error: " . $db->lastError() . "\n\n"); + } fwrite($this->stdout, "Creating relationships table (aros_acos)...\n"); $sql3 = "CREATE TABLE ".$db->fullTableName('aros_acos')." ( @@ -379,7 +383,9 @@ class AclCLI { ".$db->name('_delete')." ".$db->column($db->columns['integer'])." NOT NULL default '0', PRIMARY KEY (".$db->name('id').") );"; - $db->query($sql3); + if ($db->query($sql3) === false) { + die("Error: " . $db->lastError() . "\n\n"); + } fwrite($this->stdout, "\nDone.\n"); }