Ignore:
Timestamp:
Nov 5, 2014 11:52:12 AM (11 years ago)
Author:
dungnv
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/libraries/vservices.php

    r417 r418  
    77        private $_userId;
    88        private $_password;
     9       
     10        private $_httpUser;
     11        private $_httpPasswd;
    912       
    1013        public function __construct() {
     
    4144         * @param unknown $aryParams
    4245         */
     46
    4347        public function actionExecute ($action, $aryParams = array(), $module = 'space') {
    44                 $this->_curlObj->create($this->_apiUrl. $module.'/'.$action);
     48                $this->_curlObj->create($this->_apiUrl. $module .'/'.$action);
    4549                $this->_curlObj->option(CURLOPT_BUFFERSIZE, 10);
    4650                $this->_curlObj->options(array(CURLOPT_BUFFERSIZE => 10));
    4751               
     52                if ($this->_httpUser && $this->_httpPasswd) {
     53                        $this->_curlObj->http_login($this->_httpUser, $this->_httpPasswd);
     54                }
     55               
    4856                if ($this->_userId) $aryParams['userid'] = $this->_userId;
    49                 $this->_curlObj->post($aryParams);
     57                if (count($aryParams) > 0) $this->_curlObj->post($aryParams);
    5058                return $this->_curlObj->execute();
    51         }       
    52                        
     59        }
     60
     61       
     62       
    5363        public function __destruct() {
    5464               
Note: See TracChangeset for help on using the changeset viewer.