Changeset 467 for trunk/app/models

Show
Ignore:
Timestamp:
05/08/08 21:14:33 (7 months ago)
Author:
aarkerio
Message:

Forums and topics improveds

Location:
trunk/app/models
Files:
3 modified

Legend:

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

    r466 r467  
    3636               'dependent'     => true, 
    3737               'exclusive'     => false, 
    38                              'finderQuery'   => null 
     38                           'finderQuery'   => null 
    3939 
    4040               ) 
     
    7575    return $vclassrooms; 
    7676 } 
     77 
    7778/* 
    7879 *  check if studen already found treasure 
  • trunk/app/models/user.php

    r434 r467  
    6060      'email'    => VALID_EMAIL 
    6161   );  
    62  
    6362} 
    6463?> 
  • trunk/app/models/vclassroom.php

    r460 r467  
    358358    } 
    359359  } 
     360/* 
     361 *  check if studen already found treasure 
     362 *  int treasure_id  
     363 *  int user_id       
     364 *  int vclassroom_id 
     365 *  return boolean 
     366 */ 
     367 public function belongs($user_id, $vclassroom_id) 
     368 { 
     369   $conditions =  array("UsersVclassroom.user_id"=>$user_id, "UsersVclassroom.vclassroom_id"=>$vclassroom_id); 
     370 
     371   $data       =  $this->UsersVclassroom->field('UsersVclassroom.user_id',$conditions); 
     372      
     373   if ($data === false ): 
     374          return false;    
     375   else: 
     376          return true; 
     377   endif; 
     378 } 
     379 
    360380} 
    361381?>