/[cvs]/nfo/php/libs/org.netfrag.flib/Tracker/User.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.flib/Tracker/User.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by joko, Tue Nov 12 05:42:31 2002 UTC revision 1.5 by joko, Thu Dec 12 21:34:32 2002 UTC
# Line 3  Line 3 
3  //    $Id$  //    $Id$
4  //    -----------------------------------------------------------------------------  //    -----------------------------------------------------------------------------
5  //    $Log$  //    $Log$
6    //    Revision 1.5  2002/12/12 21:34:32  joko
7    //    + fix in 'function update': invalidate data only if it's not for caching purposes
8    //
9    //    Revision 1.4  2002/12/06 04:10:28  joko
10    //    + replaced 'xyzCache' through 'xyzProxy'
11    //
12    //    Revision 1.3  2002/12/04 07:42:54  jonen
13    //    + changes according to backend schema change
14    //
15    //    Revision 1.2  2002/12/03 16:47:22  joko
16    //    - function preLogout()
17    //    + function preLogout($autologout = 0)
18    //    + function hadTimeout()
19    //
20  //    Revision 1.1  2002/11/12 05:42:31  joko  //    Revision 1.1  2002/11/12 05:42:31  joko
21  //    + initial checkin  //    + initial checkin
22  //  //
# Line 95  class User { Line 109  class User {
109    
110      $this->_save("cache");      $this->_save("cache");
111            
112      //$this->pObject->flushCache();     // done in "pObject->save"      //$this->pObject->flushProxy();     // done in "pObject->save"
113            
114    }    }
115        
116    function _save($type = '') {    function _save($type = '') {
117    //print Dumper($this->data);
118      $this->pObject->save($this->data, $type);      $this->pObject->save($this->data, $type);
119      $this->meta[data_ready] = 0;      // invalidate data only if it's not for caching purposes
120        if ($type != 'cache') {
121          $this->meta[data_ready] = 0;
122        }
123    }    }
124        
125    function save() {    function save() {
# Line 186  class User { Line 204  class User {
204    }    }
205        
206    
207    function update(&$uservars) {    function update($vars) {
208      $this->setPostVars($uservars);      $this->setPostVars($vars);
209      $data = $this->_transformInputData($uservars);  //print Dumper($vars);
210        $data = $this->_transformInputData($vars);
211      $this->_saveData($data);      $this->_saveData($data);
212    }    }
213    
# Line 232  class User { Line 251  class User {
251    
252    }    }
253    
254    function preLogout() {    function preLogout($autologout = 0) {
255      global $site;      global $site;
256      $this->state[status] = '';      $this->state[status] = '';
257        $this->state[autologout] = $autologout;
258      $this->_saveState();      $this->_saveState();
259    }    }
260    
261    function getAccountSum() {    function getAccountSum() {
262      // store additional user-data to state      // store additional user-data to state
263        if (!$this->state[accountSum]) {        if (!$this->state[accountSum]) {
264          $this->state[accountSum] = $this->get("financeInfo.accountSum");          $this->state[accountSum] = $this->get("account.amount");
265          $this->_saveState();          $this->_saveState();
266        }        }
267        return $this->state[accountSum];        return $this->state[accountSum];
# Line 250  class User { Line 270  class User {
270    function getAccountCurrency() {    function getAccountCurrency() {
271      // store additional user-data to state      // store additional user-data to state
272        if (!$this->state[accountCurrency]) {        if (!$this->state[accountCurrency]) {
273          $this->state[accountCurrency] = $this->get("financeInfo.currency");          $this->state[accountCurrency] = $this->get("account.currency");
274          $this->_saveState();          $this->_saveState();
275        }        }
276        //print "state: " . $this->get("financeInfo.currency") . "<br>";        //print "state: " . $this->get("financeInfo.currency") . "<br>";
# Line 300  class User { Line 320  class User {
320      return $this->state[postvars][$var];      return $this->state[postvars][$var];
321    }    }
322        
323      function hadTimeout() {
324        if ($this->state[autologout]) { return 1; }
325      }
326    
327  }  }
328    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.5

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed