Changeset 279 for trunk


Ignore:
Timestamp:
Aug 17, 2007 8:10:05 PM (17 years ago)
Author:
quinn
Message:

Added better error response when mcve engine not running.

Location:
trunk/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FormValidator.inc.php

    r266 r279  
    506506
    507507    /**
    508      * Verifies credit card number.
     508     * Verifies credit card number using the Luhn (mod 10) algorithm.
     509     * http://en.wikipedia.org/wiki/Luhn_algorithm
    509510     *
    510511     * @param  string  $form_name   The name of the incoming form variable.
  • trunk/lib/MCVE.inc.php

    r268 r279  
    9595        if (!MCVE_Connect($this->conn)) {
    9696            $error = MCVE_ConnectionError($this->conn);
    97             $app->logMsg("Connection failed: $error. Are you sure the MCVE engine is running?", LOG_ERR, __FILE__, __LINE__);
     97            $app->logMsg("$error. Are you sure the MCVE engine is running?", LOG_ERR, __FILE__, __LINE__);
    9898            return false;
    9999        }
     
    105105    function beginTrans()
    106106    {
    107         $this->_connect();
     107        if (!$this->_connect()) {
     108            return false;
     109        }
    108110        $tid = MCVE_TransNew($this->conn); // Allocate memory for sending a transaction.
    109111        $this->transParam($tid, MC_USERNAME, $this->username);
  • trunk/lib/Validator.inc.php

    r266 r279  
    217217
    218218    /**
    219      * Verifies credit card number.
     219     * Verifies credit card number using the Luhn (mod 10) algorithm.
     220     * http://en.wikipedia.org/wiki/Luhn_algorithm
    220221     *
    221222     * @param  string  $val   The input data to validate..
Note: See TracChangeset for help on using the changeset viewer.