Changeset 540
- Timestamp:
- 05/21/08 11:43:42 (6 months ago)
- Location:
- trunk/app
- Files:
-
- 46 modified
-
app_controller.php (modified) (2 diffs)
-
controllers/acquaintances_controller.php (modified) (1 diff)
-
controllers/answers_controller.php (modified) (1 diff)
-
controllers/categories_controller.php (modified) (1 diff)
-
controllers/catfaqs_controller.php (modified) (1 diff)
-
controllers/catforums_controller.php (modified) (1 diff)
-
controllers/catglossaries_controller.php (modified) (1 diff)
-
controllers/colleges_controller.php (modified) (1 diff)
-
controllers/comments_controller.php (modified) (1 diff)
-
controllers/confirms_controller.php (modified) (1 diff)
-
controllers/discussions_controller.php (modified) (1 diff)
-
controllers/ecourses_controller.php (modified) (1 diff)
-
controllers/entries_controller.php (modified) (1 diff)
-
controllers/events_controller.php (modified) (1 diff)
-
controllers/faqs_controller.php (modified) (1 diff)
-
controllers/forums_controller.php (modified) (1 diff)
-
controllers/galleries_controller.php (modified) (1 diff)
-
controllers/glossaries_controller.php (modified) (1 diff)
-
controllers/groups_controller.php (modified) (1 diff)
-
controllers/helps_controller.php (modified) (1 diff)
-
controllers/images_controller.php (modified) (1 diff)
-
controllers/lessons_controller.php (modified) (1 diff)
-
controllers/medias_controller.php (modified) (1 diff)
-
controllers/messages_controller.php (modified) (1 diff)
-
controllers/news_controller.php (modified) (1 diff)
-
controllers/newsletters_controller.php (modified) (1 diff)
-
controllers/participations_controller.php (modified) (1 diff)
-
controllers/podcasts_controller.php (modified) (1 diff)
-
controllers/pollrows_controller.php (modified) (1 diff)
-
controllers/polls_controller.php (modified) (1 diff)
-
controllers/questions_controller.php (modified) (1 diff)
-
controllers/quotes_controller.php (modified) (1 diff)
-
controllers/recovers_controller.php (modified) (1 diff)
-
controllers/replies_controller.php (modified) (1 diff)
-
controllers/results_controller.php (modified) (1 diff)
-
controllers/shares_controller.php (modified) (1 diff)
-
controllers/subjects_controller.php (modified) (1 diff)
-
controllers/tests_controller.php (modified) (1 diff)
-
controllers/themeblogs_controller.php (modified) (1 diff)
-
controllers/themes_controller.php (modified) (1 diff)
-
controllers/topics_controller.php (modified) (1 diff)
-
controllers/treasures_controller.php (modified) (1 diff)
-
controllers/users_controller.php (modified) (1 diff)
-
controllers/vclassrooms_controller.php (modified) (1 diff)
-
controllers/webquests_controller.php (modified) (1 diff)
-
controllers/wikis_controller.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/app_controller.php
r538 r540 18 18 public function beforeFilter() 19 19 { 20 $this->Auth->fields = array('username' => 'email', 'password' => 'pwd');21 $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');22 $this->Auth->loginRedirect = array('controller' => 'news', 'action' => 'display');23 $this->Auth->logoutRedirect = '/news/display';20 $this->Auth->fields = array('username' => 'email', 'password' => 'pwd'); 21 $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login'); 22 $this->Auth->loginRedirect = array('controller' => 'news', 'action' => 'display'); 23 $this->Auth->logoutRedirect = array('controller' => 'news', 'action' => 'display'); 24 24 $this->Auth->loginError = 'Invalid e-mail / password combination. Please try again'; 25 25 $this->Auth->authorize = 'controller'; … … 28 28 $this->set('cU', $this->Auth->user()); // $cU current user array to use in the views if user logged in 29 29 } 30 31 public function isAuthorized() 32 { 33 if (isset( $this->params[Configure::read('Routing.admin')] )): 34 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 35 return true; 36 else: 37 return false; 38 endif; 39 endif; 30 40 41 return true; 42 } 43 31 44 public function msgFlash($msg, $to) 32 45 { -
trunk/app/controllers/acquaintances_controller.php
r538 r540 23 23 $this->Auth->allow(array('display')); 24 24 } 25 26 public function isAuthorized() 27 { 28 if (isset( $this->params[Configure::read('Routing.admin')] )): 29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 30 return true; 31 else: 32 return false; 33 endif; 34 endif; 35 36 return true; 37 } 38 25 39 26 public function display($username, $user_id) 40 27 { -
trunk/app/controllers/answers_controller.php
r538 r540 21 21 } 22 22 23 public function isAuthorized() 24 { 25 if (isset( $this->params[Configure::read('Routing.admin')] )): 26 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 27 return true; 28 else: 29 return false; 30 endif; 31 endif; 32 33 return true; 34 } 35 36 /*** === ADMIN METHODS=== ***/ 23 /*** === ADMIN METHODS=== ***/ 37 24 38 public function admin_add()39 {25 public function admin_add() 26 { 40 27 if (!empty($this->data["Answer"])) 41 28 { -
trunk/app/controllers/categories_controller.php
r538 r540 22 22 } 23 23 24 public function isAuthorized()25 {26 if (isset( $this->params[Configure::read('Routing.admin')] )):27 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers28 return true;29 else:30 return false;31 endif;32 endif;33 34 return true;35 }36 37 24 public function index($order = null) 38 25 { -
trunk/app/controllers/catfaqs_controller.php
r538 r540 22 22 parent::beforeFilter(); 23 23 $this->Auth->allow(array('display', 'view')); 24 }25 26 public function isAuthorized()27 {28 if (isset( $this->params[Configure::read('Routing.admin')] )):29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers30 return true;31 else:32 return false;33 endif;34 endif;35 36 return true;37 24 } 38 25 -
trunk/app/controllers/catforums_controller.php
r538 r540 24 24 } 25 25 26 public function isAuthorized()27 {28 if (isset( $this->params[Configure::read('Routing.admin')] )):29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers30 return true;31 else:32 return false;33 endif;34 endif;35 36 return true;37 }38 39 26 public function display($username, $user_id) 40 27 { -
trunk/app/controllers/catglossaries_controller.php
r538 r540 24 24 } 25 25 26 public function isAuthorized()27 {28 if (isset( $this->params[Configure::read('Routing.admin')] )):29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers30 return true;31 else:32 return false;33 endif;34 endif;35 36 return true;37 }38 39 26 public function display($username) 40 27 { -
trunk/app/controllers/colleges_controller.php
r538 r540 24 24 } 25 25 26 public function isAuthorized()27 {28 if (isset( $this->params[Configure::read('Routing.admin')] )):29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers30 return true;31 else:32 return false;33 endif;34 endif;35 36 return true;37 }38 39 26 public function view() 40 27 { -
trunk/app/controllers/comments_controller.php
r538 r540 24 24 } 25 25 26 public function isAuthorized()27 {28 if (isset( $this->params[Configure::read('Routing.admin')] )):29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers30 return true;31 else:32 return false;33 endif;34 endif;35 36 return true;37 }38 39 26 public function view($username=null, $entry_id=null) 40 27 { -
trunk/app/controllers/confirms_controller.php
r538 r540 19 19 $this->Auth->allow(array('signup')); 20 20 } 21 22 public function isAuthorized() 23 { 24 if (isset( $this->params[Configure::read('Routing.admin')] )): 25 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 26 return true; 27 else: 28 return false; 29 endif; 30 endif; 31 32 return true; 33 } 34 21 35 22 public function signup($secret = null) 36 23 { -
trunk/app/controllers/discussions_controller.php
r538 r540 27 27 $this->Auth->allow(array('captcha', 'add')); 28 28 endif; 29 }30 31 public function isAuthorized()32 {33 if (isset( $this->params[Configure::read('Routing.admin')] )):34 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers35 return true;36 else:37 return false;38 endif;39 endif;40 41 return true;42 29 } 43 30 -
trunk/app/controllers/ecourses_controller.php
r538 r540 22 22 } 23 23 24 public function isAuthorized() 25 { 26 if (isset( $this->params[Configure::read('Routing.admin')] )): 27 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers 28 return true; 29 else: 30 return false; 31 endif; 32 endif; 33 34 return true; 35 } 36 37 38 /**** 39 ===== ADMIN SECTION ========== 40 ****/ 24 /**** ===== ADMIN SECTION ========== ****/ 41 25 public function admin_start() 42 26 { -
trunk/app/controllers/entries_controller.php
r538 r540 25 25 } 26 26 27 public function isAuthorized()28 {29 if (isset( $this->params[Configure::read('Routing.admin')] )):30 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers31 return true;32 else:33 return false;34 endif;35 endif;36 37 return true;38 }39 40 27 public function rss($username) 41 28 { -
trunk/app/controllers/events_controller.php
r538 r540 15 15 class EventsController extends AppController 16 16 { 17 public $helpers = array('Html', 'Javascript', 'Ajax', 'Form');17 public $helpers = array('Html', 'Javascript', 'Ajax', 'Form'); 18 18 19 public $components = array('Portal');19 public $components = array('Portal'); 20 20 21 public function beforeFilter()22 {21 public function beforeFilter() 22 { 23 23 parent::beforeFilter(); 24 24 // allow everyone to join 25 25 $this->Auth->allow(array('display')); 26 }27 28 public function isAuthorized()29 {30 if (isset( $this->params[Configure::read('Routing.admin')] )):31 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers32 return true;33 else:34 return false;35 endif;36 endif;37 38 return true;39 26 } 40 27 41 42 public function calendar() 43 { 28 public function calendar() 29 { 44 30 $this->layout = 'portal'; 45 31 -
trunk/app/controllers/faqs_controller.php
r538 r540 24 24 } 25 25 26 public function isAuthorized()27 {28 if (isset( $this->params[Configure::read('Routing.admin')] )):29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers30 return true;31 else:32 return false;33 endif;34 endif;35 36 return true;37 }38 39 26 public function index($order = null) 40 27 { -
trunk/app/controllers/forums_controller.php
r538 r540 22 22 parent::beforeFilter(); 23 23 $this->Auth->allow(array('display', 'discussion', 'view', 'index')); 24 }25 26 public function isAuthorized()27 {28 if (isset( $this->params[Configure::read('Routing.admin')] )):29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers30 return true;31 else:32 return false;33 endif;34 endif;35 36 return true;37 24 } 38 25 -
trunk/app/controllers/galleries_controller.php
r538 r540 15 15 class GalleriesController extends AppController 16 16 { 17 public $helpers = array('Ajax', 'User', 'Gags');17 public $helpers = array('Ajax', 'User', 'Gags'); 18 18 19 public function beforeFilter()19 public function beforeFilter() 20 20 { 21 21 parent::beforeFilter(); -
trunk/app/controllers/glossaries_controller.php
r538 r540 21 21 { 22 22 parent::beforeFilter(); 23 }24 25 26 public function isAuthorized()27 {28 if (isset( $this->params[Configure::read('Routing.admin')] )):29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers30 return true;31 else:32 return false;33 endif;34 endif;35 36 return true;37 23 } 38 24 -
trunk/app/controllers/groups_controller.php
r538 r540 21 21 } 22 22 23 public function isAuthorized()24 {25 if (isset( $this->params[Configure::read('Routing.admin')] )):26 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers27 return true;28 else:29 return false;30 endif;31 endif;32 33 return true;34 }35 36 23 /** === ADMIN METHODS === **/ 37 24 public function admin_listing() -
trunk/app/controllers/helps_controller.php
r538 r540 22 22 parent::beforeFilter(); 23 23 $this->Auth->allow(array('display', 'tour')); 24 }25 26 public function isAuthorized()27 {28 if (isset( $this->params[Configure::read('Routing.admin')] )):29 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers30 return true;31 else:32 return false;33 endif;34 endif;35 36 return true;37 24 } 38 25 -
trunk/app/controllers/images_controller.php
r538 r540 23 23 } 24 24 25 public function isAuthorized()26 {27 if (isset( $this->params[Configure::read('Routing.admin')] )):28 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers29 return true;30 else:31 return false;32 endif;33 endif;34 35 return true;36 }37 38 25 /*** === ADMIN METHODS ***/ 39 26 -
trunk/app/controllers/lessons_controller.php
r538 r540 23 23 $this->Auth->allow(array('view', 'display')); 24 24 } 25 26 27 public function isAuthorized()28 {29 if (isset( $this->params[Configure::read('Routing.admin')] )):30 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers31 return true;32 else:33 return false;34 endif;35 endif;36 37 return true;38 }39 40 25 41 26 public function view($username, $id) -
trunk/app/controllers/medias_controller.php
r538 r540 20 20 $this->Auth->allow(array('view', 'display')); 21 21 } 22 23 24 public function isAuthorized()25 {26 if (isset( $this->params[Configure::read('Routing.admin')] )):27 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers28 return true;29 else:30 return false;31 endif;32 endif;33 34 return true;35 }36 37 22 38 23 public function index($id = null) -
trunk/app/controllers/messages_controller.php
r538 r540 26 26 } 27 27 28 public function isAuthorized()29 {30 if (isset( $this->params[Configure::read('Routing.admin')] )):31 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers32 return true;33 else:34 return false;35 endif;36 endif;37 38 return true;39 }40 41 28 public function message($username) // show form to send message to teacher 42 29 { -
trunk/app/controllers/news_controller.php
r538 r540 24 24 parent::beforeFilter(); 25 25 $this->Auth->allow(array('view', 'display', 'rss', 'category')); 26 }27 28 public function isAuthorized()29 {30 if (isset( $this->params[Configure::read('Routing.admin')] )):31 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ): // admin and teachers32 return true;33 else:34 return false;35 endif;36 endif;37 38 return true;39 26 } 40 27 -
trunk/app/controllers/newsletters_controller.php
r538 r540 21 21 } 22 22
