summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bd70b83)
raw | patch | inline | side by side (parent: bd70b83)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Aug 2006 07:46:52 +0000 (07:46 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Aug 2006 07:46:52 +0000 (07:46 +0000) |
Added av user to template
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4356 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4356 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_goVirusServer.inc | patch | blob | history | |
plugins/admin/systems/goVirusServer.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_goVirusServer.inc b/plugins/admin/systems/class_goVirusServer.inc
index 7a1dde535f0174ca6160849cb0f9c957d28d4406..510db7ba2d1138da518e2a83f3e531e24fa49c68 100644 (file)
/* 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";
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;
var $avArchiveMaxCompressionRatio = 95;
var $avChecksPerDay = 12;
-// var $avUser = "";
+ var $avUser = "";
var $avHttpProxyURL = "";
var $avDatabaseMirror = "";
}
$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__))));
}
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"));
index f2a46867950790389f3beefc7acf13bceec9fe4b..f2ea67b7d4c1a839d1f9ee050e0bc9b8684436a8 100644 (file)
<table>
<tr>
<td>
- {t}Maximum threads{/t}
+ {t}Database user{/t}
</td>
<td>
- <select name="avMaxThreads" title='{t}Select number of maximal threads{/t}'>
- {html_options options=$ThreadValues selected=$avMaxThreads}
- </select>
+ <input type='text' name='avUser' value='{$avUser}' {$avUserACL} style='width:220px;'>
</td>
</tr>
<tr>
<input type='text' name='avHttpProxyURL' value='{$avHttpProxyURL}' {$avHttpProxyURLACL} style='width:220px;'>
</td>
</tr>
+ </table>
+
+ </td>
+ <td style='border-left:1px solid #A0A0A0;vertical-align:top;'>
+
+ <table>
<tr>
<td>
{t}Checks per day{/t}
<input type='text' name='avChecksPerDay' value='{$avChecksPerDay}' {$avChecksPerDayACL}>
</td>
</tr>
- </table>
-
- </td>
- <td style='border-left:1px solid #A0A0A0;vertical-align:top;'>
-
- <table>
+ <tr>
+ <td>
+ {t}Maximum threads{/t}
+ </td>
+ <td>
+ <select name="avMaxThreads" title='{t}Select number of maximal threads{/t}'>
+ {html_options options=$ThreadValues selected=$avMaxThreads}
+ </select>
+ </td>
+ </tr>
<tr>
<td>
<input type='checkbox' name='avFlagsD' {$avFlagsDACL} {$avFlagsDCHK} value='1'>
</td>
</tr>
<tr>
- <td style="vertical-align:top;width:50%;">
+ <td style='vertical-align:top;'>
<table>
<tr>
- <td>{t}Maximum file size{/t}
- </td>
<td>
- <input name='avArchiveMaxFileSize' value='{$avArchiveMaxFileSize}' {$avArchiveMaxFileSizeACL} >
+ <input type='checkbox' name='avFlagsA' {$avFlagsAACL} {$avFlagsACHK} value='1'
+ onClick=" changeState('avFlagsE') ;
+ changeState('avArchiveMaxFileSize') ;
+ changeState('avArchiveMaxRecursion') ;
+ changeState('avArchiveMaxCompressionRatio') ; "
+ >
+ {t}Enable scanning of archives{/t}
</td>
</tr>
<tr>
- <td>{t}Maximum recursion{/t}
- </td>
<td>
- <input name='avArchiveMaxRecursion' value='{$avArchiveMaxRecursion}' {$avArchiveMaxRecursionACL} >
+ <input type='checkbox' name='avFlagsE' {$avFlagsEACL} {$avFlagsECHK} {$avFlagsAState} value='1' id='avFlagsE'>
+ {t}Block encrypted archives{/t}
</td>
</tr>
+ </table>
+
+ </td>
+ <td style="vertical-align:top;width:50%;border-left:1px solid #A0A0A0;">
+ <table>
<tr>
- <td>{t}Maximum compression ratio{/t}
+ <td>{t}Maximum file size{/t}
</td>
<td>
- <input name='avArchiveMaxCompressionRatio' value='{$avArchiveMaxCompressionRatio}' {$avArchiveMaxCompressionRatioACL} >
+ <input name='avArchiveMaxFileSize' id='avArchiveMaxFileSize' value='{$avArchiveMaxFileSize}' {$avFlagsAState} {$avArchiveMaxFileSizeACL} >
</td>
</tr>
- </table>
-
- </td>
- <td style='border-left:1px solid #A0A0A0;vertical-align:top;'>
- <table>
<tr>
+ <td>{t}Maximum recursion{/t}
+ </td>
<td>
- <input type='checkbox' name='avFlagsA' {$avFlagsAACL} {$avFlagsACHK} value='1'>
- {t}Enable scanning of archives{/t}
+ <input name='avArchiveMaxRecursion' id='avArchiveMaxRecursion' value='{$avArchiveMaxRecursion}' {$avFlagsAState} {$avArchiveMaxRecursionACL} >
</td>
</tr>
<tr>
+ <td>{t}Maximum compression ratio{/t}
+ </td>
<td>
- <input type='checkbox' name='avFlagsE' {$avFlagsEACL} {$avFlagsECHK} value='1'>
- {t}Block encrypted archives{/t}
+ <input name='avArchiveMaxCompressionRatio' id='avArchiveMaxCompressionRatio' value='{$avArchiveMaxCompressionRatio}' {$avFlagsAState} {$avArchiveMaxCompressionRatioACL} >
</td>
</tr>
</table>