Changeset 632 for trunk/app/models

Show
Ignore:
Timestamp:
07/07/08 22:23:03 (5 months ago)
Author:
aarkerio
Message:

Adding annotations

Location:
trunk/app/models
Files:
2 modified

Legend:

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

    r630 r632  
    1313                  'conditions' => '', 
    1414                  'order'      => '', 
    15                                  'foreignKey' => 'user_id' 
     15                                 'foreignKey'  => 'user_id' 
    1616                  ), 
    1717                           'Lesson' => 
     
    1919                  'conditions' => '', 
    2020                  'order'      => null, 
    21                                  'foreignKey' => 'lersson_id' 
     21                                  'foreignKey' => 'lesson_id' 
    2222                  ) 
    2323                ); 
    2424 
    2525  public $validate = array( 
    26       'comment' => VALID_NOT_EMPTY, 
    27       'user_id' => VALID_NOT_EMPTY 
     26      'comment'   => VALID_NOT_EMPTY, 
     27      'user_id'   => VALID_NOT_EMPTY, 
     28      'lesson_id' => VALID_NOT_EMPTY 
    2829   ); 
    2930/* 
  • trunk/app/models/lesson.php

    r630 r632  
    2525                ); 
    2626 
    27   public $hasMany = array('CommentsLesson' => 
    28                         array('className'     => 'CommentsLesson', 
     27  public $hasMany = array('Annotation' => 
     28                        array('className'     => 'Annotation', 
    2929                  'conditions'    =>  null, 
    30                   'order'         => 'CommentsLesson.created', 
     30                  'order'         => 'Annotation.created', 
    3131                  'limit'         => null, 
    3232                  'foreignKey'    => 'lesson_id',