X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FBookmarklet.php;h=fab9dbc6c59e56fcc243d6744bad021b78b99c4f;hb=15caf4b3f7eacda399a56b1ad8eeb9d3257306d9;hp=5cd908488eed42dfee08882ac7b4475bd8fce4b3;hpb=f2da1c5ab981ad273961eec86a8efdb5e4f01b5c;p=friendica.git
diff --git a/src/Module/Bookmarklet.php b/src/Module/Bookmarklet.php
index 5cd908488e..fab9dbc6c5 100644
--- a/src/Module/Bookmarklet.php
+++ b/src/Module/Bookmarklet.php
@@ -1,10 +1,29 @@
.
+ *
+ */
namespace Friendica\Module;
use Friendica\BaseModule;
+use Friendica\Content\PageInfo;
use Friendica\Core\ACL;
-use Friendica\Core\L10n;
use Friendica\DI;
use Friendica\Module\Security\Login;
use Friendica\Network\HTTPException;
@@ -24,7 +43,7 @@ class Bookmarklet extends BaseModule
$config = DI::config();
if (!local_user()) {
- $output = '
' . L10n::t('Login') . '
';
+ $output = '' . DI::l10n()->t('Login') . '
';
$output .= Login::form(DI::args()->getQueryString(), intval($config->get('config', 'register_policy')) === Register::CLOSED ? false : true);
return $output;
}
@@ -34,10 +53,10 @@ class Bookmarklet extends BaseModule
if (!strstr($referer, $page)) {
if (empty($_REQUEST["url"])) {
- throw new HTTPException\BadRequestException(L10n::t('This page is missing a url parameter.'));
+ throw new HTTPException\BadRequestException(DI::l10n()->t('This page is missing a url parameter.'));
}
- $content = add_page_info($_REQUEST["url"]);
+ $content = "\n" . PageInfo::getFooterFromUrl($_REQUEST['url']);
$x = [
'is_owner' => true,
@@ -56,7 +75,7 @@ class Bookmarklet extends BaseModule
$output = status_editor($app, $x, 0, false);
$output .= "";
} else {
- $output = '' . L10n::t('The post was created') . '
';
+ $output = '' . DI::l10n()->t('The post was created') . '
';
$output .= "";
}