]> git.mxchange.org Git - friendica.git/blobdiff - mod/wall_upload.php
Remove/replace killme() with *exit()
[friendica.git] / mod / wall_upload.php
index 89655981ea9a090f9f0cf993703459e72df612c2..d1fb918bfe124bf69c2848e1f0e9c229227eaa69 100644 (file)
@@ -39,7 +39,7 @@ function wall_upload_post(App $a, $desktopmode = true)
                        if (!DBA::isResult($r)) {
                                if ($r_json) {
                                        echo json_encode(['error' => L10n::t('Invalid request.')]);
-                                       killme();
+                                       exit();
                                }
                                return;
                        }
@@ -55,7 +55,7 @@ function wall_upload_post(App $a, $desktopmode = true)
        } else {
                if ($r_json) {
                        echo json_encode(['error' => L10n::t('Invalid request.')]);
-                       killme();
+                       exit();
                }
                return;
        }
@@ -104,17 +104,17 @@ function wall_upload_post(App $a, $desktopmode = true)
        if (!$can_post) {
                if ($r_json) {
                        echo json_encode(['error' => L10n::t('Permission denied.')]);
-                       killme();
+                       exit();
                }
                notice(L10n::t('Permission denied.') . EOL);
-               killme();
+               exit();
        }
 
        if (empty($_FILES['userfile']) && empty($_FILES['media'])) {
                if ($r_json) {
                        echo json_encode(['error' => L10n::t('Invalid request.')]);
                }
-               killme();
+               exit();
        }
 
        $src = '';
@@ -164,10 +164,10 @@ function wall_upload_post(App $a, $desktopmode = true)
        if ($src == "") {
                if ($r_json) {
                        echo json_encode(['error' => L10n::t('Invalid request.')]);
-                       killme();
+                       exit();
                }
                notice(L10n::t('Invalid request.').EOL);
-               killme();
+               exit();
        }
 
        // This is a special treatment for picture upload from Twidere
@@ -201,7 +201,7 @@ function wall_upload_post(App $a, $desktopmode = true)
                        echo  $msg. EOL;
                }
                @unlink($src);
-               killme();
+               exit();
        }
 
        $imagedata = @file_get_contents($src);
@@ -215,7 +215,7 @@ function wall_upload_post(App $a, $desktopmode = true)
                        echo  $msg. EOL;
                }
                @unlink($src);
-               killme();
+               exit();
        }
 
        $Image->orient($src);
@@ -253,7 +253,7 @@ function wall_upload_post(App $a, $desktopmode = true)
                } else {
                        echo  $msg. EOL;
                }
-               killme();
+               exit();
        }
 
        if ($width > 640 || $height > 640) {
@@ -283,7 +283,7 @@ function wall_upload_post(App $a, $desktopmode = true)
                if (!$r) {
                        if ($r_json) {
                                echo json_encode(['error' => '']);
-                               killme();
+                               exit();
                        }
                        return false;
                }
@@ -300,7 +300,7 @@ function wall_upload_post(App $a, $desktopmode = true)
 
                if ($r_json) {
                        echo json_encode(['picture' => $picture]);
-                       killme();
+                       exit();
                }
                Logger::log("upload done", Logger::DEBUG);
                return $picture;
@@ -310,10 +310,10 @@ function wall_upload_post(App $a, $desktopmode = true)
 
        if ($r_json) {
                echo json_encode(['ok' => true]);
-               killme();
+               exit();
        }
 
        echo  "\n\n" . '[url=' . System::baseUrl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . System::baseUrl() . "/photo/{$hash}-{$smallest}.".$Image->getExt()."[/img][/url]\n\n";
-       killme();
+       exit();
        // NOTREACHED
 }