Changeset 660 for trunk/app/models
- Timestamp:
- 07/21/08 18:29:34 (4 months ago)
- Location:
- trunk/app/models
- Files:
-
- 2 modified
-
share.php (modified) (2 diffs)
-
subject.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/models/share.php
r535 r660 1 1 <?php 2 /** MM GPLv3 **/ 2 /** Chipotle Software 2002-2008 GPLv3 **/ 3 3 4 class Share extends AppModel { 4 public $name = 'Share';5 5 6 public $belongsTo = 'User'; 6 public $belongsTo = array('User' => 7 array('className' => 'User', 8 'conditions' => '', 9 'order' => '', 10 'foreignKey' => 'user_id' 11 ), 12 'Subject' => 13 array('className' => 'Subject', 14 'conditions' => '', 15 'order' => null, 16 'foreignKey' => 'subject_id' 17 ) 18 ); 19 7 20 /* 8 21 public $validate = array( … … 11 24 'required' => true, 12 25 'message' => 'Alphabets and numbers only' 13 ),14 'between'=> array(15 'rule' => array('between', 5, 15),16 'message' => 'Between 5 to 15 characters'17 )18 ),19 'password'=> array(20 'rule' => array('minLength', '8'),21 'message' => 'Mimimum 8 characters long'22 ),23 'email' => 'email',24 'born' => array(26 ), 27 'between' => array( 28 'rule' => array('between', 5, 15), 29 'message' => 'Between 5 to 15 characters' 30 ) 31 ), 32 'password' => array('rule' => array( 33 'minLength', '8'), 34 'message' => 'Mimimum 8 characters long' 35 ), 36 'email' => 'email', 37 'born' => array( 25 38 'rule' => 'date', 26 39 'message' => 'Enter a valid date', 27 40 'allowEmpty' => true 28 41 ) 29 ); */42 ); */ 30 43 } 31 44 ?> -
trunk/app/models/subject.php
r535 r660 9 9 class Subject extends AppModel 10 10 { 11 public $hasMany = array('Ecourse' => 12 array('className' => 'Ecourse', 13 'conditions' => null, 14 'order' => null, 15 'limit' => null, 11 public $hasMany = array('Lesson' => 12 array('className' => 'Lesson', 13 'conditions' => 'status=1', 14 'order' => 'id DESC', 15 'limit' => 10, 16 'fields' => 'id, title', 16 17 'foreignKey' => 'subject_id', 17 18 'dependent' => true, … … 19 20 'finderQuery' => '' 20 21 ), 21 /*'Forum' =>22 array('className' => ' Forum',23 'conditions' => null,22 'Share' => 23 array('className' => 'Share', 24 'conditions' => 'public=1', 24 25 'order' => null, 25 'limit' => null, 26 'fields' => 'secret, description', 27 'limit' => 10, 26 28 'foreignKey' => 'subject_id', 27 29 'dependent' => true, … … 29 31 'finderQuery' => '' 30 32 ), 31 */32 33 'Entry' => 33 34 array('className' => 'Entry', 34 'conditions' => null, 35 'order' => null, 36 'limit' => null, 35 'conditions' => 'status=1', 36 'order' => 'id DESC', 37 'limit' => 10, 38 'fields' => 'id, title', 37 39 'foreignKey' => 'subject_id', 38 40 'dependent' => true,
