From f8a36c6e7409f43c57f60eef6d5cc5fbc9f4fad4 Mon Sep 17 00:00:00 2001 From: scholzDaSense Date: Sun, 16 Jun 2013 12:57:21 +0200 Subject: [PATCH] fixed database name convention --- sai/modules/saimod_sys_log/saimod_sys_log.php | 2 +- security/Security.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sai/modules/saimod_sys_log/saimod_sys_log.php b/sai/modules/saimod_sys_log/saimod_sys_log.php index aeb6e39..1a6bbcd 100644 --- a/sai/modules/saimod_sys_log/saimod_sys_log.php +++ b/sai/modules/saimod_sys_log/saimod_sys_log.php @@ -63,7 +63,7 @@ class saimod_sys_log extends \SYSTEM\SAI\SaiModule {

Truncate table system.sys_log

diff --git a/security/Security.php b/security/Security.php index a9c8024..798689c 100644 --- a/security/Security.php +++ b/security/Security.php @@ -74,7 +74,7 @@ class Security { // set password_sha if it is empty if(!$row[\SYSTEM\DBD\UserTable::FIELD_PASSWORD_SHA]){ $res = $con->prepare( 'updatePasswordSHAStmt', - 'UPDATE '.\SYSTEM\DBD\UserTable::NAME.' SET '.\SYSTEM\DBD\UserTable::FIELD_PASSWORD_SHA.' = $1 WHERE '.\SYSTEM\DBD\UserTable::FIELD_ID.' = $2'.' RETURNING '.\SYSTEM\DBD\UserTable::FIELD_PASSWORD_SHA.';', + 'UPDATE '.(\SYSTEM\system::isSystemDbInfoPG() ? \SYSTEM\DBD\UserTable::NAME_PG : \SYSTEM\DBD\UserTable::NAME_MYS).' SET '.\SYSTEM\DBD\UserTable::FIELD_PASSWORD_SHA.' = $1 WHERE '.\SYSTEM\DBD\UserTable::FIELD_ID.' = $2'.' RETURNING '.\SYSTEM\DBD\UserTable::FIELD_PASSWORD_SHA.';', array($password_sha,$row[\SYSTEM\DBD\UserTable::FIELD_ID])); $res = $res->next(); $row[\SYSTEM\DBD\UserTable::FIELD_PASSWORD_SHA] = $res[\SYSTEM\DBD\UserTable::FIELD_PASSWORD_SHA];