mirror of
https://github.com/friendica/friendica
synced 2025-04-25 05:10:11 +00:00
New function to exit the program
This commit is contained in:
parent
4e9d7df31a
commit
f6167b4cfd
27 changed files with 73 additions and 94 deletions
|
@ -23,6 +23,7 @@ namespace Friendica\Module;
|
|||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Content;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
|
@ -43,16 +44,14 @@ class Oembed extends BaseModule
|
|||
if (DI::args()->getArgv()[1] == 'b2h') {
|
||||
$url = ["", trim(hex2bin($_REQUEST['url']))];
|
||||
echo Content\OEmbed::replaceCallback($url);
|
||||
DI::page()->logRuntime();
|
||||
exit();
|
||||
System::exit();
|
||||
}
|
||||
|
||||
// Unused form: /oembed/h2b?text=...
|
||||
if (DI::args()->getArgv()[1] == 'h2b') {
|
||||
$text = trim(hex2bin($_REQUEST['text']));
|
||||
echo Content\OEmbed::HTML2BBCode($text);
|
||||
DI::page()->logRuntime();
|
||||
exit();
|
||||
System::exit();
|
||||
}
|
||||
|
||||
// @TODO: Replace with parameter from router
|
||||
|
@ -70,7 +69,6 @@ class Oembed extends BaseModule
|
|||
echo $j->html;
|
||||
echo '</body></html>';
|
||||
}
|
||||
DI::page()->logRuntime();
|
||||
exit();
|
||||
System::exit();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue