Commit c0964b81 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon
Browse files

Bug 1795190: no links in tags for group/institution/site pages

behatnotneeded

Change-Id: Idb527694337a2f80703978d285eed34fd81ce56a
(cherry picked from commit fd0a84f5)
parent 05bea899
......@@ -27,9 +27,14 @@ function PluginListTags(Core $core, $tags, $owner, $view = null) {
if (!is_array($tags)) {
return '';
}
if ($view) {
$viewobj= new View($view);
}
foreach ($tags as &$t) {
if ($owner != $USER->get('id')) {
if ($view && !$viewobj->get('owner')) {
$t = (is_array($t) ? hsc(str_shorten_text($t['tag'], 50)) : hsc(str_shorten_text($t, 50)));
}
else if ($owner != $USER->get('id')) {
if (is_array($t)) {
$t = '<a class="tag" href="' . get_config('wwwroot') . 'relatedtags.php?tag=' . urlencode($t['tag']) . '&view=' . $t['view'] . '">' . hsc(str_shorten_text($t['tag'], 50)) . '</a>';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment