correct use of Database use

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-12-19 16:57:03 +01:00
parent 2c893fef25
commit 8e84a4ff44
55 changed files with 795 additions and 816 deletions

View File

@@ -1,5 +1,4 @@
<?php
if (file_exists('/etc/froxlor-test.pwd') && file_exists('/etc/froxlor-test.rpwd')) {
// froxlor jenkins test-system
$pwd = trim(file_get_contents('/etc/froxlor-test.pwd'));
@@ -33,8 +32,8 @@ file_put_contents($userdata, $userdata_content);
// include autoloader / api / etc
require dirname(__DIR__) . '/vendor/autoload.php';
use \Froxlor\Database;
use \Froxlor\Settings;
use Froxlor\Database\Database;
use Froxlor\Settings;
Database::needRoot(true);
Database::query("DROP DATABASE IF EXISTS `test1sql1`;");
@@ -71,7 +70,7 @@ Database::query("ALTER TABLE `" . TABLE_PANEL_FPMDAEMONS . "` AUTO_INCREMENT=2;"
// add superadmin
Database::query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` SET
`loginname` = 'admin',
`password` = '".makeCryptPassword('admin')."',
`password` = '" . makeCryptPassword('admin') . "',
`name` = 'Froxlor-Administrator',
`email` = 'admin@dev.froxlor.org',
`def_language` = 'English',