]> git.mxchange.org Git - friendica.git/commitdiff
Remove/replace killme() with *exit()
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 26 Dec 2018 05:40:12 +0000 (00:40 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 21 Jan 2019 14:49:17 +0000 (09:49 -0500)
75 files changed:
bin/worker.php
include/api.php
library/OAuth1.php
mod/_well_known.php
mod/admin.php
mod/amcd.php
mod/api.php
mod/attach.php
mod/cal.php
mod/contactgroup.php
mod/dfrn_notify.php
mod/dfrn_poll.php
mod/dfrn_request.php
mod/display.php
mod/events.php
mod/fbrowser.php
mod/fetch.php
mod/filer.php
mod/filerm.php
mod/friendica.php
mod/group.php
mod/hovercard.php
mod/ignored.php
mod/item.php
mod/like.php
mod/lockview.php
mod/manifest.php
mod/modexp.php
mod/network.php
mod/nodeinfo.php
mod/noscrape.php
mod/notify.php
mod/oexchange.php
mod/opensearch.php
mod/photos.php
mod/phpinfo.php
mod/ping.php
mod/poco.php
mod/pretheme.php
mod/probe.php
mod/profiles.php
mod/profperm.php
mod/pubsub.php
mod/pubsubhubbub.php
mod/robots_txt.php
mod/rsd_xml.php
mod/search.php
mod/share.php
mod/starred.php
mod/statistics_json.php
mod/subthread.php
mod/tagger.php
mod/uexport.php
mod/update_community.php
mod/update_contact.php
mod/update_display.php
mod/update_network.php
mod/update_notes.php
mod/update_profile.php
mod/view.php
mod/viewsrc.php
mod/wall_attach.php
mod/wall_upload.php
mod/webfinger.php
mod/worker.php
mod/xrd.php
src/BaseModule.php
src/Core/Renderer.php
src/Core/System.php
src/Module/Oembed.php
src/Module/Photo.php
src/Protocol/DFRN.php
src/Render/FriendicaSmartyEngine.php
src/Util/Emailer.php
src/Worker/Cron.php

index 78b6da5857343598d81ce0825196d40fc4004b44..78b7a58a05cfcf24d72187197b319ec69bc3f3c4 100755 (executable)
@@ -44,7 +44,7 @@ $spawn = array_key_exists('s', $options) || array_key_exists('spawn', $options);
 
 if ($spawn) {
        Worker::spawnWorker();
-       killme();
+       exit();
 }
 
 $run_cron = !array_key_exists('n', $options) && !array_key_exists('no_cron', $options);
index d657d8369c690a47ad24a4b62084698ee906962c..6993cb6889f8a46a10ee1b83a1f65816dfb477b0 100644 (file)
@@ -3928,10 +3928,10 @@ function api_oauth_request_token()
                $r = $oauth1->fetch_request_token(OAuthRequest::from_request());
        } catch (Exception $e) {
                echo "error=" . OAuthUtil::urlencode_rfc3986($e->getMessage());
-               killme();
+               exit();
        }
        echo $r;
-       killme();
+       exit();
 }
 
 /**
@@ -3947,10 +3947,10 @@ function api_oauth_access_token()
                $r = $oauth1->fetch_access_token(OAuthRequest::from_request());
        } catch (Exception $e) {
                echo "error=". OAuthUtil::urlencode_rfc3986($e->getMessage());
-               killme();
+               exit();
        }
        echo $r;
-       killme();
+       exit();
 }
 
 /// @TODO move to top of file or somewhere better
index 47463283161a018099b9aba50710d9159d91f44f..27ee090b114239499c8ac47f5bf04aeec2972ea4 100644 (file)
@@ -91,7 +91,6 @@ abstract class OAuthSignatureMethod {
    */
   public function check_signature($request, $consumer, $token, $signature) {
     $built = $this->build_signature($request, $consumer, $token);
-    //echo "<pre>"; var_dump($signature, $built, ($built == $signature)); killme();
     return ($built == $signature);
   }
 }
@@ -296,7 +295,6 @@ class OAuthRequest {
     $http_url =  substr($http_url, 0, strpos($http_url,$parameters['pagename'])+strlen($parameters['pagename']));
     unset( $parameters['pagename'] );
     
-       //echo "<pre>".__function__."\n"; var_dump($http_method, $http_url, $parameters, $_SERVER['REQUEST_URI']); killme();
     return new OAuthRequest($http_method, $http_url, $parameters);
   }
 
@@ -561,7 +559,6 @@ class OAuthServer {
   public function verify_request(&$request) {
     $this->get_version($request);
     $consumer = $this->get_consumer($request);
-    //echo __file__.__line__.__function__."<pre>"; var_dump($consumer); die();
     $token = $this->get_token($request, $consumer, "access");
     $this->check_signature($request, $consumer, $token);
     return array($consumer, $token);
index 407fc756a931fef7cfe0a39adc79816def46b1b6..f6a351bb2369802f5b16bc015594b43387b0233a 100644 (file)
@@ -27,7 +27,6 @@ function _well_known_init(App $a)
                }
        }
        System::httpExit(404);
-       killme();
 }
 
 function wk_social_relay()
index a0cc207e8decb8412bb891d6b0c23ef9e8d9903a..17e58940ea158df40d7607037155fd8ba5596ef5 100644 (file)
@@ -301,8 +301,7 @@ function admin_content(App $a)
 
        if ($a->isAjax()) {
                echo $o;
-               killme();
-               return '';
+               exit();
        } else {
                return $o;
        }
index c6013b942d92913f26334731e8b0917427e85b00..31b812ecd94a6c69c360fcab2dd40312bd652325 100644 (file)
@@ -47,5 +47,5 @@ function amcd_content()
   }
 }
 JSON;
-       killme();
+       exit();
 }
index e7214624211ca5661b25e47f7cc773d48a928f69..1f199c9a9afeba401f0e5499475039dc4c3040bc 100644 (file)
@@ -59,7 +59,7 @@ function api_content(App $a)
                } catch (Exception $e) {
                        echo "<pre>";
                        var_dump($e);
-                       killme();
+                       exit();
                }
 
                if (!empty($_POST['oauth_yes'])) {
@@ -79,7 +79,7 @@ function api_content(App $a)
                                        $glue = "?";
                                }
                                $a->internalRedirect($consumer->callback_url . $glue . 'oauth_token=' . OAuthUtil::urlencode_rfc3986($params['oauth_token']) . '&oauth_verifier=' . OAuthUtil::urlencode_rfc3986($verifier));
-                               killme();
+                               exit();
                        }
 
                        $tpl = Renderer::getMarkupTemplate("oauth_authorize_done.tpl");
@@ -117,5 +117,5 @@ function api_content(App $a)
        }
 
        echo api_call($a);
-       killme();
+       exit();
 }
index cf2c8cc6dd55d68191fb94d639dce31e7158f3bd..f3192d802d9208feddc5dce56d69cb29cfd791c7 100644 (file)
@@ -49,6 +49,6 @@ function attach_init(App $a)
        }
 
        echo $r[0]['data'];
-       killme();
+       exit();
        // NOTREACHED
 }
index 526e33c00cd796b09a29591192b33db7a317346f..3d90ff03bf85cccd51af1925396a8209e8f1422d 100644 (file)
@@ -244,7 +244,7 @@ function cal_content(App $a)
 
                if (!empty($a->argv[2]) && ($a->argv[2] === 'json')) {
                        echo json_encode($events);
-                       killme();
+                       exit();
                }
 
                // links: array('href', 'text', 'extra css classes', 'title')
@@ -286,7 +286,7 @@ function cal_content(App $a)
 
                if (!empty($_GET['id'])) {
                        echo $o;
-                       killme();
+                       exit();
                }
 
                return $o;
@@ -331,7 +331,7 @@ function cal_content(App $a)
                        header('Content-type: text/calendar');
                        header('content-disposition: attachment; filename="' . L10n::t('calendar') . '-' . $nick . '.' . $evexport["extension"] . '"');
                        echo $evexport["content"];
-                       killme();
+                       exit();
                }
 
                return;
index 753d3a07332139f4690deb35d4eb8785e2a6e832..07997cd1160cbd9d7e58d89895d1a61081c2dc3b 100644 (file)
@@ -8,7 +8,7 @@ use Friendica\Model\Group;
 function contactgroup_content(App $a)
 {
        if (!local_user()) {
-               killme();
+               exit();
        }
 
        $change = null;
@@ -28,7 +28,7 @@ function contactgroup_content(App $a)
                        intval(local_user())
                );
                if (!DBA::isResult($r)) {
-                       killme();
+                       exit();
                }
 
                $group = $r[0];
@@ -49,5 +49,5 @@ function contactgroup_content(App $a)
                }
        }
 
-       killme();
+       exit();
 }
index b911a27e219d9f9fe22cff16eeff4c8e28cf9f4c..c67525810787470e0ee7eda429f676b707b7fef1 100644 (file)
@@ -281,7 +281,7 @@ function dfrn_notify_content(App $a) {
                $user = DBA::selectFirst('user', ['uid'], ['nickname' => $a->argv[1]]);
                if (!DBA::isResult($user)) {
                        Logger::log('User not found for nickname ' . $a->argv[1]);
-                       killme();
+                       exit();
                }
 
                $condition = [];
@@ -313,7 +313,7 @@ function dfrn_notify_content(App $a) {
                $importer = DFRN::getImporter($contact['id'], $user['uid']);
                if (empty($importer)) {
                        Logger::log('No importer data found for user ' . $a->argv[1] . ' and contact ' . $dfrn_id);
-                       killme();
+                       exit();
                }
 
                Logger::log("Remote rino version: ".$rino_remote." for ".$importer["url"], Logger::DATA);
@@ -370,6 +370,6 @@ function dfrn_notify_content(App $a) {
                        . "\t" . '<challenge>' . $challenge . '</challenge>' . "\r\n"
                        . '</dfrn_notify>' . "\r\n";
 
-               killme();
+               exit();
        }
 }
index 6b2016886db462274ad9da07712f11de6505c43b..928690060f4819c3904eaee8159808d11a15ed1d 100644 (file)
@@ -37,7 +37,7 @@ function dfrn_poll_init(App $a)
                $nickname = $a->argv[1];
                header("Content-type: application/atom+xml");
                echo OStatus::feed($nickname, $last_update, 10);
-               killme();
+               exit();
        }
 
        $direction = -1;
@@ -71,7 +71,7 @@ function dfrn_poll_init(App $a)
                Logger::log('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] . ' for ' . $user);
                header("Content-type: application/atom+xml");
                echo DFRN::feed('', $user, $last_update, 0, $hidewall);
-               killme();
+               exit();
        }
 
        if (($type === 'profile') && (!strlen($sec))) {
@@ -198,7 +198,7 @@ function dfrn_poll_init(App $a)
 
                        header("Content-type: text/xml");
                        echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?><dfrn_poll><status>0</status><challenge>$decoded_challenge</challenge><sec>$sec</sec></dfrn_poll>";
-                       killme();
+                       exit();
                        // NOTREACHED
                } else {
                        // old protocol
@@ -290,7 +290,7 @@ function dfrn_poll_post(App $a)
 
                        header("Content-type: text/xml");
                        echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?><dfrn_poll><status>0</status><challenge>$decoded_challenge</challenge><sec>$sec</sec></dfrn_poll>";
-                       killme();
+                       exit();
                        // NOTREACHED
                }
        }
@@ -307,7 +307,7 @@ function dfrn_poll_post(App $a)
        );
 
        if (!DBA::isResult($r)) {
-               killme();
+               exit();
        }
 
        $type = $r[0]['type'];
@@ -336,7 +336,7 @@ function dfrn_poll_post(App $a)
 
        $r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 $sql_extra LIMIT 1");
        if (!DBA::isResult($r)) {
-               killme();
+               exit();
        }
 
        $contact = $r[0];
@@ -368,7 +368,7 @@ function dfrn_poll_post(App $a)
                        <description>$text</description>
                </reputation>
                ";
-               killme();
+               exit();
                // NOTREACHED
        } else {
                // Update the writable flag if it changed
@@ -391,7 +391,7 @@ function dfrn_poll_post(App $a)
                header("Content-type: application/atom+xml");
                $o = DFRN::feed($dfrn_id, $a->argv[1], $last_update, $direction);
                echo $o;
-               killme();
+               exit();
        }
 }
 
@@ -573,7 +573,7 @@ function dfrn_poll_content(App $a)
                                . "\t" . '<dfrn_id>' . $encrypted_id . '</dfrn_id>' . "\r\n"
                                . "\t" . '<challenge>' . $challenge . '</challenge>' . "\r\n"
                                . '</dfrn_poll>' . "\r\n";
-                       killme();
+                       exit();
                        // NOTREACHED
                }
        }
index 9f0583711f703b71415b58e6485d38fc2e2ce799..0c7f4c2a6e820ddaac256dad38d16f9509bf0d59 100644 (file)
@@ -589,8 +589,7 @@ function dfrn_request_content(App $a)
                        }
                }
 
-               killme();
-               return; // NOTREACHED
+               exit();
        } else {
                // Normal web request. Display our user's introduction form.
                if ((Config::get('system', 'block_public')) && (!local_user()) && (!remote_user())) {
index a616fc8cc343022dcdbe7b0240f14795157cf8c5..dc43e08d3486404e4c86d6f0667deaea01072e1b 100644 (file)
@@ -426,5 +426,5 @@ function displayShowFeed($item_id, $conversation)
        }
        header("Content-type: application/atom+xml");
        echo $xml;
-       killme();
+       exit();
 }
index a54260c435ef95ca3f73413c1184ab80a0861835..60fa0392213be1ccfc15b83d364876a882f8aec8 100644 (file)
@@ -117,7 +117,7 @@ function events_post(App $a)
                notice(L10n::t('Event can not end before it has started.') . EOL);
                if (intval($_REQUEST['preview'])) {
                        echo L10n::t('Event can not end before it has started.');
-                       killme();
+                       exit();
                }
                $a->internalRedirect($onerror_path);
        }
@@ -126,7 +126,7 @@ function events_post(App $a)
                notice(L10n::t('Event title and start time are required.') . EOL);
                if (intval($_REQUEST['preview'])) {
                        echo L10n::t('Event title and start time are required.');
-                       killme();
+                       exit();
                }
                $a->internalRedirect($onerror_path);
        }
@@ -414,7 +414,7 @@ function events_content(App $a)
 
                if (!empty($_GET['id'])) {
                        echo $o;
-                       killme();
+                       exit();
                }
 
                return $o;
index d5310f4577144600437f607b38da4451654e20f3..c6e669d0228d67d82d3aa2e3af624ebef0564947 100644 (file)
@@ -18,11 +18,11 @@ use Friendica\Object\Image;
 function fbrowser_content(App $a)
 {
        if (!local_user()) {
-               killme();
+               exit();
        }
 
        if ($a->argc == 1) {
-               killme();
+               exit();
        }
 
        $template_file = "filebrowser.tpl";
@@ -146,6 +146,6 @@ function fbrowser_content(App $a)
                return $o;
        } else {
                echo $o;
-               killme();
+               exit();
        }
 }
index 5dcedb1aafdca58b6b8d0a01b58ed8611fe88155..1af8d078551d54a2b52bfdf4a1da83e5e6b24f23 100644 (file)
@@ -40,7 +40,7 @@ function fetch_init(App $a)
 
                                header("HTTP/1.1 301 Moved Permanently");
                                header("Location:".$location);
-                               killme();
+                               exit();
                        }
                }
 
@@ -60,5 +60,5 @@ function fetch_init(App $a)
        header("Content-Type: application/magic-envelope+xml; charset=utf-8");
        echo Diaspora::buildMagicEnvelope($xml, $user);
 
-       killme();
+       exit();
 }
index 4580dc6f67fd8a8e5051aac6e21129afc0288437..0d9afe638b48b16ae681efc9f6aad0e026912fad 100644 (file)
@@ -13,7 +13,7 @@ use Friendica\Util\XML;
 function filer_content(App $a)
 {
        if (! local_user()) {
-               killme();
+               exit();
        }
 
        $term = XML::unescape(trim(defaults($_GET, 'term', '')));
@@ -38,5 +38,5 @@ function filer_content(App $a)
 
                echo $o;
        }
-       killme();
+       exit();
 }
index d240c2d6a757927df98f1bf81134889c7e69da16..f88c174cb0cd5ff5cb52856ca68458edbc79bb8a 100644 (file)
@@ -10,7 +10,7 @@ function filerm_content(App $a)
 {
        if (! local_user())
        {
-               killme();
+               exit();
        }
 
        $term = XML::unescape(trim($_GET['term']));
@@ -37,5 +37,5 @@ function filerm_content(App $a)
        }
 
        $a->internalRedirect('/network?f=&file=' . rawurlencode($term));
-       killme();
+       exit();
 }
index 81275df6fb7a0053be199acd0c699a30febfdffc..4466211607e87c4b78a23aacf717029d8094b623 100644 (file)
@@ -68,7 +68,7 @@ function friendica_init(App $a)
 
                header('Content-type: application/json; charset=utf-8');
                echo json_encode($data);
-               killme();
+               exit();
        }
 }
 
index db0ae7fbd2a9709ddf789b1e4e99270f9a8cba09..6a347a8093d0a13aa395b242cb23e54dfc3471ce 100644 (file)
@@ -307,7 +307,7 @@ function group_content(App $a) {
        if ($change) {
                $tpl = Renderer::getMarkupTemplate('groupeditor.tpl');
                echo Renderer::replaceMacros($tpl, $context);
-               killme();
+               exit();
        }
 
        return Renderer::replaceMacros($tpl, $context);
index 101ebd5af2e4e1b9068e9550368ef7bad137565c..976d7c18323b972139bf8a16807507e81ca11e70 100644 (file)
@@ -41,7 +41,7 @@ function hovercard_content()
        if ($datatype == 'tpl') {
                $templatecontent = get_template_content('hovercard.tpl');
                echo $templatecontent;
-               killme();
+               exit();
        }
 
        // If a contact is connected the url is internally changed to 'redir/CID'. We need the pure url to search for
index 4f14119fef876d792e9b3f1e684139a09fb9812f..e6d9a09d6096d884d0f7df08bf80d96fa6326242 100644 (file)
@@ -8,7 +8,7 @@ use Friendica\Model\Item;
 function ignored_init(App $a)
 {
        if (!local_user()) {
-               killme();
+               exit();
        }
 
        if ($a->argc > 1) {
@@ -16,12 +16,12 @@ function ignored_init(App $a)
        }
 
        if (!$message_id) {
-               killme();
+               exit();
        }
 
        $thread = Item::selectFirstThreadForUser(local_user(), ['uid', 'ignored'], ['iid' => $message_id]);
        if (!DBA::isResult($thread)) {
-               killme();
+               exit();
        }
 
        // Numeric values are needed for the json output further below
@@ -49,5 +49,5 @@ function ignored_init(App $a)
        // the json doesn't really matter, it will either be 0 or 1
 
        echo json_encode($ignored);
-       killme();
+       exit();
 }
index c499e9ffc505748238c05ab174cc24d2734ccbdc..5e6f88bac7ea33224c78b741d68633c76fd43491 100644 (file)
@@ -51,7 +51,7 @@ function item_post(App $a) {
                drop_items($arr_drop);
                $json = ['success' => 1];
                echo json_encode($json);
-               killme();
+               exit();
        }
 
        Addon::callHooks('post_local_start', $_REQUEST);
@@ -118,7 +118,7 @@ function item_post(App $a) {
                        if (!empty($_REQUEST['return'])) {
                                $a->internalRedirect($return_path);
                        }
-                       killme();
+                       exit();
                }
 
                $parent = $parent_item['id'];
@@ -169,7 +169,7 @@ function item_post(App $a) {
                        $a->internalRedirect($return_path);
                }
 
-               killme();
+               exit();
        }
 
        // Init post instance
@@ -280,13 +280,13 @@ function item_post(App $a) {
 
                if (!strlen($body)) {
                        if ($preview) {
-                               killme();
+                               exit();
                        }
                        info(L10n::t('Empty post discarded.') . EOL);
                        if (!empty($_REQUEST['return'])) {
                                $a->internalRedirect($return_path);
                        }
-                       killme();
+                       exit();
                }
        }
 
@@ -693,7 +693,7 @@ function item_post(App $a) {
                }
 
                echo json_encode($json);
-               killme();
+               exit();
        }
 
        if ($orig_post) {
@@ -721,7 +721,7 @@ function item_post(App $a) {
                        Logger::log('return: ' . $return_path);
                        $a->internalRedirect($return_path);
                }
-               killme();
+               exit();
        } else {
                $post_id = 0;
        }
@@ -874,7 +874,7 @@ function item_post_return($baseurl, $api_source, $return_path)
        Logger::log('post_json: ' . print_r($json, true), Logger::DEBUG);
 
        echo json_encode($json);
-       killme();
+       exit();
 }
 
 function item_content(App $a)
@@ -900,7 +900,7 @@ function item_content(App $a)
                if ($a->isAjax()) {
                        // ajax return: [<item id>, 0 (no perm) | <owner id>]
                        echo json_encode([intval($a->argv[2]), intval($o)]);
-                       killme();
+                       exit();
                }
        }
 
index 7ce7b1a1b912b9b1341db081e20aa6c67f766216..321992008ea8b2c0df726cf41180f0fcac7692ba 100644 (file)
@@ -28,7 +28,7 @@ function like_content(App $a) {
        $return_path = defaults($_REQUEST, 'return', '');
 
        like_content_return($a, $return_path);
-       killme(); // NOTREACHED
+       exit();
 }
 
 
@@ -46,6 +46,4 @@ function like_content_return(App $a, $return_path) {
 
                $a->internalRedirect($return_path . $rand);
        }
-
-       killme();
 }
index a2301b4ccb7e73e20b47862cc62fe74929477152..ef97cc91d0caa69054aeb81ee3a1d1da0068c774 100644 (file)
@@ -19,11 +19,11 @@ function lockview_content(App $a)
        }
 
        if (!$item_id) {
-               killme();
+               exit();
        }
 
        if (!in_array($type, ['item','photo','event'])) {
-               killme();
+               exit();
        }
 
        $fields = ['uid', 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid'];
@@ -37,14 +37,14 @@ function lockview_content(App $a)
        }
 
        if (!DBA::isResult($item)) {
-               killme();
+               exit();
        }
 
        Addon::callHooks('lockview_content', $item);
 
        if ($item['uid'] != local_user()) {
                echo L10n::t('Remote privacy information not available.') . '<br />';
-               killme();
+               exit();
        }
 
        if (isset($item['private'])
@@ -55,7 +55,7 @@ function lockview_content(App $a)
                && empty($item['deny_gid']))
        {
                echo L10n::t('Remote privacy information not available.') . '<br />';
-               killme();
+               exit();
        }
 
        $allowed_users  = expand_acl($item['allow_cid']);
@@ -111,6 +111,6 @@ function lockview_content(App $a)
        }
 
        echo $o . implode(', ', $l);
-       killme();
+       exit();
 
 }
index 9fbfde448eb9a68b47362d5350ebe8e5c65cf8f6..bdb5298ef3a87e81361e7a9e9ee709e9387589a7 100644 (file)
@@ -24,5 +24,5 @@ function manifest_content(App $a) {
 
        echo $o;
 
-       killme();
+       exit();
 }
index 5819268e9ddda060031d7018d8ff14de1f9a09d4..cae91c46483c9d576cf48a3d3781a17f5c87256a 100644 (file)
@@ -6,7 +6,7 @@ use Friendica\Database\DBA;
 function modexp_init(App $a) {
 
        if($a->argc != 2)
-               killme();
+               exit();
 
        $nick = $a->argv[1];
        $r = q("SELECT `spubkey` FROM `user` WHERE `nickname` = '%s' LIMIT 1",
@@ -14,7 +14,7 @@ function modexp_init(App $a) {
        );
 
        if (! DBA::isResult($r)) {
-               killme();
+               exit();
        }
 
        $lines = explode("\n",$r[0]['spubkey']);
@@ -30,7 +30,7 @@ function modexp_init(App $a) {
        header("Content-type: application/magic-public-key");
        echo 'RSA' . '.' . $m . '.' . $e;
 
-       killme();
+       exit();
 
 }
 
index 29a340afdc240c6d8b3c1c786f1c2af388f5674b..ef53be471569d7db78a615942f3e98ceef8d1fae 100644 (file)
@@ -625,7 +625,7 @@ function networkThreadedView(App $a, $update, $parent)
                $group = DBA::selectFirst('group', ['name'], ['id' => $gid, 'uid' => local_user()]);
                if (!DBA::isResult($group)) {
                        if ($update) {
-                               killme();
+                               exit();
                        }
                        notice(L10n::t('No such group') . EOL);
                        $a->internalRedirect('network/0');
index 71aaae8d4eb8948e3e01f8fe19399c011ce725ae..5c25b6e5511d225e758643950b6ed344c9f02978 100644 (file)
@@ -24,12 +24,10 @@ function nodeinfo_wellknown(App $a) {
 function nodeinfo_init(App $a) {
        if (!Config::get('system', 'nodeinfo')) {
                System::httpExit(404);
-               killme();
        }
 
        if (($a->argc != 2) || ($a->argv[1] != '1.0')) {
                System::httpExit(404);
-               killme();
        }
 
        $smtp = (function_exists('imap_open') && !Config::get('system', 'imap_disabled') && !Config::get('system', 'dfrn_only'));
@@ -149,7 +147,6 @@ function nodeinfo_cron() {
 
                $addon = 'statistics_json';
                $addons = Config::get('system', 'addon');
-               $addons_arr = [];
 
                if ($addons) {
                        $addons_arr = explode(',',str_replace(' ', '',$addons));
index e1d51e5a801eae0f8a5bcee7c27d0cc9d43e2c1e..3528a2f118d1862bdba1f13adb31fc64d919f1c8 100644 (file)
@@ -15,7 +15,7 @@ function noscrape_init(App $a)
        if ($a->argc > 1) {
                $which = $a->argv[1];
        } else {
-               killme();
+               exit();
        }
 
        $profile = 0;
index 959b581d59a25942b19cb824ec4b11cd1e479a8a..2606e796ff81daa74682a4b80671a4f387776f99 100644 (file)
@@ -48,7 +48,7 @@ function notify_init(App $a)
                $r = $nm->setAllSeen();
                $j = json_encode(['result' => ($r) ? 'success' : 'fail']);
                echo $j;
-               killme();
+               exit();
        }
 }
 
index 6d682d6adfad073c62f07bf0fedb4b91bdcf2393..e042a22f52038f9a47b4fe7f7edc821c429ea356 100644 (file)
@@ -17,7 +17,7 @@ function oexchange_init(App $a) {
 
                $o = Renderer::replaceMacros($tpl, ['$base' => System::baseUrl()]);
                echo $o;
-               killme();
+               exit();
        }
 }
 
index f4765b0621b16107cc379aee3a684355595bbf0d..2057f0b5d60579155de31336d1990da404d5e3a9 100644 (file)
@@ -17,5 +17,5 @@ function opensearch_content(App $a) {
 
        echo $o;
 
-       killme();
+       exit();
 }
index 3ccd3fa1119446f52ae7e0e291ba5a58339497cf..aff8041a9f6f5dfd14afe945d5ea1993f40f8096 100644 (file)
@@ -185,7 +185,7 @@ function photos_post(App $a)
 
        if (!$can_post) {
                notice(L10n::t('Permission denied.') . EOL);
-               killme();
+               exit();
        }
 
        $owner_record = User::getOwnerDataById($page_owner_uid);
@@ -193,7 +193,7 @@ function photos_post(App $a)
        if (!$owner_record) {
                notice(L10n::t('Contact information unavailable') . EOL);
                Logger::log('photos_post: unable to locate contact record for page owner. uid=' . $page_owner_uid);
-               killme();
+               exit();
        }
 
        if ($a->argc > 3 && $a->argv[2] === 'album') {
@@ -794,7 +794,7 @@ function photos_post(App $a)
                @unlink($src);
                $foo = 0;
                Addon::callHooks('photo_post_end',$foo);
-               killme();
+               exit();
        }
 
        $exif = $image->orient($src);
@@ -820,7 +820,7 @@ function photos_post(App $a)
        if (!$r) {
                Logger::log('mod/photos.php: photos_post(): image store failed', Logger::DEBUG);
                notice(L10n::t('Image upload failed.') . EOL);
-               killme();
+               exit();
        }
 
        if ($width > 640 || $height > 640) {
index 0155609abd6434c16595c60e748e9bc798437046..3228d250ba2b8acff5fd66bd2c708b728195dd97 100644 (file)
@@ -10,5 +10,5 @@ function phpinfo_content()
        }
 
        phpinfo();
-       killme();
+       exit();
 }
index 18b126cce560f30b4011c86c9b7004a2f093c38e..9d8311f1c445d557ec2fb4978774ea118fcd4f3b 100644 (file)
@@ -115,7 +115,7 @@ function ping_init(App $a)
                                header("Content-type: text/xml");
                                echo XML::fromArray($data, $xml);
                        }
-                       killme();
+                       exit();
                }
 
                $notifs = ping_get_notifications(local_user());
@@ -386,7 +386,7 @@ function ping_init(App $a)
                echo XML::fromArray(["result" => $data], $xml);
        }
 
-       killme();
+       exit();
 }
 
 /**
index 3456beb12896a4b2a507f365b28330d66ba76f54..477b48b04472a29b42e0b24ca94bf38bdf478b36 100644 (file)
@@ -46,7 +46,7 @@ function poco_init(App $a) {
                $ret = PortableContact::serverlist();
                header('Content-type: application/json');
                echo json_encode($ret);
-               killme();
+               exit();
        }
 
        if ($a->argc > 1 && $a->argv[1] === '@global') {
@@ -378,12 +378,12 @@ function poco_init(App $a) {
        if ($format === 'xml') {
                header('Content-type: text/xml');
                echo Renderer::replaceMacros(Renderer::getMarkupTemplate('poco_xml.tpl'), XML::arrayEscape(['$response' => $ret]));
-               killme();
+               exit();
        }
        if ($format === 'json') {
                header('Content-type: application/json');
                echo json_encode($ret);
-               killme();
+               exit();
        } else {
                System::httpExit(500);
        }
index 4989eb87b716539b7436c98e7cfb7a48b5d5b099..14d1f2b9ea1fd2572696c8f7bede585a73e8c668 100644 (file)
@@ -21,5 +21,5 @@ function pretheme_init(App $a) {
                echo json_encode(['img' => Theme::getScreenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits]);
        }
 
-       killme();
+       exit();
 }
index 7c41df8ac5de26f4a476020b12f5482f85e658f7..e120ce17246dbbc37647842494e5c80b4d419ee4 100644 (file)
@@ -12,7 +12,7 @@ function probe_content(App $a)
        if (!local_user()) {
                System::httpExit(403, ["title" => L10n::t("Public access denied."),
                        "description" => L10n::t("Only logged in users are permitted to perform a probing.")]);
-               killme();
+               exit();
        }
 
        $o = '<div class="generic-page-wrapper">';
index 70917d7df8ff019cba3e0e10b1ee202e4ad5b055..b30739b30459acf29119b96d94744d42480b775c 100644 (file)
@@ -117,7 +117,7 @@ function profiles_init(App $a) {
                );
                if(! DBA::isResult($r1)) {
                        notice(L10n::t('Profile unavailable to clone.') . EOL);
-                       killme();
+                       exit();
                        return;
                }
                unset($r1[0]['id']);
@@ -150,7 +150,7 @@ function profiles_init(App $a) {
                );
                if (! DBA::isResult($r)) {
                        notice(L10n::t('Profile not found.') . EOL);
-                       killme();
+                       exit();
                        return;
                }
 
index 5d7d8ed94bc8c07265cef703b147151bc8df6256..218d1973eea101f332d362a19e50db9942b7bc6c 100644 (file)
@@ -165,7 +165,7 @@ function profperm_content(App $a) {
 
        if (!empty($change)) {
                echo $o;
-               killme();
+               exit();
        }
        $o .= '</div>';
        return $o;
index 8d6e81a68523e6e862661130205322eb5c5225dc..9b5bf1209e81b1c941c15bbf605f12251964af5c 100644 (file)
@@ -17,7 +17,7 @@ function hub_return($valid, $body)
        } else {
                System::httpExit(404);
        }
-       killme();
+       exit();
 }
 
 // when receiving an XML feed, always return OK
index 11fbf2cf5f3af52f7bc4919fbbb68e7776bc6178..843406fe6f4c2945b316e5ad6ca160604bf9c9f9 100644 (file)
@@ -136,5 +136,5 @@ function pubsubhubbub_init(App $a) {
 
                System::httpExit(202);
        }
-       killme();
+       exit();
 }
index 29f520b18cdce9252d235461b66b168afce506d0..0575742dd832e08e518db85bc44945e50e078c9b 100644 (file)
@@ -26,5 +26,5 @@ function robots_txt_init(App $a)
        foreach ($allDisalloweds as $disallowed) {
                echo 'Disallow: ' . $disallowed . PHP_EOL;
        }
-       killme();
+       exit();
 }
index 8c7170dcdf604827551e6551a41a15dea9ae3b71..84dedd6c56da12bcada3e2683ee062350783cf47 100644 (file)
@@ -22,5 +22,5 @@ function rsd_xml_content(App $a)
   </service>
 </rsd>';
 
-       killme();
+       exit();
 }
index 2cdfd6e12826cdbb81e39e0b1871a77d0942ffd0..3864f148822e280224be8c8baa1b84c0b9318753 100644 (file)
@@ -102,7 +102,7 @@ function search_content(App $a) {
                System::httpExit(403,
                                ["title" => L10n::t("Public access denied."),
                                        "description" => L10n::t("Only logged in users are permitted to perform a search.")]);
-               killme();
+               exit();
                //notice(L10n::t('Public access denied.').EOL);
                //return;
        }
@@ -127,7 +127,7 @@ function search_content(App $a) {
                                System::httpExit(429,
                                                ["title" => L10n::t("Too Many Requests"),
                                                        "description" => L10n::t("Only one search per minute is permitted for not logged in users.")]);
-                               killme();
+                               exit();
                        }
                        Cache::set("remote_search:".$remote, json_encode(["time" => time(), "accesses" => $resultdata->accesses + 1]), Cache::HOUR);
                } else
index 74de1967b44782542d7c081a654d59c90e159593..bb3212ece0621c46e8b544a8f8a659f7bbfa4313 100644 (file)
@@ -8,7 +8,7 @@ function share_init(App $a) {
        $post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
 
        if (!$post_id || !local_user()) {
-               killme();
+               exit();
        }
 
        $fields = ['private', 'body', 'author-name', 'author-link', 'author-avatar',
@@ -16,7 +16,7 @@ function share_init(App $a) {
        $item = Item::selectFirst($fields, ['id' => $post_id]);
 
        if (!DBA::isResult($item) || $item['private'] == 1) {
-               killme();
+               exit();
        }
 
        if (strpos($item['body'], "[/share]") !== false) {
@@ -34,7 +34,7 @@ function share_init(App $a) {
        }
 
        echo $o;
-       killme();
+       exit();
 }
 
 /// @TODO Rewrite to handle over whole record array
index 537f3920232b6bcf4befed19db4c83ae24a9a065..1462513de6b19f4c7f5abf180be743a38cba56e5 100644 (file)
@@ -12,18 +12,18 @@ function starred_init(App $a) {
        $message_id = null;
 
        if (!local_user()) {
-               killme();
+               exit();
        }
        if ($a->argc > 1) {
                $message_id = intval($a->argv[1]);
        }
        if (!$message_id) {
-               killme();
+               exit();
        }
 
        $item = Item::selectFirstForUser(local_user(), ['starred'], ['uid' => local_user(), 'id' => $message_id]);
        if (!DBA::isResult($item)) {
-               killme();
+               exit();
        }
 
        if (!intval($item['starred'])) {
@@ -48,5 +48,5 @@ function starred_init(App $a) {
        // the json doesn't really matter, it will either be 0 or 1
 
        echo json_encode($starred);
-       killme();
+       exit();
 }
index e3577083b4f7fe0657e9eb93cb32333c9a59cdbf..833b2e9a8e8b1d005135c6424c814c13d56641c9 100644 (file)
@@ -14,7 +14,6 @@ function statistics_json_init(App $a) {
 
        if (!Config::get("system", "nodeinfo")) {
                System::httpExit(404);
-               killme();
        }
 
        $statistics = [
@@ -56,5 +55,5 @@ function statistics_json_init(App $a) {
        header("Content-Type: application/json");
        echo json_encode($statistics, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
        Logger::log("statistics_init: printed " . print_r($statistics, true), Logger::DATA);
-       killme();
+       exit();
 }
index bd7fee534e81b1fb80dfda60405da38f60f40055..3d7167303346db291ac90894645cf069313b402a 100644 (file)
@@ -151,6 +151,6 @@ EOT;
 
        Addon::callHooks('post_local_end', $arr);
 
-       killme();
+       exit();
 
 }
index 78133a9e1823a30498262e811269eee948c910e0..87895e16f8c62dc5dd1f537613f6cef044e732f7 100644 (file)
@@ -203,7 +203,5 @@ EOT;
 
        Worker::add(PRIORITY_HIGH, "Notifier", "tag", $post_id);
 
-       killme();
-
-       return; // NOTREACHED
+       exit();
 }
index f0d91eeab029f94b0e5609760b716b7b19d97c4d..11ed4b67eae12fd69e6d8ce91df3ece91ede9a34 100644 (file)
@@ -11,7 +11,7 @@ use Friendica\Database\DBA;
 
 function uexport_init(App $a) {
        if (!local_user()) {
-               killme();
+               exit();
        }
 
        require_once("mod/settings.php");
@@ -26,14 +26,14 @@ function uexport_content(App $a) {
                switch ($a->argv[1]) {
                        case "backup":
                                uexport_all($a);
-                               killme();
+                               exit();
                                break;
                        case "account":
                                uexport_account($a);
-                               killme();
+                               exit();
                                break;
                        default:
-                               killme();
+                               exit();
                }
        }
 
@@ -130,7 +130,6 @@ function uexport_account($a) {
                'group_member' => $group_member,
        ];
 
-       //echo "<pre>"; var_dump(json_encode($output)); killme();
        echo json_encode($output, JSON_PARTIAL_OUTPUT_ON_ERROR);
 }
 
@@ -152,7 +151,6 @@ function uexport_all(App $a) {
        // chunk the output to avoid exhausting memory
 
        for ($x = 0; $x < $total; $x += 500) {
-               $item = [];
                $r = q("SELECT * FROM `item` WHERE `uid` = %d LIMIT %d, %d",
                        intval(local_user()),
                        intval($x),
index 088da0143c5954f849a4bbf62007956d53e59a16..e15520320ea85944353a5c1647f761bcefb2ac14 100644 (file)
@@ -34,5 +34,5 @@ function update_community_content(App $a) {
        echo str_replace("\t", "       ", $text);
        echo "</section>";
        echo "</body></html>\r\n";
-       killme();
+       exit();
 }
index 361234fea77820ed8d6192e412e88f0d7c0d076f..bf15afa86392a7fe1f1331f174b545f11f9ea5db 100644 (file)
@@ -34,5 +34,5 @@ function update_contact_content(App $a)
        echo str_replace("\t", "       ", $text);
        echo "</section>";
        echo "</body></html>\r\n";
-       killme();
+       exit();
 }
index 4b6d26cb7f4fb9303cf8ff3cee72be1caad1d70a..405933251056f6f93a1e743acde622ff9bfb813f 100644 (file)
@@ -35,5 +35,5 @@ function update_display_content(App $a)
        echo str_replace("\t", "       ", $text);
        echo "</section>";
        echo "</body></html>\r\n";
-       killme();
+       exit();
 }
index 11dfc5e03c8de2f469a134de5ffe02195800e078..6ba761d04acf861382fc9714688fdbb83ce5fd67 100644 (file)
@@ -13,7 +13,7 @@ require_once "mod/network.php";
 function update_network_content(App $a)
 {
        if (!isset($_GET['p']) || !isset($_GET['item'])) {
-               killme();
+               exit();
        }
 
        $profile_uid = intval($_GET['p']);
@@ -44,5 +44,5 @@ function update_network_content(App $a)
        echo str_replace("\t", "       ", $text);
        echo "</section>";
        echo "</body></html>\r\n";
-       killme();
+       exit();
 }
index 7db60e78e077a664eb2a6e328553a3b89f43f43e..10f60c1ef17472b2ad42c01cc3578d8931e9aef1 100644 (file)
@@ -48,5 +48,5 @@ function update_notes_content(App $a) {
        echo str_replace("\t", "       ", $text);
        echo "</section>";
        echo "</body></html>\r\n";
-       killme();
+       exit();
 }
\ No newline at end of file
index 984fd7949cffbe1393d004fa6a7d4ab0a37204f9..bc6e511896f5935e137a5f57c32110988eec1a17 100644 (file)
@@ -47,5 +47,5 @@ function update_profile_content(App $a) {
        echo str_replace("\t", "       ", $text);
        echo "</section>";
        echo "</body></html>\r\n";
-       killme();
+       exit();
 }
\ No newline at end of file
index 15b3733b3fc974f45dcb21d2c2bec7a3728b6ef3..ce260db185eb2aced9e5a9beba8d62b28a092025 100644 (file)
@@ -13,5 +13,5 @@ function view_init($a){
                        require_once("view/theme/$theme/style.php");
        }
        
-       killme();
+       exit();
 }
index 7ed029aa78100f6cc118c05de0a4450644ce9b3a..f05996d2fbcf22ef9fb59724248548a4c370bcd6 100644 (file)
@@ -28,7 +28,7 @@ function viewsrc_content(App $a)
        if (DBA::isResult($item)) {
                if ($a->isAjax()) {
                        echo str_replace("\n", '<br />', $item['body']);
-                       killme();
+                       exit();
                } else {
                        $o .= str_replace("\n", '<br />', $item['body']);
                }
index ba1a8205c589a8b98a6f2329fb208d75f5a7ee36..9b790a440ef08692371a062d8c2d109ae2e7afea 100644 (file)
@@ -26,14 +26,14 @@ function wall_attach_post(App $a) {
                if (! DBA::isResult($r)) {
                        if ($r_json) {
                                echo json_encode(['error' => L10n::t('Invalid request.')]);
-                               killme();
+                               exit();
                        }
                        return;
                }
        } else {
                if ($r_json) {
                        echo json_encode(['error' => L10n::t('Invalid request.')]);
-                       killme();
+                       exit();
                }
 
                return;
@@ -79,17 +79,17 @@ function wall_attach_post(App $a) {
        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'])) {
                if ($r_json) {
                        echo json_encode(['error' => L10n::t('Invalid request.')]);
                }
-               killme();
+               exit();
        }
 
        $src      = $_FILES['userfile']['tmp_name'];
@@ -112,7 +112,7 @@ function wall_attach_post(App $a) {
                        notice($msg . EOL);
                }
                @unlink($src);
-               killme();
+               exit();
        }
 
        if ($maxfilesize && $filesize > $maxfilesize) {
@@ -123,7 +123,7 @@ function wall_attach_post(App $a) {
                        echo $msg . EOL;
                }
                @unlink($src);
-               killme();
+               exit();
        }
 
        $filedata = @file_get_contents($src);
@@ -146,7 +146,7 @@ function wall_attach_post(App $a) {
                } else {
                        echo $msg . EOL;
                }
-               killme();
+               exit();
        }
 
        $r = q("SELECT `id` FROM `attach` WHERE `uid` = %d AND `created` = '%s' AND `hash` = '%s' LIMIT 1",
@@ -162,18 +162,18 @@ function wall_attach_post(App $a) {
                } else {
                        echo $msg . EOL;
                }
-               killme();
+               exit();
        }
 
        if ($r_json) {
                echo json_encode(['ok' => true]);
-               killme();
+               exit();
        }
 
        $lf = "\n";
 
        echo  $lf . $lf . '[attachment]' . $r[0]['id'] . '[/attachment]' . $lf;
 
-       killme();
+       exit();
        // NOTREACHED
 }
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
 }
index a48d2dba6bac2634c0032a74ba238f5dfac8503b..b22b1ee64a69c4dde20dc60fa0c2e58370c72359 100644 (file)
@@ -17,7 +17,7 @@ function webfinger_content(App $a)
                                "description" => L10n::t("Only logged in users are permitted to perform a probing.")
                        ]
                );
-               killme();
+               exit();
        }
 
        $o = '<div class="generic-page-wrapper">';
index 00cb6699d1b2a484e57ae0f5729fd1f92868b743..86fed28bbe37f73e80b95bade828f699c251a54b 100644 (file)
@@ -58,5 +58,5 @@ function worker_init()
 
        Logger::log("Front end worker ended: ".getmypid());
 
-       killme();
+       exit();
 }
index 1611540a6c4955990beb48644f7c1851adb7abd2..b470197a2e1e3bfb05a642215de773322a7b139a 100644 (file)
@@ -97,7 +97,7 @@ function xrd_json($a, $uri, $alias, $profile_url, $r)
        ];
 
        echo json_encode($json);
-       killme();
+       exit();
 }
 
 function xrd_xml($a, $uri, $alias, $profile_url, $r)
@@ -130,5 +130,5 @@ function xrd_xml($a, $uri, $alias, $profile_url, $r)
        Addon::callHooks('personal_xrd', $arr);
 
        echo $arr['xml'];
-       killme();
+       exit();
 }
index 6c14d6ba77aa6b6838c90316cdd30773f2a9460d..85a506beaadb79353ee64a91b9f1f61ada2db285 100644 (file)
@@ -150,8 +150,8 @@ abstract class BaseModule extends BaseObject
                        $a = \get_app();
                        Logger::log('checkFormSecurityToken failed: user ' . $a->user['guid'] . ' - form element ' . $typename);
                        Logger::log('checkFormSecurityToken failed: _REQUEST data: ' . print_r($_REQUEST, true), Logger::DATA);
-                       header('HTTP/1.1 403 Forbidden');
-                       killme();
+
+                       System::httpExit(403);
                }
        }
 }
index 2ca91b4b6ce3d72818467fc5387777f431e504d7..29b160634972ee5f3aab3f51b9e7051974600013 100644 (file)
@@ -96,7 +96,7 @@ class Renderer extends BaseObject
             $template = $t->getTemplateFile($s, $root);
         } catch (Exception $e) {
             echo "<pre><b>" . __FUNCTION__ . "</b>: " . $e->getMessage() . "</pre>";
-            killme();
+            exit();
         }
 
         $a->saveTimestamp($stamp1, "file");
index ab347bc8b11493e3e8215ce88fb6126b98e8cd5d..14631b5e9d86ef07b820c751ca8b1c4f4b272e6f 100644 (file)
@@ -111,7 +111,7 @@ class System extends BaseObject
 
                echo XML::fromArray($xmldata, $xml);
 
-               killme();
+               exit();
        }
 
        /**
@@ -185,7 +185,7 @@ class System extends BaseObject
        public static function jsonExit($x, $content_type = 'application/json') {
                header("Content-type: $content_type");
                echo json_encode($x);
-               killme();
+               exit();
        }
 
        /**
index 9ca4530d8b8781a2fa322f8914765f41aa656c49..d5ff62dac9c5a91aca8ef7e2d0cb5a4514e41a34 100644 (file)
@@ -25,14 +25,14 @@ class Oembed extends BaseModule
                if ($a->argv[1] == 'b2h') {
                        $url = ["", trim(hex2bin($_REQUEST['url']))];
                        echo Content\OEmbed::replaceCallback($url);
-                       killme();
+                       exit();
                }
 
                // Unused form: /oembed/h2b?text=...
                if ($a->argv[1] == 'h2b') {
                        $text = trim(hex2bin($_REQUEST['text']));
                        echo Content\OEmbed::HTML2BBCode($text);
-                       killme();
+                       exit();
                }
 
                if ($a->argc == 2) {
@@ -49,6 +49,6 @@ class Oembed extends BaseModule
                        echo $j->html;
                        echo '</body></html>';
                }
-               killme();
+               exit();
        }
 }
index 9277670f6267cbf58ef97761d69fcdda8a2fa0a8..ac31835be8ebd0fa9a23b056af2b0799de53a74c 100644 (file)
@@ -20,7 +20,6 @@ use Friendica\Network\HTTPException\InternalServerErrorException;
  */
 class Photo extends BaseModule
 {
-
        /**
         * @brief Module initializer
         *
@@ -78,7 +77,7 @@ class Photo extends BaseModule
                if ($photo === false) {
                        // not using System::httpExit() because we don't want html here.
                        header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found" , true, 404);
-                       killme();
+                       exit();
                }
 
                $cacheable = ($photo["allow_cid"] . $photo["allow_gid"] . $photo["deny_cid"] . $photo["deny_gid"] === "") && (isset($photo["cacheable"]) ? $photo["cacheable"] : true);
@@ -90,13 +89,11 @@ class Photo extends BaseModule
                        System::httpExit(500, ["description" => "Invalid photo with id {$photo["id"]}."]);
                }
 
-
                // if customsize is set and image is not a gif, resize it
                if ($img->getType() !== "image/gif" && $customsize > 0 && $customsize < 501) {
                        $img->scaleToSquare($customsize);
                }
 
-
                if (function_exists("header_remove")) {
                        header_remove("Pragma");
                        header_remove("pragma");
@@ -117,11 +114,9 @@ class Photo extends BaseModule
                        header("Cache-Control: max-age=31536000");
                }
 
-
                echo $img->asString();
 
-
-               killme();
+               exit();
        }
 
        private static function stripExtension($name)
index d6b0a482ec94c439734b6b49436913346d7a07df..6c475b18529a28e25265ce74200cdd8662ddf9e8 100644 (file)
@@ -171,7 +171,7 @@ class DFRN
 
                if (! DBA::isResult($r)) {
                        Logger::log(sprintf('No contact found for nickname=%d', $owner_nick), Logger::WARNING);
-                       killme();
+                       exit();
                }
 
                $owner = $r[0];
@@ -207,7 +207,7 @@ class DFRN
 
                        if (! DBA::isResult($r)) {
                                Logger::log(sprintf('No contact found for uid=%d', $owner_id), Logger::WARNING);
-                               killme();
+                               exit();
                        }
 
                        $contact = $r[0];
@@ -353,7 +353,7 @@ class DFRN
                $ret = Item::select(Item::DELIVER_FIELDLIST, $condition);
                $items = Item::inArray($ret);
                if (!DBA::isResult($items)) {
-                       killme();
+                       exit();
                }
 
                $item = $items[0];
@@ -361,7 +361,7 @@ class DFRN
                if ($item['uid'] != 0) {
                        $owner = User::getOwnerDataById($item['uid']);
                        if (!$owner) {
-                               killme();
+                               exit();
                        }
                } else {
                        $owner = ['uid' => 0, 'nick' => 'feed-item'];
@@ -1962,7 +1962,7 @@ class DFRN
                 */
                if (!DBA::isResult($fcontact)) {
                        // Database record did not get created. Quietly give up.
-                       killme();
+                       exit();
                }
 
                $fid = $r[0]["id"];
index de078d233c20132223b0eea51cdde262d10b3912..54295684cc70c4ddc95779798d8d75f47d9a543f 100644 (file)
@@ -19,7 +19,7 @@ class FriendicaSmartyEngine implements ITemplateEngine
        {
                if (!is_writable('view/smarty3/')) {
                        echo "<b>ERROR:</b> folder <tt>view/smarty3/</tt> must be writable by webserver.";
-                       killme();
+                       exit();
                }
        }
 
index b291076cc088bfae898e5c0e5917daf1c5f4dbde..a13af739e6f0981cb211b37ca92b32d76e5dea50 100644 (file)
@@ -88,8 +88,9 @@ class Emailer
                        'headers' => $messageHeader,
                        'parameters' => $sendmail_params
                ];
-               //echo "<pre>"; var_dump($hookdata); killme();
+
                Addon::callHooks("emailer_send", $hookdata);
+
                $res = mail(
                        $hookdata['to'],
                        $hookdata['subject'],
index 0e4b40bf66e3a300da6e2761da40bc601b704324..837c0020fa2adda70db13434236f5485d0632ea0 100644 (file)
@@ -151,7 +151,7 @@ class Cron
                        $restart = true;
                        $generation = intval($generation);
                        if (!$generation) {
-                               killme();
+                               exit();
                        }
                }