From ec44bdce88a07d5529b9c16c12cd16e78c350813 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 18 Feb 2018 19:07:11 +0100 Subject: [PATCH] Fixed nav-app installation not working --- apps/Navigation/install.php | 30 ------------------------------ inc/libs/db-mysql.php | 2 ++ 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100755 apps/Navigation/install.php diff --git a/apps/Navigation/install.php b/apps/Navigation/install.php deleted file mode 100755 index 427e24f..0000000 --- a/apps/Navigation/install.php +++ /dev/null @@ -1,30 +0,0 @@ -query('CREATE TABLE `' . $_POST['db_prefix'] . 'nav_nav` ( - `id` int(11) NOT NULL, - `title` text CHARACTER SET latin1 NOT NULL, - `page` int(11) NOT NULL, - `parent` int(11) NOT NULL, - `nav_order` int(11) NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -ALTER TABLE `' . $_POST['db_prefix'] . 'nav_nav` - ADD PRIMARY KEY (`id`); - -ALTER TABLE `' . $_POST['db_prefix'] . 'nav_nav` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; - - ALTER TABLE `' . $_POST['db_prefix'] . 'nav_nav` ADD external VARCHAR(300) NULL; -ALTER TABLE `' . $_POST['db_prefix'] . 'nav_nav` - MODIFY COLUMN external VARCHAR(300) AFTER page; -')) - { - echo msg('success', 'Navigation was installed successfully.'); - } - else - { - echo msg('fail', 'An error occured while installing Navigation.'); - exit; - } -} \ No newline at end of file diff --git a/inc/libs/db-mysql.php b/inc/libs/db-mysql.php index 13fa972..b2eb8ae 100755 --- a/inc/libs/db-mysql.php +++ b/inc/libs/db-mysql.php @@ -154,6 +154,8 @@ class db } $stmt .= ') VALUES (' . $valCnt . ')'; + echo $stmt; + print_r($vals); $insert = $this->dbh->prepare($stmt); return $insert->execute($vals); }