Changeset 130

Show
Ignore:
Timestamp:
06/26/07 22:44:51 (2 years ago)
Author:
shupp
Message:

move debug setting to config.xml, set connect timeout of 30

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Framework/Site/Default/config.xml

    r119 r130  
    33    <vpopmaildHost>home.shupp.org</vpopmaildHost> 
    44    <vpopmaildPort>89</vpopmaildPort> 
     5    <debug>0</debug> 
    56    <mcryptKey>My Secret Key</mcryptKey> 
    67    <maxPerPage>10</maxPerPage> 
  • trunk/Framework/User/Vpopmail.php

    r125 r130  
    5151     * @access public 
    5252     */ 
    53     public $debug = false
     53    public $debug = 0
    5454    /** 
    5555     * loginUser  
     
    8686 
    8787    function  __construct() { 
    88         #parent::__construct(); 
    8988        // Manual log stuff, since we're skipping Framework_User::__construct() 
    90         if ($this->debug && is_null($this->log)) { 
     89        $this->debug = (int)Framework::$site->config->debug; 
     90        if ($this->debug > 0 && is_null($this->log)) { 
    9191            $logFile = (string)Framework::$site->config->logFile; 
    9292            $this->log = Log::factory('file', $logFile); 
     
    9696        $this->port = (string)Framework::$site->config->vpopmaildPort; 
    9797        $this->socket = new Net_Socket(); 
    98         $result = $this->socket->connect($this->address, $this->port); 
     98        $result = $this->socket->connect($this->address, $this->port, null, 30); 
    9999        if(PEAR::isError($result)) return $result; 
    100100    } 
    101101 
    102102    function recordio($data) { 
    103         if($this->debug
     103        if($this->debug > 0
    104104            $this->log->log($data); 
    105105    }