Changeset 373

Show
Ignore:
Timestamp:
02/20/07 17:55:42 (2 years ago)
Author:
bballizlife
Message:

fix ticket #121 : add quotes around values in the connection string to postgresql

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/jelix/db/drivers/postgresql/jDbConnection.postgresql.class.php

    r366 r373  
    6464        $funcconnect= ($this->profil['persistent'] ? 'pg_pconnect':'pg_connect'); 
    6565 
    66         $str = 'dbname='.$this->profil['database'].' user='.$this->profil['user'].' password='.$this->profil['password']
     66        $str = 'dbname=\''.$this->profil['database'].'\' user=\''.$this->profil['user'].'\' password=\''.$this->profil['password'].'\''
    6767 
    6868        // on fait une distinction car si host indiqu�> connection TCP/IP, sinon socket unix 
    6969        if($this->profil['host'] != '') 
    70             $str = 'host='.$this->profil['host'].' '.$str; 
     70            $str = 'host=\''.$this->profil['host'].'\' '.$str; 
    7171 
    7272        // Si le port est d�ni on le rajoute �a chaine de connexion 
    7373        if (isset($this->profil['port'])) { 
    74             $str .= ' port='.$this->profil['port']
     74            $str .= ' port=\''.$this->profil['port'].'\''
    7575        } 
    7676 
Download in other formats: Unified Diff Zip Archive