From 73432a568a7e71ce492f7dce06e66481d3624680 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 13 Sep 2017 20:25:23 +0200 Subject: [PATCH] Fix installer (nav) --- Admin/Installer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Admin/Installer.php b/Admin/Installer.php index b9618a4..b662c1e 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -80,7 +80,7 @@ class Installer extends InstallerAbstract } foreach ($data as $link) { - self::installLink($dbPool, $link, $link['parent']); + self::installLink($dbPool, $link); } } @@ -95,7 +95,7 @@ class Installer extends InstallerAbstract * * @since 1.0.0 */ - private static function installLink($dbPool, $data, $parent = 0) + private static function installLink($dbPool, $data) { $sth = $dbPool->get('core')->con->prepare( 'INSERT INTO `' . $dbPool->get('core')->prefix . 'nav` (`nav_id`, `nav_pid`, `nav_name`, `nav_type`, `nav_subtype`, `nav_icon`, `nav_uri`, `nav_target`, `nav_from`, `nav_order`, `nav_parent`, `nav_permission`) VALUES @@ -112,7 +112,7 @@ class Installer extends InstallerAbstract $sth->bindValue(':target', $data['target'] ?? "self", \PDO::PARAM_STR); $sth->bindValue(':from', $data['from'] ?? 0, \PDO::PARAM_INT); $sth->bindValue(':order', $data['order'] ?? 1, \PDO::PARAM_INT); - $sth->bindValue(':parent', $parent, \PDO::PARAM_INT); + $sth->bindValue(':parent', $data['parent'], \PDO::PARAM_INT); $sth->bindValue(':perm', $data['permission'] ?? 0, \PDO::PARAM_INT); $sth->execute();