Changeset 564


Ignore:
Timestamp:
Mar 5, 2016 4:07:19 AM (8 years ago)
Author:
anonymous
Message:

Fixed db_server=>localhost regression. Removed Auth->initDB from Auth->clear. Enabled logging by default for cb cli scripts.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/_config.inc.php

    r533 r564  
    8080    'display_errors' => true,
    8181    'error_reporting' => E_ALL,
    82     'log_file_priority' => false,
     82    'log_file_priority' => LOG_DEBUG,
    8383    'log_screen_priority' => LOG_INFO,
    84     'log_directory' => '/tmp',
     84    'log_directory' => (is_dir('./log') ? './log' : '/tmp'), // If ./log exists, use it, otherwise /tmp.
    8585    'log_filename' => 'site_log',
    8686));
    8787
    8888if (strtolower(getFilenameExtension($db_auth_file)) != 'json') {
    89     // DB auth file is not json, and will not be automaticlaly be loaded by $app's 'db_auth_file' parser.
     89    // DB auth file is not JSON, and will not be automatically be loaded by $app's 'db_auth_file' parser.
    9090    require_once $db_auth_file;
    9191}
  • trunk/lib/Auth_SQL.inc.php

    r563 r564  
    163163        $app =& App::getInstance();
    164164        $db =& DB::getInstance();
    165 
    166165
    167166        static $_db_tested = false;
     
    323322        $db =& DB::getInstance();
    324323
    325         $this->initDB();
    326 
    327324        if ($this->get('user_id', false)) {
     325
     326            $this->initDB();
     327
    328328            // FIX ME: Should we check if the session is active?
    329329            $db->query("
  • trunk/lib/DB.inc.php

    r563 r564  
    149149        if (!$this->getParam('db_server')) {
    150150            // If db_server not specified, assume localhost.
    151             $this->setParam('db_server', 'localhost');
     151            $this->setParam(array('db_server' => 'localhost'));
    152152        }
    153153
Note: See TracChangeset for help on using the changeset viewer.