|
@@ 735-739 (lines=5) @@
|
| 732 |
|
require PMF_ROOT_DIR . '/config/database.php'; |
| 733 |
|
$db = PMF_Db::factory($dbSetup['dbType']); |
| 734 |
|
$db->connect($DB['server'], $DB['user'], $DB['password'], $DB['db']); |
| 735 |
|
if (!$db) { |
| 736 |
|
echo "<p class=\"alert alert-error\"><strong>DB Error:</strong> ".$db->error()."</p>\n"; |
| 737 |
|
$this->_system->cleanInstallation(); |
| 738 |
|
PMF_System::renderFooter(true); |
| 739 |
|
} |
| 740 |
|
|
| 741 |
|
require PMF_ROOT_DIR . '/install/' . $dbSetup['dbType'] . '.sql.php'; // CREATE TABLES |
| 742 |
|
require PMF_ROOT_DIR . '/install/stopwords.sql.php'; // INSERTs for stopwords |
|
@@ 790-795 (lines=6) @@
|
| 787 |
|
|
| 788 |
|
// add admin account and rights |
| 789 |
|
$admin = new PMF_User($configuration); |
| 790 |
|
if (! $admin->createUser($loginname, $password, 1)) { |
| 791 |
|
echo "<p class=\"alert alert-error\"><strong>Fatal installation error:</strong> " . |
| 792 |
|
"Couldn't create the admin user.</p>\n"; |
| 793 |
|
$this->_system->cleanInstallation(); |
| 794 |
|
PMF_System::renderFooter(true); |
| 795 |
|
} |
| 796 |
|
$admin->setStatus('protected'); |
| 797 |
|
$adminData = array( |
| 798 |
|
'display_name' => $realname, |