Twitter, Statusnet: Supress profile link of user whose message was repeated

libertree: Design improvement of exported messages
privacy_image_cache: quickfix for double encoded urls
This commit is contained in:
Michael Vogel 2012-06-23 12:50:48 +02:00
parent fe7c741eed
commit 471b5db36f
4 changed files with 46 additions and 26 deletions

View file

@ -118,7 +118,7 @@ function libertree_post_local(&$a,&$b) {
if($b['private'] || $b['parent'])
return;
$ltree_post = intval(get_pconfig(local_user(),'libertree','post'));
$ltree_post = intval(get_pconfig(local_user(),'libertree','post'));
$ltree_enable = (($ltree_post && x($_REQUEST,'libertree_enable')) ? intval($_REQUEST['libertree_enable']) : 0);
@ -176,6 +176,12 @@ function libertree_send(&$a,&$b) {
$body = str_ireplace("[quote", "\n\n[quote", $body);
$body = str_ireplace("[/quote]", "[/quote]\n\n", $body);
// Removal of tags and mentions
// #-tags
$body = preg_replace('/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', '#$2', $body);
// @-mentions
$body = preg_replace('/@\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', '@$2', $body);
// remove multiple newlines
do {
$oldbody = $body;