From 2f81fb438508436ad6424c53f0f2dc878969b929 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 20 Aug 2012 06:34:54 -0700 Subject: upstream fixes --- include/bbcode.php | 1 + include/conversation.php | 50 ++++++++++++++++++++++++------------------------ 2 files changed, 26 insertions(+), 25 deletions(-) (limited to 'include') diff --git a/include/bbcode.php b/include/bbcode.php index 0889e76ce..f43d2f547 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -324,6 +324,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $Text = preg_replace("/\[crypt\](.*?)\[\/crypt\]/ism",'
' . t('Encrypted content') . '
', $Text); + $Text = preg_replace("/\[crypt=(.*?)\](.*?)\[\/crypt\]/ism",'
' . t('Encrypted content') . '
', $Text); // Try to Oembed if ($tryoembed) { diff --git a/include/conversation.php b/include/conversation.php index 0d770ef40..2edb551a5 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -432,37 +432,37 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr $template = $wallwall_template; $commentww = 'ww'; } - } - else if($item['owner-link']) { + else if($item['owner-link']) { - $owner_linkmatch = (($item['owner-link']) && link_compare($item['owner-link'],$item['author-link'])); - $alias_linkmatch = (($item['alias']) && link_compare($item['alias'],$item['author-link'])); - $owner_namematch = (($item['owner-name']) && $item['owner-name'] == $item['author-name']); - if((! $owner_linkmatch) && (! $alias_linkmatch) && (! $owner_namematch)) { + $owner_linkmatch = (($item['owner-link']) && link_compare($item['owner-link'],$item['author-link'])); + $alias_linkmatch = (($item['alias']) && link_compare($item['alias'],$item['author-link'])); + $owner_namematch = (($item['owner-name']) && $item['owner-name'] == $item['author-name']); + if((! $owner_linkmatch) && (! $alias_linkmatch) && (! $owner_namematch)) { - // The author url doesn't match the owner (typically the contact) - // and also doesn't match the contact alias. - // The name match is a hack to catch several weird cases where URLs are - // all over the park. It can be tricked, but this prevents you from - // seeing "Bob Smith to Bob Smith via Wall-to-wall" and you know darn - // well that it's the same Bob Smith. + // The author url doesn't match the owner (typically the contact) + // and also doesn't match the contact alias. + // The name match is a hack to catch several weird cases where URLs are + // all over the park. It can be tricked, but this prevents you from + // seeing "Bob Smith to Bob Smith via Wall-to-wall" and you know darn + // well that it's the same Bob Smith. - // But it could be somebody else with the same name. It just isn't highly likely. + // But it could be somebody else with the same name. It just isn't highly likely. - $owner_url = $item['owner-link']; - $owner_photo = $item['owner-avatar']; - $owner_name = $item['owner-name']; - $template = $wallwall_template; - $commentww = 'ww'; - // If it is our contact, use a friendly redirect link - if((link_compare($item['owner-link'],$item['url'])) - && ($item['network'] === NETWORK_DFRN)) { - $owner_url = $redirect_url; - $osparkle = ' sparkle'; + $owner_url = $item['owner-link']; + $owner_photo = $item['owner-avatar']; + $owner_name = $item['owner-name']; + $template = $wallwall_template; + $commentww = 'ww'; + // If it is our contact, use a friendly redirect link + if((link_compare($item['owner-link'],$item['url'])) + && ($item['network'] === NETWORK_DFRN)) { + $owner_url = $redirect_url; + $osparkle = ' sparkle'; + } + else + $owner_url = zrl($owner_url); } - else - $owner_url = zrl($owner_url); } } if($profile_owner == local_user()) { -- cgit v1.2.3