Commit 0e3df6c9 authored by Marius Cramer's avatar Marius Cramer
Browse files

- Changed APS to 1.2

- Fixed error in mysql library
parent 85fdab1f
......@@ -287,6 +287,7 @@ class ApsGUIController extends ApsBase
//* Create the mysql database user if not existing
$tmp = $app->db->queryOneRecord("SELECT database_user_id FROM web_database_user WHERE database_user = ?", $settings['main_database_login']);
if(!$tmp) {
$tmppw = $app->db->queryOneRecord("SELECT PASSWORD(?) as `crypted`", $settings['main_database_password']);
$insert_data = array("sys_userid" => $websrv['sys_userid'],
"sys_groupid" => $websrv['sys_groupid'],
"sys_perm_user" => 'riud',
......@@ -295,7 +296,7 @@ class ApsGUIController extends ApsBase
"server_id" => 0,
"database_user" => $settings['main_database_login'],
"database_user_prefix" => $dbuser_prefix,
"database_password" => "PASSWORD('" . $settings['main_database_password'] . "')"
"database_password" => $tmppw['crypted']
);
$mysql_db_user_id = $app->db->datalogInsert('web_database_user', $insert_data, 'database_user_id');
}
......
......@@ -678,7 +678,7 @@ class db extends mysqli
$old_rec = array();
$index_value = $this->insertID();
$new_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ? = ?", $tablename, $index_field, $index_value);
$new_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value);
$this->datalogSave($tablename, 'INSERT', $index_field, $index_value, $old_rec, $new_rec);
return $index_value;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment