Changeset 324

Show
Ignore:
Timestamp:
03/19/08 13:31:56 (10 months ago)
Author:
aarkerio
Message:

Small changes

Location:
trunk/app
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/app_controller.php

    r322 r324  
    2020     $this->Auth->loginError = 'Invalid e-mail / password combination. Please try again'; 
    2121     $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') ); 
    2323     $this->Auth->autoRedirect = true; 
    2424     $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  
    1414 * In development mode, you need to click the flash message to continue. 
    1515 */ 
    16     Configure::write('debug', 1); 
     16    Configure::write('debug', 2); 
    1717/** 
    1818 * Application wide charset encoding 
  • trunk/app/controllers/topics_controller.php

    r323 r324  
    1010class TopicsController extends AppController 
    1111{ 
    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 { 
    1818          if (isset($this->params[Configure::read('Routing.admin')])) 
    1919         { 
     
    2424         } 
    2525  return false; 
    26   } 
     26 } 
    2727  
    2828 public function view($user_id, $forum_id) 
  • trunk/app/models/reply.php

    r323 r324  
    11<?php  
     2/** 
     3*  Karamelo eLearning Platform 
     4*  Chipotle Software 2002-2008  
     5*  GPLv3 manuel<arroba>mononeurona<punto>org 
     6**/  
     7 
    28class Reply extends AppModel 
    39{ 
    410 
    5 public $belongsTo = array('Topic' =>  
    6                                      array('className' => 'Topic',  
    7                                            'foreignkey' => 'topic_id'), 
    8                           'User' =>  
     11public $belongsTo = array('User' =>  
    912                                     array('className' => 'User',  
    1013                                           'foreignkey' => 'user_id') 
    11                                            ); 
     14                         ); 
    1215 
    1316public $validate = array( 
  • trunk/app/models/topic.php

    r322 r324  
    88class Topic extends AppModel 
    99{ 
    10 public $name = 'Topic'; 
    11  
    12 public $belongsTo = array('Forum' =>  
     10 public $name = 'Topic'; 
     11  
     12 public $belongsTo = array('Forum' =>  
    1313                                     array('className' => 'Forum',  
    1414                                           'foreignkey' => 'forum_id'), 
     
    1818                                           'fields'     => 'username, id') 
    1919                                           );  
    20  
    21 /* delete later 
    22 public $hasMany = array('Reply' =>  
     20  
     21 public $hasMany = array('Reply' =>  
    2322                                     array('className' => 'Reply',  
    24                                            'foreignkey' => 'topic_id')); */ 
     23                                           'foreignkey' => 'topic_id')); 
    2524                                            
    26 public $validate = array( 
     25 public $validate = array( 
    2726      'subject' => VALID_NOT_EMPTY, 
    2827      'message' => VALID_NOT_EMPTY, 
     
    3029      'forum_id' => VALID_NOT_EMPTY 
    3130      ); 
    32  
    3331} 
    3432?>