Changeset 803 for trunk/app/controllers

Show
Ignore:
Timestamp:
10/09/08 22:07:55 (8 weeks ago)
Author:
aarkerio
Message:

Update fck edity

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/ecourses_controller.php

    r785 r803  
    2626 public function admin_listing($page=1) 
    2727 { 
    28         $this->layout = 'admin'; 
     28   $this->layout = 'admin'; 
    2929         
    30         $conditions   =  array("user_id"=>$this->Auth->user('id')); 
    31         $fields       =  array('id', 'title', 'status', 'description'); 
    32         $order        =  "Ecourse.id DESC"; 
    33         $limit        =  10; 
     30   $conditions   =  array('user_id'=>$this->Auth->user('id')); 
     31   $fields       =  array('id', 'title', 'status', 'description'); 
     32   $order        =  'Ecourse.title'; 
     33   $limit        =  20; 
    3434         
    35         $this->set('data', $this->Ecourse->findAll($conditions, $fields)); 
     35   $this->set('data', $this->Ecourse->findAll($conditions, $fields, $order, $limit)); 
    3636 } 
    3737 
    3838 public function admin_vclassrooms($ecourse_id, $historic = null) 
    3939 { 
    40         $this->layout = 'admin'; 
     40  $this->layout = 'admin'; 
    4141         
    42         $lmt        = 25; // limit news 
     42  $lmt        = 25; // limit news 
    4343         
    44         $conditions   =  array("Ecourse.user_id"=>$this->Auth->user('id'), "Ecourse.id"=>$ecourse_id); 
     44  $conditions   =  array("Ecourse.user_id"=>$this->Auth->user('id'), "Ecourse.id"=>$ecourse_id); 
    4545         
    46     if ( $historic === 'historic' ): 
    47           $this->Ecourse->filed(); //show filed classrooms 
    48            
    49           $this->set('historic', true); 
    50     endif; 
     46  if ( $historic === 'historic' ): 
     47     $this->Ecourse->filed(); //show filed classrooms        
     48     $this->set('historic', true); 
     49  endif; 
    5150         
    52         $order        =  "Ecourse.id DESC"; 
     51  $order        =  'Ecourse.title DESC'; 
    5352         
    54         $this->set('data', $this->Ecourse->find($conditions)); 
     53   $this->set('data', $this->Ecourse->find($conditions)); 
    5554  } 
    5655