<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\BaseModule;
use Friendica\Content;
+use Friendica\Core\System;
use Friendica\DI;
use Friendica\Util\Strings;
*/
class Oembed extends BaseModule
{
- public function content(): string
+ protected function content(array $request = []): string
{
// Unused form: /oembed/b2h?url=...
if (DI::args()->getArgv()[1] == 'b2h') {
$url = ["", trim(hex2bin($_REQUEST['url']))];
echo Content\OEmbed::replaceCallback($url);
- exit();
+ System::exit();
}
// Unused form: /oembed/h2b?text=...
if (DI::args()->getArgv()[1] == 'h2b') {
$text = trim(hex2bin($_REQUEST['text']));
echo Content\OEmbed::HTML2BBCode($text);
- exit();
+ System::exit();
}
// @TODO: Replace with parameter from router
echo $j->html;
echo '</body></html>';
}
- exit();
+ System::exit();
}
}