Changeset 620 for trunk/app/controllers/news_controller.php
- Timestamp:
- 07/02/08 18:44:15 (5 months ago)
- Files:
-
- 1 modified
-
trunk/app/controllers/news_controller.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/news_controller.php
r540 r620 38 38 $order = "News.id DESC"; 39 39 40 $limit = 10;41 42 $this->set('data', $this->News->findAll($conditions, $fields, $order ));40 $limit = 8; 41 42 $this->set('data', $this->News->findAll($conditions, $fields, $order, $limit)); 43 43 44 44 $this->Portal->statics(); // Charge Portal components aka Sidebars … … 126 126 127 127 // change user status actived/no actived 128 public function admin_change($ id, $status)128 public function admin_change($status, $news_id) 129 129 { 130 130 $this->data['News']['status'] = ($status == 0 ) ? 1 : 0; 131 131 132 $this->data['News']['id'] = $ id;132 $this->data['News']['id'] = $news_id; 133 133 134 if ($this->News->save($this->data['News'])) 135 { 136 $this->msgFlash('News status changed', '/admin/news/listing'); 137 } 134 if ($this->News->save($this->data['News'])): 135 $this->msgFlash(__('Status modified', true), '/admin/news/listing'); 136 endif; 138 137 } 139 138
