phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] [19085] Change the sql for application name, using th


From: Caeies
Subject: [Phpgroupware-cvs] [19085] Change the sql for application name, using the app_id stuff now
Date: Wed, 18 Feb 2009 18:30:53 +0000

Revision: 19085
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=19085
Author:   Caeies
Date:     2009-02-18 18:30:52 +0000 (Wed, 18 Feb 2009)

Log Message:
-----------
Change the sql for application name, using the app_id stuff now

Modified Paths:
--------------
    core/trunk/phpgwapi/inc/class.historylog.inc.php

Modified: core/trunk/phpgwapi/inc/class.historylog.inc.php
===================================================================
--- core/trunk/phpgwapi/inc/class.historylog.inc.php    2009-02-18 18:29:55 UTC 
(rev 19084)
+++ core/trunk/phpgwapi/inc/class.historylog.inc.php    2009-02-18 18:30:52 UTC 
(rev 19085)
@@ -57,7 +57,7 @@
                function delete($record_id)
                {
                        $this->db->query("DELETE FROM phpgw_history_log WHERE 
history_record_id='".(int)$record_id."' and "
-                               . "history_appname='" . $this->appname . 
"'",__LINE__,__FILE__);
+                               . "app_id='" . 
$GLOBALS['phpgw']->applications->name2id($this->appname) . 
"'",__LINE__,__FILE__);
                }
 
                function add($status,$record_id,$new_value,$old_value)
@@ -65,8 +65,8 @@
                        if ($new_value != $old_value)
                        {
                                $this->db->query("INSERT INTO phpgw_history_log 
(history_record_id,"
-                                       . 
"history_appname,history_owner,history_status,history_new_value,history_old_value,history_timestamp)
 "
-                                       . "VALUES ('".(int)$record_id."','" . 
$this->appname . "','"
+                                       . 
"app_id,history_owner,history_status,history_new_value,history_old_value,history_timestamp)
 "
+                                       . "VALUES ('".(int)$record_id."','" . 
$GLOBALS['phpgw']->applications->name2id($this->appname) . "','"
                                        . 
$GLOBALS['phpgw_info']['user']['account_id'] . "','$status','"
                                        . $this->db->db_addslashes($new_value) 
. "','" . $this->db->db_addslashes($old_value) . "','" . 
$this->db->to_timestamp(time())
                                        . "')",__LINE__,__FILE__);
@@ -114,7 +114,7 @@
                        }
 
                        $this->db->query('SELECT * FROM phpgw_history_log'
-                               . " WHERE history_appname='{$this->appname}' 
AND history_record_id = {$record_id} $filter $only_show_filter "
+                               . " WHERE 
app_id='{$GLOBALS['phpgw']->applications->name2id($this->appname)}' AND 
history_record_id = {$record_id} $filter $only_show_filter "
                                . $orderby, __LINE__, __FILE__);
 
                        $return_values = array();
@@ -174,7 +174,7 @@
                                
$this->template->set_var('row_date',$GLOBALS['phpgw']->common->show_date($value['datetime']));
                                
$this->template->set_var('row_owner',$value['owner']);
 
-                               if ($this->alternate_handlers[$value['status']])
+                               if 
(isset($this->alternate_handlers[$value['status']]))
                                {
                                        eval('\$s = ' . 
$this->alternate_handlers[$value['status']] . '(' . $value['new_value'] . ');');
                                        
$this->template->set_var('row_new_value',$s);






reply via email to

[Prev in Thread] Current Thread [Next in Thread]