Nextrek
Diff Revisions
374
vs
378
for /Android/SmartCharging/endPoints/nightly/add_commento.php
|
@@ -4,8 +4,8 @@ |
4 |
4 |
|
header("Access-Control-Allow-Origin: *"); |
5 |
5 |
|
header('Content-Type: application/json; charset=UTF-8'); |
6 |
6 |
|
|
|
7 |
+ |
require_once("constants.php"); |
7 |
8 |
|
require_once("CommentRepository.php"); |
8 |
|
- |
|
9 |
9 |
|
require_once("utilities.php"); |
10 |
10 |
|
|
11 |
11 |
|
$servername = "localhost"; |
|
@@ -42,10 +42,10 @@ |
42 |
42 |
|
|
43 |
43 |
|
if ($risposta["return"] == 0 && count($commentImgs)>0) { |
44 |
44 |
|
foreach($commentImgs as $image) { |
45 |
|
- |
rename("./images/temp/".session_id()."/".$image, "./images/".$image); |
|
45 |
+ |
rename(TEMP_IMAGES_PATH.session_id()."/".$image, IMAGES_PATH.$image); |
46 |
46 |
|
} |
47 |
47 |
|
//rmdir("./images/temp/".session_id()."/"); |
48 |
|
- |
deleteDirectory("./images/temp/".session_id()."/"); |
|
48 |
+ |
deleteDirectory(TEMP_IMAGES_PATH.session_id()."/"); |
49 |
49 |
|
$comment_repo->addImages($risposta["id"], $commentImgs); |
50 |
50 |
|
} |
51 |
51 |
|
|