Fixed nav-app installation not working

This commit is contained in:
kolaente 2018-02-18 19:07:11 +01:00
parent 71743d5f46
commit ec44bdce88
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 2 additions and 30 deletions

View File

@ -1,30 +0,0 @@
<?php
if(isset($_POST['submit']))
{
if($db->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;
}
}

View File

@ -154,6 +154,8 @@ class db
}
$stmt .= ') VALUES (' . $valCnt . ')';
echo $stmt;
print_r($vals);
$insert = $this->dbh->prepare($stmt);
return $insert->execute($vals);
}