Esempio n. 1
0
 /**
  * Grabs the current database values from the hub installation
  */
 public function plugHubValues()
 {
     $dsn =& $GLOBALS['PHPWS_DB']['connection']->dsn;
     $this->dbname = $dsn['database'];
     $this->dbuser = $dsn['username'];
     $this->dbpass = $dsn['password'];
     $this->dbhost = $dsn['hostspec'];
     if ($dsn['port']) {
         $this->dbport = $dsn['port'];
     } else {
         $this->dbport = null;
     }
     $this->dbprefix = PHPWS_DB::getPrefix();
     // dsn also contains dbsyntax
     $this->dbtype = $dsn['phptype'];
 }