Browse Source

Remove/replace killme() with *exit()

tags/2019.03^2
Hypolite Petovan 6 months ago
parent
commit
895b3abf32
75 changed files with 167 additions and 187 deletions
  1. 1
    1
      bin/worker.php
  2. 4
    4
      include/api.php
  3. 0
    3
      library/OAuth1.php
  4. 0
    1
      mod/_well_known.php
  5. 1
    2
      mod/admin.php
  6. 1
    1
      mod/amcd.php
  7. 3
    3
      mod/api.php
  8. 1
    1
      mod/attach.php
  9. 3
    3
      mod/cal.php
  10. 3
    3
      mod/contactgroup.php
  11. 3
    3
      mod/dfrn_notify.php
  12. 9
    9
      mod/dfrn_poll.php
  13. 1
    2
      mod/dfrn_request.php
  14. 1
    1
      mod/display.php
  15. 3
    3
      mod/events.php
  16. 3
    3
      mod/fbrowser.php
  17. 2
    2
      mod/fetch.php
  18. 2
    2
      mod/filer.php
  19. 2
    2
      mod/filerm.php
  20. 1
    1
      mod/friendica.php
  21. 1
    1
      mod/group.php
  22. 1
    1
      mod/hovercard.php
  23. 4
    4
      mod/ignored.php
  24. 9
    9
      mod/item.php
  25. 1
    3
      mod/like.php
  26. 6
    6
      mod/lockview.php
  27. 1
    1
      mod/manifest.php
  28. 3
    3
      mod/modexp.php
  29. 1
    1
      mod/network.php
  30. 0
    3
      mod/nodeinfo.php
  31. 1
    1
      mod/noscrape.php
  32. 1
    1
      mod/notify.php
  33. 1
    1
      mod/oexchange.php
  34. 1
    1
      mod/opensearch.php
  35. 4
    4
      mod/photos.php
  36. 1
    1
      mod/phpinfo.php
  37. 2
    2
      mod/ping.php
  38. 3
    3
      mod/poco.php
  39. 1
    1
      mod/pretheme.php
  40. 1
    1
      mod/probe.php
  41. 2
    2
      mod/profiles.php
  42. 1
    1
      mod/profperm.php
  43. 1
    1
      mod/pubsub.php
  44. 1
    1
      mod/pubsubhubbub.php
  45. 1
    1
      mod/robots_txt.php
  46. 1
    1
      mod/rsd_xml.php
  47. 2
    2
      mod/search.php
  48. 3
    3
      mod/share.php
  49. 4
    4
      mod/starred.php
  50. 1
    2
      mod/statistics_json.php
  51. 1
    1
      mod/subthread.php
  52. 1
    3
      mod/tagger.php
  53. 4
    6
      mod/uexport.php
  54. 1
    1
      mod/update_community.php
  55. 1
    1
      mod/update_contact.php
  56. 1
    1
      mod/update_display.php
  57. 2
    2
      mod/update_network.php
  58. 1
    1
      mod/update_notes.php
  59. 1
    1
      mod/update_profile.php
  60. 1
    1
      mod/view.php
  61. 1
    1
      mod/viewsrc.php
  62. 11
    11
      mod/wall_attach.php
  63. 14
    14
      mod/wall_upload.php
  64. 1
    1
      mod/webfinger.php
  65. 1
    1
      mod/worker.php
  66. 2
    2
      mod/xrd.php
  67. 2
    2
      src/BaseModule.php
  68. 1
    1
      src/Core/Renderer.php
  69. 2
    2
      src/Core/System.php
  70. 3
    3
      src/Module/Oembed.php
  71. 2
    7
      src/Module/Photo.php
  72. 5
    5
      src/Protocol/DFRN.php
  73. 1
    1
      src/Render/FriendicaSmartyEngine.php
  74. 2
    1
      src/Util/Emailer.php
  75. 1
    1
      src/Worker/Cron.php

+ 1
- 1
bin/worker.php View File

@@ -44,7 +44,7 @@ $spawn = array_key_exists('s', $options) || array_key_exists('spawn', $options);
44 44
 
45 45
 if ($spawn) {
46 46
 	Worker::spawnWorker();
47
-	killme();
47
+	exit();
48 48
 }
49 49
 
50 50
 $run_cron = !array_key_exists('n', $options) && !array_key_exists('no_cron', $options);

+ 4
- 4
include/api.php View File

@@ -3928,10 +3928,10 @@ function api_oauth_request_token()
3928 3928
 		$r = $oauth1->fetch_request_token(OAuthRequest::from_request());
3929 3929
 	} catch (Exception $e) {
3930 3930
 		echo "error=" . OAuthUtil::urlencode_rfc3986($e->getMessage());
3931
-		killme();
3931
+		exit();
3932 3932
 	}
3933 3933
 	echo $r;
3934
-	killme();
3934
+	exit();
3935 3935
 }
3936 3936
 
3937 3937
 /**
@@ -3947,10 +3947,10 @@ function api_oauth_access_token()
3947 3947
 		$r = $oauth1->fetch_access_token(OAuthRequest::from_request());
3948 3948
 	} catch (Exception $e) {
3949 3949
 		echo "error=". OAuthUtil::urlencode_rfc3986($e->getMessage());
3950
-		killme();
3950
+		exit();
3951 3951
 	}
3952 3952
 	echo $r;
3953
-	killme();
3953
+	exit();
3954 3954
 }
3955 3955
 
3956 3956
 /// @TODO move to top of file or somewhere better

+ 0
- 3
library/OAuth1.php View File

@@ -91,7 +91,6 @@ abstract class OAuthSignatureMethod {
91 91
    */
92 92
   public function check_signature($request, $consumer, $token, $signature) {
93 93
     $built = $this->build_signature($request, $consumer, $token);
94
-    //echo "<pre>"; var_dump($signature, $built, ($built == $signature)); killme();
95 94
     return ($built == $signature);
96 95
   }
97 96
 }
@@ -296,7 +295,6 @@ class OAuthRequest {
296 295
     $http_url =  substr($http_url, 0, strpos($http_url,$parameters['pagename'])+strlen($parameters['pagename']));
297 296
     unset( $parameters['pagename'] );
298 297
     
299
-	//echo "<pre>".__function__."\n"; var_dump($http_method, $http_url, $parameters, $_SERVER['REQUEST_URI']); killme();
300 298
     return new OAuthRequest($http_method, $http_url, $parameters);
301 299
   }
302 300
 
@@ -561,7 +559,6 @@ class OAuthServer {
561 559
   public function verify_request(&$request) {
562 560
     $this->get_version($request);
563 561
     $consumer = $this->get_consumer($request);
564
-    //echo __file__.__line__.__function__."<pre>"; var_dump($consumer); die();
565 562
     $token = $this->get_token($request, $consumer, "access");
566 563
     $this->check_signature($request, $consumer, $token);
567 564
     return array($consumer, $token);

+ 0
- 1
mod/_well_known.php View File

@@ -27,7 +27,6 @@ function _well_known_init(App $a)
27 27
 		}
28 28
 	}
29 29
 	System::httpExit(404);
30
-	killme();
31 30
 }
32 31
 
33 32
 function wk_social_relay()

+ 1
- 2
mod/admin.php View File

@@ -301,8 +301,7 @@ function admin_content(App $a)
301 301
 
302 302
 	if ($a->isAjax()) {
303 303
 		echo $o;
304
-		killme();
305
-		return '';
304
+		exit();
306 305
 	} else {
307 306
 		return $o;
308 307
 	}

+ 1
- 1
mod/amcd.php View File

@@ -47,5 +47,5 @@ function amcd_content()
47 47
   }
48 48
 }
49 49
 JSON;
50
-	killme();
50
+	exit();
51 51
 }

+ 3
- 3
mod/api.php View File

@@ -59,7 +59,7 @@ function api_content(App $a)
59 59
 		} catch (Exception $e) {
60 60
 			echo "<pre>";
61 61
 			var_dump($e);
62
-			killme();
62
+			exit();
63 63
 		}
64 64
 
65 65
 		if (!empty($_POST['oauth_yes'])) {
@@ -79,7 +79,7 @@ function api_content(App $a)
79 79
 					$glue = "?";
80 80
 				}
81 81
 				$a->internalRedirect($consumer->callback_url . $glue . 'oauth_token=' . OAuthUtil::urlencode_rfc3986($params['oauth_token']) . '&oauth_verifier=' . OAuthUtil::urlencode_rfc3986($verifier));
82
-				killme();
82
+				exit();
83 83
 			}
84 84
 
85 85
 			$tpl = Renderer::getMarkupTemplate("oauth_authorize_done.tpl");
@@ -117,5 +117,5 @@ function api_content(App $a)
117 117
 	}
118 118
 
119 119
 	echo api_call($a);
120
-	killme();
120
+	exit();
121 121
 }

+ 1
- 1
mod/attach.php View File

@@ -49,6 +49,6 @@ function attach_init(App $a)
49 49
 	}
50 50
 
51 51
 	echo $r[0]['data'];
52
-	killme();
52
+	exit();
53 53
 	// NOTREACHED
54 54
 }

+ 3
- 3
mod/cal.php View File

@@ -244,7 +244,7 @@ function cal_content(App $a)
244 244
 
245 245
 		if (!empty($a->argv[2]) && ($a->argv[2] === 'json')) {
246 246
 			echo json_encode($events);
247
-			killme();
247
+			exit();
248 248
 		}
249 249
 
250 250
 		// links: array('href', 'text', 'extra css classes', 'title')
@@ -286,7 +286,7 @@ function cal_content(App $a)
286 286
 
287 287
 		if (!empty($_GET['id'])) {
288 288
 			echo $o;
289
-			killme();
289
+			exit();
290 290
 		}
291 291
 
292 292
 		return $o;
@@ -331,7 +331,7 @@ function cal_content(App $a)
331 331
 			header('Content-type: text/calendar');
332 332
 			header('content-disposition: attachment; filename="' . L10n::t('calendar') . '-' . $nick . '.' . $evexport["extension"] . '"');
333 333
 			echo $evexport["content"];
334
-			killme();
334
+			exit();
335 335
 		}
336 336
 
337 337
 		return;

+ 3
- 3
mod/contactgroup.php View File

@@ -8,7 +8,7 @@ use Friendica\Model\Group;
8 8
 function contactgroup_content(App $a)
9 9
 {
10 10
 	if (!local_user()) {
11
-		killme();
11
+		exit();
12 12
 	}
13 13
 
14 14
 	$change = null;
@@ -28,7 +28,7 @@ function contactgroup_content(App $a)
28 28
 			intval(local_user())
29 29
 		);
30 30
 		if (!DBA::isResult($r)) {
31
-			killme();
31
+			exit();
32 32
 		}
33 33
 
34 34
 		$group = $r[0];
@@ -49,5 +49,5 @@ function contactgroup_content(App $a)
49 49
 		}
50 50
 	}
51 51
 
52
-	killme();
52
+	exit();
53 53
 }

+ 3
- 3
mod/dfrn_notify.php View File

@@ -281,7 +281,7 @@ function dfrn_notify_content(App $a) {
281 281
 		$user = DBA::selectFirst('user', ['uid'], ['nickname' => $a->argv[1]]);
282 282
 		if (!DBA::isResult($user)) {
283 283
 			Logger::log('User not found for nickname ' . $a->argv[1]);
284
-			killme();
284
+			exit();
285 285
 		}
286 286
 
287 287
 		$condition = [];
@@ -313,7 +313,7 @@ function dfrn_notify_content(App $a) {
313 313
 		$importer = DFRN::getImporter($contact['id'], $user['uid']);
314 314
 		if (empty($importer)) {
315 315
 			Logger::log('No importer data found for user ' . $a->argv[1] . ' and contact ' . $dfrn_id);
316
-			killme();
316
+			exit();
317 317
 		}
318 318
 
319 319
 		Logger::log("Remote rino version: ".$rino_remote." for ".$importer["url"], Logger::DATA);
@@ -370,6 +370,6 @@ function dfrn_notify_content(App $a) {
370 370
 			. "\t" . '<challenge>' . $challenge . '</challenge>' . "\r\n"
371 371
 			. '</dfrn_notify>' . "\r\n";
372 372
 
373
-		killme();
373
+		exit();
374 374
 	}
375 375
 }

+ 9
- 9
mod/dfrn_poll.php View File

@@ -37,7 +37,7 @@ function dfrn_poll_init(App $a)
37 37
 		$nickname = $a->argv[1];
38 38
 		header("Content-type: application/atom+xml");
39 39
 		echo OStatus::feed($nickname, $last_update, 10);
40
-		killme();
40
+		exit();
41 41
 	}
42 42
 
43 43
 	$direction = -1;
@@ -71,7 +71,7 @@ function dfrn_poll_init(App $a)
71 71
 		Logger::log('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] . ' for ' . $user);
72 72
 		header("Content-type: application/atom+xml");
73 73
 		echo DFRN::feed('', $user, $last_update, 0, $hidewall);
74
-		killme();
74
+		exit();
75 75
 	}
76 76
 
77 77
 	if (($type === 'profile') && (!strlen($sec))) {
@@ -198,7 +198,7 @@ function dfrn_poll_init(App $a)
198 198
 
199 199
 			header("Content-type: text/xml");
200 200
 			echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?><dfrn_poll><status>0</status><challenge>$decoded_challenge</challenge><sec>$sec</sec></dfrn_poll>";
201
-			killme();
201
+			exit();
202 202
 			// NOTREACHED
203 203
 		} else {
204 204
 			// old protocol
@@ -290,7 +290,7 @@ function dfrn_poll_post(App $a)
290 290
 
291 291
 			header("Content-type: text/xml");
292 292
 			echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?><dfrn_poll><status>0</status><challenge>$decoded_challenge</challenge><sec>$sec</sec></dfrn_poll>";
293
-			killme();
293
+			exit();
294 294
 			// NOTREACHED
295 295
 		}
296 296
 	}
@@ -307,7 +307,7 @@ function dfrn_poll_post(App $a)
307 307
 	);
308 308
 
309 309
 	if (!DBA::isResult($r)) {
310
-		killme();
310
+		exit();
311 311
 	}
312 312
 
313 313
 	$type = $r[0]['type'];
@@ -336,7 +336,7 @@ function dfrn_poll_post(App $a)
336 336
 
337 337
 	$r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 $sql_extra LIMIT 1");
338 338
 	if (!DBA::isResult($r)) {
339
-		killme();
339
+		exit();
340 340
 	}
341 341
 
342 342
 	$contact = $r[0];
@@ -368,7 +368,7 @@ function dfrn_poll_post(App $a)
368 368
 			<description>$text</description>
369 369
 		</reputation>
370 370
 		";
371
-		killme();
371
+		exit();
372 372
 		// NOTREACHED
373 373
 	} else {
374 374
 		// Update the writable flag if it changed
@@ -391,7 +391,7 @@ function dfrn_poll_post(App $a)
391 391
 		header("Content-type: application/atom+xml");
392 392
 		$o = DFRN::feed($dfrn_id, $a->argv[1], $last_update, $direction);
393 393
 		echo $o;
394
-		killme();
394
+		exit();
395 395
 	}
396 396
 }
397 397
 
@@ -573,7 +573,7 @@ function dfrn_poll_content(App $a)
573 573
 				. "\t" . '<dfrn_id>' . $encrypted_id . '</dfrn_id>' . "\r\n"
574 574
 				. "\t" . '<challenge>' . $challenge . '</challenge>' . "\r\n"
575 575
 				. '</dfrn_poll>' . "\r\n";
576
-			killme();
576
+			exit();
577 577
 			// NOTREACHED
578 578
 		}
579 579
 	}

+ 1
- 2
mod/dfrn_request.php View File

@@ -589,8 +589,7 @@ function dfrn_request_content(App $a)
589 589
 			}
590 590
 		}
591 591
 
592
-		killme();
593
-		return; // NOTREACHED
592
+		exit();
594 593
 	} else {
595 594
 		// Normal web request. Display our user's introduction form.
596 595
 		if ((Config::get('system', 'block_public')) && (!local_user()) && (!remote_user())) {

+ 1
- 1
mod/display.php View File

@@ -426,5 +426,5 @@ function displayShowFeed($item_id, $conversation)
426 426
 	}
427 427
 	header("Content-type: application/atom+xml");
428 428
 	echo $xml;
429
-	killme();
429
+	exit();
430 430
 }

+ 3
- 3
mod/events.php View File

@@ -117,7 +117,7 @@ function events_post(App $a)
117 117
 		notice(L10n::t('Event can not end before it has started.') . EOL);
118 118
 		if (intval($_REQUEST['preview'])) {
119 119
 			echo L10n::t('Event can not end before it has started.');
120
-			killme();
120
+			exit();
121 121
 		}
122 122
 		$a->internalRedirect($onerror_path);
123 123
 	}
@@ -126,7 +126,7 @@ function events_post(App $a)
126 126
 		notice(L10n::t('Event title and start time are required.') . EOL);
127 127
 		if (intval($_REQUEST['preview'])) {
128 128
 			echo L10n::t('Event title and start time are required.');
129
-			killme();
129
+			exit();
130 130
 		}
131 131
 		$a->internalRedirect($onerror_path);
132 132
 	}
@@ -414,7 +414,7 @@ function events_content(App $a)
414 414
 
415 415
 		if (!empty($_GET['id'])) {
416 416
 			echo $o;
417
-			killme();
417
+			exit();
418 418
 		}
419 419
 
420 420
 		return $o;

+ 3
- 3
mod/fbrowser.php View File

@@ -18,11 +18,11 @@ use Friendica\Object\Image;
18 18
 function fbrowser_content(App $a)
19 19
 {
20 20
 	if (!local_user()) {
21
-		killme();
21
+		exit();
22 22
 	}
23 23
 
24 24
 	if ($a->argc == 1) {
25
-		killme();
25
+		exit();
26 26
 	}
27 27
 
28 28
 	$template_file = "filebrowser.tpl";
@@ -146,6 +146,6 @@ function fbrowser_content(App $a)
146 146
 		return $o;
147 147
 	} else {
148 148
 		echo $o;
149
-		killme();
149
+		exit();
150 150
 	}
151 151
 }

+ 2
- 2
mod/fetch.php View File

@@ -40,7 +40,7 @@ function fetch_init(App $a)
40 40
 
41 41
 				header("HTTP/1.1 301 Moved Permanently");
42 42
 				header("Location:".$location);
43
-				killme();
43
+				exit();
44 44
 			}
45 45
 		}
46 46
 
@@ -60,5 +60,5 @@ function fetch_init(App $a)
60 60
 	header("Content-Type: application/magic-envelope+xml; charset=utf-8");
61 61
 	echo Diaspora::buildMagicEnvelope($xml, $user);
62 62
 
63
-	killme();
63
+	exit();
64 64
 }

+ 2
- 2
mod/filer.php View File

@@ -13,7 +13,7 @@ use Friendica\Util\XML;
13 13
 function filer_content(App $a)
14 14
 {
15 15
 	if (! local_user()) {
16
-		killme();
16
+		exit();
17 17
 	}
18 18
 
19 19
 	$term = XML::unescape(trim(defaults($_GET, 'term', '')));
@@ -38,5 +38,5 @@ function filer_content(App $a)
38 38
 
39 39
 		echo $o;
40 40
 	}
41
-	killme();
41
+	exit();
42 42
 }

+ 2
- 2
mod/filerm.php View File

@@ -10,7 +10,7 @@ function filerm_content(App $a)
10 10
 {
11 11
 	if (! local_user())
12 12
 	{
13
-		killme();
13
+		exit();
14 14
 	}
15 15
 
16 16
 	$term = XML::unescape(trim($_GET['term']));
@@ -37,5 +37,5 @@ function filerm_content(App $a)
37 37
 	}
38 38
 
39 39
 	$a->internalRedirect('/network?f=&file=' . rawurlencode($term));
40
-	killme();
40
+	exit();
41 41
 }

+ 1
- 1
mod/friendica.php View File

@@ -68,7 +68,7 @@ function friendica_init(App $a)
68 68
 
69 69
 		header('Content-type: application/json; charset=utf-8');
70 70
 		echo json_encode($data);
71
-		killme();
71
+		exit();
72 72
 	}
73 73
 }
74 74
 

+ 1
- 1
mod/group.php View File

@@ -307,7 +307,7 @@ function group_content(App $a) {
307 307
 	if ($change) {
308 308
 		$tpl = Renderer::getMarkupTemplate('groupeditor.tpl');
309 309
 		echo Renderer::replaceMacros($tpl, $context);
310
-		killme();
310
+		exit();
311 311
 	}
312 312
 
313 313
 	return Renderer::replaceMacros($tpl, $context);

+ 1
- 1
mod/hovercard.php View File

@@ -41,7 +41,7 @@ function hovercard_content()
41 41
 	if ($datatype == 'tpl') {
42 42
 		$templatecontent = get_template_content('hovercard.tpl');
43 43
 		echo $templatecontent;
44
-		killme();
44
+		exit();
45 45
 	}
46 46
 
47 47
 	// If a contact is connected the url is internally changed to 'redir/CID'. We need the pure url to search for

+ 4
- 4
mod/ignored.php View File

@@ -8,7 +8,7 @@ use Friendica\Model\Item;
8 8
 function ignored_init(App $a)
9 9
 {
10 10
 	if (!local_user()) {
11
-		killme();
11
+		exit();
12 12
 	}
13 13
 
14 14
 	if ($a->argc > 1) {
@@ -16,12 +16,12 @@ function ignored_init(App $a)
16 16
 	}
17 17
 
18 18
 	if (!$message_id) {
19
-		killme();
19
+		exit();
20 20
 	}
21 21
 
22 22
 	$thread = Item::selectFirstThreadForUser(local_user(), ['uid', 'ignored'], ['iid' => $message_id]);
23 23
 	if (!DBA::isResult($thread)) {
24
-		killme();
24
+		exit();
25 25
 	}
26 26
 
27 27
 	// Numeric values are needed for the json output further below
@@ -49,5 +49,5 @@ function ignored_init(App $a)
49 49
 	// the json doesn't really matter, it will either be 0 or 1
50 50
 
51 51
 	echo json_encode($ignored);
52
-	killme();
52
+	exit();
53 53
 }

+ 9
- 9
mod/item.php View File

@@ -51,7 +51,7 @@ function item_post(App $a) {
51 51
 		drop_items($arr_drop);
52 52
 		$json = ['success' => 1];
53 53
 		echo json_encode($json);
54
-		killme();
54
+		exit();
55 55
 	}
56 56
 
57 57
 	Addon::callHooks('post_local_start', $_REQUEST);
@@ -118,7 +118,7 @@ function item_post(App $a) {
118 118
 			if (!empty($_REQUEST['return'])) {
119 119
 				$a->internalRedirect($return_path);
120 120
 			}
121
-			killme();
121
+			exit();
122 122
 		}
123 123
 
124 124
 		$parent = $parent_item['id'];
@@ -169,7 +169,7 @@ function item_post(App $a) {
169 169
 			$a->internalRedirect($return_path);
170 170
 		}
171 171
 
172
-		killme();
172
+		exit();
173 173
 	}
174 174
 
175 175
 	// Init post instance
@@ -280,13 +280,13 @@ function item_post(App $a) {
280 280
 
281 281
 		if (!strlen($body)) {
282 282
 			if ($preview) {
283
-				killme();
283
+				exit();
284 284
 			}
285 285
 			info(L10n::t('Empty post discarded.') . EOL);
286 286
 			if (!empty($_REQUEST['return'])) {
287 287
 				$a->internalRedirect($return_path);
288 288
 			}
289
-			killme();
289
+			exit();
290 290
 		}
291 291
 	}
292 292
 
@@ -693,7 +693,7 @@ function item_post(App $a) {
693 693
 		}
694 694
 
695 695
 		echo json_encode($json);
696
-		killme();
696
+		exit();
697 697
 	}
698 698
 
699 699
 	if ($orig_post)	{
@@ -721,7 +721,7 @@ function item_post(App $a) {
721 721
 			Logger::log('return: ' . $return_path);
722 722
 			$a->internalRedirect($return_path);
723 723
 		}
724
-		killme();
724
+		exit();
725 725
 	} else {
726 726
 		$post_id = 0;
727 727
 	}
@@ -874,7 +874,7 @@ function item_post_return($baseurl, $api_source, $return_path)
874 874
 	Logger::log('post_json: ' . print_r($json, true), Logger::DEBUG);
875 875
 
876 876
 	echo json_encode($json);
877
-	killme();
877
+	exit();
878 878
 }
879 879
 
880 880
 function item_content(App $a)
@@ -900,7 +900,7 @@ function item_content(App $a)
900 900
 		if ($a->isAjax()) {
901 901
 			// ajax return: [<item id>, 0 (no perm) | <owner id>]
902 902
 			echo json_encode([intval($a->argv[2]), intval($o)]);
903
-			killme();
903
+			exit();
904 904
 		}
905 905
 	}
906 906
 

+ 1
- 3
mod/like.php View File

@@ -28,7 +28,7 @@ function like_content(App $a) {
28 28
 	$return_path = defaults($_REQUEST, 'return', '');
29 29
 
30 30
 	like_content_return($a, $return_path);
31
-	killme(); // NOTREACHED
31
+	exit();
32 32
 }
33 33
 
34 34
 
@@ -46,6 +46,4 @@ function like_content_return(App $a, $return_path) {
46 46
 
47 47
 		$a->internalRedirect($return_path . $rand);
48 48
 	}
49
-
50
-	killme();
51 49
 }

+ 6
- 6
mod/lockview.php View File

@@ -19,11 +19,11 @@ function lockview_content(App $a)
19 19
 	}
20 20
 
21 21
 	if (!$item_id) {
22
-		killme();
22
+		exit();
23 23
 	}
24 24
 
25 25
 	if (!in_array($type, ['item','photo','event'])) {
26
-		killme();
26
+		exit();
27 27
 	}
28 28
 
29 29
 	$fields = ['uid', 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid'];
@@ -37,14 +37,14 @@ function lockview_content(App $a)
37 37
 	}
38 38
 
39 39
 	if (!DBA::isResult($item)) {
40
-		killme();
40
+		exit();
41 41
 	}
42 42
 
43 43
 	Addon::callHooks('lockview_content', $item);
44 44
 
45 45
 	if ($item['uid'] != local_user()) {
46 46
 		echo L10n::t('Remote privacy information not available.') . '<br />';
47
-		killme();
47
+		exit();
48 48
 	}
49 49
 
50 50
 	if (isset($item['private'])
@@ -55,7 +55,7 @@ function lockview_content(App $a)
55 55
 		&& empty($item['deny_gid']))
56 56
 	{
57 57
 		echo L10n::t('Remote privacy information not available.') . '<br />';
58
-		killme();
58
+		exit();
59 59
 	}
60 60
 
61 61
 	$allowed_users  = expand_acl($item['allow_cid']);
@@ -111,6 +111,6 @@ function lockview_content(App $a)
111 111
 	}
112 112
 
113 113
 	echo $o . implode(', ', $l);
114
-	killme();
114
+	exit();
115 115
 
116 116
 }

+ 1
- 1
mod/manifest.php View File

@@ -24,5 +24,5 @@ function manifest_content(App $a) {
24 24
 
25 25
 	echo $o;
26 26
 
27
-	killme();
27
+	exit();
28 28
 }

+ 3
- 3
mod/modexp.php View File

@@ -6,7 +6,7 @@ use Friendica\Database\DBA;
6 6
 function modexp_init(App $a) {
7 7
 
8 8
 	if($a->argc != 2)
9
-		killme();
9
+		exit();
10 10
 
11 11
 	$nick = $a->argv[1];
12 12
 	$r = q("SELECT `spubkey` FROM `user` WHERE `nickname` = '%s' LIMIT 1",
@@ -14,7 +14,7 @@ function modexp_init(App $a) {
14 14
 	);
15 15
 
16 16
 	if (! DBA::isResult($r)) {
17
-		killme();
17
+		exit();
18 18
 	}
19 19
 
20 20
 	$lines = explode("\n",$r[0]['spubkey']);
@@ -30,7 +30,7 @@ function modexp_init(App $a) {
30 30
 	header("Content-type: application/magic-public-key");
31 31
 	echo 'RSA' . '.' . $m . '.' . $e;
32 32
 
33
-	killme();
33
+	exit();
34 34
 
35 35
 }
36 36
 

+ 1
- 1
mod/network.php View File

@@ -625,7 +625,7 @@ function networkThreadedView(App $a, $update, $parent)
625 625
 		$group = DBA::selectFirst('group', ['name'], ['id' => $gid, 'uid' => local_user()]);
626 626
 		if (!DBA::isResult($group)) {
627 627
 			if ($update) {
628
-				killme();
628
+				exit();
629 629
 			}
630 630
 			notice(L10n::t('No such group') . EOL);
631 631
 			$a->internalRedirect('network/0');

+ 0
- 3
mod/nodeinfo.php View File

@@ -24,12 +24,10 @@ function nodeinfo_wellknown(App $a) {
24 24
 function nodeinfo_init(App $a) {
25 25
 	if (!Config::get('system', 'nodeinfo')) {
26 26
 		System::httpExit(404);
27
-		killme();
28 27
 	}
29 28
 
30 29
 	if (($a->argc != 2) || ($a->argv[1] != '1.0')) {
31 30
 		System::httpExit(404);
32
-		killme();
33 31
 	}
34 32
 
35 33
 	$smtp = (function_exists('imap_open') && !Config::get('system', 'imap_disabled') && !Config::get('system', 'dfrn_only'));
@@ -149,7 +147,6 @@ function nodeinfo_cron() {
149 147
 
150 148
 		$addon = 'statistics_json';
151 149
 		$addons = Config::get('system', 'addon');
152
-		$addons_arr = [];
153 150
 
154 151
 		if ($addons) {
155 152
 			$addons_arr = explode(',',str_replace(' ', '',$addons));

+ 1
- 1
mod/noscrape.php View File

@@ -15,7 +15,7 @@ function noscrape_init(App $a)
15 15
 	if ($a->argc > 1) {
16 16
 		$which = $a->argv[1];
17 17
 	} else {
18
-		killme();
18
+		exit();
19 19
 	}
20 20
 
21 21
 	$profile = 0;

+ 1
- 1
mod/notify.php View File

@@ -48,7 +48,7 @@ function notify_init(App $a)
48 48
 		$r = $nm->setAllSeen();
49 49
 		$j = json_encode(['result' => ($r) ? 'success' : 'fail']);
50 50
 		echo $j;
51
-		killme();
51
+		exit();
52 52
 	}
53 53
 }
54 54
 

+ 1
- 1
mod/oexchange.php View File

@@ -17,7 +17,7 @@ function oexchange_init(App $a) {
17 17
 
18 18
 		$o = Renderer::replaceMacros($tpl, ['$base' => System::baseUrl()]);
19 19
 		echo $o;
20
-		killme();
20
+		exit();
21 21
 	}
22 22
 }
23 23
 

+ 1
- 1
mod/opensearch.php View File

@@ -17,5 +17,5 @@ function opensearch_content(App $a) {
17 17
 
18 18
 	echo $o;
19 19
 
20
-	killme();
20
+	exit();
21 21
 }

+ 4
- 4
mod/photos.php View File

@@ -185,7 +185,7 @@ function photos_post(App $a)
185 185
 
186 186
 	if (!$can_post) {
187 187
 		notice(L10n::t('Permission denied.') . EOL);
188
-		killme();
188
+		exit();
189 189
 	}
190 190
 
191 191
 	$owner_record = User::getOwnerDataById($page_owner_uid);
@@ -193,7 +193,7 @@ function photos_post(App $a)
193 193
 	if (!$owner_record) {
194 194
 		notice(L10n::t('Contact information unavailable') . EOL);
195 195
 		Logger::log('photos_post: unable to locate contact record for page owner. uid=' . $page_owner_uid);
196
-		killme();
196
+		exit();
197 197
 	}
198 198
 
199 199
 	if ($a->argc > 3 && $a->argv[2] === 'album') {
@@ -794,7 +794,7 @@ function photos_post(App $a)
794 794
 		@unlink($src);
795 795
 		$foo = 0;
796 796
 		Addon::callHooks('photo_post_end',$foo);
797
-		killme();
797
+		exit();
798 798
 	}
799 799
 
800 800
 	$exif = $image->orient($src);
@@ -820,7 +820,7 @@ function photos_post(App $a)
820 820
 	if (!$r) {
821 821
 		Logger::log('mod/photos.php: photos_post(): image store failed', Logger::DEBUG);
822 822
 		notice(L10n::t('Image upload failed.') . EOL);
823
-		killme();
823
+		exit();
824 824
 	}
825 825
 
826 826
 	if ($width > 640 || $height > 640) {

+ 1
- 1
mod/phpinfo.php View File

@@ -10,5 +10,5 @@ function phpinfo_content()
10 10
 	}
11 11
 
12 12
 	phpinfo();
13
-	killme();
13
+	exit();
14 14
 }

+ 2
- 2
mod/ping.php View File

@@ -115,7 +115,7 @@ function ping_init(App $a)
115 115
 				header("Content-type: text/xml");
116 116
 				echo XML::fromArray($data, $xml);
117 117
 			}
118
-			killme();
118
+			exit();
119 119
 		}
120 120
 
121 121
 		$notifs = ping_get_notifications(local_user());
@@ -386,7 +386,7 @@ function ping_init(App $a)
386 386
 		echo XML::fromArray(["result" => $data], $xml);
387 387
 	}
388 388
 
389
-	killme();
389
+	exit();
390 390
 }
391 391
 
392 392
 /**

+ 3
- 3
mod/poco.php View File

@@ -46,7 +46,7 @@ function poco_init(App $a) {
46 46
 		$ret = PortableContact::serverlist();
47 47
 		header('Content-type: application/json');
48 48
 		echo json_encode($ret);
49
-		killme();
49
+		exit();
50 50
 	}
51 51
 
52 52
 	if ($a->argc > 1 && $a->argv[1] === '@global') {
@@ -378,12 +378,12 @@ function poco_init(App $a) {
378 378
 	if ($format === 'xml') {
379 379
 		header('Content-type: text/xml');
380 380
 		echo Renderer::replaceMacros(Renderer::getMarkupTemplate('poco_xml.tpl'), XML::arrayEscape(['$response' => $ret]));
381
-		killme();
381
+		exit();
382 382
 	}
383 383
 	if ($format === 'json') {
384 384
 		header('Content-type: application/json');
385 385
 		echo json_encode($ret);
386
-		killme();
386
+		exit();
387 387
 	} else {
388 388
 		System::httpExit(500);
389 389
 	}

+ 1
- 1
mod/pretheme.php View File

@@ -21,5 +21,5 @@ function pretheme_init(App $a) {
21 21
 		echo json_encode(['img' => Theme::getScreenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits]);
22 22
 	}
23 23
 
24
-	killme();
24
+	exit();
25 25
 }

+ 1
- 1
mod/probe.php View File

@@ -12,7 +12,7 @@ function probe_content(App $a)
12 12
 	if (!local_user()) {
13 13
 		System::httpExit(403, ["title" => L10n::t("Public access denied."),
14 14
 			"description" => L10n::t("Only logged in users are permitted to perform a probing.")]);
15
-		killme();
15
+		exit();
16 16
 	}
17 17
 
18 18
 	$o = '<div class="generic-page-wrapper">';

+ 2
- 2
mod/profiles.php View File

@@ -117,7 +117,7 @@ function profiles_init(App $a) {
117 117
 		);
118 118
 		if(! DBA::isResult($r1)) {
119 119
 			notice(L10n::t('Profile unavailable to clone.') . EOL);
120
-			killme();
120
+			exit();
121 121
 			return;
122 122
 		}
123 123
 		unset($r1[0]['id']);
@@ -150,7 +150,7 @@ function profiles_init(App $a) {
150 150
 		);
151 151
 		if (! DBA::isResult($r)) {
152 152
 			notice(L10n::t('Profile not found.') . EOL);
153
-			killme();
153
+			exit();
154 154
 			return;
155 155
 		}
156 156
 

+ 1
- 1
mod/profperm.php View File

@@ -165,7 +165,7 @@ function profperm_content(App $a) {
165 165
 
166 166
 	if (!empty($change)) {
167 167
 		echo $o;
168
-		killme();
168
+		exit();
169 169
 	}
170 170
 	$o .= '</div>';
171 171
 	return $o;

+ 1
- 1
mod/pubsub.php View File

@@ -17,7 +17,7 @@ function hub_return($valid, $body)
17 17
 	} else {
18 18
 		System::httpExit(404);
19 19
 	}
20
-	killme();
20
+	exit();
21 21
 }
22 22
 
23 23
 // when receiving an XML feed, always return OK

+ 1
- 1
mod/pubsubhubbub.php View File

@@ -136,5 +136,5 @@ function pubsubhubbub_init(App $a) {
136 136
 
137 137
 		System::httpExit(202);
138 138
 	}
139
-	killme();
139
+	exit();
140 140
 }

+ 1
- 1
mod/robots_txt.php View File

@@ -26,5 +26,5 @@ function robots_txt_init(App $a)
26 26
 	foreach ($allDisalloweds as $disallowed) {
27 27
 		echo 'Disallow: ' . $disallowed . PHP_EOL;
28 28
 	}
29
-	killme();
29
+	exit();
30 30
 }

+ 1
- 1
mod/rsd_xml.php View File

@@ -22,5 +22,5 @@ function rsd_xml_content(App $a)
22 22
   </service>
23 23
 </rsd>';
24 24
 
25
-	killme();
25
+	exit();
26 26
 }

+ 2
- 2
mod/search.php View File

@@ -102,7 +102,7 @@ function search_content(App $a) {
102 102
 		System::httpExit(403,
103 103
 				["title" => L10n::t("Public access denied."),
104 104
 					"description" => L10n::t("Only logged in users are permitted to perform a search.")]);
105
-		killme();
105
+		exit();
106 106
 		//notice(L10n::t('Public access denied.').EOL);
107 107
 		//return;
108 108
 	}
@@ -127,7 +127,7 @@ function search_content(App $a) {
127 127
 				System::httpExit(429,
128 128
 						["title" => L10n::t("Too Many Requests"),
129 129
 							"description" => L10n::t("Only one search per minute is permitted for not logged in users.")]);
130
-				killme();
130
+				exit();
131 131
 			}
132 132
 			Cache::set("remote_search:".$remote, json_encode(["time" => time(), "accesses" => $resultdata->accesses + 1]), Cache::HOUR);
133 133
 		} else

+ 3
- 3
mod/share.php View File

@@ -8,7 +8,7 @@ function share_init(App $a) {
8 8
 	$post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
9 9
 
10 10
 	if (!$post_id || !local_user()) {
11
-		killme();
11
+		exit();
12 12
 	}
13 13
 
14 14
 	$fields = ['private', 'body', 'author-name', 'author-link', 'author-avatar',
@@ -16,7 +16,7 @@ function share_init(App $a) {
16 16
 	$item = Item::selectFirst($fields, ['id' => $post_id]);
17 17
 
18 18
 	if (!DBA::isResult($item) || $item['private'] == 1) {
19
-		killme();
19
+		exit();
20 20
 	}
21 21
 
22 22
 	if (strpos($item['body'], "[/share]") !== false) {
@@ -34,7 +34,7 @@ function share_init(App $a) {
34 34
 	}
35 35
 
36 36
 	echo $o;
37
-	killme();
37
+	exit();
38 38
 }
39 39
 
40 40
 /// @TODO Rewrite to handle over whole record array

+ 4
- 4
mod/starred.php View File

@@ -12,18 +12,18 @@ function starred_init(App $a) {
12 12
 	$message_id = null;
13 13
 
14 14
 	if (!local_user()) {
15
-		killme();
15
+		exit();
16 16
 	}
17 17
 	if ($a->argc > 1) {
18 18
 		$message_id = intval($a->argv[1]);
19 19
 	}
20 20
 	if (!$message_id) {
21
-		killme();
21
+		exit();
22 22
 	}
23 23
 
24 24
 	$item = Item::selectFirstForUser(local_user(), ['starred'], ['uid' => local_user(), 'id' => $message_id]);
25 25
 	if (!DBA::isResult($item)) {
26
-		killme();
26
+		exit();
27 27
 	}
28 28
 
29 29
 	if (!intval($item['starred'])) {
@@ -48,5 +48,5 @@ function starred_init(App $a) {
48 48
 	// the json doesn't really matter, it will either be 0 or 1
49 49
 
50 50
 	echo json_encode($starred);
51
-	killme();
51
+	exit();
52 52
 }

+ 1
- 2
mod/statistics_json.php View File

@@ -14,7 +14,6 @@ function statistics_json_init(App $a) {
14 14
 
15 15
 	if (!Config::get("system", "nodeinfo")) {
16 16
 		System::httpExit(404);
17
-		killme();
18 17
 	}
19 18
 
20 19
 	$statistics = [
@@ -56,5 +55,5 @@ function statistics_json_init(App $a) {
56 55
 	header("Content-Type: application/json");
57 56
 	echo json_encode($statistics, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
58 57
 	Logger::log("statistics_init: printed " . print_r($statistics, true), Logger::DATA);
59
-	killme();
58
+	exit();
60 59
 }

+ 1
- 1
mod/subthread.php View File

@@ -151,6 +151,6 @@ EOT;
151 151
 
152 152
 	Addon::callHooks('post_local_end', $arr);
153 153
 
154
-	killme();
154
+	exit();
155 155
 
156 156
 }

+ 1
- 3
mod/tagger.php View File

@@ -203,7 +203,5 @@ EOT;
203 203
 
204 204
 	Worker::add(PRIORITY_HIGH, "Notifier", "tag", $post_id);
205 205
 
206
-	killme();
207
-
208
-	return; // NOTREACHED
206
+	exit();
209 207
 }

+ 4
- 6
mod/uexport.php View File

@@ -11,7 +11,7 @@ use Friendica\Database\DBA;
11 11
 
12 12
 function uexport_init(App $a) {
13 13
 	if (!local_user()) {
14
-		killme();
14
+		exit();
15 15
 	}
16 16
 
17 17
 	require_once("mod/settings.php");
@@ -26,14 +26,14 @@ function uexport_content(App $a) {
26 26
 		switch ($a->argv[1]) {
27 27
 			case "backup":
28 28
 				uexport_all($a);
29
-				killme();
29
+				exit();
30 30
 				break;
31 31
 			case "account":
32 32
 				uexport_account($a);
33
-				killme();
33
+				exit();
34 34
 				break;
35 35
 			default:
36
-				killme();
36
+				exit();
37 37
 		}
38 38
 	}
39 39
 
@@ -130,7 +130,6 @@ function uexport_account($a) {
130 130
 		'group_member' => $group_member,
131 131
 	];
132 132
 
133
-	//echo "<pre>"; var_dump(json_encode($output)); killme();
134 133
 	echo json_encode($output, JSON_PARTIAL_OUTPUT_ON_ERROR);
135 134
 }
136 135
 
@@ -152,7 +151,6 @@ function uexport_all(App $a) {
152 151
 	// chunk the output to avoid exhausting memory
153 152
 
154 153
 	for ($x = 0; $x < $total; $x += 500) {
155
-		$item = [];
156 154
 		$r = q("SELECT * FROM `item` WHERE `uid` = %d LIMIT %d, %d",
157 155
 			intval(local_user()),
158 156
 			intval($x),

+ 1
- 1
mod/update_community.php View File

@@ -34,5 +34,5 @@ function update_community_content(App $a) {
34 34
 	echo str_replace("\t", "       ", $text);
35 35
 	echo "</section>";
36 36
 	echo "</body></html>\r\n";
37
-	killme();
37
+	exit();
38 38
 }

+ 1
- 1
mod/update_contact.php View File

@@ -34,5 +34,5 @@ function update_contact_content(App $a)
34 34
 	echo str_replace("\t", "       ", $text);
35 35
 	echo "</section>";
36 36
 	echo "</body></html>\r\n";
37
-	killme();
37
+	exit();
38 38
 }

+ 1
- 1
mod/update_display.php View File

@@ -35,5 +35,5 @@ function update_display_content(App $a)
35 35
 	echo str_replace("\t", "       ", $text);
36 36
 	echo "</section>";
37 37
 	echo "</body></html>\r\n";
38
-	killme();
38
+	exit();
39 39
 }

+ 2
- 2
mod/update_network.php View File

@@ -13,7 +13,7 @@ require_once "mod/network.php";
13 13
 function update_network_content(App $a)
14 14
 {
15 15
 	if (!isset($_GET['p']) || !isset($_GET['item'])) {
16
-		killme();
16
+		exit();
17 17
 	}
18 18
 
19 19
 	$profile_uid = intval($_GET['p']);
@@ -44,5 +44,5 @@ function update_network_content(App $a)
44 44
 	echo str_replace("\t", "       ", $text);
45 45
 	echo "</section>";
46 46
 	echo "</body></html>\r\n";
47
-	killme();
47
+	exit();
48 48
 }

+ 1
- 1
mod/update_notes.php View File

@@ -48,5 +48,5 @@ function update_notes_content(App $a) {
48 48
 	echo str_replace("\t", "       ", $text);
49 49
 	echo "</section>";
50 50
 	echo "</body></html>\r\n";
51
-	killme();
51
+	exit();
52 52
 }

+ 1
- 1
mod/update_profile.php View File

@@ -47,5 +47,5 @@ function update_profile_content(App $a) {
47 47
 	echo str_replace("\t", "       ", $text);
48 48
 	echo "</section>";
49 49
 	echo "</body></html>\r\n";
50
-	killme();
50
+	exit();
51 51
 }

+ 1
- 1
mod/view.php View File

@@ -13,5 +13,5 @@ function view_init($a){
13 13
 			require_once("view/theme/$theme/style.php");
14 14
 	}
15 15
 	
16
-	killme();
16
+	exit();
17 17
 }

+ 1
- 1
mod/viewsrc.php View File

@@ -28,7 +28,7 @@ function viewsrc_content(App $a)
28 28
 	if (DBA::isResult($item)) {
29 29
 		if ($a->isAjax()) {
30 30
 			echo str_replace("\n", '<br />', $item['body']);
31
-			killme();
31
+			exit();
32 32
 		} else {
33 33
 			$o .= str_replace("\n", '<br />', $item['body']);
34 34
 		}

+ 11
- 11
mod/wall_attach.php View File

@@ -26,14 +26,14 @@ function wall_attach_post(App $a) {
26 26
 		if (! DBA::isResult($r)) {
27 27
 			if ($r_json) {
28 28
 				echo json_encode(['error' => L10n::t('Invalid request.')]);
29
-				killme();
29
+				exit();
30 30
 			}
31 31
 			return;
32 32
 		}
33 33
 	} else {
34 34
 		if ($r_json) {
35 35
 			echo json_encode(['error' => L10n::t('Invalid request.')]);
36
-			killme();
36
+			exit();
37 37
 		}
38 38
 
39 39
 		return;
@@ -79,17 +79,17 @@ function wall_attach_post(App $a) {
79 79
 	if (! $can_post) {
80 80
 		if ($r_json) {
81 81
 			echo json_encode(['error' => L10n::t('Permission denied.')]);
82
-			killme();
82
+			exit();
83 83
 		}
84 84
 		notice(L10n::t('Permission denied.') . EOL );
85
-		killme();
85
+		exit();
86 86
 	}
87 87
 
88 88
 	if (empty($_FILES['userfile'])) {
89 89
 		if ($r_json) {
90 90
 			echo json_encode(['error' => L10n::t('Invalid request.')]);
91 91
 		}
92
-		killme();
92
+		exit();
93 93
 	}
94 94
 
95 95
 	$src      = $_FILES['userfile']['tmp_name'];
@@ -112,7 +112,7 @@ function wall_attach_post(App $a) {
112 112
 			notice($msg . EOL);
113 113
 		}
114 114
 		@unlink($src);
115
-		killme();
115
+		exit();
116 116
 	}
117 117
 
118 118
 	if ($maxfilesize && $filesize > $maxfilesize) {
@@ -123,7 +123,7 @@ function wall_attach_post(App $a) {
123 123
 			echo $msg . EOL;
124 124
 		}
125 125
 		@unlink($src);
126
-		killme();
126
+		exit();
127 127
 	}
128 128
 
129 129
 	$filedata = @file_get_contents($src);
@@ -146,7 +146,7 @@ function wall_attach_post(App $a) {
146 146
 		} else {
147 147
 			echo $msg . EOL;
148 148
 		}
149
-		killme();
149
+		exit();
150 150
 	}
151 151
 
152 152
 	$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) {
162 162
 		} else {
163 163
 			echo $msg . EOL;
164 164
 		}
165
-		killme();
165
+		exit();
166 166
 	}
167 167
 
168 168
 	if ($r_json) {
169 169
 		echo json_encode(['ok' => true]);
170
-		killme();
170
+		exit();
171 171
 	}
172 172
 
173 173
 	$lf = "\n";
174 174
 
175 175
 	echo  $lf . $lf . '[attachment]' . $r[0]['id'] . '[/attachment]' . $lf;
176 176
 
177
-	killme();
177
+	exit();
178 178
 	// NOTREACHED
179 179
 }

+ 14
- 14
mod/wall_upload.php View File

@@ -39,7 +39,7 @@ function wall_upload_post(App $a, $desktopmode = true)
39 39
 			if (!DBA::isResult($r)) {
40 40
 				if ($r_json) {
41 41
 					echo json_encode(['error' => L10n::t('Invalid request.')]);
42
-					killme();
42
+					exit();
43 43
 				}
44 44
 				return;
45 45
 			}
@@ -55,7 +55,7 @@ function wall_upload_post(App $a, $desktopmode = true)
55 55
 	} else {
56 56
 		if ($r_json) {
57 57
 			echo json_encode(['error' => L10n::t('Invalid request.')]);
58
-			killme();
58
+			exit();
59 59
 		}
60 60
 		return;
61 61
 	}
@@ -104,17 +104,17 @@ function wall_upload_post(App $a, $desktopmode = true)
104 104
 	if (!$can_post) {
105 105
 		if ($r_json) {
106 106
 			echo json_encode(['error' => L10n::t('Permission denied.')]);
107
-			killme();
107
+			exit();
108 108
 		}
109 109
 		notice(L10n::t('Permission denied.') . EOL);
110
-		killme();
110
+		exit();
111 111
 	}
112 112
 
113 113
 	if (empty($_FILES['userfile']) && empty($_FILES['media'])) {
114 114
 		if ($r_json) {
115 115
 			echo json_encode(['error' => L10n::t('Invalid request.')]);
116 116
 		}
117
-		killme();
117
+		exit();
118 118
 	}
119 119
 
120 120
 	$src = '';
@@ -164,10 +164,10 @@ function wall_upload_post(App $a, $desktopmode = true)
164 164
 	if ($src == "") {
165 165
 		if ($r_json) {
166 166
 			echo json_encode(['error' => L10n::t('Invalid request.')]);
167
-			killme();
167
+			exit();
168 168
 		}
169 169
 		notice(L10n::t('Invalid request.').EOL);
170
-		killme();
170
+		exit();
171 171
 	}
172 172
 
173 173
 	// This is a special treatment for picture upload from Twidere
@@ -201,7 +201,7 @@ function wall_upload_post(App $a, $desktopmode = true)
201 201
 			echo  $msg. EOL;
202 202
 		}
203 203
 		@unlink($src);
204
-		killme();
204
+		exit();
205 205
 	}
206 206
 
207 207
 	$imagedata = @file_get_contents($src);
@@ -215,7 +215,7 @@ function wall_upload_post(App $a, $desktopmode = true)
215 215
 			echo  $msg. EOL;
216 216
 		}
217 217
 		@unlink($src);
218
-		killme();
218
+		exit();
219 219
 	}
220 220
 
221 221
 	$Image->orient($src);
@@ -253,7 +253,7 @@ function wall_upload_post(App $a, $desktopmode = true)
253 253
 		} else {
254 254
 			echo  $msg. EOL;
255 255
 		}
256
-		killme();
256
+		exit();
257 257
 	}
258 258
 
259 259
 	if ($width > 640 || $height > 640) {
@@ -283,7 +283,7 @@ function wall_upload_post(App $a, $desktopmode = true)
283 283
 		if (!$r) {
284 284
 			if ($r_json) {
285 285
 				echo json_encode(['error' => '']);
286
-				killme();
286
+				exit();
287 287
 			}
288 288
 			return false;
289 289
 		}
@@ -300,7 +300,7 @@ function wall_upload_post(App $a, $desktopmode = true)
300 300
 
301 301
 		if ($r_json) {
302 302
 			echo json_encode(['picture' => $picture]);
303
-			killme();
303
+			exit();
304 304
 		}
305 305
 		Logger::log("upload done", Logger::DEBUG);
306 306
 		return $picture;
@@ -310,10 +310,10 @@ function wall_upload_post(App $a, $desktopmode = true)
310 310
 
311 311
 	if ($r_json) {
312 312
 		echo json_encode(['ok' => true]);
313
-		killme();
313
+		exit();
314 314
 	}
315 315
 
316 316
 	echo  "\n\n" . '[url=' . System::baseUrl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . System::baseUrl() . "/photo/{$hash}-{$smallest}.".$Image->getExt()."[/img][/url]\n\n";
317
-	killme();
317
+	exit();
318 318
 	// NOTREACHED
319 319
 }

+ 1
- 1
mod/webfinger.php View File

@@ -17,7 +17,7 @@ function webfinger_content(App $a)
17 17
 				"description" => L10n::t("Only logged in users are permitted to perform a probing.")
18 18
 			]
19 19
 		);
20
-		killme();
20
+		exit();
21 21
 	}
22 22
 
23 23
 	$o = '<div class="generic-page-wrapper">';

+ 1
- 1
mod/worker.php View File

@@ -58,5 +58,5 @@ function worker_init()
58 58
 
59 59
 	Logger::log("Front end worker ended: ".getmypid());
60 60
 
61
-	killme();
61
+	exit();
62 62
 }

+ 2
- 2
mod/xrd.php View File

@@ -97,7 +97,7 @@ function xrd_json($a, $uri, $alias, $profile_url, $r)
97 97
 	];
98 98
 
99 99
 	echo json_encode($json);
100
-	killme();
100
+	exit();
101 101
 }
102 102
 
103 103
 function xrd_xml($a, $uri, $alias, $profile_url, $r)
@@ -130,5 +130,5 @@ function xrd_xml($a, $uri, $alias, $profile_url, $r)
130 130
 	Addon::callHooks('personal_xrd', $arr);
131 131
 
132 132
 	echo $arr['xml'];
133
-	killme();
133
+	exit();
134 134
 }

+ 2
- 2
src/BaseModule.php View File

@@ -150,8 +150,8 @@ abstract class BaseModule extends BaseObject
150 150
 			$a = \get_app();
151 151
 			Logger::log('checkFormSecurityToken failed: user ' . $a->user['guid'] . ' - form element ' . $typename);
152 152
 			Logger::log('checkFormSecurityToken failed: _REQUEST data: ' . print_r($_REQUEST, true), Logger::DATA);
153
-			header('HTTP/1.1 403 Forbidden');
154
-			killme();
153
+
154
+			System::httpExit(403);
155 155
 		}
156 156
 	}
157 157
 }

+ 1
- 1
src/Core/Renderer.php View File

@@ -96,7 +96,7 @@ class Renderer extends BaseObject
96 96
             $template = $t->getTemplateFile($s, $root);
97 97
         } catch (Exception $e) {
98 98
             echo "<pre><b>" . __FUNCTION__ . "</b>: " . $e->getMessage() . "</pre>";
99
-            killme();
99
+            exit();
100 100
         }
101 101
 
102 102
         $a->saveTimestamp($stamp1, "file");

+ 2
- 2
src/Core/System.php View File

@@ -111,7 +111,7 @@ class System extends BaseObject
111 111
 
112 112
 		echo XML::fromArray($xmldata, $xml);
113 113
 
114
-		killme();
114
+		exit();
115 115
 	}
116 116
 
117 117
 	/**
@@ -185,7 +185,7 @@ class System extends BaseObject
185 185
 	public static function jsonExit($x, $content_type = 'application/json') {
186 186
 		header("Content-type: $content_type");
187 187
 		echo json_encode($x);
188
-		killme();
188
+		exit();
189 189
 	}
190 190
 
191 191
 	/**

+ 3
- 3
src/Module/Oembed.php View File

@@ -25,14 +25,14 @@ class Oembed extends BaseModule
25 25
 		if ($a->argv[1] == 'b2h') {
26 26
 			$url = ["", trim(hex2bin($_REQUEST['url']))];
27 27
 			echo Content\OEmbed::replaceCallback($url);
28
-			killme();
28
+			exit();
29 29
 		}
30 30
 
31 31
 		// Unused form: /oembed/h2b?text=...
32 32
 		if ($a->argv[1] == 'h2b') {
33 33
 			$text = trim(hex2bin($_REQUEST['text']));
34 34
 			echo Content\OEmbed::HTML2BBCode($text);
35
-			killme();
35
+			exit();
36 36
 		}
37 37
 
38 38
 		if ($a->argc == 2) {
@@ -49,6 +49,6 @@ class Oembed extends BaseModule
49 49
 			echo $j->html;
50 50
 			echo '</body></html>';
51 51
 		}
52
-		killme();
52
+		exit();
53 53
 	}
54 54
 }

+ 2
- 7
src/Module/Photo.php View File

@@ -20,7 +20,6 @@ use Friendica\Network\HTTPException\InternalServerErrorException;
20 20
  */
21 21
 class Photo extends BaseModule
22 22
 {
23
-
24 23
 	/**
25 24
 	 * @brief Module initializer
26 25
 	 *
@@ -78,7 +77,7 @@ class Photo extends BaseModule
78 77
 		if ($photo === false) {
79 78
 			// not using System::httpExit() because we don't want html here.
80 79
 			header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found" , true, 404);
81
-			killme();
80
+			exit();
82 81
 		}
83 82
 
84 83
 		$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
90 89
 			System::httpExit(500, ["description" => "Invalid photo with id {$photo["id"]}."]);
91 90
 		}
92 91
 
93
-
94 92
 		// if customsize is set and image is not a gif, resize it
95 93
 		if ($img->getType() !== "image/gif" && $customsize > 0 && $customsize < 501) {
96 94
 			$img->scaleToSquare($customsize);
97 95
 		}
98 96
 
99
-
100 97
 		if (function_exists("header_remove")) {
101 98
 			header_remove("Pragma");
102 99
 			header_remove("pragma");
@@ -117,11 +114,9 @@ class Photo extends BaseModule
117 114
 			header("Cache-Control: max-age=31536000");
118 115
 		}
119 116
 
120
-
121 117
 		echo $img->asString();
122 118
 
123
-
124
-		killme();
119
+		exit();
125 120
 	}
126 121
 
127 122
 	private static function stripExtension($name)

+ 5
- 5
src/Protocol/DFRN.php View File

@@ -171,7 +171,7 @@ class DFRN
171 171
 
172 172
 		if (! DBA::isResult($r)) {
173 173
 			Logger::log(sprintf('No contact found for nickname=%d', $owner_nick), Logger::WARNING);
174
-			killme();
174
+			exit();
175 175
 		}
176 176
 
177 177
 		$owner = $r[0];
@@ -207,7 +207,7 @@ class DFRN
207 207
 
208 208
 			if (! DBA::isResult($r)) {
209 209
 				Logger::log(sprintf('No contact found for uid=%d', $owner_id), Logger::WARNING);
210
-				killme();
210
+				exit();
211 211
 			}
212 212
 
213 213
 			$contact = $r[0];
@@ -353,7 +353,7 @@ class DFRN
353 353
 		$ret = Item::select(Item::DELIVER_FIELDLIST, $condition);
354 354
 		$items = Item::inArray($ret);
355 355
 		if (!DBA::isResult($items)) {
356
-			killme();
356
+			exit();
357 357
 		}
358 358
 
359 359
 		$item = $items[0];
@@ -361,7 +361,7 @@ class DFRN
361 361
 		if ($item['uid'] != 0) {
362 362
 			$owner = User::getOwnerDataById($item['uid']);
363 363
 			if (!$owner) {
364
-				killme();
364
+				exit();
365 365
 			}
366 366
 		} else {
367 367
 			$owner = ['uid' => 0, 'nick' => 'feed-item'];
@@ -1962,7 +1962,7 @@ class DFRN
1962 1962
 		 */
1963 1963
 		if (!DBA::isResult($fcontact)) {
1964 1964
 			// Database record did not get created. Quietly give up.
1965
-			killme();
1965
+			exit();
1966 1966
 		}
1967 1967
 
1968 1968
 		$fid = $r[0]["id"];

+ 1
- 1
src/Render/FriendicaSmartyEngine.php View File

@@ -19,7 +19,7 @@ class FriendicaSmartyEngine implements ITemplateEngine
19 19
 	{
20 20
 		if (!is_writable('view/smarty3/')) {
21 21
 			echo "<b>ERROR:</b> folder <tt>view/smarty3/</tt> must be writable by webserver.";
22
-			killme();
22
+			exit();
23 23
 		}
24 24
 	}
25 25
 

+ 2
- 1
src/Util/Emailer.php View File

@@ -88,8 +88,9 @@ class Emailer
88 88
 			'headers' => $messageHeader,
89 89
 			'parameters' => $sendmail_params
90 90
 		];
91
-		//echo "<pre>"; var_dump($hookdata); killme();
91
+
92 92
 		Addon::callHooks("emailer_send", $hookdata);
93
+
93 94
 		$res = mail(
94 95
 			$hookdata['to'],
95 96
 			$hookdata['subject'],

+ 1
- 1
src/Worker/Cron.php View File

@@ -151,7 +151,7 @@ class Cron
151 151
 			$restart = true;
152 152
 			$generation = intval($generation);
153 153
 			if (!$generation) {
154
-				killme();
154
+				exit();
155 155
 			}
156 156
 		}
157 157
 

Loading…
Cancel
Save