phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/class.historylog.php, 1.1.1.5


From: nomail
Subject: [Phpgroupware-cvs] property/class.historylog.php, 1.1.1.5
Date: Sun, 23 May 2004 16:11:59 -0000

Update of /property
Modified Files:
        Branch: 
          class.historylog.php

date: 2004/05/03 09:35:14;  author: sigurdne;  state: Exp;  lines: +20 -16

Log Message:
no message
=====================================================================
Index: property/class.historylog.php
diff -u property/class.historylog.php:1.1.1.4 
property/class.historylog.php:1.1.1.5
--- property/class.historylog.php:1.1.1.4       Sat Apr 24 19:39:54 2004
+++ property/class.historylog.php       Mon May  3 09:35:14 2004
@@ -36,6 +36,9 @@
 
                function property_historylog($appname)
                {
+                       $this->currentapp               = 'property'; 
//$GLOBALS['phpgw_data']['flags']['req_app'];
+                       $this->functions                = 
CreateObject($this->currentapp.'_functions');
+
                        if (! $appname)
                        {
                                $appname = 'property'; 
//$GLOBALS['phpgw_data']['flags']['req_app'];
@@ -70,18 +73,18 @@
 
                function delete($record_id)
                {
-                       $this->db->query("delete from $this->table where 
history_record_id='$record_id' and "
-                               . "history_appname='" . $this->appname . 
"'",__LINE__,__FILE__);
+                       $GLOBALS['phpgw']->db->Execute("delete from 
$this->table where history_record_id='$record_id' and "
+                               . "history_appname='" . $this->appname . "'");
                }
 
                function add($status,$record_id,$new_value)
                {
-                       $this->db->query("insert into $this->table 
(history_record_id,"
+                       $GLOBALS['phpgw']->db->Execute("insert into 
$this->table (history_record_id,"
                                . 
"history_appname,history_owner,history_status,history_new_value,history_timestamp)
 "
                                . "values ('$record_id','" . $this->appname . 
"','"
                                . $GLOBALS['phpgw_data']['user']['id'] . 
"','$status','"
-                               . addslashes($new_value) . "','" . 
$this->db->to_timestamp(time())
-                               . "')",__LINE__,__FILE__);
+                               . addslashes($new_value) . "','" . 
$this->functions->to_timestamp(time())
+                               . "')");
                }
 
                // array $filter_out
@@ -117,20 +120,21 @@
                                $only_show_filter = ' and (' . implode(' or 
',$_only_show) . ')';
                        }
 
-                       $this->db->query("select * from $this->table where 
history_appname='"
+                       $dbresult = $GLOBALS['phpgw']->db->Execute("select * 
from $this->table where history_appname='"
                                . $this->appname . "' and 
history_record_id='$record_id' $filter $only_show_filter "
-                               . "$orderby",__LINE__,__FILE__);
-                       while ($this->db->next_record())
+                               . "$orderby");
+                       while (!$dbresult->EOF)
                        {
                                $return_values[] = array(
-                                       'id'         => 
$this->db->f('history_id'),
-                                       'record_id'  => 
$this->db->f('history_record_id'),
-                                       'owner'      => 
$GLOBALS['phpgw']->accounts->id2name($this->db->f('history_owner')),
-//                                     'status'     => 
lang($this->types[$this->db->f('history_status')]),
-                                       'status'     => ereg_replace(' 
','',$this->db->f('history_status')),
-                                       'new_value'  => 
$this->db->f('history_new_value'),
-                                       'datetime'   => 
$this->db->from_timestamp($this->db->f('history_timestamp'))
+                                       'id'         => 
$dbresult->fields['history_id'],
+                                       'record_id'  => 
$dbresult->fields['history_record_id'],
+                                       'owner'      => 
$GLOBALS['phpgw']->accounts->id2name($dbresult->fields['history_owner']),
+//                                     'status'     => 
lang($this->types[$dbresult->fields['history_status']]),
+                                       'status'     => ereg_replace(' 
','',$dbresult->fields['history_status']),
+                                       'new_value'  => 
$dbresult->fields['history_new_value'],
+                                       'datetime'   => 
$this->functions->from_timestamp($dbresult->fields['history_timestamp'])
                                );
+                               $dbresult->MoveNext();
                        }
                        return $return_values;
                }




reply via email to

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