Changeset 134 for branches/1.1dev/lib


Ignore:
Timestamp:
May 31, 2006 2:58:36 AM (18 years ago)
Author:
scdev
Message:

Q - changed when MCVE object connects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1dev/lib/MCVE.inc.php

    r133 r134  
    1818    var $connected = false;
    1919    var $conn;
     20    var $ca_bundle = '/usr/share/ssl/certs/ca-bundle.crt';
    2021   
    2122    function MCVE($username, $password)
     
    2728        $this->username = $username;
    2829        $this->password = $password;
     30       
     31        if (!$this->_connect()) {
     32            trigger_error('Connection to MCVE engine failed.', E_USER_ERROR);
     33        }
    2934    }
    3035
     
    3641       
    3742        // Initialize SSL structures and definitions.
    38         MCVE_InitEngine(CODE_BASE . '/config/ca-bundle.crt');
     43        MCVE_InitEngine($this->ca_bundle);
    3944       
    4045        // Allocate Connection Structures
     
    9499    function beginTrans()
    95100    {
    96         $this->_connect();
     101        if (!$this->connected) {
     102            return false;
     103        }
    97104        $tid = MCVE_TransNew($this->conn); // Allocate memory for sending a transaction.
    98105        $this->transParam($tid, MC_USERNAME, $this->username);
Note: See TracChangeset for help on using the changeset viewer.