X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FClientSideShorten%2FClientSideShortenPlugin.php;h=65e27a0374988bdbf5f1dcd71ad7250259e54069;hb=59119482ca34540bd7f0a2a1aa994de1d5328ea2;hp=27a3a56f72d2e3cd62db96aaf3d366a03acef5b2;hpb=1652ded48c9c62c40157a5142e5231adbc574ddb;p=quix0rs-gnu-social.git diff --git a/plugins/ClientSideShorten/ClientSideShortenPlugin.php b/plugins/ClientSideShorten/ClientSideShortenPlugin.php index 27a3a56f72..65e27a0374 100644 --- a/plugins/ClientSideShorten/ClientSideShortenPlugin.php +++ b/plugins/ClientSideShorten/ClientSideShortenPlugin.php @@ -51,8 +51,10 @@ class ClientSideShortenPlugin extends Plugin } function onEndShowScripts($action){ - $action->inlineScript('var Notice_maxContent = ' . Notice::maxContent()); if (common_logged_in()) { + $user = common_current_user(); + $action->inlineScript('var maxNoticeLength = ' . User_urlshortener_prefs::maxNoticeLength($user)); + $action->inlineScript('var maxUrlLength = ' . User_urlshortener_prefs::maxUrlLength($user)); $action->script('plugins/ClientSideShorten/shorten.js'); } }