Ignore:
Timestamp:
Dec 30, 2014 11:06:09 AM (10 years ago)
Author:
dungnv
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/services/models/services_model.php

    r677 r685  
    3535
    3636if ( ! defined('_SBG_MO_PROCCESS_ERR'))                                 define('_SBG_MO_PROCCESS_ERR', 0);
     37
     38if ( ! defined('_SBG_GET_COLLABORATOR_FAIL'))                           define('_SBG_GET_COLLABORATOR_FAIL', -1);
    3739
    3840Class Services_model extends CI_Model
     
    382384                $client->useHTTPPersistentConnection();
    383385                $client->soap_defencoding = 'UTF-8';
     386                //$client->soap_defencoding = 'ISO-8859-1';
     387               
    384388                $client->operation = $action;
    385389                $result = $client->send($xml, $action);
    386                 return $result;
     390                if ($client->fault || (int)$result['Result']['error'] != 0) {
     391                        return _SBG_GET_COLLABORATOR_FAIL;
     392                }
     393               
     394                return $result['Result']['original'];
    387395        }
    388396       
Note: See TracChangeset for help on using the changeset viewer.