From: Michael Vogel Date: Fri, 15 May 2015 18:56:05 +0000 (+0200) Subject: The intelligent shortening for social media systems like Twitter, GNU Social and... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d995fc3994a065d068679edb09afd03483079f10;p=friendica.git The intelligent shortening for social media systems like Twitter, GNU Social and App.net can now be disabled. --- diff --git a/include/plaintext.php b/include/plaintext.php index 88febbfff8..c8cdfa57df 100644 --- a/include/plaintext.php +++ b/include/plaintext.php @@ -182,6 +182,8 @@ function plaintext($a, $b, $limit = 0, $includedlinks = false, $htmlmode = 2) { $post["url"] = $b["plink"]; } elseif (strpos($b["body"], "[share") !== false) $post["url"] = $b["plink"]; + elseif (get_pconfig($b["uid"], "system", "no_intelligent_shortening")) + $post["url"] = $b["plink"]; $msg = shortenmsg($msg, $limit); } diff --git a/mod/settings.php b/mod/settings.php index 7db196b030..da987260ca 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -177,7 +177,9 @@ function settings_post(&$a) { check_form_security_token_redirectOnErr('/settings/connectors', 'settings_connectors'); - if(x($_POST, 'imap-submit')) { + if(x($_POST, 'general-submit')) { + set_pconfig(local_user(), 'system', 'no_intelligent_shortening', $_POST['no_intelligent_shortening']); + } elseif(x($_POST, 'imap-submit')) { $mail_server = ((x($_POST,'mail_server')) ? $_POST['mail_server'] : ''); $mail_port = ((x($_POST,'mail_port')) ? $_POST['mail_port'] : ''); @@ -733,7 +735,24 @@ function settings_content(&$a) { if(($a->argc > 1) && ($a->argv[1] === 'connectors')) { - $settings_connectors = ""; + $settings_connectors = ''; + $settings_connectors .= '

'. t('General Social Media Settings').'

'; + $settings_connectors .= '
'; + $settings_connectors .= '
'; call_hooks('connector_settings', $settings_connectors);