@@ -27,8 +27,8 @@ |
||
27 | 27 | $this->data['userLevel'] = $this->auth->getUserLevel(); |
28 | 28 | } |
29 | 29 | |
30 | - protected function onlyAdmin(){ |
|
31 | - if(!$this->auth->isAdmin()){ |
|
30 | + protected function onlyAdmin() { |
|
31 | + if (!$this->auth->isAdmin()) { |
|
32 | 32 | $this->alertBox->setAlert("Only admins can access this", 'error'); |
33 | 33 | $this->container->getResponse()->redirect('/admin'); |
34 | 34 | } |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | |
4 | 4 | use Core\AdminController; |
5 | 5 | |
6 | -class Post extends AdminController{ |
|
6 | +class Post extends AdminController { |
|
7 | 7 | |
8 | 8 | /** |
9 | 9 | * page for new post |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * Shows the post to modify and update |
26 | 26 | * @param $idPost |
27 | 27 | */ |
28 | - public function modify($idPost){ |
|
28 | + public function modify($idPost) { |
|
29 | 29 | $this->onlyAdmin(); |
30 | 30 | |
31 | 31 | } |
@@ -8,7 +8,7 @@ |
||
8 | 8 | { |
9 | 9 | public function index() |
10 | 10 | { |
11 | - if(!$this->auth->isUser()){ |
|
11 | + if (!$this->auth->isUser()) { |
|
12 | 12 | $this->alertBox->setAlert("You must be connected to acces the admin interface", 'warning'); |
13 | 13 | $this->container->getResponse()->redirect(); |
14 | 14 | } |