Changeset 663 for trunk/app/models/subject.php
- Timestamp:
- 07/21/08 22:49:17 (4 months ago)
- Files:
-
- 1 modified
-
trunk/app/models/subject.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/models/subject.php
r661 r663 51 51 public function getSubject($code) 52 52 { 53 try{ 53 54 $data = array(); 54 55 $this->unbindAll(); … … 61 62 $data['Lesson'] = $this->Lesson->findAll($conditions, $fields, $order, $limit); 62 63 63 64 64 $conditions = array('Entry.subject_id'=>$data['S']['Subject']['id']); 65 65 $fields = array('Entry.id', 'Entry.title', 'User.username', 'User.id'); … … 67 67 $limit = 10; 68 68 $data['Entry'] = $this->Entry->findAll($conditions, $fields, $order, $limit); 69 70 69 71 70 $conditions = array('Share.subject_id'=>$data['S']['Subject']['id'], 'Share.public'=>1); … … 76 75 77 76 return $data; 77 } 78 79 catch(Exception $e) 80 { 81 echo $e->getMessage(); 82 exit(); 83 } 78 84 } 79 85
