diff options
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php index 5c8242e79..ef2fc2371 100644 --- a/include/text.php +++ b/include/text.php @@ -1946,9 +1946,9 @@ function find_xchan_in_array($xchan,$arr) { } function get_rel_link($j,$rel) { - if(count($j)) + if(is_array($j) && ($j)) foreach($j as $l) - if($l['rel'] === $rel) + if(array_key_exists('rel',$j) && $l['rel'] === $rel && array_key_exists('href',$l)) return $l['href']; return ''; @@ -2297,6 +2297,7 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag) { } } else { + // check for a group/collection exclusion tag // note that we aren't setting $replaced even though we're replacing text. @@ -2357,6 +2358,8 @@ function linkify_tags($a, &$body, $uid) { $tags = get_tags($body); if(count($tags)) { foreach($tags as $tag) { + $access_tag = ''; + // If we already tagged 'Robert Johnson', don't try and tag 'Robert'. // Robert Johnson should be first in the $tags array @@ -2388,6 +2391,7 @@ function getIconFromType($type) { $iconMap = array( //Folder t('Collection') => 'icon-folder-close', + 'multipart/mixed' => 'icon-folder-close', //dirs in attach use this mime type //Common file 'application/octet-stream' => 'icon-file-alt', //Text |