fix search url, add search for mime types

This commit is contained in:
Uwe Steinmann 2025-04-24 16:30:48 +02:00
parent 8b0d8e85c2
commit a5edba86ae

View File

@ -246,34 +246,36 @@ $(document).ready( function() {
protected function getSearchUrl($type, $item) { protected function getSearchUrl($type, $item) {
$dms = $this->params['dms']; $dms = $this->params['dms'];
$settings = $this->params['settings'];
$searchurl = null; $searchurl = null;
switch($type) { switch($type) {
case 'docsperuser': case 'docsperuser':
case 'sizeperuser': case 'sizeperuser':
$searchurl = $settings->_httpRoot.'/out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=1&owner%5B%5D='.$item['res']; $searchurl = $settings->_httpRoot.'out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=1&owner%5B%5D='.$item['res'];
break; break;
case 'foldersperuser': case 'foldersperuser':
$searchurl = $settings->_httpRoot.'/out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=2&owner%5B%5D='.$item['res']; $searchurl = $settings->_httpRoot.'out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=2&owner%5B%5D='.$item['res'];
break; break;
case 'docspercategory': case 'docspercategory':
$searchurl = $settings->_httpRoot.'/out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=1&category%5B%5D='.$item['res']; $searchurl = $settings->_httpRoot.'out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=1&category%5B%5D='.$item['res'];
break; break;
case 'docsperstatus': case 'docsperstatus':
$searchurl = $settings->_httpRoot.'/out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=1&status%5B%5D='.$item['res']; $searchurl = $settings->_httpRoot.'out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=1&status%5B%5D='.$item['res'];
break; break;
case 'docspermonth': case 'docspermonth':
case 'sizepermonth': case 'sizepermonth':
$startmonth = $item['key'].'-01'; $startmonth = $item['key'].'-01';
$endmonth = date('Y-m-t', strtotime($startmonth)); $endmonth = date('Y-m-t', strtotime($startmonth));
$searchurl = $settings->_httpRoot.'/out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=1&created%5Bfrom%5D='.$startmonth.'&created%5Bto%5D='.$endmonth; $searchurl = $settings->_httpRoot.'out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=1&created%5Bfrom%5D='.$startmonth.'&created%5Bto%5D='.$endmonth;
break; break;
case 'docspermimetype': case 'docspermimetype':
$searchurl = $settings->_httpRoot.'out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=1&mimetype%5B%5D='.urlencode($item['key']);
break; break;
case 'docsaccumulated': case 'docsaccumulated':
$start = date('Y-m-d', $item['key']/1000); $start = date('Y-m-d', $item['key']/1000);
$end = date('Y-m-d', $item['key']/1000 + 86400); $end = date('Y-m-d', $item['key']/1000 + 86400);
$searchurl = $settings->_httpRoot.'/out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=1&created%5Bfrom%5D='.$start.'&created%5Bto%5D='.$end; $searchurl = $settings->_httpRoot.'out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=1&created%5Bfrom%5D='.$start.'&created%5Bto%5D='.$end;
break; break;
} }
return $searchurl; return $searchurl;