webui fixes

This commit is contained in:
SJ 2013-02-16 13:54:41 +01:00
parent 1a5c36eb64
commit ff616a8398
2 changed files with 12 additions and 20 deletions

View File

@ -622,8 +622,13 @@ class ModelSearchSearch extends Model {
array_push($arr, $id);
if(Registry::get('auditor_user') == 1 && RESTRICTED_AUDITOR == 1) {
if(validdomain($_SESSION['domain']) == 1) {
$q .= ",?";
array_push($a, $_SESSION['domain']);
}
while(list($k, $v) = each($_SESSION['auditdomains'])) {
if(validdomain($v) == 1) {
if(validdomain($v) == 1 && !in_array($v, $a)) {
$q .= ",?";
array_push($a, $v);
}
@ -676,8 +681,13 @@ class ModelSearchSearch extends Model {
$q2 = preg_replace("/^\,/", "", $q2);
if(Registry::get('auditor_user') == 1 && RESTRICTED_AUDITOR == 1) {
if(validdomain($_SESSION['domain']) == 1) {
$q .= ",?";
array_push($a, $_SESSION['domain']);
}
while(list($k, $v) = each($_SESSION['auditdomains'])) {
if(validdomain($v) == 1) {
if(validdomain($v) == 1 && !in_array($v, $a)) {
$q .= ",?";
array_push($a, $v);
}

View File

@ -33,24 +33,6 @@ class ModelStatCounter extends Model {
}
public function reset_counters(){
if(MEMCACHED_ENABLED) {
$memcache = Registry::get('memcache');
$c = Registry::get('counters');
unset($c[MEMCACHED_PREFIX . 'size']);
foreach ($c as $counter) {
$memcache->set($counter, 0);
}
}
$query = $this->db->query("UPDATE " . TABLE_COUNTER . " SET `rcvd`=0, `virus`=0, `duplicate`=0, `ignore`=0");
return 0;
}
}
?>