Remove dependency for twitter addon

This commit is contained in:
Art4 2024-11-16 10:37:48 +00:00
parent 2b6cc5378f
commit fca8de40a1

View file

@ -234,9 +234,6 @@ class Babel extends BaseModule
case 'twitter':
$json = trim($request['text']);
if (file_exists('addon/twitter/twitter.php')) {
require_once 'addon/twitter/twitter.php';
$status = json_decode($json);
$results[] = [
@ -262,12 +259,6 @@ class Babel extends BaseModule
'title' => DI::l10n()->t('Post array before expand entities'),
'content' => $visible_whitespace(var_export($postarray, true)),
];
} else {
$results[] = [
'title' => DI::l10n()->tt('Error', 'Errors', 1),
'content' => DI::l10n()->t('Twitter addon is absent from the addon/ folder.'),
];
}
break;
}