From: hickert Date: Tue, 1 Aug 2006 07:46:52 +0000 (+0000) Subject: Added grey out to archive options, if archive options are disabled X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=04bd445b7d7b51ba25491b070951eeb9c3dc51f6;p=gosa.git Added grey out to archive options, if archive options are disabled Added av user to template git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4356 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_goVirusServer.inc b/plugins/admin/systems/class_goVirusServer.inc index 7a1dde535..510db7ba2 100644 --- a/plugins/admin/systems/class_goVirusServer.inc +++ b/plugins/admin/systems/class_goVirusServer.inc @@ -4,7 +4,7 @@ class govirusserver extends plugin{ /* This plugin only writes its objectClass */ var $objectclasses = array("goVirusServer"); - var $attributes = array("avMaxThreads","avMaxDirectoryRecursions",/*"avUser",*/"avFlags","avArchiveMaxFileSize","avArchiveMaxRecursion", + var $attributes = array("avMaxThreads","avMaxDirectoryRecursions","avUser","avFlags","avArchiveMaxFileSize","avArchiveMaxRecursion", "avArchiveMaxCompressionRatio","avDatabaseMirror","avChecksPerDay","avHttpProxyURL"); var $StatusFlag = "avStatus"; @@ -22,11 +22,11 @@ class govirusserver extends plugin{ var $Flags = array("D","S","A","E"); - var $avFlags = "DSAE"; + var $avFlags = "DS"; var $avFlagsD = TRUE; var $avFlagsS = TRUE; - var $avFlagsA = TRUE; - var $avFlagsE = TRUE; + var $avFlagsA = FALSE; + var $avFlagsE = FALSE; var $avMaxThreads = 5; var $avMaxDirectoryRecursions = 4; @@ -35,7 +35,7 @@ class govirusserver extends plugin{ var $avArchiveMaxCompressionRatio = 95; var $avChecksPerDay = 12; -// var $avUser = ""; + var $avUser = ""; var $avHttpProxyURL = ""; var $avDatabaseMirror = ""; @@ -115,6 +115,12 @@ class govirusserver extends plugin{ } $smarty->assign("ThreadValues",$tmp); + if($this->avFlagsA){ + $smarty->assign("avFlagsAState" , "" ); + }else{ + $smarty->assign("avFlagsAState" , " disabled " ); + } + return($display.$smarty->fetch(get_template_path("goVirusServer.tpl",TRUE,dirname(__FILE__)))); } @@ -163,6 +169,14 @@ class govirusserver extends plugin{ plugin::save(); + if(!$this->avFlagsA){ + $arr = array("avArchiveMaxFileSize","avArchiveMaxRecursion","avArchiveMaxCompressionRatio"); + foreach($arr as $attr){ + $this->attrs[$attr] = array(); + } + $this->attrs['avFlags'] = preg_replace("/E/","",$this->attrs['avFlags']); + } + /* Check if this is a new entry ... add/modify */ $ldap = $this->config->get_ldap_link(); $ldap->cat($this->dn,array("objectClass")); diff --git a/plugins/admin/systems/goVirusServer.tpl b/plugins/admin/systems/goVirusServer.tpl index f2a468679..f2ea67b7d 100644 --- a/plugins/admin/systems/goVirusServer.tpl +++ b/plugins/admin/systems/goVirusServer.tpl @@ -10,12 +10,10 @@ @@ -34,6 +32,12 @@ +
- {t}Maximum threads{/t} + {t}Database user{/t} - +
+ + + + + -
{t}Checks per day{/t} @@ -42,12 +46,16 @@
- - - - - + + + + - + -
+ {t}Maximum threads{/t} + + +
@@ -70,44 +78,49 @@
+ - - +
{t}Maximum file size{/t} - - + + {t}Enable scanning of archives{/t}
{t}Maximum recursion{/t} - - + + {t}Block encrypted archives{/t}
+ +
+ - -
{t}Maximum compression ratio{/t} + {t}Maximum file size{/t} - +
- -
- + +
{t}Maximum recursion{/t} + - - {t}Enable scanning of archives{/t} +
{t}Maximum compression ratio{/t} + - - {t}Block encrypted archives{/t} +