@@ -78,7 +78,7 @@ |
||
| 78 | 78 | $postId = $postModel->newPost($title, $postImage, $idCategory, $article, $idUser, $published, $onFrontpage, |
| 79 | 79 | $postSlug); |
| 80 | 80 | |
| 81 | - echo "<p>new post ID : " . $postId . "</p>"; |
|
| 81 | + echo "<p>new post ID : ".$postId."</p>"; |
|
| 82 | 82 | |
| 83 | 83 | echo "<pre>"; |
| 84 | 84 | var_dump($posts); |
@@ -12,11 +12,11 @@ |
||
| 12 | 12 | { |
| 13 | 13 | |
| 14 | 14 | if (!preg_match("/^[A-Za-z0-9_-]+$/", $table)) { |
| 15 | - throw new \ErrorException("Invalid table name " . $table); |
|
| 15 | + throw new \ErrorException("Invalid table name ".$table); |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | if (!preg_match("/^[A-Za-z0-9_-]+$/", $columnName)) { |
| 19 | - throw new \ErrorException("Invalid Column name " . $columnName); |
|
| 19 | + throw new \ErrorException("Invalid Column name ".$columnName); |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | $slugTbl = $this->getTablePrefix($table); |
@@ -55,12 +55,12 @@ discard block |
||
| 55 | 55 | return; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - $filetowrite = $this->imageFolder . $tempFile['name']; |
|
| 58 | + $filetowrite = $this->imageFolder.$tempFile['name']; |
|
| 59 | 59 | move_uploaded_file($tempFile['tmp_name'], $filetowrite); |
| 60 | 60 | |
| 61 | 61 | // Respond to the successful upload with JSON. |
| 62 | 62 | echo json_encode(array('location' => $filetowrite)); |
| 63 | - } else { |
|
| 63 | + }else { |
|
| 64 | 64 | // Notify editor that the upload failed |
| 65 | 65 | header("HTTP/1.1 500 Server Error"); |
| 66 | 66 | } |
@@ -86,12 +86,12 @@ discard block |
||
| 86 | 86 | return; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - $filetowrite = $this->configFolder . $tempFile['name']; |
|
| 89 | + $filetowrite = $this->configFolder.$tempFile['name']; |
|
| 90 | 90 | move_uploaded_file($tempFile['tmp_name'], $filetowrite); |
| 91 | 91 | |
| 92 | 92 | // Respond to the successful upload with JSON. |
| 93 | 93 | echo json_encode(array('location' => $filetowrite)); |
| 94 | - } else { |
|
| 94 | + }else { |
|
| 95 | 95 | // Notify editor that the upload failed |
| 96 | 96 | echo json_encode(array('error' => 'Upload failed')); |
| 97 | 97 | } |