Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Purr admin tags displaying improperly #1608

Merged
merged 2 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/components/com_publications/helpers/tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public function count_tags($admin=0)
public function get_tag_cloud($showsizes=0, $admin=0, $objectid=null)
{
$cloud = new Cloud($objectid, $this->_tbl);
return $cloud->render();
return $cloud->render('html', array('admin' => $admin));
dbenham marked this conversation as resolved.
Show resolved Hide resolved
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
</div>
<?php } ?>
<?php if ($this->publication->params->get('show_tags')) {
$this->publication->getTagCloud( $this->authorized );
$this->publication->getTagCloud(User::authorise('core.admin')?1:0);
dbenham marked this conversation as resolved.
Show resolved Hide resolved
?>
<?php if ($this->publication->_tagCloud) { ?>
<h4><?php echo Lang::txt('COM_PUBLICATIONS_TAGS'); ?></h4>
Expand Down
5 changes: 1 addition & 4 deletions core/components/com_tags/models/cloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,7 @@ public function tags($rtrn='', $filters=array(), $clear=false)
// Filter out admin tags - JBG
$results->whereNotIn('admin', [1]);
}
else
{
$results->whereEquals('admin', (int) $filters['admin']);
}

dbenham marked this conversation as resolved.
Show resolved Hide resolved
}
if (isset($filters['created_by']) && $filters['created_by'] > 0)
{
Expand Down