@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | use Core\Constant; |
| 8 | 8 | use Core\Container; |
| 9 | 9 | |
| 10 | -class Tag extends AdminController{ |
|
| 10 | +class Tag extends AdminController { |
|
| 11 | 11 | |
| 12 | 12 | protected $siteConfig; |
| 13 | 13 | protected $pagination; |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $totalCategories = $this->tagModel->countTags(); |
| 33 | 33 | $pagination = $this->pagination->getPagination($page, $totalCategories, $linesPerPage); |
| 34 | 34 | |
| 35 | - if($linesPerPage !== Constant::LIST_PER_PAGE){ |
|
| 35 | + if ($linesPerPage !== Constant::LIST_PER_PAGE) { |
|
| 36 | 36 | $this->data['paginationPostsPerPage'] = $linesPerPage; |
| 37 | 37 | } |
| 38 | 38 | |
@@ -60,14 +60,14 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | |
| 62 | 62 | //Sanity check on ID |
| 63 | - if($tagId == null ) |
|
| 63 | + if ($tagId == null) |
|
| 64 | 64 | { |
| 65 | 65 | throw new \ErrorException("invalid tag ID"); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | //Error checking |
| 69 | 69 | $error = false; |
| 70 | - if($tagName == "") |
|
| 70 | + if ($tagName == "") |
|
| 71 | 71 | { |
| 72 | 72 | $error = true; |
| 73 | 73 | $this->alertBox->setAlert("empty name not allowed", "error"); |
@@ -81,10 +81,10 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | //checking result and redirecting |
| 83 | 83 | if ($tagUpdate) { |
| 84 | - $this->alertBox->setAlert("Tag " . $tagName . " updated"); |
|
| 84 | + $this->alertBox->setAlert("Tag ".$tagName." updated"); |
|
| 85 | 85 | $this->response->redirect("/admin/tag/list/"); |
| 86 | 86 | } |
| 87 | - $this->alertBox->setAlert("Error updating " . $tagName, "error"); |
|
| 87 | + $this->alertBox->setAlert("Error updating ".$tagName, "error"); |
|
| 88 | 88 | $this->response->redirect("/admin/tag/list/"); |
| 89 | 89 | } |
| 90 | 90 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | $removedTag = $this->tagModel->delete($tagId); |
| 102 | 102 | |
| 103 | - if($removedTag) |
|
| 103 | + if ($removedTag) |
|
| 104 | 104 | { |
| 105 | 105 | $this->alertBox->setAlert("Tag ".$tagName." deleted"); |
| 106 | 106 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | //Error checking |
| 127 | 127 | $error = false; |
| 128 | - if($tagName == "") |
|
| 128 | + if ($tagName == "") |
|
| 129 | 129 | { |
| 130 | 130 | $error = true; |
| 131 | 131 | $this->alertBox->setAlert("empty name not allowed", "error"); |
@@ -139,10 +139,10 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | //checking result and redirecting |
| 141 | 141 | if ($tagNew) { |
| 142 | - $this->alertBox->setAlert("Tag " . $tagName . " created"); |
|
| 142 | + $this->alertBox->setAlert("Tag ".$tagName." created"); |
|
| 143 | 143 | $this->response->redirect("/admin/tag/list/"); |
| 144 | 144 | } |
| 145 | - $this->alertBox->setAlert("Error creating " . $tagName, "error"); |
|
| 145 | + $this->alertBox->setAlert("Error creating ".$tagName, "error"); |
|
| 146 | 146 | $this->response->redirect("/admin/tag/list/"); |
| 147 | 147 | } |
| 148 | 148 | } |
| 149 | 149 | \ No newline at end of file |