13 |
// $Id$ |
// $Id$ |
14 |
// ----------------------------------------------------------------------------- |
// ----------------------------------------------------------------------------- |
15 |
// $Log$ |
// $Log$ |
16 |
|
// Revision 1.17 2004/06/07 16:54:53 joko |
17 |
|
// modified cache-key |
18 |
|
// added cache-control |
19 |
|
// |
20 |
// Revision 1.16 2004/05/06 13:02:09 jonen |
// Revision 1.16 2004/05/06 13:02:09 jonen |
21 |
// + added/modified functions related to User-Messages |
// + added/modified functions related to User-Messages |
22 |
// |
// |
156 |
//$this->pObject = new ProxyObject($this->getUserGuid(), array( remote => 1, classname => "NetPerson", guid => 1) ); |
//$this->pObject = new ProxyObject($this->getUserGuid(), array( remote => 1, classname => "NetPerson", guid => 1) ); |
157 |
$rpcinfo = $this->site->configuration->get("rpcinfo"); |
$rpcinfo = $this->site->configuration->get("rpcinfo"); |
158 |
//$this->pObject = mkObject('DesignPattern::RemoteProxy', $this->getUserGuid(), array( remote => 1, classname => "NetPerson", guid => 1, rpcinfo => $rpcinfo, cache => array( db => 1, session => 1 ), connect => 1 ) ); |
//$this->pObject = mkObject('DesignPattern::RemoteProxy', $this->getUserGuid(), array( remote => 1, classname => "NetPerson", guid => 1, rpcinfo => $rpcinfo, cache => array( db => 1, session => 1 ), connect => 1 ) ); |
159 |
$this->pObject = mkObject('DesignPattern::RemoteProxy', $this->getUserGuid(), array( key => 1, command => 'getUser', query => $this->getUserGuid(), remote => 1, rpcinfo => $rpcinfo, cache => array( db => 1, session => 1 ), connect => 1 ) ); |
$cache_key = $this->getUserGuid() . "_user"; |
160 |
|
$this->pObject = mkObject('DesignPattern::RemoteProxy', $cache_key, array( key => 1, command => 'getUser', query => $this->getUserGuid(), remote => 1, rpcinfo => $rpcinfo, cache => array( db => 1, session => 1 ), connect => 1 ) ); |
161 |
if ($this->getUserGuid()) { |
if ($this->getUserGuid()) { |
162 |
$this->data = $this->pObject->getResult(); |
$this->data = $this->pObject->getResult(); |
163 |
} |
} |
186 |
$args = array( 'guid' => $this->data[guid], 'data' => $this->data ); |
$args = array( 'guid' => $this->data[guid], 'data' => $this->data ); |
187 |
$this->pObject->backend->send('saveUser', $args, array( utf8 => 1) ); |
$this->pObject->backend->send('saveUser', $args, array( utf8 => 1) ); |
188 |
$this->_save_local(); |
$this->_save_local(); |
189 |
|
$this->refresh(); |
190 |
} |
} |
191 |
// invalidate data only if it's not for caching purposes |
// invalidate data only if it's not for caching purposes |
192 |
if ($type != 'cache') { |
if ($type != 'cache') { |
410 |
} |
} |
411 |
|
|
412 |
function refresh() { |
function refresh() { |
413 |
if ($this->pObject) {$this->pObject->flushState();} |
if ($this->pObject) {$this->pObject->flush();} |
414 |
$this->meta[data_ready] = 0; |
$this->meta[data_ready] = 0; |
415 |
} |
} |
416 |
|
|