Installer update
This commit is contained in:
parent
350352fefd
commit
d7fb952ea3
|
@ -2,7 +2,11 @@
|
|||
require_once 'vendor/autoload.php';
|
||||
use Tracy\Debugger;
|
||||
|
||||
require_once 'config.php';
|
||||
try{
|
||||
require_once 'config.php';
|
||||
} catch(Exception $e){
|
||||
header('Location: install/install.php');
|
||||
}
|
||||
|
||||
session_start();
|
||||
date_default_timezone_set('Europe/Rome');
|
||||
|
|
|
@ -327,7 +327,9 @@ CREATE TABLE `".$prefix."_dbversion` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `Id` (`id`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `".$prefix."_dbversion` (`id`, `version`, `timestamp`) VALUES (NULL, '1', current_timestamp());");
|
||||
INSERT INTO `".$prefix."_dbversion` (`id`, `version`, `timestamp`) VALUES (NULL, '1', current_timestamp()) WHERE NOT EXISTS (
|
||||
SELECT version FROM `".$prefix."_dbversion` WHERE version = '1'
|
||||
) LIMIT 1;");
|
||||
} catch (Exception $e) {
|
||||
if(is_cli()){
|
||||
echo($e);
|
||||
|
|
Loading…
Reference in New Issue