Skip to content

Commit 0e3df6c

Browse files
author
Marius Cramer
committed
- Changed APS to 1.2
- Fixed error in mysql library
1 parent 85fdab1 commit 0e3df6c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

interface/lib/classes/aps_guicontroller.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ public function createDatabaseForPackageInstance(&$settings, $websrv) {
287287
//* Create the mysql database user if not existing
288288
$tmp = $app->db->queryOneRecord("SELECT database_user_id FROM web_database_user WHERE database_user = ?", $settings['main_database_login']);
289289
if(!$tmp) {
290+
$tmppw = $app->db->queryOneRecord("SELECT PASSWORD(?) as `crypted`", $settings['main_database_password']);
290291
$insert_data = array("sys_userid" => $websrv['sys_userid'],
291292
"sys_groupid" => $websrv['sys_groupid'],
292293
"sys_perm_user" => 'riud',
@@ -295,7 +296,7 @@ public function createDatabaseForPackageInstance(&$settings, $websrv) {
295296
"server_id" => 0,
296297
"database_user" => $settings['main_database_login'],
297298
"database_user_prefix" => $dbuser_prefix,
298-
"database_password" => "PASSWORD('" . $settings['main_database_password'] . "')"
299+
"database_password" => $tmppw['crypted']
299300
);
300301
$mysql_db_user_id = $app->db->datalogInsert('web_database_user', $insert_data, 'database_user_id');
301302
}

interface/lib/classes/db_mysql.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ public function datalogInsert($tablename, $insert_data, $index_field) {
678678

679679
$old_rec = array();
680680
$index_value = $this->insertID();
681-
$new_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ? = ?", $tablename, $index_field, $index_value);
681+
$new_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value);
682682
$this->datalogSave($tablename, 'INSERT', $index_field, $index_value, $old_rec, $new_rec);
683683

684684
return $index_value;

0 commit comments

Comments
 (0)