@@ -17,7 +17,7 @@ class Search extends AbstractController implements ManagerTheme\PageControllerIn
17
17
public function canView (): bool
18
18
{
19
19
return $ this ->managerTheme ->getCore ()
20
- ->hasPermission ('settings ' );
20
+ ->hasPermission ('view_document ' );
21
21
}
22
22
23
23
public function checkLocked (): ?string
@@ -137,7 +137,7 @@ protected function getResults()
137
137
$ mgrRole = (isset ($ _SESSION ['mgrRole ' ]) && $ _SESSION ['mgrRole ' ] == 1 ) ? 1 : 0 ;
138
138
if ($ mgrRole != 1 ) {
139
139
if (isset ($ _SESSION ['mgrDocgroups ' ]) && is_array ($ _SESSION ['mgrDocgroups ' ])) {
140
- $ searchQuery = $ searchQuery ->join ('document_groups ' , 'site_content.id ' , '= ' , 'document_groups.document ' )
140
+ $ searchQuery = $ searchQuery ->leftJoin ('document_groups ' , 'site_content.id ' , '= ' , 'document_groups.document ' )
141
141
->where (function ($ query ) use ($ searchfields ) {
142
142
$ query ->where ('privatemgr ' , 0 )
143
143
->orWhereIn ('document_group ' , $ _SESSION ['mgrDocgroups ' ]);
@@ -177,7 +177,7 @@ protected function getResults()
177
177
if ($ result ['type ' ] == 'reference ' ) {
178
178
$ result ['iconClass ' ] .= $ this ->managerTheme ->getStyle ('tree_linkgo ' );
179
179
} elseif ($ result ['isfolder ' ] == 0 ) {
180
- $ result ['iconClass ' ] .= isset ($ icons [$ result ['contenttype ' ]]) ? $ icons [$ result ['contenttype ' ]] : $ this ->managerTheme ->getStyle ('icon_document ' );
180
+ $ result ['iconClass ' ] .= isset ($ result [ ' contenttype ' ], $ icons [$ result ['contenttype ' ]]) ? $ icons [$ result ['contenttype ' ]] : $ this ->managerTheme ->getStyle ('icon_document ' );
181
181
} else {
182
182
$ result ['iconClass ' ] .= $ this ->managerTheme ->getStyle ('icon_folder ' );
183
183
}
0 commit comments