[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11959] SMS: test incoming
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11959] SMS: test incoming |
Date: |
Thu, 08 May 2014 13:26:08 +0000 |
Revision: 11959
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11959
Author: sigurdne
Date: 2014-05-08 13:26:07 +0000 (Thu, 08 May 2014)
Log Message:
-----------
SMS: test incoming
Modified Paths:
--------------
trunk/sms/inc/plugin/gateway/bergen_kommune/get.php
Modified: trunk/sms/inc/plugin/gateway/bergen_kommune/get.php
===================================================================
--- trunk/sms/inc/plugin/gateway/bergen_kommune/get.php 2014-05-08 12:03:42 UTC
(rev 11958)
+++ trunk/sms/inc/plugin/gateway/bergen_kommune/get.php 2014-05-08 13:26:07 UTC
(rev 11959)
@@ -41,19 +41,43 @@
$getNyeInnkommendeMeldinger->kodeord = $kodeord;
$ReturnValue =
$service->getNyeInnkommendeMeldinger($getNyeInnkommendeMeldinger);
+
+ $response = array();
+ if(isset($ReturnValue->return))
+ {
+ $_response = $ReturnValue->return;
+ if(is_array($_response))
+ {
+ $response = $_response;
+ }
+ else
+ {
+ $response[] = $_response;
+ }
+ }
- _debug_array($ReturnValue);
+// _debug_array($ReturnValue->return);
- die();
+ $datetime_format = phpgwapi_db::datetime_format();
+ foreach ($response as $entry)
+ {
+ $sms_datetime = date($datetime_format, time());
// should not be calculated
-/*
- if
($this->setsmsincomingaction($sms_datetime,$sms_sender,$target_code,$message))
- {
+ $message = trim(ltrim($entry->tekst,
$entry->kodeord));
+ $array_target_code = explode(' ',$message);
+ $target_code =
strtoupper(trim($array_target_code[0]));
+ $message = $array_target_code[1];
+ for ($i=2;$i<count($array_target_code);$i++)
+ {
+ $message .= " {$array_target_code[$i]}";
+ }
+// _debug_array($target_code);
+// _debug_array($message);
+
$this->setsmsincomingaction($sms_datetime,$entry->tlfavsender,$target_code,$message);
+ }
- }
+// _debug_array($ReturnValue);
-*/
}
-
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11959] SMS: test incoming,
Sigurd Nes <=