From ce014035e77c5a4c0e825d859c49cda686caa1e8 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 27 Jun 2013 22:29:14 +0200 Subject: [PATCH 1/2] twitter: URLs aren't shortened anymore since twitter is doing it on its own. --- twitter/twitter.php | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/twitter/twitter.php b/twitter/twitter.php index 932708067..1b9f2c1b0 100755 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -421,11 +421,22 @@ function twitter_shortenmsg($b) { if ((strlen(trim($origmsg)) <= ($max_char - 3)) AND strpos($origmsg, $msglink)) return(trim($origmsg)); - if (strlen($msglink) > 20) - $msglink = short_link($msglink); + // Preserve the unshortened link + $orig_link = $msglink; - if (strlen(trim($msg." ".$msglink)) > ($max_char - 3)) { - $msg = substr($msg, 0, ($max_char - 3) - (strlen($msglink))); + //if (strlen($msglink) > 20) + // $msglink = short_link($msglink); + // + //if (strlen(trim($msg." ".$msglink)) > ($max_char - 3)) { + // $msg = substr($msg, 0, ($max_char - 3) - (strlen($msglink))); + + // Just replace the message link with a 15 character long string + // Twitter shortens it anyway to this length + if (trim($msglink) <> '') + $msglink = "123456789012345"; + + if (strlen(trim($msg." ".$msglink)) > ($max_char)) { + $msg = substr($msg, 0, ($max_char) - (strlen($msglink))); $lastchar = substr($msg, -1); $msg = substr($msg, 0, -1); $pos = strrpos($msg, "\n"); @@ -440,7 +451,8 @@ function twitter_shortenmsg($b) { while (strpos($msg, " ") !== false) $msg = str_replace(" ", " ", $msg); - return(trim($msg." ".$msglink)); + //return(trim($msg." ".$msglink)); + return(trim($msg." ".$orig_link)); } function twitter_post_hook(&$a,&$b) { From c4315ad631e9b6c5d618ba807cf416ea85de89bd Mon Sep 17 00:00:00 2001 From: repat Date: Sat, 29 Jun 2013 01:00:49 +0200 Subject: [PATCH 2/2] typo --- webrtc/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/README.md b/webrtc/README.md index d29500a67..4f6c55cac 100644 --- a/webrtc/README.md +++ b/webrtc/README.md @@ -19,6 +19,6 @@ question). If the test is successful then proceed with copying the webrtc instance you would like to use and place it in the config window and save. Now when you -opent he app it will load the webrtc instance for you to use. +open the app it will load the webrtc instance for you to use. [1]: https://en.wikipedia.org/wiki/WebRTC