diff --git a/bin/worker.php b/bin/worker.php index 78b6da585..78b7a58a0 100755 --- a/bin/worker.php +++ b/bin/worker.php @@ -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); diff --git a/include/api.php b/include/api.php index d657d8369..6993cb688 100644 --- a/include/api.php +++ b/include/api.php @@ -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 diff --git a/library/OAuth1.php b/library/OAuth1.php index 474632831..27ee090b1 100644 --- a/library/OAuth1.php +++ b/library/OAuth1.php @@ -91,7 +91,6 @@ abstract class OAuthSignatureMethod { */ public function check_signature($request, $consumer, $token, $signature) { $built = $this->build_signature($request, $consumer, $token); - //echo "
"; 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 "".__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__.""; var_dump($consumer); die(); $token = $this->get_token($request, $consumer, "access"); $this->check_signature($request, $consumer, $token); return array($consumer, $token); diff --git a/mod/_well_known.php b/mod/_well_known.php index 407fc756a..f6a351bb2 100644 --- a/mod/_well_known.php +++ b/mod/_well_known.php @@ -27,7 +27,6 @@ function _well_known_init(App $a) } } System::httpExit(404); - killme(); } function wk_social_relay() diff --git a/mod/admin.php b/mod/admin.php index a0cc207e8..17e58940e 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -301,8 +301,7 @@ function admin_content(App $a) if ($a->isAjax()) { echo $o; - killme(); - return ''; + exit(); } else { return $o; } diff --git a/mod/amcd.php b/mod/amcd.php index c6013b942..31b812ecd 100644 --- a/mod/amcd.php +++ b/mod/amcd.php @@ -47,5 +47,5 @@ function amcd_content() } } JSON; - killme(); + exit(); } diff --git a/mod/api.php b/mod/api.php index e72146242..1f199c9a9 100644 --- a/mod/api.php +++ b/mod/api.php @@ -59,7 +59,7 @@ function api_content(App $a) } catch (Exception $e) { echo ""; 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(); } diff --git a/mod/attach.php b/mod/attach.php index cf2c8cc6d..f3192d802 100644 --- a/mod/attach.php +++ b/mod/attach.php @@ -49,6 +49,6 @@ function attach_init(App $a) } echo $r[0]['data']; - killme(); + exit(); // NOTREACHED } diff --git a/mod/cal.php b/mod/cal.php index 526e33c00..3d90ff03b 100644 --- a/mod/cal.php +++ b/mod/cal.php @@ -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; diff --git a/mod/contactgroup.php b/mod/contactgroup.php index 753d3a073..07997cd11 100644 --- a/mod/contactgroup.php +++ b/mod/contactgroup.php @@ -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(); } diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index b911a27e2..c67525810 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -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 . ' ' . "\r\n" . '' . "\r\n"; - killme(); + exit(); } } diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 6b2016886..928690060 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -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 ""; - killme(); + exit(); // NOTREACHED } else { // old protocol @@ -290,7 +290,7 @@ function dfrn_poll_post(App $a) header("Content-type: text/xml"); echo " 0 $decoded_challenge $sec "; - 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) 0 $decoded_challenge $sec $text "; - 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" . '' . $encrypted_id . ' ' . "\r\n" . "\t" . '' . $challenge . ' ' . "\r\n" . '' . "\r\n"; - killme(); + exit(); // NOTREACHED } } diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 9f0583711..0c7f4c2a6 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -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())) { diff --git a/mod/display.php b/mod/display.php index a616fc8cc..dc43e08d3 100644 --- a/mod/display.php +++ b/mod/display.php @@ -426,5 +426,5 @@ function displayShowFeed($item_id, $conversation) } header("Content-type: application/atom+xml"); echo $xml; - killme(); + exit(); } diff --git a/mod/events.php b/mod/events.php index a54260c43..60fa03922 100644 --- a/mod/events.php +++ b/mod/events.php @@ -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; diff --git a/mod/fbrowser.php b/mod/fbrowser.php index d5310f457..c6e669d02 100644 --- a/mod/fbrowser.php +++ b/mod/fbrowser.php @@ -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(); } } diff --git a/mod/fetch.php b/mod/fetch.php index 5dcedb1aa..1af8d0785 100644 --- a/mod/fetch.php +++ b/mod/fetch.php @@ -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(); } diff --git a/mod/filer.php b/mod/filer.php index 4580dc6f6..0d9afe638 100644 --- a/mod/filer.php +++ b/mod/filer.php @@ -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(); } diff --git a/mod/filerm.php b/mod/filerm.php index d240c2d6a..f88c174cb 100644 --- a/mod/filerm.php +++ b/mod/filerm.php @@ -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(); } diff --git a/mod/friendica.php b/mod/friendica.php index 81275df6f..446621160 100644 --- a/mod/friendica.php +++ b/mod/friendica.php @@ -68,7 +68,7 @@ function friendica_init(App $a) header('Content-type: application/json; charset=utf-8'); echo json_encode($data); - killme(); + exit(); } } diff --git a/mod/group.php b/mod/group.php index db0ae7fbd..6a347a809 100644 --- a/mod/group.php +++ b/mod/group.php @@ -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); diff --git a/mod/hovercard.php b/mod/hovercard.php index 101ebd5af..976d7c183 100644 --- a/mod/hovercard.php +++ b/mod/hovercard.php @@ -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 diff --git a/mod/ignored.php b/mod/ignored.php index 4f14119fe..e6d9a09d6 100644 --- a/mod/ignored.php +++ b/mod/ignored.php @@ -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(); } diff --git a/mod/item.php b/mod/item.php index c499e9ffc..5e6f88bac 100644 --- a/mod/item.php +++ b/mod/item.php @@ -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: [- , 0 (no perm) |
] echo json_encode([intval($a->argv[2]), intval($o)]); - killme(); + exit(); } } diff --git a/mod/like.php b/mod/like.php index 7ce7b1a1b..321992008 100644 --- a/mod/like.php +++ b/mod/like.php @@ -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(); } diff --git a/mod/lockview.php b/mod/lockview.php index a2301b4cc..ef97cc91d 100644 --- a/mod/lockview.php +++ b/mod/lockview.php @@ -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.') . '
'; - 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.') . '
'; - killme(); + exit(); } $allowed_users = expand_acl($item['allow_cid']); @@ -111,6 +111,6 @@ function lockview_content(App $a) } echo $o . implode(', ', $l); - killme(); + exit(); } diff --git a/mod/manifest.php b/mod/manifest.php index 9fbfde448..bdb5298ef 100644 --- a/mod/manifest.php +++ b/mod/manifest.php @@ -24,5 +24,5 @@ function manifest_content(App $a) { echo $o; - killme(); + exit(); } diff --git a/mod/modexp.php b/mod/modexp.php index 5819268e9..cae91c464 100644 --- a/mod/modexp.php +++ b/mod/modexp.php @@ -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(); } diff --git a/mod/network.php b/mod/network.php index 29a340afd..ef53be471 100644 --- a/mod/network.php +++ b/mod/network.php @@ -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'); diff --git a/mod/nodeinfo.php b/mod/nodeinfo.php index 71aaae8d4..5c25b6e55 100644 --- a/mod/nodeinfo.php +++ b/mod/nodeinfo.php @@ -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)); diff --git a/mod/noscrape.php b/mod/noscrape.php index e1d51e5a8..3528a2f11 100644 --- a/mod/noscrape.php +++ b/mod/noscrape.php @@ -15,7 +15,7 @@ function noscrape_init(App $a) if ($a->argc > 1) { $which = $a->argv[1]; } else { - killme(); + exit(); } $profile = 0; diff --git a/mod/notify.php b/mod/notify.php index 959b581d5..2606e796f 100644 --- a/mod/notify.php +++ b/mod/notify.php @@ -48,7 +48,7 @@ function notify_init(App $a) $r = $nm->setAllSeen(); $j = json_encode(['result' => ($r) ? 'success' : 'fail']); echo $j; - killme(); + exit(); } } diff --git a/mod/oexchange.php b/mod/oexchange.php index 6d682d6ad..e042a22f5 100644 --- a/mod/oexchange.php +++ b/mod/oexchange.php @@ -17,7 +17,7 @@ function oexchange_init(App $a) { $o = Renderer::replaceMacros($tpl, ['$base' => System::baseUrl()]); echo $o; - killme(); + exit(); } } diff --git a/mod/opensearch.php b/mod/opensearch.php index f4765b062..2057f0b5d 100644 --- a/mod/opensearch.php +++ b/mod/opensearch.php @@ -17,5 +17,5 @@ function opensearch_content(App $a) { echo $o; - killme(); + exit(); } diff --git a/mod/photos.php b/mod/photos.php index 3ccd3fa11..aff8041a9 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -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) { diff --git a/mod/phpinfo.php b/mod/phpinfo.php index 0155609ab..3228d250b 100644 --- a/mod/phpinfo.php +++ b/mod/phpinfo.php @@ -10,5 +10,5 @@ function phpinfo_content() } phpinfo(); - killme(); + exit(); } diff --git a/mod/ping.php b/mod/ping.php index 18b126cce..9d8311f1c 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -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(); } /** diff --git a/mod/poco.php b/mod/poco.php index 3456beb12..477b48b04 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -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); } diff --git a/mod/pretheme.php b/mod/pretheme.php index 4989eb87b..14d1f2b9e 100644 --- a/mod/pretheme.php +++ b/mod/pretheme.php @@ -21,5 +21,5 @@ function pretheme_init(App $a) { echo json_encode(['img' => Theme::getScreenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits]); } - killme(); + exit(); } diff --git a/mod/probe.php b/mod/probe.php index 7c41df8ac..e120ce172 100644 --- a/mod/probe.php +++ b/mod/probe.php @@ -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 = ''; diff --git a/mod/profiles.php b/mod/profiles.php index 70917d7df..b30739b30 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -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; } diff --git a/mod/profperm.php b/mod/profperm.php index 5d7d8ed94..218d1973e 100644 --- a/mod/profperm.php +++ b/mod/profperm.php @@ -165,7 +165,7 @@ function profperm_content(App $a) { if (!empty($change)) { echo $o; - killme(); + exit(); } $o .= ''; return $o; diff --git a/mod/pubsub.php b/mod/pubsub.php index 8d6e81a68..9b5bf1209 100644 --- a/mod/pubsub.php +++ b/mod/pubsub.php @@ -17,7 +17,7 @@ function hub_return($valid, $body) } else { System::httpExit(404); } - killme(); + exit(); } // when receiving an XML feed, always return OK diff --git a/mod/pubsubhubbub.php b/mod/pubsubhubbub.php index 11fbf2cf5..843406fe6 100644 --- a/mod/pubsubhubbub.php +++ b/mod/pubsubhubbub.php @@ -136,5 +136,5 @@ function pubsubhubbub_init(App $a) { System::httpExit(202); } - killme(); + exit(); } diff --git a/mod/robots_txt.php b/mod/robots_txt.php index 29f520b18..0575742dd 100644 --- a/mod/robots_txt.php +++ b/mod/robots_txt.php @@ -26,5 +26,5 @@ function robots_txt_init(App $a) foreach ($allDisalloweds as $disallowed) { echo 'Disallow: ' . $disallowed . PHP_EOL; } - killme(); + exit(); } diff --git a/mod/rsd_xml.php b/mod/rsd_xml.php index 8c7170dcd..84dedd6c5 100644 --- a/mod/rsd_xml.php +++ b/mod/rsd_xml.php @@ -22,5 +22,5 @@ function rsd_xml_content(App $a) '; - killme(); + exit(); } diff --git a/mod/search.php b/mod/search.php index 2cdfd6e12..3864f1488 100644 --- a/mod/search.php +++ b/mod/search.php @@ -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 diff --git a/mod/share.php b/mod/share.php index 74de1967b..bb3212ece 100644 --- a/mod/share.php +++ b/mod/share.php @@ -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 diff --git a/mod/starred.php b/mod/starred.php index 537f39202..1462513de 100644 --- a/mod/starred.php +++ b/mod/starred.php @@ -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(); } diff --git a/mod/statistics_json.php b/mod/statistics_json.php index e3577083b..833b2e9a8 100644 --- a/mod/statistics_json.php +++ b/mod/statistics_json.php @@ -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(); } diff --git a/mod/subthread.php b/mod/subthread.php index bd7fee534..3d7167303 100644 --- a/mod/subthread.php +++ b/mod/subthread.php @@ -151,6 +151,6 @@ EOT; Addon::callHooks('post_local_end', $arr); - killme(); + exit(); } diff --git a/mod/tagger.php b/mod/tagger.php index 78133a9e1..87895e16f 100644 --- a/mod/tagger.php +++ b/mod/tagger.php @@ -203,7 +203,5 @@ EOT; Worker::add(PRIORITY_HIGH, "Notifier", "tag", $post_id); - killme(); - - return; // NOTREACHED + exit(); } diff --git a/mod/uexport.php b/mod/uexport.php index f0d91eeab..11ed4b67e 100644 --- a/mod/uexport.php +++ b/mod/uexport.php @@ -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 ""; 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), diff --git a/mod/update_community.php b/mod/update_community.php index 088da0143..e15520320 100644 --- a/mod/update_community.php +++ b/mod/update_community.php @@ -34,5 +34,5 @@ function update_community_content(App $a) { echo str_replace("\t", " ", $text); echo ""; echo "