Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Commit

Permalink
Fix - Wayfinder
Browse files Browse the repository at this point in the history
  • Loading branch information
yama committed Aug 25, 2016
1 parent 5fb3c76 commit bab78fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/snippets/wayfinder/wayfinder.inc.php
Expand Up @@ -407,6 +407,7 @@ function getData() {
$access = sprintf("1='%s' OR sc.privatemgr=0", $_SESSION['mgrRole']);
if($docgrp) $access .= sprintf(' OR dg.document_group IN (%s)', $docgrp);
}
if($access) $access = "AND({$access})";

//Add the ignore hidden option to the where clause
if ($this->_config['ignoreHidden']) $menuWhere = '';
Expand All @@ -427,7 +428,7 @@ function getData() {

$fields = "DISTINCT {$fields}";
$from = '[+prefix+]site_content sc LEFT JOIN [+prefix+]document_groups dg ON dg.document=sc.id';
$where = sprintf('sc.published=1 AND sc.deleted=0 AND (%s) %s AND sc.id IN (%s) GROUP BY sc.id', $access, $menuWhere, implode(',',$ids));
$where = sprintf('sc.published=1 AND sc.deleted=0 %s %s AND sc.id IN (%s) GROUP BY sc.id', $access, $menuWhere, implode(',',$ids));
$sort = "{$sort} {$this->_config['sortOrder']}";

//run the query
Expand Down

0 comments on commit bab78fd

Please sign in to comment.