Changeset 324
- Timestamp:
- 03/19/08 13:31:56 (10 months ago)
- Location:
- trunk/app
- Files:
-
- 5 modified
-
app_controller.php (modified) (1 diff)
-
config/core.php (modified) (1 diff)
-
controllers/topics_controller.php (modified) (2 diffs)
-
models/reply.php (modified) (1 diff)
-
models/topic.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/app_controller.php
r322 r324 20 20 $this->Auth->loginError = 'Invalid e-mail / password combination. Please try again'; 21 21 $this->Auth->authorize = 'controller'; 22 $this->Auth->allow( array('view', 'display', 'subscribe', 'recover', 'register', 'insert', 'vote', ' download', 'blog','portfolio', 'about', 'message', 'directory', 'bloggers', 'add', 'rss', 'discussion') );22 $this->Auth->allow( array('view', 'display', 'subscribe', 'recover', 'register', 'insert', 'vote', 'entry', 'download', 'blog','portfolio', 'about', 'message', 'directory', 'bloggers', 'add', 'rss', 'discussion') ); 23 23 $this->Auth->autoRedirect = true; 24 24 $this->set('cU', $this->Auth->user()); // $cU current user array to use in the views if user logged -
trunk/app/config/core.php
r322 r324 14 14 * In development mode, you need to click the flash message to continue. 15 15 */ 16 Configure::write('debug', 1);16 Configure::write('debug', 2); 17 17 /** 18 18 * Application wide charset encoding -
trunk/app/controllers/topics_controller.php
r323 r324 10 10 class TopicsController extends AppController 11 11 { 12 public $helpers = array('Ajax', 'Form');13 14 public $components = array('Edublog');15 16 public function isAuthorized()17 {12 public $helpers = array('Ajax', 'Form'); 13 14 public $components = array('Edublog'); 15 16 public function isAuthorized() 17 { 18 18 if (isset($this->params[Configure::read('Routing.admin')])) 19 19 { … … 24 24 } 25 25 return false; 26 }26 } 27 27 28 28 public function view($user_id, $forum_id) -
trunk/app/models/reply.php
r323 r324 1 1 <?php 2 /** 3 * Karamelo eLearning Platform 4 * Chipotle Software 2002-2008 5 * GPLv3 manuel<arroba>mononeurona<punto>org 6 **/ 7 2 8 class Reply extends AppModel 3 9 { 4 10 5 public $belongsTo = array('Topic' => 6 array('className' => 'Topic', 7 'foreignkey' => 'topic_id'), 8 'User' => 11 public $belongsTo = array('User' => 9 12 array('className' => 'User', 10 13 'foreignkey' => 'user_id') 11 );14 ); 12 15 13 16 public $validate = array( -
trunk/app/models/topic.php
r322 r324 8 8 class Topic extends AppModel 9 9 { 10 public $name = 'Topic';11 12 public $belongsTo = array('Forum' =>10 public $name = 'Topic'; 11 12 public $belongsTo = array('Forum' => 13 13 array('className' => 'Forum', 14 14 'foreignkey' => 'forum_id'), … … 18 18 'fields' => 'username, id') 19 19 ); 20 21 /* delete later 22 public $hasMany = array('Reply' => 20 21 public $hasMany = array('Reply' => 23 22 array('className' => 'Reply', 24 'foreignkey' => 'topic_id')); */23 'foreignkey' => 'topic_id')); 25 24 26 public $validate = array(25 public $validate = array( 27 26 'subject' => VALID_NOT_EMPTY, 28 27 'message' => VALID_NOT_EMPTY, … … 30 29 'forum_id' => VALID_NOT_EMPTY 31 30 ); 32 33 31 } 34 32 ?>
