summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 456e406)
raw | patch | inline | side by side (parent: 456e406)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Aug 2006 07:00:15 +0000 (07:00 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Aug 2006 07:00:15 +0000 (07:00 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4354 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_goSpamServer.inc b/plugins/admin/systems/class_goSpamServer.inc
index de52e20647409e4e0f55782360cabb15eb53cc96..b0a61d6fa767b712a9ea431aa099eb815f82488c 100644 (file)
function execute()
{
- /* Do we need to flip is_account state? */
- if (isset($_POST['modify_state'])) {
- $this->is_account = !$this->is_account;
- }
-
- /* Show tab dialog headers */
- if ($this->is_account) {
- /* call Add Acoount to add account */
- $display = $this->show_header(_("Remove spamassassin extension"),
- _("This server has spamassassin features enabled. You can disable them by clicking below."));
- } else {
- /* call remove Account */
- $display = $this->show_header(_("Add spamassassin service"),
- _("This server has spamassassin features disabled. You can enable them by clicking below."));
- return ($display);
- }
+ $smarty = get_smarty();
+ if(get_class($this->parent) == "servtabs"){
+ $smarty->assign("servtabs",true);
+ /* Do we need to flip is_account state? */
+ if (isset($_POST['modify_state'])) {
+ $this->is_account = !$this->is_account;
+ }
+
+ /* Show tab dialog headers */
+ if ($this->is_account) {
+ /* call Add Acoount to add account */
+ $display = $this->show_header(_("Remove spamassassin extension"),
+ _("This server has spamassassin features enabled. You can disable them by clicking below."));
+ } else {
+ /* call remove Account */
+ $display = $this->show_header(_("Add spamassassin service"),
+ _("This server has spamassassin features disabled. You can enable them by clicking below."));
+ return ($display);
+ }
+ }else{
+ $this->is_account =true;
+ $display ="";
+ $smarty->assign("servtabs",false);
+ }
+
/* Add new trusted network */
if(isset($_POST['AddNewTrust'])){
$this->AddTrust($_POST['NewTrustName']);
}
/* Assign smarty vars */
- $smarty = get_smarty();
foreach($this->attributes as $attr){
$smarty->assign($attr,$this->$attr);
$smarty->assign($attr."ACL",chkacl($this->acl,$attr));
$smarty->assign("divRules",$DivRules->DrawList());
$smarty->assign("TrustedNetworks",$this->TrustedNetworks);
+ /* Create Spam score select box entries */
+ $tmp = array();
+ for($i = 0 ; $i <= 20 ; $i ++ ){
+ $tmp[$i] = $i;
+ }
+ $smarty->assign("SpamScore",$tmp);
+
return($display.$smarty->fetch(get_template_path("goSpamServer.tpl",TRUE,dirname(__FILE__))));
}
*/
/* For newer service management dialogs */
- /*function getListEntry()
+ function getListEntry()
{
$this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
- $fields['Message'] = _("spamassassin");
+ $fields['Message'] = _("Spamassassin");
$fields['AllowStart'] = true;
$fields['AllowStop'] = true;
$fields['AllowRestart'] = true;
}
function action_hook($add_attrs= array())
{
- /* Find postcreate entries for this class * /
+ /* Find postcreate entries for this class */
$command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
if ($command == "" && isset($this->config->data['TABS'])){
$command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
}
if ($command != ""){
- /* Walk through attribute list * /
+ /* Walk through attribute list */
foreach ($this->attributes as $attr){
if (!is_array($this->$attr)){
$command= preg_replace("/%$attr/", $this->$attr, $command);
}
}
$command= preg_replace("/%dn/", $this->dn, $command);
- /* Additional attributes * /
+ /* Additional attributes */
foreach ($add_attrs as $name => $value){
$command= preg_replace("/%$name/", $value, $command);
}
- /* If there are still some %.. in our command, try to fill these with some other class vars * /
+ /* If there are still some %.. in our command, try to fill these with some other class vars */
if(preg_match("/%/",$command)){
$attrs = get_object_vars($this);
foreach($attrs as $name => $value){
}
}
- /* Directly save new status flag * /
+ /* Directly save new status flag */
function setStatus($value)
{
if($value == "none") return;
}
- */
-
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goVirusServer.inc b/plugins/admin/systems/class_goVirusServer.inc
index 3cd2469cfb04bb4ae12efedd2ff2ba1965c491d8..7b334597b420f49bbddb411a4b5b686d183cd898 100644 (file)
var $DisplayName = "";
var $dn = NULL;
var $cn = "";
- var $saStatus = "";
+ var $avStatus = "";
var $dialog = NULL;
var $ui = NULL;
var $avHttpProxyURL = "";
var $avDatabaseMirror = "";
- function gvirusserver($config,$dn)
+ function govirusserver($config,$dn)
{
/* Init class */
plugin::plugin($config,$dn);
function execute()
{
- /* Do we need to flip is_account state? */
- if (isset($_POST['modify_state'])) {
- $this->is_account = !$this->is_account;
- }
-
- /* Show tab dialog headers */
- if ($this->is_account) {
- /* call Add Acoount to add account */
- $display = $this->show_header(_("Remove anti virus extension"),
- _("This server has anti virus features enabled. You can disable them by clicking below."));
- } else {
- /* call remove Account */
- $display = $this->show_header(_("Add anti virus service"),
- _("This server has anti virus features disabled. You can enable them by clicking below."));
- return ($display);
+ $smarty = get_smarty();
+ if(get_class($this->parent) == "servtabs"){
+
+ $smarty->assign("servtabs",TRUE);
+
+ /* Do we need to flip is_account state? */
+ if (isset($_POST['modify_state'])) {
+ $this->is_account = !$this->is_account;
+ }
+
+ /* Show tab dialog headers */
+ if ($this->is_account) {
+ /* call Add Acoount to add account */
+ $display = $this->show_header(_("Remove anti virus extension"),
+ _("This server has anti virus features enabled. You can disable them by clicking below."));
+ } else {
+ /* call remove Account */
+ $display = $this->show_header(_("Add anti virus service"),
+ _("This server has anti virus features disabled. You can enable them by clicking below."));
+ return ($display);
+ }
+ }else{
+ $display = "";
+ $smarty->assign("servtabs",FALSE);
+ $this->is_account = true;
}
/* Assign smarty vars */
- $smarty = get_smarty();
foreach($this->attributes as $attr){
$smarty->assign($attr,$this->$attr);
$smarty->assign($attr."ACL",chkacl($this->acl,$attr));
}
}
-
-
-
-
-
-
return($message);
}
}
- /* Return plugin informations for acl handling
- function plInfo()
- {
- return (array(
- "plShortName" => _("Anti virus"),
- "plDescription" => _("Anti virus service"),
- "plSelfModify" => FALSE,
- "plDepends" => array(),
- "plPriority" => 0,
- "plSection" => array("administration"),
- "plCategory" => array("server"),
- "plProvidedAcls"=> array(
-
-
- "avFlagsD" =>_("Enable debugging"),
- "avFlagsS" =>_("Enable mail scanning"),
- "avFlagsA" =>_("Enable scanning of archives"),
- "avFlagsE" =>_("Block encrypted archives"),
-
- "avMaxThreads" =>_("Maximum threads"),
-// "avMaxDirectoryRecursions" =>_(""),
-// "avUser" =>_(""),
- "avArchiveMaxFileSize" =>_("Maximum file size"),
- "avArchiveMaxRecursion" =>_("Maximum recursions"),
- "avArchiveMaxCompressionRatio" =>_("Maximum compression ratio"),
- "avDatabaseMirror" =>_("Database mirror"),
- "avChecksPerDay" =>_("Checks per day"),
- "avHttpProxyURL" =>_("Http proxy URL"))
- ));
- }
- */
/* For newer service management dialogs */
- /*function getListEntry()
+ function getListEntry()
{
$this->updateStatusState();
$flag = $this->StatusFlag;
$this->$flag = $attrs[$flag][0];
}
}
+
function action_hook($add_attrs= array())
{
- /* Find postcreate entries for this class * /
+ /* Find postcreate entries for this class */
$command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
if ($command == "" && isset($this->config->data['TABS'])){
$command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
}
if ($command != ""){
- /* Walk through attribute list * /
+ /* Walk through attribute list */
foreach ($this->attributes as $attr){
if (!is_array($this->$attr)){
$command= preg_replace("/%$attr/", $this->$attr, $command);
}
}
$command= preg_replace("/%dn/", $this->dn, $command);
- /* Additional attributes * /
+ /* Additional attributes */
foreach ($add_attrs as $name => $value){
$command= preg_replace("/%$name/", $value, $command);
}
- /* If there are still some %.. in our command, try to fill these with some other class vars * /
+ /* If there are still some %.. in our command, try to fill these with some other class vars */
if(preg_match("/%/",$command)){
$attrs = get_object_vars($this);
foreach($attrs as $name => $value){
}
}
- /* Directly save new status flag * /
+ /* Directly save new status flag */
function setStatus($value)
{
if($value == "none") return;
}
}
+ /* Return plugin informations for acl handling
+ function plInfo()
+ {
+ return (array(
+ "plShortName" => _("Anti virus"),
+ "plDescription" => _("Anti virus service"),
+ "plSelfModify" => FALSE,
+ "plDepends" => array(),
+ "plPriority" => 0,
+ "plSection" => array("administration"),
+ "plCategory" => array("server"),
+ "plProvidedAcls"=> array(
- */
+ "avFlagsD" =>_("Enable debugging"),
+ "avFlagsS" =>_("Enable mail scanning"),
+ "avFlagsA" =>_("Enable scanning of archives"),
+ "avFlagsE" =>_("Block encrypted archives"),
+
+ "avMaxThreads" =>_("Maximum threads"),
+// "avMaxDirectoryRecursions" =>_(""),
+// "avUser" =>_(""),
+ "avArchiveMaxFileSize" =>_("Maximum file size"),
+ "avArchiveMaxRecursion" =>_("Maximum recursions"),
+ "avArchiveMaxCompressionRatio" =>_("Maximum compression ratio"),
+ "avDatabaseMirror" =>_("Database mirror"),
+ "avChecksPerDay" =>_("Checks per day"),
+ "avHttpProxyURL" =>_("Http proxy URL"))
+ ));
+ }
+ */
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
index 745ff497d36b2fcac10e2430da17b6188d78904f..8952c8373be5c1b60b067ccab0cf820271dcea1a 100644 (file)
{t}Required score{/t}
</td>
<td>
- <input type='text' name='saRequiredScore' value='{$saRequiredScore}' {$saRequiredScoreACL}>
+ <select name='saRequiredScore' title='{t}Select required score to tag mail as spam{/t}'>
+ {html_options options=$SpamScore selected=$saRequiredScore}
+ </select>
</td>
</tr>
</table>
</td>
</table>
<input type='hidden' value='1' name='goSpamServer'>
+
+{if !$servtabs}
+<p class='seperator'> </p>
+<p>
+<div style="width:100%; text-align:right;">
+ <input type='submit' name='SaveService' value='{t}Save{/t}'>
+
+ <input type='submit' name='CancelService' value='{t}Cancel{/t}'>
+</div>
+</p>
+{/if}
+
index 70544dc3d922948b9ccd66952b8599524d42bf5a..f2a46867950790389f3beefc7acf13bceec9fe4b 100644 (file)
</tr>
</table>
<input type='hidden' name='goVirusServer' value='1'>
+{if !$servtabs}
+<p class='seperator'> </p>
+<p>
+<div style="width:100%; text-align:right;">
+ <input type='submit' name='SaveService' value='{t}Save{/t}'>
+
+ <input type='submit' name='CancelService' value='{t}Cancel{/t}'>
+</div>
+</p>
+{/if}
+