mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 05:31:42 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
d50247ba09
|
@ -328,6 +328,7 @@
|
||||||
- add much better support for new storage drivers
|
- add much better support for new storage drivers
|
||||||
- fix possible xss attacks
|
- fix possible xss attacks
|
||||||
- saver way to collect plugin configuration
|
- saver way to collect plugin configuration
|
||||||
|
- fix update of postgres database
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 5.1.39
|
Changes in version 5.1.39
|
||||||
|
|
|
@ -244,6 +244,41 @@ $(document).ready( function() {
|
||||||
return true;
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
protected function getSearchUrl($type, $item) {
|
||||||
|
$dms = $this->params['dms'];
|
||||||
|
|
||||||
|
$searchurl = null;
|
||||||
|
switch($type) {
|
||||||
|
case 'docsperuser':
|
||||||
|
case 'sizeperuser':
|
||||||
|
$searchurl = $settings->_httpRoot.'/out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=1&owner%5B%5D='.$item['res'];
|
||||||
|
break;
|
||||||
|
case 'foldersperuser':
|
||||||
|
$searchurl = $settings->_httpRoot.'/out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=2&owner%5B%5D='.$item['res'];
|
||||||
|
break;
|
||||||
|
case 'docspercategory':
|
||||||
|
$searchurl = $settings->_httpRoot.'/out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=1&category%5B%5D='.$item['res'];
|
||||||
|
break;
|
||||||
|
case 'docsperstatus':
|
||||||
|
$searchurl = $settings->_httpRoot.'/out/out.Search.php?fullsearch=0&query=&mode=1&orderby=&resultmode=1&status%5B%5D='.$item['res'];
|
||||||
|
break;
|
||||||
|
case 'docspermonth':
|
||||||
|
case 'sizepermonth':
|
||||||
|
$startmonth = $item['key'].'-01';
|
||||||
|
$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;
|
||||||
|
break;
|
||||||
|
case 'docspermimetype':
|
||||||
|
break;
|
||||||
|
case 'docsaccumulated':
|
||||||
|
$start = date('Y-m-d', $item['key']/1000);
|
||||||
|
$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;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $searchurl;
|
||||||
|
}
|
||||||
|
|
||||||
public function show() { /* {{{ */
|
public function show() { /* {{{ */
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
|
@ -293,6 +328,7 @@ $(document).ready( function() {
|
||||||
$types[] = 'sizeperuser';
|
$types[] = 'sizeperuser';
|
||||||
if(in_array($type, $types))
|
if(in_array($type, $types))
|
||||||
echo "<th></th>";
|
echo "<th></th>";
|
||||||
|
echo "<th>Search</th>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
$total = 0;
|
$total = 0;
|
||||||
switch($type) {
|
switch($type) {
|
||||||
|
@ -309,6 +345,11 @@ $(document).ready( function() {
|
||||||
echo "<td>".$item['total']."</td>";
|
echo "<td>".$item['total']."</td>";
|
||||||
if(in_array($type, array('docspermonth')))
|
if(in_array($type, array('docspermonth')))
|
||||||
echo "<td>".sprintf('%+d', $item['total']-$oldtotal)."</td>";
|
echo "<td>".sprintf('%+d', $item['total']-$oldtotal)."</td>";
|
||||||
|
$searchurl = $this->getSearchUrl($type, $item);
|
||||||
|
if($searchurl)
|
||||||
|
echo "<td><a href=\"".$searchurl."\"><i class=\"fa fa-search\"></i></a></td>";
|
||||||
|
else
|
||||||
|
echo "<td></td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
$oldtotal = $item['total'];
|
$oldtotal = $item['total'];
|
||||||
$total += $item['total'];
|
$total += $item['total'];
|
||||||
|
@ -322,6 +363,11 @@ $(document).ready( function() {
|
||||||
echo "<td>".getReadableDate($item['key']/1000)."</td>";
|
echo "<td>".getReadableDate($item['key']/1000)."</td>";
|
||||||
echo "<td>".$item['total']."</td>";
|
echo "<td>".$item['total']."</td>";
|
||||||
echo "<td>".sprintf('%+d', $item['total']-$oldtotal)."</td>";
|
echo "<td>".sprintf('%+d', $item['total']-$oldtotal)."</td>";
|
||||||
|
$searchurl = $this->getSearchUrl($type, $item);
|
||||||
|
if($searchurl)
|
||||||
|
echo "<td><a href=\"".$searchurl."\"><i class=\"fa fa-search\"></i></a></td>";
|
||||||
|
else
|
||||||
|
echo "<td></td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
$oldtotal = $item['total'];
|
$oldtotal = $item['total'];
|
||||||
$total += $item['total'];
|
$total += $item['total'];
|
||||||
|
@ -338,6 +384,11 @@ $(document).ready( function() {
|
||||||
echo $this->getProgressBar($currUser->getUsedDiskSpace(), $qt);
|
echo $this->getProgressBar($currUser->getUsedDiskSpace(), $qt);
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
}
|
}
|
||||||
|
$searchurl = $this->getSearchUrl($type, $item);
|
||||||
|
if($searchurl)
|
||||||
|
echo "<td><a href=\"".$searchurl."\"><i class=\"fa fa-search\"></i></a></td>";
|
||||||
|
else
|
||||||
|
echo "<td></td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
$total += $item['total'];
|
$total += $item['total'];
|
||||||
}
|
}
|
||||||
|
@ -345,7 +396,13 @@ $(document).ready( function() {
|
||||||
break;
|
break;
|
||||||
case 'sizepermonth':
|
case 'sizepermonth':
|
||||||
foreach($data as $item) {
|
foreach($data as $item) {
|
||||||
echo "<tr><td>".htmlspecialchars($item['key'])."</td><td>".SeedDMS_Core_File::format_filesize((int) $item['total'])."</td></tr>";
|
echo "<tr><td>".htmlspecialchars($item['key'])."</td><td>".SeedDMS_Core_File::format_filesize((int) $item['total'])."</td>";
|
||||||
|
$searchurl = $this->getSearchUrl($type, $item);
|
||||||
|
if($searchurl)
|
||||||
|
echo "<td><a href=\"".$searchurl."\"><i class=\"fa fa-search\"></i></a></td>";
|
||||||
|
else
|
||||||
|
echo "<td></td>";
|
||||||
|
echo "</tr>";
|
||||||
$total += $item['total'];
|
$total += $item['total'];
|
||||||
}
|
}
|
||||||
echo "<tr><th></th><th>".SeedDMS_Core_File::format_filesize($total)."<th></tr>";
|
echo "<tr><th></th><th>".SeedDMS_Core_File::format_filesize($total)."<th></tr>";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user