fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9939] sms


From: Sigurd Nes
Subject: [Fmsystem-commits] [9939] sms
Date: Thu, 30 Aug 2012 12:55:37 +0000

Revision: 9939
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9939
Author:   sigurdne
Date:     2012-08-30 12:55:34 +0000 (Thu, 30 Aug 2012)
Log Message:
-----------
sms

Modified Paths:
--------------
    trunk/sms/inc/plugin/gateway/pswin/README
    trunk/sms/inc/plugin/gateway/pswin/SMSReceive.php
    trunk/sms/inc/plugin/gateway/pswin/get.php
    trunk/sms/inc/plugin/gateway/pswin/soap.php
    trunk/sms/setup/default_records.inc.php
    trunk/sms/setup/setup.inc.php
    trunk/sms/setup/tables_current.inc.php
    trunk/sms/setup/tables_update.inc.php

Modified: trunk/sms/inc/plugin/gateway/pswin/README
===================================================================
--- trunk/sms/inc/plugin/gateway/pswin/README   2012-08-30 12:20:08 UTC (rev 
9938)
+++ trunk/sms/inc/plugin/gateway/pswin/README   2012-08-30 12:55:34 UTC (rev 
9939)
@@ -12,6 +12,8 @@
        'proxy_host'    =>
        'proxy_port'    =>
        'originator'    =>
-       'type'                  => SOAP / GET
+       'type'                  => SOAP | GET //Send type
+       'receive_url'   => ''//local url to webservice for pswin to deliver 
messages and reports
 );
 
+The common-section needs the 'anonymous_user' and the 'anonymous_pass'

Modified: trunk/sms/inc/plugin/gateway/pswin/SMSReceive.php
===================================================================
--- trunk/sms/inc/plugin/gateway/pswin/SMSReceive.php   2012-08-30 12:20:08 UTC 
(rev 9938)
+++ trunk/sms/inc/plugin/gateway/pswin/SMSReceive.php   2012-08-30 12:55:34 UTC 
(rev 9939)
@@ -376,12 +376,11 @@
                        $this->_checkArguments($args, $validParameters);
                        $result =  $this->__soapCall("ReceiveSMSMessage", 
$args);
 
-/*
                        echo("<H1>Dumping request headers:</H1></br>" 
.$this->__getLastRequestHeaders());
                        echo("</br><H1>Dumping 
request:</H1></br>".$this->__getLastRequest());
                        echo("</br><H1>Dumping response headers:</H1></br>"     
.$this->__getLastResponseHeaders());
                        echo("</br><H1>Dumping 
response:</H1></br>".$this->__getLastResponse());
-*/
+
                        return $result;
                }
        

Modified: trunk/sms/inc/plugin/gateway/pswin/get.php
===================================================================
--- trunk/sms/inc/plugin/gateway/pswin/get.php  2012-08-30 12:20:08 UTC (rev 
9938)
+++ trunk/sms/inc/plugin/gateway/pswin/get.php  2012-08-30 12:55:34 UTC (rev 
9939)
@@ -34,35 +34,48 @@
                }
 
 
+
                function gw_set_incoming_action()
                {
-                       if(!isset($this->pswin_param['email_user']) || ! 
$this->pswin_param['email_user'])
+                       $test_receive = true;
+                       
+                       if ($test_receive)
                        {
-//                         throw new Exception('Email user not defined');
+                               $this->test_receive();
                        }
 
+                       
+
+
+               }
+
+
+               function test_receive()
+               {
                        require_once 'SMSReceive.php';
 
                        $options=array();
-                       $options['soap_version'] = SOAP_1_2;
-                       $options['location'] = 
'http://localhost/~sn5607/savannah_trunk/sms/inc/plugin/gateway/pswin/soap.php?domain=default';//$this->pswin_param['receive_url'];
-                       $options['uri']         = 
"http://localhost/~sn5607/savannah_trunk/sms/inc/plugin/gateway/pswin/soap.php";;
-                       $options['trace']               = 1;
-               //      $options['proxy_host']  = 
$this->pswin_param['proxy_host'];
-               //      $options['proxy_port']  = 
$this->pswin_param['proxy_port'];
-                       $options['encoding']    = 'iso-8859-1';//'UTF-8';
+                       $options['soap_version']        = SOAP_1_2;
+                       $options['location']            = 
'http://localhost/~sn5607/savannah_trunk/sms/inc/plugin/gateway/pswin/soap.php?domain=test';//$this->pswin_param['receive_url'];
+                       $options['uri']                         = 
"http://localhost/~sn5607/savannah_trunk/sms/inc/plugin/gateway/pswin/soap.php";;
+                       $options['trace']                       = 1;
+               //      $options['proxy_host']          = 
$this->pswin_param['proxy_host'];
+               //      $options['proxy_port']          = 
$this->pswin_param['proxy_port'];
+                       $options['encoding']            = 
'iso-8859-1';//'UTF-8';
 
                        $wdsl = PHPGW_SERVER_ROOT . 
'/sms/inc/plugin/gateway/pswin/Receive.wdsl';
 
                        $receive = new SMSReceive($wdsl, $options);
 
+                       $Position = new GSMPosition();
+                       $Position->City = 'Bergen';
                        $IncomingSMSMessage = new IncomingSMSMessage();
                        $IncomingSMSMessage->ReceiverNumber = '26112';
-                       $IncomingSMSMessage->SenderNumber = '26112';
-                       $IncomingSMSMessage->Text = '';
+                       $IncomingSMSMessage->SenderNumber = '90665164';
+                       $IncomingSMSMessage->Text = 'Dette er en testmelding';
                        $IncomingSMSMessage->Network = '';
-                       $IncomingSMSMessage->Address = '';
-                       $IncomingSMSMessage->Position = '';
+                       $IncomingSMSMessage->Address = 
'Firstname;middlename;lastname;address;ZipCode;City;RegionNumber;CountyNumber';
+                       $IncomingSMSMessage->Position = $Position;
                
 
                        $ReceiveSMSMessage = new ReceiveSMSMessage();

Modified: trunk/sms/inc/plugin/gateway/pswin/soap.php
===================================================================
--- trunk/sms/inc/plugin/gateway/pswin/soap.php 2012-08-30 12:20:08 UTC (rev 
9938)
+++ trunk/sms/inc/plugin/gateway/pswin/soap.php 2012-08-30 12:55:34 UTC (rev 
9939)
@@ -3,7 +3,7 @@
        * phpGroupWare
        *
        * @author Sigurd Nes <address@hidden>
-       * @copyright Copyright (C) 2000-2009 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @copyright Copyright (C) 2012 Free Software Foundation, Inc. 
http://www.fsf.org/
        * This file is part of phpGroupWare.
        *
        * phpGroupWare is free software; you can redistribute it and/or modify
@@ -50,7 +50,7 @@
        require_once '../../../../../header.inc.php';
 
        unset($GLOBALS['phpgw_info']['flags']['noapi']);
-       $GLOBALS['phpgw_info']['flags']['authed'] = false;
+
        $GLOBALS['phpgw_info']['message']['errors'] = array();
 
        if(!isset($_GET['domain']) || !$_GET['domain'])
@@ -103,9 +103,7 @@
        (
                'uri'          => "http://test-uri/";, # the name space of the 
SOAP service
                'soap_version' => SOAP_1_2,
-       //      'actor'        => "...", # the actor
                'encoding'     => "UTF-8", # the encoding name
-       //      'classmap'     => "...", # a map of WSDL types to PHP classes
        );
 
        ini_set("soap.wsdl_cache_enabled","0");
@@ -123,6 +121,19 @@
                 */
                public $ReceiveSMSMessageResult;
        }
+
+       /**
+        * ReceiveDeliveryReportResponse
+        */
+       class ReceiveDeliveryReportResponse
+       {
+               /**
+                * @access public
+                * @var ReturnValue
+                */
+               public $ReceiveDeliveryReportResult;
+       }
+
        
        /**
         * ReturnValue
@@ -147,6 +158,16 @@
        }
        
 
+       function check_error()
+       {
+               if( isset($GLOBALS['phpgw_info']['message']['errors']) && 
$GLOBALS['phpgw_info']['message']['errors'] )
+               {
+               $error = 'Error(s): ' . implode(' ## AND ## ', 
$GLOBALS['phpgw_info']['message']['errors']);
+               return new SoapFault("phpgw", $error);
+               }
+       }
+
+
        function ReceiveSMSMessage($ReceiveSMSMessage)
        {
                if($error = check_error())
@@ -154,40 +175,68 @@
                        return $error;
                }
 
-               $filename = '/tmp/test_soap.txt';
-               $fp = fopen($filename, "wb");
-               fwrite($fp,serialize($ReceiveSMSMessage));
-               if(fclose($fp))
-               {
-                       $file_written=True;
-               }
-
                $ReceiveSMSMessageResponse = new ReceiveSMSMessageResponse();
                $ReturnValue = new ReturnValue();
-               $ReturnValue->Code = '200';
+               $ReturnValue->Code = '500';
                $ReturnValue->Description = '';
                $ReturnValue->Reference = '';
+
+               $value_set = array
+               (
+                       'type'                          => 'sms', // report
+                       'data'                          => 
$GLOBALS['phpgw']->db->db_addslashes(serialize($ReceiveSMSMessage)),
+                       'entry_date'            => time(),
+                       'modified_date'         => time(),
+               );
+
+               $cols = implode(',', array_keys($value_set));
+               $values = 
$GLOBALS['phpgw']->db->validate_insert(array_values($value_set));
+               if(     $GLOBALS['phpgw']->db->query("INSERT INTO 
phpgw_sms_reveived_data ({$cols}) VALUES ({$values})",__LINE__,__FILE__))
+               {
+                       $ReturnValue->Code = '200';             
+               }
                
                $ReceiveSMSMessageResponse->ReceiveSMSMessageResult = 
$ReturnValue;
 
                return $ReceiveSMSMessageResponse;
        } 
 
-       function check_error()
+
+
+       function ReceiveMMSMessage($ReceiveMMSMessage)
        {
-               if( isset($GLOBALS['phpgw_info']['message']['errors']) && 
$GLOBALS['phpgw_info']['message']['errors'] )
+               if($error = check_error())
                {
-               $error = 'Error(s): ' . implode(' ## AND ## ', 
$GLOBALS['phpgw_info']['message']['errors']);
-               return new SoapFault("phpgw", $error);
+                       return $error;
                }
 
-               //to be sure...
-               if( !$GLOBALS['phpgw_info']['flags']['authed'] )
+               $ReceiveMMSMessageResponse = new ReceiveMMSMessageResponse();
+               $ReturnValue = new ReturnValue();
+               $ReturnValue->Code = '500';
+               $ReturnValue->Description = '';
+               $ReturnValue->Reference = '';
+
+               $value_set = array
+               (
+                       'type'                          => 'mms', // report
+                       'data'                          => 
base64_encode(serialize($ReceiveMMSMessage)),
+                       'entry_date'            => time(),
+                       'modified_date'         => time(),
+               );
+
+               $cols = implode(',', array_keys($value_set));
+               $values = 
$GLOBALS['phpgw']->db->validate_insert(array_values($value_set));
+               if(     $GLOBALS['phpgw']->db->query("INSERT INTO 
phpgw_sms_reveived_data ({$cols}) VALUES ({$values})",__LINE__,__FILE__))
                {
-               return new SoapFault("phpgw", 'not authenticated');
-               }       
-       }
+                       $ReturnValue->Code = '200';             
+               }
+               
+               $ReceiveMMSMessageResponse->ReceiveSMSMessageResult = 
$ReturnValue;
 
+               return $ReceiveMMSMessageResult;
+       } 
+
+
        function ReceiveDeliveryReport($DeliveryReport)
        {
                if($error = check_error())
@@ -195,7 +244,30 @@
                        return $error;
                }
 
-               return '';
+               $ReceiveDeliveryReportResponse = new 
ReceiveDeliveryReportResponse();
+               $ReturnValue = new ReturnValue();
+               $ReturnValue->Code = '500';
+               $ReturnValue->Description = '';
+               $ReturnValue->Reference = '';
+               
+               $value_set = array
+               (
+                       'type'                          => 'report',
+                       'data'                          => 
$GLOBALS['phpgw']->db->db_addslashes(serialize($DeliveryReport)),
+                       'entry_date'            => time(),
+                       'modified_date'         => time(),
+               );
+
+               $cols = implode(',', array_keys($value_set));
+               $values = 
$GLOBALS['phpgw']->db->validate_insert(array_values($value_set));
+               if(     $GLOBALS['phpgw']->db->query("INSERT INTO 
phpgw_sms_reveived_data ({$cols}) VALUES ({$values})",__LINE__,__FILE__))
+               {
+                       $ReturnValue->Code = '200';             
+               }
+               
+               $ReceiveDeliveryReportResponse->ReceiveDeliveryReportResult = 
$ReturnValue;
+
+               return $ReceiveDeliveryReportResponse;
        }
 
 
@@ -210,8 +282,9 @@
        } 
 
        $functions = array();
-       $functions[] = 'hello';
+//     $functions[] = 'hello';
        $functions[] = 'ReceiveSMSMessage';
+       $functions[] = 'ReceiveMMSMessage';
        $functions[] = 'ReceiveDeliveryReport';
 
        $GLOBALS['server']->addFunction($functions);
@@ -227,18 +300,10 @@
 
        if ($_SERVER["REQUEST_METHOD"] == "POST")
        {
-/*
-               $filename = '/tmp/test_request_xml.txt';
-               $fp = fopen($filename, "wb");
-               fwrite($fp,serialize($request_xml));
-               fclose($fp);
-*/
-
                $GLOBALS['server']->handle($request_xml);
        }
        else
        {
-
                if( isset($GLOBALS['phpgw_info']['message']['errors']) && 
$GLOBALS['phpgw_info']['message']['errors'] )
                {
                $error = 'Error(s): ' . implode(' ## AND ## ', 
$GLOBALS['phpgw_info']['message']['errors']);

Modified: trunk/sms/setup/default_records.inc.php
===================================================================
--- trunk/sms/setup/default_records.inc.php     2012-08-30 12:20:08 UTC (rev 
9938)
+++ trunk/sms/setup/default_records.inc.php     2012-08-30 12:55:34 UTC (rev 
9939)
@@ -51,10 +51,14 @@
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 
1,'listbox', 'gateway_module_get', 'Active gateway module GET')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 
2,'listbox', 'gateway_module_send', 'Active gateway module SEND')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 3, 
'text', 'gateway_number', 'Gateway number')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 4, 
'text', 'anonymous_user', 'anonymous user for delivering data via 
wev-service')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (1 + $num_sections) . ", 5, 
'password', 'anonymous_pass', 'Password for anonymous user for delivering data 
via wev-service')");
+
+
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (2 + $num_sections) . ", 1, 
'text', 'gnokii_cfg', 'Gnokii Installation Path')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (3 + $num_sections) . ", 1, 
'text', 'api_id', 'Clickatell API ID')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (3 + $num_sections) . ", 2, 
'text', 'username', 'Clickatell username')");
-       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (3 + $num_sections) . ", 3, 
'text', 'password', 'Clickatell password')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (3 + $num_sections) . ", 3, 
'password', 'password', 'Clickatell password')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (3 + $num_sections) . ", 4, 
'text', 'sender', 'Clickatell Global Sender')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (3 + $num_sections) . ", 5, 
'text', 'send_url', 'Clickatell API URL')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (3 + $num_sections) . ", 6, 
'text', 'incoming_path', 'Clickatell Incoming Path')");
@@ -63,12 +67,12 @@
 
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (4 + $num_sections) . ", 1, 
'text', 'master', 'Uplink Master URL')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (4 + $num_sections) . ", 2, 
'text', 'username', 'Uplink username')");
-       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (4 + $num_sections) . ", 3, 
'text', 'password', 'Uplink password')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (4 + $num_sections) . ", 3, 
'password', 'password', 'Uplink password')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (4 + $num_sections) . ", 4, 
'text', 'global_sender', 'Uplink Global Sender')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (4 + $num_sections) . ", 5, 
'text', 'incoming_path', 'Uplink Incoming Path')");
 
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (5 + $num_sections) . ", 1, 
'text', 'username', 'Kannel username')");
-       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (5 + $num_sections) . ", 2, 
'text', 'password', 'Kannel password')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (5 + $num_sections) . ", 2, 
'password', 'password', 'Kannel password')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (5 + $num_sections) . ", 3, 
'text', 'global_sender', 'Kannel global sender')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (5 + $num_sections) . ", 4, 
'text', 'bearerbox_host', 'Kannel bearerbox_host')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (5 + $num_sections) . ", 5, 
'text', 'sendsms_port', 'Kannel Send SMS Port')");
@@ -92,15 +96,13 @@
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 2, 
'text', 'send_url', 'send url using GET')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 3, 
'text', 'service_url', 'service_url using SOAP')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 4, 
'text', 'login', 'pswin login')");
-       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 5, 
'password', 'password', 'Carrot password')");
+       $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 5, 
'password', 'password', 'pswin password')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 6, 
'text', 'proxy_host', 'proxy_host')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 7, 
'text', 'proxy_port', 'proxy_port')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 8, 
'text', 'originator', 'originator')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 9, 
'listbox', 'type', 'Send type')");
        $db->query("INSERT INTO phpgw_config2_attrib 
(section_id,id,input_type,name, descr) VALUES (" . (7 + $num_sections) . ", 10, 
'text', 'receive_url', 'receive_url using SOAP')");
 
-
-
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 1, 1, 
'gnokii')");
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 1, 2, 
'clickatell')");
        $db->query("INSERT INTO phpgw_config2_choice 
(section_id,attrib_id,id,value) VALUES (" . (1 + $num_sections) . ", 1, 3, 
'uplink')");

Modified: trunk/sms/setup/setup.inc.php
===================================================================
--- trunk/sms/setup/setup.inc.php       2012-08-30 12:20:08 UTC (rev 9938)
+++ trunk/sms/setup/setup.inc.php       2012-08-30 12:55:34 UTC (rev 9939)
@@ -10,7 +10,7 @@
        */
 
        $setup_info['sms']['name']      = 'sms';
-       $setup_info['sms']['version']   = '0.9.17.511';
+       $setup_info['sms']['version']   = '0.9.17.512';
        $setup_info['sms']['app_order'] = 8;
        $setup_info['sms']['enable']    = 1;
        $setup_info['sms']['app_group'] = 'office';
@@ -50,6 +50,7 @@
                'phpgw_sms_tblusergroupphonebook_public',
                'phpgw_sms_tbluserinbox',
                'phpgw_sms_tbluserphonebook',
+               'phpgw_sms_reveived_data'
        );
 
        /* The hooks this app includes, needed for hooks registration */

Modified: trunk/sms/setup/tables_current.inc.php
===================================================================
--- trunk/sms/setup/tables_current.inc.php      2012-08-30 12:20:08 UTC (rev 
9938)
+++ trunk/sms/setup/tables_current.inc.php      2012-08-30 12:55:34 UTC (rev 
9939)
@@ -309,5 +309,21 @@
                        'fk' => array(),
                        'ix' => array(),
                        'uc' => array()
+               ),
+
+               'phpgw_sms_reveived_data' => array(
+                       'fd' => array(
+                               'id' => array('type' => 'auto', 'nullable' => 
False),
+                               'type' => array('type' => 'varchar', 
'precision' => 15, 'nullable' => False),,/*sms/mms/report*/
+                               'data' => array('type' => 'text', 'nullable' => 
False),
+                               'status' => array('type' => 'int', 'precision' 
=> 4, 'nullable' => False, 'default' => '0'),
+                               'entry_date' => array('type' => 'int', 
'precision' => 4, 'nullable' => False, 'default' => '0'),
+                               'modified_date' => array('type' => 'int', 
'precision' => 4, 'nullable' => False, 'default' => '0'),
+                       ),
+                       'pk' => array('id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
                )
+
        );

Modified: trunk/sms/setup/tables_update.inc.php
===================================================================
--- trunk/sms/setup/tables_update.inc.php       2012-08-30 12:20:08 UTC (rev 
9938)
+++ trunk/sms/setup/tables_update.inc.php       2012-08-30 12:55:34 UTC (rev 
9939)
@@ -518,3 +518,38 @@
                }
        }
 
+
+       /**
+       * Update sms version from 0.9.17.511 to 0.9.17.512
+       * 
+       */
+
+       $test[] = '0.9.17.511';
+       function sms_upgrade0_9_17_511()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+                       'phpgw_sms_reveived_data', array(
+                               'fd' => array(
+                                       'id' => array('type' => 'auto', 
'nullable' => False),
+                                       'type' => array('type' => 'varchar', 
'precision' => 15, 'nullable' => False),/*sms/mms/report*/
+                                       'data' => array('type' => 'text', 
'nullable' => False),
+                                       'status' => array('type' => 'int', 
'precision' => 4, 'nullable' => False, 'default' => '0'),
+                                       'entry_date' => array('type' => 'int', 
'precision' => 4, 'nullable' => False, 'default' => '0'),
+                                       'modified_date' => array('type' => 
'int', 'precision' => 4, 'nullable' => False, 'default' => '0'),
+                               ),
+                               'pk' => array('id'),
+                               'fk' => array(),
+                               'ix' => array(),
+                               'uc' => array()
+                       )
+               );
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['sms']['currentver'] = 
'0.9.17.512';
+                       return $GLOBALS['setup_info']['sms']['currentver'];
+               }
+       }




reply via email to

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