Changeset 471 for trunk/app/models/user.php
- Timestamp:
- 05/09/08 23:13:21 (8 months ago)
- Files:
-
- 1 modified
-
trunk/app/models/user.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/models/user.php
r467 r471 51 51 ); 52 52 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')); 54 54 55 55 public $validate = array( … … 59 59 'name' => VALID_NOT_EMPTY, 60 60 '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 } 62 81 } 63 82 ?>
