type ) { case DB_Driver::SQLITE: $this->host = ''; $this->user = ''; $this->pass = ''; break; } return $result; } public function store( $force_insert = false ) { $now = current_time( 'mysql', 1 ); if ( $this->is_new() ) { $this->created = $now; $this->author_id = get_current_user_id(); } else { $this->modified = $now; } return parent::store( $force_insert ); } public function validate() { if ( empty( $this->title ) ) return false; if ( ! $this->validate_connection_params() ) return false; return true; } public function validate_connection_params() { if ( empty( $this->db_name ) ) return false; return true; } }