[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] sms/inc class.sms.inc.php
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] sms/inc class.sms.inc.php |
Date: |
Mon, 22 May 2006 13:31:57 +0000 |
CVSROOT: /sources/phpgroupware
Module name: sms
Branch:
Changes by: Sigurd Nes <address@hidden> 06/05/22 13:31:57
Modified files:
inc : class.sms.inc.php
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/sms/inc/class.sms.inc.php.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
Patches:
Index: sms/inc/class.sms.inc.php
diff -u sms/inc/class.sms.inc.php:1.7 sms/inc/class.sms.inc.php:1.8
--- sms/inc/class.sms.inc.php:1.7 Mon May 22 12:50:06 2006
+++ sms/inc/class.sms.inc.php Mon May 22 13:31:57 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package sms
* @subpackage sms
- * @version $Id: class.sms.inc.php,v 1.7 2006/05/22 12:50:06 sigurdne
Exp $
+ * @version $Id: class.sms.inc.php,v 1.8 2006/05/22 13:31:57 sigurdne
Exp $
*/
/**
@@ -230,7 +230,7 @@
return $gp_name;
}
- function gpid2gpcode($gpid)
+/* function gpid2gpcode($gpid)
{
if ($gpid)
{
@@ -241,7 +241,7 @@
}
return $gp_code;
}
-
+*/
function gpcode2gpname($uid,$gp_code)
{
if ($uid && $gp_code)
@@ -792,29 +792,33 @@
function getsmsstatus()
{
$gateway_module = $this->gateway_module;
- $db_query = "SELECT * FROM phpgw_sms_tblSMSOutgoing
WHERE p_status='0' AND p_gateway='$gateway_module'";
+ $db_query = "SELECT * FROM phpgw_sms_tblsmsoutgoing
WHERE p_status='0' AND p_gateway='$gateway_module'";
$this->db->query($db_query,__LINE__,__FILE__);
while ($this->db->next_record())
{
- $gpid = "";
- $gp_code = "";
- $uid = $this->db->f('uid');
- $smslog_id = $this->db->f('smslog_id');
- $p_datetime = $this->db->f('p_datetime');
- $p_update = $this->db->f('p_update');
- $gpid = $this->db->f('p_gpid');
- $gp_code = gpid2gpcode($gpid);
-
$this->gw_set_delivery_status($gp_code,$uid,$smslog_id,$p_datetime,$p_update);
+ $gpid = "";
+ $gp_code = "";
+ $uid = $this->db->f('uid');
+ $smslog_id = $this->db->f('smslog_id');
+ $p_datetime = $this->db->f('p_datetime');
+ $p_update = $this->db->f('p_update');
+ $gpid = $this->db->f('p_gpid');
+ // $gp_code = gpid2gpcode($gpid);
+ if($gpid)
+ {
+ $gp_code =
$GLOBALS['phpgw']->accounts->name2id($gpid);
+ }
+
$this->gw_set_delivery_status($gp_code,$uid,$smslog_id,$p_datetime,$p_update);
}
-
$this->gw_set_delivery_status($gp_code,$uid,$smslog_id,$p_datetime,$p_update);
+ //
$this->gw_set_delivery_status($gp_code,$uid,$smslog_id,$p_datetime,$p_update);
}
function execgwcustomcmd()
{
if (function_exists("gw_customcmd"))
{
- gw_customcmd();
+ gw_customcmd();
}
}
@@ -828,9 +832,12 @@
$datetime_now = $this->datetime_now;
$ok = false;
$db_query = "UPDATE phpgw_sms_tblSMSOutgoing SET
p_update='$datetime_now',p_status='$p_status' WHERE smslog_id='$smslog_id' AND
uid='$uid'";
- if ($aff_id = @dba_affected_rows($db_query))
+ $this->db->transaction_begin();
+ $this->db->query($db_query,__LINE__,__FILE__);
+
+ if ($this->db->transaction_commit())
{
- $ok = true;
+ $ok = true;
}
return $ok;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sms/inc class.sms.inc.php,
Sigurd Nes <=