Commit 3c4b2833 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon

Bug 1851165: filter tags by owner id


Change-Id: Ib973889a28b5a3319ffc2fbc6c240ba802d7a7ea
(cherry picked from commit ddbf98b7)
parent 929c897f
......@@ -104,7 +104,7 @@ function display_tag($name, $alltags, $showcount = false) {
else {
$tag = $alltags[$name]->tag;
if ($showcount) {
if ($showcount && $alltags[$name]->count > 0) {
$tag .= ' (' . $alltags[$name]->count . ')';
return $tag;
......@@ -212,7 +212,7 @@ function get_all_tags_for_user($query = null, $limit = null, $offset = null, $in
FROM {tag} t
LEFT JOIN {tag} t2 ON" . $typecast . " = SUBSTRING(t.tag, 7)
LEFT JOIN {institution} i ON = t2.ownerid AND t2.resourcetype = 'institution'
WHERE t.editedby=? AND t.resourcetype IN ('artefact', 'view', 'collection', 'blocktype')
WHERE t.ownertype='user' AND t.ownerid=? AND t.resourcetype IN ('artefact', 'view', 'collection', 'blocktype')
-- Selecting tags used in institution section that you belong to
" . $userinstitutiontags . "
......@@ -46,7 +46,7 @@ Scenario: Creating institution tags
And I choose "Journals" in "Create" from main menu
And I click on "Mars journal"
And I click on "Edit" in "Mars party" row
And I fill in select2 input "editpost_tags" with "One tag" and select "Institution One: One tag (0)"
And I fill in select2 input "editpost_tags" with "One tag" and select "Institution One: One tag"
And I press "Save entry"
Given I choose "Pages and collections" in "Create" from main menu
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment