@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $onFrontpage = $posts["isOnFrontPage"]; |
| 87 | 87 | $idUser = $userSessionid; |
| 88 | 88 | |
| 89 | - if(!is_int($idUser) || $idUser === null) |
|
| 89 | + if (!is_int($idUser) || $idUser === null) |
|
| 90 | 90 | { |
| 91 | 91 | throw new \Error("Invalid userID"); |
| 92 | 92 | } |
@@ -129,10 +129,10 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | //checking result and redirecting |
| 131 | 131 | if ($postId != null) { |
| 132 | - $this->alertBox->setAlert("Post " . $title . " Created"); |
|
| 133 | - $this->container->getResponse()->redirect("admin/post/modify/" . $postSlug); |
|
| 132 | + $this->alertBox->setAlert("Post ".$title." Created"); |
|
| 133 | + $this->container->getResponse()->redirect("admin/post/modify/".$postSlug); |
|
| 134 | 134 | } |
| 135 | - $this->alertBox->setAlert("Error creating " . $title, "error"); |
|
| 135 | + $this->alertBox->setAlert("Error creating ".$title, "error"); |
|
| 136 | 136 | $this->container->getResponse()->redirect("admin/post/new"); |
| 137 | 137 | |
| 138 | 138 | } |
@@ -211,10 +211,10 @@ discard block |
||
| 211 | 211 | |
| 212 | 212 | //checking result and redirecting |
| 213 | 213 | if ($postUpdate) { |
| 214 | - $this->alertBox->setAlert("Post " . $title . " Updated"); |
|
| 215 | - $this->container->getResponse()->redirect("admin/post/modify/" . $postSlug); |
|
| 214 | + $this->alertBox->setAlert("Post ".$title." Updated"); |
|
| 215 | + $this->container->getResponse()->redirect("admin/post/modify/".$postSlug); |
|
| 216 | 216 | } |
| 217 | - $this->alertBox->setAlert("Error updating " . $title, "error"); |
|
| 218 | - $this->container->getResponse()->redirect("admin/post/modify/" . $originalPostSlug); |
|
| 217 | + $this->alertBox->setAlert("Error updating ".$title, "error"); |
|
| 218 | + $this->container->getResponse()->redirect("admin/post/modify/".$originalPostSlug); |
|
| 219 | 219 | } |
| 220 | 220 | } |
| 221 | 221 | \ No newline at end of file |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $this->query($sql); |
| 88 | 88 | if ($select != null) { |
| 89 | 89 | foreach ($select as $col => $val) { |
| 90 | - $this->bind(":" . $col, $val); |
|
| 90 | + $this->bind(":".$col, $val); |
|
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | $this->bind(":limit", $limit); |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $this->query($sql); |
| 122 | 122 | if ($select != null) { |
| 123 | 123 | foreach ($select as $col => $val) { |
| 124 | - $this->bind(":" . $col, $val); |
|
| 124 | + $this->bind(":".$col, $val); |
|
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | 127 | $this->execute(); |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | |
| 292 | 292 | $this->execute(); |
| 293 | 293 | |
| 294 | - return (int)$this->dbh->lastInsertId(); |
|
| 294 | + return (int) $this->dbh->lastInsertId(); |
|
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | /** |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | $this->query($sql); |
| 68 | 68 | $this->bind(":tag", $tag); |
| 69 | 69 | $this->execute(); |
| 70 | - return (int)$this->dbh->lastInsertId(); |
|
| 70 | + return (int) $this->dbh->lastInsertId(); |
|
| 71 | 71 | |
| 72 | 72 | } |
| 73 | 73 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | //Searching for the page break tag |
| 86 | 86 | $breakTagPosition = strpos($text, "<!-- EndOfExcerptBlogOc -->"); |
| 87 | - if($breakTagPosition > 0){ |
|
| 87 | + if ($breakTagPosition > 0) { |
|
| 88 | 88 | return $this->completeDom(substr($text, 0, $breakTagPosition)); |
| 89 | 89 | } |
| 90 | 90 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $string = preg_split('/(<img[^>]+\>)|(<p[^>]+\>)|(<span[^>]+\>)|\s/', $text, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); |
| 93 | 93 | |
| 94 | 94 | //The preg split can return false, probably will never happen but just in case. |
| 95 | - if(!$string) |
|
| 95 | + if (!$string) |
|
| 96 | 96 | { |
| 97 | 97 | throw new \Error("excerpt generation failed"); |
| 98 | 98 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $trimed .= $string[$wordCounter]; |
| 106 | 106 | if ($wordCounter < $count - 1) { |
| 107 | 107 | $trimed .= " "; |
| 108 | - } else { |
|
| 108 | + }else { |
|
| 109 | 109 | $trimed .= "[...]"; |
| 110 | 110 | } |
| 111 | 111 | } |