@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | { |
22 | 22 | |
23 | 23 | if (!$this->isAlphaNum($table)) { |
24 | - throw new \ErrorException("Invalid table name " . $table); |
|
24 | + throw new \ErrorException("Invalid table name ".$table); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | if (!$this->isAlphaNum($columnName)) { |
28 | - throw new \ErrorException("Invalid Column name " . $columnName); |
|
28 | + throw new \ErrorException("Invalid Column name ".$columnName); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | $slugTbl = $this->getTablePrefix($table); |
@@ -49,15 +49,15 @@ discard block |
||
49 | 49 | public function getIdFromSlug(string $slug, string $table, string $columnName, string $idColumn): int |
50 | 50 | { |
51 | 51 | if (!$this->isAlphaNum($table)) { |
52 | - throw new \ErrorException("Invalid table name " . $table); |
|
52 | + throw new \ErrorException("Invalid table name ".$table); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | if (!$this->isAlphaNum($columnName)) { |
56 | - throw new \ErrorException("Invalid Slug Column name " . $columnName); |
|
56 | + throw new \ErrorException("Invalid Slug Column name ".$columnName); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | if (!$this->isAlphaNum($idColumn)) { |
60 | - throw new \ErrorException("Invalid ID Column name " . $columnName); |
|
60 | + throw new \ErrorException("Invalid ID Column name ".$columnName); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | $slugTbl = $this->getTablePrefix($table); |
@@ -92,7 +92,7 @@ |
||
92 | 92 | $trimed .= $string[$wordCounter]; |
93 | 93 | if ($wordCounter < $count - 1) { |
94 | 94 | $trimed .= " "; |
95 | - } else { |
|
95 | + }else { |
|
96 | 96 | $trimed .= "..."; |
97 | 97 | } |
98 | 98 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $postModel = new PostModel($this->container); |
50 | 50 | $slugModel = new SlugModel($this->container); |
51 | 51 | |
52 | - $postId = $slugModel->getIdFromSlug($slug,"posts","posts_slug", "idposts"); |
|
52 | + $postId = $slugModel->getIdFromSlug($slug, "posts", "posts_slug", "idposts"); |
|
53 | 53 | |
54 | 54 | $this->data['post'] = $postModel->getSinglePost($postId); |
55 | 55 | $this->data['postTags'] = $tagModel->getTagsOnPost($postId); |
@@ -119,8 +119,8 @@ discard block |
||
119 | 119 | $tagModel->addNewTagToPost($postId, $tag["name"]); |
120 | 120 | } |
121 | 121 | } |
122 | - $this->alertBox->setAlert("Post " . $title . " Created"); |
|
123 | - $this->container->getResponse()->redirect("admin/post/modify/" . $postSlug); |
|
122 | + $this->alertBox->setAlert("Post ".$title." Created"); |
|
123 | + $this->container->getResponse()->redirect("admin/post/modify/".$postSlug); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | /** |