From d88de8e07267cb628e7ecf28c1518002fd8d7ff9 Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Mon, 28 Aug 2017 22:43:03 +0200 Subject: [PATCH] * fixed Twig loading on case-sensitive systems --- system/init.php | 2 +- system/migrations/4.php | 3 ++- system/migrations/6.php | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/system/init.php b/system/init.php index 090abe50..7fef463a 100644 --- a/system/init.php +++ b/system/init.php @@ -27,7 +27,7 @@ require_once(SYSTEM . 'libs/cache.php'); $cache = Cache::getInstance($config['cache_engine'], $config['cache_prefix']); // twig -require_once LIBS . 'twig/Autoloader.php'; +require_once LIBS . 'Twig/Autoloader.php'; Twig_Autoloader::register(); $loader = new Twig_Loader_Filesystem(SYSTEM . 'templates'); diff --git a/system/migrations/4.php b/system/migrations/4.php index 774b2d5f..fbe17b12 100644 --- a/system/migrations/4.php +++ b/system/migrations/4.php @@ -1,3 +1,4 @@ query("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `id` int(11) NOT NULL AUTO_INCREMENT primary key FIRST;"); + if(!fieldExist('id', TABLE_PREFIX . 'monsters')) + $db->query("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `id` int(11) NOT NULL AUTO_INCREMENT primary key FIRST;"); ?> \ No newline at end of file diff --git a/system/migrations/6.php b/system/migrations/6.php index 1356dd05..6f1fed1a 100644 --- a/system/migrations/6.php +++ b/system/migrations/6.php @@ -1,3 +1,4 @@ query("ALTER TABLE `" . TABLE_PREFIX . "hooks` ADD `enabled` INT(1) NOT NULL DEFAULT 1;"); + if(!fieldExist('enabled', TABLE_PREFIX . 'hooks')) + $db->query("ALTER TABLE `" . TABLE_PREFIX . "hooks` ADD `enabled` INT(1) NOT NULL DEFAULT 1;"); ?> \ No newline at end of file