Ignore:
Timestamp:
May 25, 2006 10:21:07 PM (18 years ago)
Author:
scdev
Message:

Updated App.inc.php thru Hierarchy.inc.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0singleton/lib/FormValidator.inc.php

    r121 r127  
    389389    function validateEmail($form_name)
    390390    {
     391        $app =& App::getInstance();
     392   
    391393        $email = getFormData($form_name);
    392394        if ('' == trim($email)) {
     
    400402        if (!preg_match($e->getParam('regex'), $email, $e_parts)) {
    401403            $this->addError($form_name, sprintf(_("<strong>%s</strong> is not a valid email address."), oTxt($email)));
    402             App::logMsg(sprintf('The email address %s is not valid.', getFormData($form_name)), LOG_DEBUG, __FILE__, __LINE__);
     404            $app->logMsg(sprintf('The email address %s is not valid.', getFormData($form_name)), LOG_DEBUG, __FILE__, __LINE__);
    403405            return false;
    404406        }
     
    412414        if (strlen($local) > 64 || strlen($domain) > 191) {
    413415            $this->addError($form_name, sprintf(_("<strong>Email address</strong> must contain less than 256 characters."), oTxt($email)));
    414             App::logMsg(sprintf('The email address %s must contain less than 256 characters.', getFormData($form_name)), LOG_DEBUG, __FILE__, __LINE__);
     416            $app->logMsg(sprintf('The email address %s must contain less than 256 characters.', getFormData($form_name)), LOG_DEBUG, __FILE__, __LINE__);
    415417            return false;
    416418        }
     
    420422        if ((ip2long($domain) == '-1' || ip2long($domain) === false) && function_exists('checkdnsrr') && !checkdnsrr($domain . '.', 'MX') && gethostbyname($domain) == $domain) {
    421423            $this->addError($form_name, sprintf(_("<strong>%s</strong> is not a valid email domain name"), oTxt($domain)));
    422             App::logMsg(sprintf('The email address %s contains an invalid email domain name (%s).', getFormData($form_name), $domain), LOG_INFO, __FILE__, __LINE__);
     424            $app->logMsg(sprintf('The email address %s contains an invalid email domain name (%s).', getFormData($form_name), $domain), LOG_INFO, __FILE__, __LINE__);
    423425            return false;
    424426        }
     
    454456    function validateStrDate($form_name, $msg='')
    455457    {
     458        $app =& App::getInstance();
     459   
    456460        if (($timestamp = strtotime(getFormData($form_name, '0'))) === -1) {
    457461            $this->addError($form_name, $msg);
    458             App::logMsg(sprintf('The string date %s is not valid.', getFormData($form_name)), LOG_DEBUG, __FILE__, __LINE__);
     462            $app->logMsg(sprintf('The string date %s is not valid.', getFormData($form_name)), LOG_DEBUG, __FILE__, __LINE__);
    459463            return false;
    460464        } else {
Note: See TracChangeset for help on using the changeset viewer.