{
if (($a->argc != 3) || (!in_array($a->argv[1], ["post", "status_message", "reshare"]))) {
- header($_SERVER["SERVER_PROTOCOL"].' 404 '.L10n::t('Not Found'));
- killme();
+ System::httpExit(404, ['title' => L10n::t('Not found.')]);
}
$guid = $a->argv[2];
}
}
- header($_SERVER["SERVER_PROTOCOL"].' 404 '.L10n::t('Not Found'));
- killme();
+ System::httpExit(404, ['title' => L10n::t('Not found.')]);
}
// Fetch some data from the author (We could combine both queries - but I think this is more readable)
$user = User::getOwnerDataById($item["uid"]);
if (!$user) {
- header($_SERVER["SERVER_PROTOCOL"].' 404 '.L10n::t('Not Found'));
- killme();
+ System::httpExit(404, ['title' => L10n::t('Not found.')]);
}
$status = Diaspora::buildStatus($item, $user);
use Friendica\Model\Contact;
use Friendica\Protocol\OStatus;
use Friendica\Util\Strings;
+use Friendica\Core\System;
require_once 'include/items.php';
header($_SERVER["SERVER_PROTOCOL"] . ' 200 OK');
echo $body;
} else {
- header($_SERVER["SERVER_PROTOCOL"] . ' 404 Not Found');
+ System::httpExit(404, ['title' => L10n::t('Not found.')]);
}
killme();
}