Changeset 537 for trunk/app/models

Show
Ignore:
Timestamp:
05/20/08 20:43:23 (7 months ago)
Author:
aarkerio
Message:

Discussions

Location:
trunk/app/models
Files:
3 modified

Legend:

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

    r407 r537  
    1111  public $name = 'Discussion'; 
    1212   
    13   public $belongsTo = array('News' => 
     13  /* public $belongsTo = array('News' => 
    1414                         array('className'     => 'News', 
    1515                               'conditions'    => null, 
     
    2121                               'finderQuery'   => '' 
    2222                         ) 
    23                   ); 
     23                  ); */ 
    2424 
    2525  public $validate = array( 
  • trunk/app/models/news.php

    r535 r537  
    2020             'Theme' => array( 
    2121                             'className'    => 'Theme',     
    22                              'foreignKey'   => 'theme_id' 
     22                             'foreignKey'   => 'theme_id'  
    2323                              ) 
    2424             ); 
     
    2626  public $hasMany  = array( 
    2727             'Discussion' => array( 
    28                              'className'    => 'Discussion', 
    29                              'foreignKey'   => 'new_id' 
    30                                ) 
    31              ); 
     28                                   'className'    => 'Discussion', 
     29                                   'foreignKey'   => 'new_id', 
     30                                   'conditions'   => 'Discussion.status = 1' 
     31                                   ) 
     32                         ); 
    3233 
    3334     public $validate = array( 
  • trunk/app/models/theme.php

    r535 r537  
    22/** 
    33*  Karamelo E-Learning Platform 
    4 *  Manuel Montoya 2002-2007  
    5 *  Chipotle Software 
    6 *  GPLv3 manuel<at>mononeurona.org 
     4*  Manuel Montoya 2002-2008  
     5*  Chipotle Software tm 
     6*  GPLv3 manuel<ARROBA>mononeurona<PUNTO>org 
    77*/  
    8 class Theme extends AppModel 
    9 { 
     8class Theme extends AppModel { 
     9 
    1010public $name = 'Theme'; 
    1111 
    12 public $hasMany  = array( 
     12 /* public $hasMany  = array( 
    1313             "News" => array( 
    1414                             "className"    => "News", 
    1515                             "foreignKey"   => "theme_id" 
    16                                )); 
     16                               )); */ 
    1717 
    1818public $validate = array(