proxy_ref = $dn_or_proxy; $dn = $this->proxy_ref->GetProxyDN(); } else { $dn = $dn_or_proxy; } parent::__construct($dn,'user','dn'); } public function getDBProxy ($voattrs_hash) { $dbp_id = DB::QueryResultValue( 'SELECT id FROM proxycerts ' . 'WHERE attrs_hash = ?(attrshash) AND userid = ?(userid)', $voattrs_hash, $this->dbid ); if(is_null($dbp_id)) return FALSE; $this->db_proxy_ref = new Proxy($dbp_id); $this->db_proxy_ref->loadDBProxy(); } public function updateDBProxy () { if ( $this->proxy_ref == NULL ) return FALSE; $this->getDBProxy($this->proxy_ref->getProxyVOAttrsHash()); if ( $this->db_proxy_ref == NULL ) { // insert new $this->proxy_ref->saveDBProxy($this->dbid); } elseif ( $this->proxy_ref->getProxyValidityTime() > $this->db_proxy_ref->getProxyValidityTime() ) { if ( $this->db_proxy_ref->updateDBProxyFile($this->proxy_ref->getProxyFile()) ) { $this->db_proxy_ref->updateDBProxyValidity($this->proxy_ref->getProxyValidityTime()); } } } } ?>