From: hickert Date: Tue, 1 Aug 2006 04:22:02 +0000 (+0000) Subject: Updated layout and added some checks X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b441af5bc8b988da981fdccafeb09e56aca789ae;p=gosa.git Updated layout and added some checks git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4352 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_goVirusServer.inc b/plugins/admin/systems/class_goVirusServer.inc index ee4bb64e3..273fba3ce 100644 --- a/plugins/admin/systems/class_goVirusServer.inc +++ b/plugins/admin/systems/class_goVirusServer.inc @@ -22,21 +22,22 @@ class goVirusServer extends plugin{ var $Flags = array("D","S","A","E"); - var $avFlags = ""; - var $avFlagsD = FALSE; - var $avFlagsS = FALSE; - var $avFlagsA = FALSE; - var $avFlagsE = FALSE; + var $avFlags = "DSAE"; + var $avFlagsD = TRUE; + var $avFlagsS = TRUE; + var $avFlagsA = TRUE; + var $avFlagsE = TRUE; var $avMaxThreads = 5; var $avMaxDirectoryRecursions = 4; -// var $avUser = ""; var $avArchiveMaxFileSize = 4000; var $avArchiveMaxRecursion = 5; var $avArchiveMaxCompressionRatio = 95; - var $avDatabaseMirror = ""; var $avChecksPerDay = 12; + +// var $avUser = ""; var $avHttpProxyURL = ""; + var $avDatabaseMirror = ""; function goVirusServer($config,$dn) { @@ -98,27 +99,14 @@ class goVirusServer extends plugin{ } } - return($display.$smarty->fetch(get_template_path("goVirusServer.tpl",TRUE,dirname(__FILE__)))); - } - - - /* Add $post to list of configured trusted */ - function AddTrust($post) - { - if(!empty($post)){ - $this->TrustedNetworks[$post] = $post; + /* Assign value for max thread select box */ + $tmp = array(); + for($i = 1 ; $i <= 20 ; $i ++){ + $tmp[$i] = $i; } - } - + $smarty->assign("ThreadValues",$tmp); - /* Delete trusted network */ - function DelTrust($posts) - { - foreach($posts as $post){ - if(isset($this->TrustedNetworks[$post])){ - unset($this->TrustedNetworks[$post]); - } - } + return($display.$smarty->fetch(get_template_path("goVirusServer.tpl",TRUE,dirname(__FILE__)))); } @@ -159,8 +147,6 @@ class goVirusServer extends plugin{ plugin::save(); - print_a($this->attrs); - /* Check if this is a new entry ... add/modify */ $ldap = $this->config->get_ldap_link(); $ldap->cat($this->dn,array("objectClass")); @@ -183,6 +169,26 @@ class goVirusServer extends plugin{ function check() { $message = plugin::check(); + + $mustBeNumeric = array( + "avMaxThreads" =>_("Maximum threads"), + "avArchiveMaxFileSize" =>_("Maximum file size"), + "avArchiveMaxRecursion" =>_("Maximum recursions"), + "avArchiveMaxCompressionRatio" =>_("Maximum compression ratio"), + "avChecksPerDay" =>_("Checks per day")); + + foreach($mustBeNumeric as $key => $trans){ + if(!is_numeric($this->$key)){ + $message[] = sprintf(_("The specified value for '%s' must be a numeric value."),$trans); + } + } + + + + + + + return($message); } diff --git a/plugins/admin/systems/goVirusServer.tpl b/plugins/admin/systems/goVirusServer.tpl index f5a6fd9af..70544dc3d 100644 --- a/plugins/admin/systems/goVirusServer.tpl +++ b/plugins/admin/systems/goVirusServer.tpl @@ -1,15 +1,21 @@ -
-

{t}Generic virus filtering{/t}

- + + + + - -
+

{t}Generic virus filtering{/t}

+
+ @@ -17,31 +23,31 @@ {t}Database mirror{/t}
{t}Maximum threads{/t} - +
- +
- {t}Checks per day{/t} + {t}Http proxy URL{/t} - +
- {t}Http proxy URL{/t} + {t}Checks per day{/t} - +
+ - +
- - -
@@ -54,24 +60,18 @@ {t}Enable mail scanning{/t}
- - {t}Enable scanning of archives{/t} -

 

+

{t}Archive scanning{/t}

-

{t}Archive scanning{/t}

- + - +
+ @@ -86,11 +86,6 @@ -
{t}Maximum file size{/t}
- -
- @@ -98,6 +93,17 @@ +
{t}Maximum compression ratio{/t}
+ +
+ + + +
+ + {t}Enable scanning of archives{/t} +