From f739bc00c418608becb8ae877011f3691e0d1550 Mon Sep 17 00:00:00 2001 From: rylon Date: Sat, 28 Sep 2013 14:15:02 +0200 Subject: [PATCH] pg sql fixes for todo and locale editmode --- sai/modules/saimod_sys_locale/saimod_sys_locale.php | 2 +- sai/modules/saimod_sys_todo/saimod_sys_todo.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sai/modules/saimod_sys_locale/saimod_sys_locale.php b/sai/modules/saimod_sys_locale/saimod_sys_locale.php index bd18e9c..724948e 100644 --- a/sai/modules/saimod_sys_locale/saimod_sys_locale.php +++ b/sai/modules/saimod_sys_locale/saimod_sys_locale.php @@ -45,7 +45,7 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule { $con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo()); $res = null; if(\SYSTEM\system::isSystemDbInfoPG()){ - throw new \SYSTEM\LOG\ERROR("action_edit failed"); + $res = $con->prepare('newText' ,'UPDATE system.locale_string SET "'.$lang.'"=$1 WHERE id=$2;', array($newtext, $id)); } else { $res = $con->prepare('newText' ,'UPDATE system_locale_string SET '.$lang.'=? WHERE id=?;', array($newtext, $id)); } diff --git a/sai/modules/saimod_sys_todo/saimod_sys_todo.php b/sai/modules/saimod_sys_todo/saimod_sys_todo.php index 8fb4341..c90c714 100644 --- a/sai/modules/saimod_sys_todo/saimod_sys_todo.php +++ b/sai/modules/saimod_sys_todo/saimod_sys_todo.php @@ -5,7 +5,7 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { public static function sai_mod__SYSTEM_SAI_saimod_sys_todo(){ $con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo()); if(\SYSTEM\system::isSystemDbInfoPG()){ - $res = $con->query('SELECT * FROM system.todo LEFT JOIN system_user ON system_todo.author = system_user.ID ORDER BY state, time DESC;'); + $res = $con->query('SELECT * FROM system.todo LEFT JOIN system.user ON system.todo.author = system.user.ID ORDER BY state, time DESC;'); } else { $res = $con->query('SELECT * FROM system_todo LEFT JOIN system_user ON system_todo.author = system_user.ID ORDER BY state, time DESC;'); }