Show
Ignore:
Timestamp:
05/09/08 23:13:21 (8 months ago)
Author:
aarkerio
Message:

Forums and topics improveds

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/models/user.php

    r467 r471  
    5151  ); 
    5252   
    53  public $notNow = array('hasMany'=>array('Entry', 'Category', 'Acquaintance', 'Faq', 'Glossary', 'Vclassroom', 'Lesson', 'Confirm')); 
     53 public $notNow = array('hasMany'=>array('Entry', 'Category', 'Acquaintance', 'Faq', 'Glossary', 'Vclassroom', 'Lesson', 'Confirm', 'Vclassroom')); 
    5454 
    5555 public $validate = array( 
     
    5959      'name' => VALID_NOT_EMPTY, 
    6060      'email'    => VALID_EMAIL 
    61    );  
     61   ); 
     62  
     63 /* 
     64  * excepts : model you need 
     65  * 
     66  */ 
     67  public function removeBinds($excepts = array()) 
     68  { 
     69    foreach ($excepts as $e) 
     70    { 
     71        if ( in_array($e, $this->notNow) ) 
     72    { 
     73           unset($this->notNow[$e]); // not unbind this model 
     74        } 
     75    } 
     76 
     77    $this->unbindModel($this->notNow); 
     78 
     79    return true; 
     80  } 
    6281} 
    6382?>