if ($spawn) {
Worker::spawnWorker();
- killme();
+ exit();
}
$run_cron = !array_key_exists('n', $options) && !array_key_exists('no_cron', $options);
$r = $oauth1->fetch_request_token(OAuthRequest::from_request());
} catch (Exception $e) {
echo "error=" . OAuthUtil::urlencode_rfc3986($e->getMessage());
- killme();
+ exit();
}
echo $r;
- killme();
+ exit();
}
/**
$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
*/
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);
}
}
$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);
}
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);
}
}
System::httpExit(404);
- killme();
}
function wk_social_relay()
if ($a->isAjax()) {
echo $o;
- killme();
- return '';
+ exit();
} else {
return $o;
}
}
}
JSON;
- killme();
+ exit();
}
} catch (Exception $e) {
echo "<pre>";
var_dump($e);
- killme();
+ exit();
}
if (!empty($_POST['oauth_yes'])) {
$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");
}
echo api_call($a);
- killme();
+ exit();
}
}
echo $r[0]['data'];
- killme();
+ exit();
// NOTREACHED
}
if (!empty($a->argv[2]) && ($a->argv[2] === 'json')) {
echo json_encode($events);
- killme();
+ exit();
}
// links: array('href', 'text', 'extra css classes', 'title')
if (!empty($_GET['id'])) {
echo $o;
- killme();
+ exit();
}
return $o;
header('Content-type: text/calendar');
header('content-disposition: attachment; filename="' . L10n::t('calendar') . '-' . $nick . '.' . $evexport["extension"] . '"');
echo $evexport["content"];
- killme();
+ exit();
}
return;
function contactgroup_content(App $a)
{
if (!local_user()) {
- killme();
+ exit();
}
$change = null;
intval(local_user())
);
if (!DBA::isResult($r)) {
- killme();
+ exit();
}
$group = $r[0];
}
}
- killme();
+ exit();
}
$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 = [];
$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);
. "\t" . '<challenge>' . $challenge . '</challenge>' . "\r\n"
. '</dfrn_notify>' . "\r\n";
- killme();
+ exit();
}
}
$nickname = $a->argv[1];
header("Content-type: application/atom+xml");
echo OStatus::feed($nickname, $last_update, 10);
- killme();
+ exit();
}
$direction = -1;
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))) {
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
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
}
}
);
if (!DBA::isResult($r)) {
- killme();
+ exit();
}
$type = $r[0]['type'];
$r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 $sql_extra LIMIT 1");
if (!DBA::isResult($r)) {
- killme();
+ exit();
}
$contact = $r[0];
<description>$text</description>
</reputation>
";
- killme();
+ exit();
// NOTREACHED
} else {
// Update the writable flag if it changed
header("Content-type: application/atom+xml");
$o = DFRN::feed($dfrn_id, $a->argv[1], $last_update, $direction);
echo $o;
- killme();
+ exit();
}
}
. "\t" . '<dfrn_id>' . $encrypted_id . '</dfrn_id>' . "\r\n"
. "\t" . '<challenge>' . $challenge . '</challenge>' . "\r\n"
. '</dfrn_poll>' . "\r\n";
- killme();
+ exit();
// NOTREACHED
}
}
}
}
- killme();
- return; // NOTREACHED
+ exit();
} else {
// Normal web request. Display our user's introduction form.
if ((Config::get('system', 'block_public')) && (!local_user()) && (!remote_user())) {
}
header("Content-type: application/atom+xml");
echo $xml;
- killme();
+ exit();
}
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);
}
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);
}
if (!empty($_GET['id'])) {
echo $o;
- killme();
+ exit();
}
return $o;
function fbrowser_content(App $a)
{
if (!local_user()) {
- killme();
+ exit();
}
if ($a->argc == 1) {
- killme();
+ exit();
}
$template_file = "filebrowser.tpl";
return $o;
} else {
echo $o;
- killme();
+ exit();
}
}
header("HTTP/1.1 301 Moved Permanently");
header("Location:".$location);
- killme();
+ exit();
}
}
header("Content-Type: application/magic-envelope+xml; charset=utf-8");
echo Diaspora::buildMagicEnvelope($xml, $user);
- killme();
+ exit();
}
function filer_content(App $a)
{
if (! local_user()) {
- killme();
+ exit();
}
$term = XML::unescape(trim(defaults($_GET, 'term', '')));
echo $o;
}
- killme();
+ exit();
}
{
if (! local_user())
{
- killme();
+ exit();
}
$term = XML::unescape(trim($_GET['term']));
}
$a->internalRedirect('/network?f=&file=' . rawurlencode($term));
- killme();
+ exit();
}
header('Content-type: application/json; charset=utf-8');
echo json_encode($data);
- killme();
+ exit();
}
}
if ($change) {
$tpl = Renderer::getMarkupTemplate('groupeditor.tpl');
echo Renderer::replaceMacros($tpl, $context);
- killme();
+ exit();
}
return Renderer::replaceMacros($tpl, $context);
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
function ignored_init(App $a)
{
if (!local_user()) {
- killme();
+ exit();
}
if ($a->argc > 1) {
}
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
// the json doesn't really matter, it will either be 0 or 1
echo json_encode($ignored);
- killme();
+ exit();
}
drop_items($arr_drop);
$json = ['success' => 1];
echo json_encode($json);
- killme();
+ exit();
}
Addon::callHooks('post_local_start', $_REQUEST);
if (!empty($_REQUEST['return'])) {
$a->internalRedirect($return_path);
}
- killme();
+ exit();
}
$parent = $parent_item['id'];
$a->internalRedirect($return_path);
}
- killme();
+ exit();
}
// Init post instance
if (!strlen($body)) {
if ($preview) {
- killme();
+ exit();
}
info(L10n::t('Empty post discarded.') . EOL);
if (!empty($_REQUEST['return'])) {
$a->internalRedirect($return_path);
}
- killme();
+ exit();
}
}
}
echo json_encode($json);
- killme();
+ exit();
}
if ($orig_post) {
Logger::log('return: ' . $return_path);
$a->internalRedirect($return_path);
}
- killme();
+ exit();
} else {
$post_id = 0;
}
Logger::log('post_json: ' . print_r($json, true), Logger::DEBUG);
echo json_encode($json);
- killme();
+ exit();
}
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();
}
}
$return_path = defaults($_REQUEST, 'return', '');
like_content_return($a, $return_path);
- killme(); // NOTREACHED
+ exit();
}
$a->internalRedirect($return_path . $rand);
}
-
- killme();
}
}
if (!$item_id) {
- killme();
+ exit();
}
if (!in_array($type, ['item','photo','event'])) {
- killme();
+ exit();
}
$fields = ['uid', 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid'];
}
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'])
&& empty($item['deny_gid']))
{
echo L10n::t('Remote privacy information not available.') . '<br />';
- killme();
+ exit();
}
$allowed_users = expand_acl($item['allow_cid']);
}
echo $o . implode(', ', $l);
- killme();
+ exit();
}
echo $o;
- killme();
+ exit();
}
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",
);
if (! DBA::isResult($r)) {
- killme();
+ exit();
}
$lines = explode("\n",$r[0]['spubkey']);
header("Content-type: application/magic-public-key");
echo 'RSA' . '.' . $m . '.' . $e;
- killme();
+ exit();
}
$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');
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'));
$addon = 'statistics_json';
$addons = Config::get('system', 'addon');
- $addons_arr = [];
if ($addons) {
$addons_arr = explode(',',str_replace(' ', '',$addons));
if ($a->argc > 1) {
$which = $a->argv[1];
} else {
- killme();
+ exit();
}
$profile = 0;
$r = $nm->setAllSeen();
$j = json_encode(['result' => ($r) ? 'success' : 'fail']);
echo $j;
- killme();
+ exit();
}
}
$o = Renderer::replaceMacros($tpl, ['$base' => System::baseUrl()]);
echo $o;
- killme();
+ exit();
}
}
echo $o;
- killme();
+ exit();
}
if (!$can_post) {
notice(L10n::t('Permission denied.') . EOL);
- killme();
+ exit();
}
$owner_record = User::getOwnerDataById($page_owner_uid);
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') {
@unlink($src);
$foo = 0;
Addon::callHooks('photo_post_end',$foo);
- killme();
+ exit();
}
$exif = $image->orient($src);
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) {
}
phpinfo();
- killme();
+ exit();
}
header("Content-type: text/xml");
echo XML::fromArray($data, $xml);
}
- killme();
+ exit();
}
$notifs = ping_get_notifications(local_user());
echo XML::fromArray(["result" => $data], $xml);
}
- killme();
+ exit();
}
/**
$ret = PortableContact::serverlist();
header('Content-type: application/json');
echo json_encode($ret);
- killme();
+ exit();
}
if ($a->argc > 1 && $a->argv[1] === '@global') {
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);
}
echo json_encode(['img' => Theme::getScreenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits]);
}
- killme();
+ exit();
}
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">';
);
if(! DBA::isResult($r1)) {
notice(L10n::t('Profile unavailable to clone.') . EOL);
- killme();
+ exit();
return;
}
unset($r1[0]['id']);
);
if (! DBA::isResult($r)) {
notice(L10n::t('Profile not found.') . EOL);
- killme();
+ exit();
return;
}
if (!empty($change)) {
echo $o;
- killme();
+ exit();
}
$o .= '</div>';
return $o;
} else {
System::httpExit(404);
}
- killme();
+ exit();
}
// when receiving an XML feed, always return OK
System::httpExit(202);
}
- killme();
+ exit();
}
foreach ($allDisalloweds as $disallowed) {
echo 'Disallow: ' . $disallowed . PHP_EOL;
}
- killme();
+ exit();
}
</service>
</rsd>';
- killme();
+ exit();
}
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;
}
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
$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',
$item = Item::selectFirst($fields, ['id' => $post_id]);
if (!DBA::isResult($item) || $item['private'] == 1) {
- killme();
+ exit();
}
if (strpos($item['body'], "[/share]") !== false) {
}
echo $o;
- killme();
+ exit();
}
/// @TODO Rewrite to handle over whole record array
$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'])) {
// the json doesn't really matter, it will either be 0 or 1
echo json_encode($starred);
- killme();
+ exit();
}
if (!Config::get("system", "nodeinfo")) {
System::httpExit(404);
- killme();
}
$statistics = [
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();
}
Addon::callHooks('post_local_end', $arr);
- killme();
+ exit();
}
Worker::add(PRIORITY_HIGH, "Notifier", "tag", $post_id);
- killme();
-
- return; // NOTREACHED
+ exit();
}
function uexport_init(App $a) {
if (!local_user()) {
- killme();
+ exit();
}
require_once("mod/settings.php");
switch ($a->argv[1]) {
case "backup":
uexport_all($a);
- killme();
+ exit();
break;
case "account":
uexport_account($a);
- killme();
+ exit();
break;
default:
- killme();
+ exit();
}
}
'group_member' => $group_member,
];
- //echo "<pre>"; var_dump(json_encode($output)); killme();
echo json_encode($output, JSON_PARTIAL_OUTPUT_ON_ERROR);
}
// 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),
echo str_replace("\t", " ", $text);
echo "</section>";
echo "</body></html>\r\n";
- killme();
+ exit();
}
echo str_replace("\t", " ", $text);
echo "</section>";
echo "</body></html>\r\n";
- killme();
+ exit();
}
echo str_replace("\t", " ", $text);
echo "</section>";
echo "</body></html>\r\n";
- killme();
+ exit();
}
function update_network_content(App $a)
{
if (!isset($_GET['p']) || !isset($_GET['item'])) {
- killme();
+ exit();
}
$profile_uid = intval($_GET['p']);
echo str_replace("\t", " ", $text);
echo "</section>";
echo "</body></html>\r\n";
- killme();
+ exit();
}
echo str_replace("\t", " ", $text);
echo "</section>";
echo "</body></html>\r\n";
- killme();
+ exit();
}
\ No newline at end of file
echo str_replace("\t", " ", $text);
echo "</section>";
echo "</body></html>\r\n";
- killme();
+ exit();
}
\ No newline at end of file
require_once("view/theme/$theme/style.php");
}
- killme();
+ exit();
}
if (DBA::isResult($item)) {
if ($a->isAjax()) {
echo str_replace("\n", '<br />', $item['body']);
- killme();
+ exit();
} else {
$o .= str_replace("\n", '<br />', $item['body']);
}
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;
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'];
notice($msg . EOL);
}
@unlink($src);
- killme();
+ exit();
}
if ($maxfilesize && $filesize > $maxfilesize) {
echo $msg . EOL;
}
@unlink($src);
- killme();
+ exit();
}
$filedata = @file_get_contents($src);
} else {
echo $msg . EOL;
}
- killme();
+ exit();
}
$r = q("SELECT `id` FROM `attach` WHERE `uid` = %d AND `created` = '%s' AND `hash` = '%s' LIMIT 1",
} 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
}
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;
}
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 = '';
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
echo $msg. EOL;
}
@unlink($src);
- killme();
+ exit();
}
$imagedata = @file_get_contents($src);
echo $msg. EOL;
}
@unlink($src);
- killme();
+ exit();
}
$Image->orient($src);
} else {
echo $msg. EOL;
}
- killme();
+ exit();
}
if ($width > 640 || $height > 640) {
if (!$r) {
if ($r_json) {
echo json_encode(['error' => '']);
- killme();
+ exit();
}
return false;
}
if ($r_json) {
echo json_encode(['picture' => $picture]);
- killme();
+ exit();
}
Logger::log("upload done", Logger::DEBUG);
return $picture;
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
}
"description" => L10n::t("Only logged in users are permitted to perform a probing.")
]
);
- killme();
+ exit();
}
$o = '<div class="generic-page-wrapper">';
Logger::log("Front end worker ended: ".getmypid());
- killme();
+ exit();
}
];
echo json_encode($json);
- killme();
+ exit();
}
function xrd_xml($a, $uri, $alias, $profile_url, $r)
Addon::callHooks('personal_xrd', $arr);
echo $arr['xml'];
- killme();
+ exit();
}
$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);
}
}
}
$template = $t->getTemplateFile($s, $root);
} catch (Exception $e) {
echo "<pre><b>" . __FUNCTION__ . "</b>: " . $e->getMessage() . "</pre>";
- killme();
+ exit();
}
$a->saveTimestamp($stamp1, "file");
echo XML::fromArray($xmldata, $xml);
- killme();
+ exit();
}
/**
public static function jsonExit($x, $content_type = 'application/json') {
header("Content-type: $content_type");
echo json_encode($x);
- killme();
+ exit();
}
/**
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) {
echo $j->html;
echo '</body></html>';
}
- killme();
+ exit();
}
}
*/
class Photo extends BaseModule
{
-
/**
* @brief Module initializer
*
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);
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");
header("Cache-Control: max-age=31536000");
}
-
echo $img->asString();
-
- killme();
+ exit();
}
private static function stripExtension($name)
if (! DBA::isResult($r)) {
Logger::log(sprintf('No contact found for nickname=%d', $owner_nick), Logger::WARNING);
- killme();
+ exit();
}
$owner = $r[0];
if (! DBA::isResult($r)) {
Logger::log(sprintf('No contact found for uid=%d', $owner_id), Logger::WARNING);
- killme();
+ exit();
}
$contact = $r[0];
$ret = Item::select(Item::DELIVER_FIELDLIST, $condition);
$items = Item::inArray($ret);
if (!DBA::isResult($items)) {
- killme();
+ exit();
}
$item = $items[0];
if ($item['uid'] != 0) {
$owner = User::getOwnerDataById($item['uid']);
if (!$owner) {
- killme();
+ exit();
}
} else {
$owner = ['uid' => 0, 'nick' => 'feed-item'];
*/
if (!DBA::isResult($fcontact)) {
// Database record did not get created. Quietly give up.
- killme();
+ exit();
}
$fid = $r[0]["id"];
{
if (!is_writable('view/smarty3/')) {
echo "<b>ERROR:</b> folder <tt>view/smarty3/</tt> must be writable by webserver.";
- killme();
+ exit();
}
}
'headers' => $messageHeader,
'parameters' => $sendmail_params
];
- //echo "<pre>"; var_dump($hookdata); killme();
+
Addon::callHooks("emailer_send", $hookdata);
+
$res = mail(
$hookdata['to'],
$hookdata['subject'],
$restart = true;
$generation = intval($generation);
if (!$generation) {
- killme();
+ exit();
}
}