Changeset 247

Show
Ignore:
Timestamp:
02/22/08 17:22:12 (11 months ago)
Author:
aarkerio
Message:

COntyroller to 1.2 cake version

Location:
trunk/app
Files:
38 modified

Legend:

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

    r202 r247  
    22/** 
    33*  Karamelo eLearning Platform 
    4 Manuel Montoya 2002-2007  
    5 *  GPL manuel<at>mononeurona.org 
     4Chipotle Software 2002-2008  
     5*  GPL manuel<arroba>mononeurona<punto>org 
    66*/  
    77uses('sanitize'); 
  • trunk/app/controllers/answers_controller.php

    r193 r247  
    22/** 
    33*  Karamelo E-Learning Platform 
    4 Manuel Montoya 2002-2007  
     4Chipotle Software 2002-2008  
    55*  GPL manuel<at>mononeurona<punto>org 
    66*/  
    77//File: /app/controllers/quotes_controller.php 
     8 
    89uses('Sanitize'); 
     10 
    911class AnswersController extends AppController 
    1012{ 
    11   public $helpers = array('Form', 'Ajax'); 
     13  public $helpers = array('Ajax'); 
     14 
     15  public function isAuthorized()  
     16  { 
     17    if ($this->action == 'delete')  
     18      { 
     19    if ($this->Auth->user('group_id') == 1)  
     20          { 
     21        return true; 
     22          } else { 
     23        return false; 
     24          } 
     25      } 
     26  
     27    return true; 
     28  } 
    1229 
    1330  /*** 
  • trunk/app/controllers/categories_controller.php

    r31 r247  
    22/** 
    33*  Karamelo E-Learning Platform 
    4 Manuel Montoya 2002-2007  
     4Chipotle Software 2002-2008  
    55*  GPL manuel<at>mononeurona.org 
    66*/  
    77  
    88uses('sanitize'); 
    9 loadModel('User'); 
    10 loadModel('Category'); 
     9 
    1110 
    1211class CategoriesController extends AppController 
    1312{ 
    14     public $helpers       = array('Ajax', 'Form'); 
     13    public $helpers       = array('Ajax'); 
    1514     
    1615    public $displayField = 'Blog'; 
    1716     
    18     public function index($order = null) 
    19     { 
     17  public function isAuthorized()  
     18  { 
     19    if ($this->action == 'delete')  
     20      { 
     21    if ($this->Auth->user('group_id') == 1)  
     22          { 
     23        return true; 
     24          } else { 
     25        return false; 
     26          } 
     27      } 
     28  
     29    return true; 
     30  } 
     31 
     32  public function index($order = null) 
     33  { 
    2034        $this->layout    = 'admin'; 
    2135        $this->pageTitle = 'Categories'; 
  • trunk/app/controllers/catfaqs_controller.php

    r142 r247  
    22/** 
    33*  Karamelo E-Learning Platform 
    4 Manuel Montoya 2002-2007  
    5 *  GPLv3  manuel<at>mononeurona.org 
     4Chipotle Software 2002-2008 
     5*  GPLv3  manuel<at>mononeurona<punto>org 
    66*/  
    77  
    88uses('sanitize'); 
    9 loadModel('Group'); 
    109 
    1110class CatfaqsController extends AppController 
    1211{ 
    13   public $helpers       = array('Ajax', 'Form', 'User', 'Gags'); 
     12  public $helpers       = array('Ajax', 'User', 'Gags'); 
    1413   
    1514  public $components    = array('Edublog'); 
    1615   
    17   public $displayField = 'title'; 
    18    
     16  public function isAuthorized()  
     17  { 
     18    if ($this->action == 'delete')  
     19      { 
     20    if ($this->Auth->user('group_id') == 1)  
     21          { 
     22        return true; 
     23          } else { 
     24        return false; 
     25          } 
     26      } 
     27  
     28    return true; 
     29  } 
     30 
    1931  public function view($catfaq_id, $user_id) 
    2032  { 
  • trunk/app/controllers/catforums_controller.php

    r65 r247  
    11<?php 
    22/**   
    3 *  Chipotle Software  
    4 *  Manuel Montoya 2002-2007  
     3*  Chipotle Software TM 
     4*  Manuel Montoya 2002-2008 
    55*  GPL v3 manuel<at>mononeurona<punto>org 
    66*/  
     
    1010class CatforumsController extends AppController 
    1111{ 
    12     public $helpers       = array('Javascript', 'Ajax', 'Form', 'Gags', 'Time'); 
     12 public $helpers       = array('Ajax', 'Gags', 'Time'); 
    1313     
    14     public $components    = array('Security', 'Edublog');   
    15      
    16     public function display($username, $user_id)  
    17     {  
     14 public $components    = array('Edublog');   
     15  
     16  public function isAuthorized()  
     17  { 
     18    if ($this->action == 'delete')  
     19      { 
     20    if ($this->Auth->user('group_id') == 1)  
     21          { 
     22        return true; 
     23          } else { 
     24        return false; 
     25          } 
     26      } 
     27  
     28    return true; 
     29  }    
     30 
     31 public function display($username, $user_id)  
     32 {  
    1833        $this->pageTitle = $username .'\'s Forums'; 
    1934         
  • trunk/app/controllers/catglossaries_controller.php

    r89 r247  
    22/** 
    33*  Chipotle Software 
    4 *  Manuel Montoya 2002-2007  
     4*  Manuel Montoya 2002-2008  
    55*  GPL manuel<at>mononeurona<dot>org 
    66*/  
    77 
    88uses('sanitize'); 
    9 loadModel('Group'); 
    109 
    1110class CatglossariesController extends AppController 
    1211{ 
    13  public $helpers          = array('Ajax', 'Form', 'User', 'Gags'); 
     12 public $helpers          = array('Ajax', 'User', 'Gags'); 
    1413  
    1514 public $components       = array('Edublog'); 
    1615  
     16 public function isAuthorized()  
     17 { 
     18    if ($this->action == 'delete')  
     19      { 
     20    if ($this->Auth->user('group_id') == 1)  
     21          { 
     22        return true; 
     23          } else { 
     24        return false; 
     25          } 
     26      } 
     27  
     28    return true; 
     29  } 
     30 
    1731 public function display($username) 
    1832 { 
  • trunk/app/controllers/colleges_controller.php

    r177 r247  
    22/** 
    33    *  Karamelo E-Learning Platform 
    4     *  Manuel Montoya 2002-2007  
    5     *  GPL License manuel<at>mononeurona.org 
    6     *  Chipotle Software 
     4    *  Manuel Montoya 2002-2008  
     5    *  GPL License manuel<at>mononeurona<punto>org 
     6    *  Chipotle Software TM 
    77*/  
    88 
     
    1111class CollegesController extends AppController { 
    1212   
    13  public $helpers          = array('Ajax', 'Form', 'Fck', 'Time', 'Gags', 'Session'); 
     13 public $helpers          = array('Ajax', 'Fck', 'Time', 'Gags'); 
    1414   
    15  public $components       = array('Portal', 'Mypagination', 'Security', 'Session'); 
    16    
    17  public function about()  
     15 public $components       = array('Portal'); 
     16 
     17 public function isAuthorized()  
     18 { 
     19    if ($this->action == 'delete')  
     20      { 
     21    if ($this->Auth->user('group_id') == 1)  
     22          { 
     23        return true; 
     24          } else { 
     25        return false; 
     26          } 
     27      } 
     28  
     29    return true; 
     30 } 
     31 
     32 public function view()  
    1833 {      
    1934        $this->layout = 'portal'; 
     
    2540        $this->set('data', $this->College->find($conditions, $fields)); 
    2641         
    27         $this->set('Element', $this->Portal->statics()); // Charge Portal components aka Sidebars 
     42        //$this->set('Element', $this->Portal->statics()); // Charge Portal components aka Sidebars 
    2843 } 
    2944       
  • trunk/app/controllers/comments_controller.php

    r156 r247  
    22/** 
    33*  Karamelo E-Learning Platform 
    4 *  Manuel Montoya 2002-2007  
    5 *  Chipotle Software 
    6 *  GPLv3 manuel<at>mononeurona.org 
     4*  Manuel Montoya 2002-2008  
     5*  Chipotle Software TM 
     6*  GPLv3 manuel<arroba>mononeurona<punto>org 
    77*/  
    88 
    9 //loadModel('User'); 
    109uses('sanitize'); 
    1110 
     
    1514  
    1615 public $helpers = array('Fck', 'News', 'Time', 'Gags', 'Session'); 
     16 
     17  public function isAuthorized()  
     18  { 
     19    if ($this->action == 'delete')  
     20      { 
     21    if ($this->Auth->user('group_id') == 1)  
     22          { 
     23        return true; 
     24          } else { 
     25        return false; 
     26          } 
     27      } 
     28  
     29    return true; 
     30 } 
    1731  
    1832 public function view($username=null, $entry_id=null) 
  • trunk/app/controllers/confirms_controller.php

    r183 r247  
    22/** 
    33*  Karamelo E-Learning Platform 
    4 Manuel Montoya 2002-2007  
    5 *  GPL manuel<at>mononeurona.org 
     4Chipotle Software 2002-2008  
     5*  GPLv3 manuel<at>mononeurona<punto>org 
    66*/  
    77//File: /app/controllers/users_controller.php 
    88 
    99uses('sanitize'); 
    10 loadModel('User'); 
    1110 
    1211class ConfirmsController extends AppController 
    1312{ 
     13  public function isAuthorized()  
     14  { 
     15    if ($this->action == 'delete')  
     16      { 
     17    if ($this->Auth->user('group_id') == 1)  
     18          { 
     19        return true; 
     20          } else { 
     21        return false; 
     22          } 
     23      } 
     24  
     25    return true; 
     26  } 
    1427     
    15     public function signup($secret = null) 
    16     {    
     28  public function signup($secret = null) 
     29  {    
    1730        $this->pageTitle = 'Active User Account'; 
    1831         
  • trunk/app/controllers/ecourses_controller.php

    r203 r247  
    11<?php 
    22/** 
    3     *  Karamelo E-Learning Platform 
    4     *  Manuel Montoya 2002-2007  
    5     *  GPL License manuel<at>mononeurona.org 
    6     *  Chipotle Software 
     3*   Karamelo E-Learning Platform 
     4*   Manuel Montoya 2002-2008  
     5*   GPLv3 License manuel<at>mononeurona.org 
     6*   Chipotle Software TM 
    77*/  
    88uses('sanitize'); 
     
    1010class EcoursesController extends AppController 
    1111{ 
     12  public $helpers      = array('Fck', 'Gags'); 
     13   
     14  public $components   = array('Pagination'); 
    1215 
    13   public $helpers      = array('Form', 'Fck', 'Gags'); 
    14    
    15   public $components   = array('Security', 'Mypagination'); 
    16    
     16  public function isAuthorized()  
     17  { 
     18    if ($this->action == 'delete')  
     19      { 
     20    if ($this->Auth->user('group_id') == 1)  
     21          { 
     22        return true; 
     23          } else { 
     24        return false; 
     25          } 
     26      } 
     27  
     28    return true; 
     29  } 
     30 
    1731   /**** 
    1832     ===== ADMIN SECTION ========== 
  • trunk/app/controllers/faqs_controller.php

    r135 r247  
    22/* 
    33*  Karamelo E-Learning Platform 
    4 *  Chipotle Software 2002-2007  
     4*  Chipotle Software 2002-2008  
    55*  GPLv3 manuel<ARROBA>mononeurona<PUNTO>org 
    66*/  
     
    1010class FaqsController extends AppController 
    1111{ 
    12  public $helpers       = array('Ajax', 'Form', 'User', 'Fck', 'Gags'); 
     12 public $helpers       = array('Ajax', 'User', 'Fck', 'Gags'); 
    1313  
     14 public function isAuthorized()  
     15 { 
     16    if ($this->action == 'delete')  
     17      { 
     18    if ($this->Auth->user('group_id') == 1)  
     19          { 
     20        return true; 
     21          } else { 
     22        return false; 
     23          } 
     24      } 
     25  
     26    return true; 
     27 } 
     28 
    1429 public function index($order = null) 
    1530 { 
  • trunk/app/controllers/forums_controller.php

    r163 r247  
    11<?php 
    22/** 
    3 *  Chipotle Software 
    4 *  Manuel Montoya 2002-2007  
    5 *  GPL manuel<at>mononeurona<dot>org 
     3*  Chipotle Software TM 
     4*  Manuel Montoya 2002-2008  
     5*  GPLv3 manuel<at>mononeurona<dot>org 
    66*/  
    77  
     
    1010class ForumsController extends AppController 
    1111{ 
    12  public $helpers       = array('Javascript', 'Ajax', 'Form', 'Time'); 
     12 public $helpers       = array('Javascript', 'Ajax', 'Time'); 
    1313  
    14  public $components    = array('Security', 'Edublog'); 
     14 public $components    = array('Edublog'); 
    1515  
     16 public function isAuthorized()  
     17 { 
     18    if ($this->action == 'delete')  
     19      { 
     20    if ($this->Auth->user('group_id') == 1)  
     21          { 
     22        return true; 
     23          } else { 
     24        return false; 
     25          } 
     26      } 
     27    return true; 
     28 } 
     29 
    1630 public function display($title, $username, $user_id, $forum_id)  
    1731 {       
  • trunk/app/controllers/galleries_controller.php

    r69 r247  
    22/** 
    33*  Karamelo E-Learning Platform 
    4 *  Manuel Montoya 2002-2007  
    5 *  Chipotle Software 
     4*  Manuel Montoya 2002-2008  
     5*  Chipotle Software TM 
    66*  GPLv3 manuel<at>mononeurona.org 
    77*/  
     
    1111class GalleriesController extends AppController 
    1212{ 
    13     public $helpers       = array('Ajax', 'Form', 'User', 'Gags'); 
    14      
    15     public function index($id = null) 
    16     { 
     13  public $helpers       = array('Ajax', 'User', 'Gags');     
     14 
     15  public function isAuthorized()  
     16  { 
     17    if ($this->action == 'delete')  
     18      { 
     19    if ($this->Auth->user('group_id') == 1)  
     20          { 
     21        return true; 
     22          } else { 
     23        return false; 
     24          } 
     25      } 
     26  
     27    return true; 
     28  } 
     29 
     30  public function index($id = null) 
     31  { 
    1732        $this->pageTitle = 'View Active Users'; 
    1833        $this->set('data', $this->User->findAll());  
    1934        $this->set('color', 'blue'); 
    20     } 
     35  } 
    2136     
    22     public function listview() 
    23     {    
    24          
     37  public function listview() 
     38  {          
    2539        $this->layout    = 'popup'; 
    2640         
  • trunk/app/controllers/glossaries_controller.php

    r72 r247  
    22/** 
    33*  Karamelo E-Learning Platform 
    4 *  Manuel Montoya 2002-2007  
     4*  Manuel Montoya 2002-2008  
    55*  GPL manuel<at>mononeurona.org 
    66*/  
     
    1010class GlossariesController extends AppController 
    1111{ 
    12     public $helpers       = array('Ajax', 'Form', 'User', 'Fck', 'Gags'); 
     12 public $helpers       = array('Ajax', 'User', 'Fck', 'Gags'); 
    1313     
    14      public $components       = array('Edublog'); 
    15  
     14 public $components   = array('Edublog'); 
     15  
     16 public function isAuthorized()  
     17 { 
     18    if ($this->action == 'delete')  
     19      { 
     20    if ($this->Auth->user('group_id') == 1)  
     21          { 
     22        return true; 
     23          } else { 
     24        return false; 
     25          } 
     26      } 
     27  
     28    return true; 
     29 } 
    1630     
    1731 public function display($username) 
  • trunk/app/controllers/groups_controller.php

    r216 r247  
    22/** 
    33*  Karamelo E-Learning Platform 
    4 *  Manuel Montoya 2002-2007 
    5 *  Chipotle Software GPLv3 manuel<at>mononeurona.org 
     4*  Manuel Montoya 2002-2008 
     5*  Chipotle Software GPLv3 manuel<arroba>mononeurona<punto>org 
    66*/  
    77  
     
    1010class GroupsController extends AppController 
    1111{ 
    12   public $helpers       = array('Ajax', 'Form', 'Gags'); 
    13     
     12  public $helpers       = array('Ajax', 'Gags'); 
     13 
     14  public function isAuthorized()  
     15  { 
     16    if ($this->action == 'delete')  
     17      { 
     18    if ($this->Auth->user('group_id') == 1)  
     19          { 
     20        return true; 
     21          } else { 
     22        return false; 
     23          } 
     24      } 
     25  
     26    return true; 
     27 } 
     28   
    1429 /** 
    1530    === ADMIN METHODS === 
  • trunk/app/controllers/helps_controller.php

    r183 r247  
    11<?php 
    22/** 
    3 *  Chipotle Software 
    4 *  Manuel Montoya 2002-2007  
    5 *  GPL manuel<at>mononeurona<dot>org 
     3*  Chipotle Software TM 
     4*  Manuel Montoya 2002-2008  
     5*  GPLv3 manuel<at>mononeurona<dot>org 
    66*/  
    77 
     
    1010class HelpsController extends AppController 
    1111 
    12    public $helpers       = array('Javascript', 'Ajax', 'Form', 'Fck', 'Gags'); 
     12 public $helpers       = array('Javascript', 'Ajax', 'Fck', 'Gags'); 
    1313    
    14    public $components    = array('Portal', 'Edublog'); 
    15     
    16    public function tour()  
    17    { 
     14 public $components    = array('Portal', 'Edublog'); 
     15 
     16 public function isAuthorized()  
     17