fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11961] SMS: debug on manual fetch


From: Sigurd Nes
Subject: [Fmsystem-commits] [11961] SMS: debug on manual fetch
Date: Fri, 09 May 2014 14:02:33 +0000

Revision: 11961
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11961
Author:   sigurdne
Date:     2014-05-09 14:02:32 +0000 (Fri, 09 May 2014)
Log Message:
-----------
SMS: debug on manual fetch

Modified Paths:
--------------
    trunk/sms/inc/class.sms.inc.php
    trunk/sms/inc/class.uisms.inc.php
    trunk/sms/inc/plugin/gateway/bergen_kommune/get.php
    trunk/sms/inc/plugin/gateway/gnokii/get.php

Modified: trunk/sms/inc/class.sms.inc.php
===================================================================
--- trunk/sms/inc/class.sms.inc.php     2014-05-09 08:36:41 UTC (rev 11960)
+++ trunk/sms/inc/class.sms.inc.php     2014-05-09 14:02:32 UTC (rev 11961)
@@ -461,9 +461,13 @@
                        return $ok;
                }
 
-               function getsmsinbox()
+               function getsmsinbox($debug = false)
                {
-                       $this->gw_set_incoming_action();
+                       $ReturnValue = $this->gw_set_incoming_action();
+                       if($debug)
+                       {
+                               _debug_array($ReturnValue);
+                       }
                }
 
                function getsmsstatus()

Modified: trunk/sms/inc/class.uisms.inc.php
===================================================================
--- trunk/sms/inc/class.uisms.inc.php   2014-05-09 08:36:41 UTC (rev 11960)
+++ trunk/sms/inc/class.uisms.inc.php   2014-05-09 14:02:32 UTC (rev 11961)
@@ -867,7 +867,7 @@
                        $GLOBALS['phpgw']->xslttpl->add_file(array('sms'));
 
                        $sms = CreateObject('sms.sms');
-                       $sms->getsmsinbox();
+                       $sms->getsmsinbox(true);
                        $sms->getsmsstatus();
 
                        $receipt['message'][]=array('msg'=>lang('Daemon 
refreshed'));

Modified: trunk/sms/inc/plugin/gateway/bergen_kommune/get.php
===================================================================
--- trunk/sms/inc/plugin/gateway/bergen_kommune/get.php 2014-05-09 08:36:41 UTC 
(rev 11960)
+++ trunk/sms/inc/plugin/gateway/bergen_kommune/get.php 2014-05-09 14:02:32 UTC 
(rev 11961)
@@ -56,8 +56,6 @@
                                }
                        }
 
-//     _debug_array($ReturnValue->return);
-
                        $datetime_format = phpgwapi_db::datetime_format();
 
                        foreach ($response as $entry)
@@ -72,12 +70,10 @@
                                {
                                        $message .= " {$array_target_code[$i]}";
                                }
-//     _debug_array($target_code);
-//     _debug_array($message);
                                
$this->setsmsincomingaction($sms_datetime,$entry->tlfavsender,$target_code,$message);
                        }
 
-//                     _debug_array($ReturnValue);
+                       return $ReturnValue;
 
                }
        }

Modified: trunk/sms/inc/plugin/gateway/gnokii/get.php
===================================================================
--- trunk/sms/inc/plugin/gateway/gnokii/get.php 2014-05-09 08:36:41 UTC (rev 
11960)
+++ trunk/sms/inc/plugin/gateway/gnokii/get.php 2014-05-09 14:02:32 UTC (rev 
11961)
@@ -15,6 +15,7 @@
 
                function gw_set_incoming_action()
                {
+                   $response = array();
                    $handle = @opendir($this->gnokii_param[path] . 
"/cache/smsd");
                    while ($sms_in_file = @readdir($handle))
                    {
@@ -39,11 +40,20 @@
                                    }
                                    // collected:
                                    // $sms_datetime, $sms_sender, 
$target_code, $message
+                                       $response[] = array
+                                       (
+                                               'sms_datetime'  => 
$sms_datetime,
+                                               'sms_sender'    => $sms_sender,
+                                               'target_code'   => $target_code,
+                                               'message'               => 
$message     
+                                       );
+
                                    if 
($this->setsmsincomingaction($sms_datetime,$sms_sender,$target_code,$message))
                                    {
                                                @unlink($tobe_deleted);
                                    }
                                }
                    }
+                   return $response;
                }
        }




reply via email to

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