diff --git a/plugins/admin/systems/class_goVirusServer.inc b/plugins/admin/systems/class_goVirusServer.inc
index fcdd0f2cdcd5be54ed414f5b09a2b706dcc7a021..0d7cd71592009a3ba93853ef95f56b7c562132cd 100644 (file)
<?php
-require_once("class_goService.inc");
-
class govirusserver extends goService{
/* This plugin only writes its objectClass */
var $cn = "";
var $avStatus = "";
- var $dialog = NULL;
var $ui = NULL;
var $Flags = array("D","S","A","E");
var $avUser = "";
var $avHttpProxyURL = "";
var $avDatabaseMirror = "";
+ var $view_logged =FALSE;
- function govirusserver($config,$dn, $parent= NULL)
+ function govirusserver(&$config,$dn, $parent= NULL)
{
/* Init class */
- plugin::plugin($config,$dn, $parent);
+ goService::goService($config,$dn, $parent);
$this->DisplayName = _("Anti virus");
/* Get userinfo & acls */
{
$smarty = get_smarty();
+ if($this->is_account && !$this->view_logged){
+ $this->view_logged = TRUE;
+ new log("view","server/".get_class($this),$this->dn);
+ }
+
+
/* Set acls */
$tmp = $this->plInfo();
foreach($tmp['plProvidedAcls'] as $name => $translation) {
$smarty->assign($name."ACL",$this->getacl($name));
}
- 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;
- }
+ $display = "";
+ $smarty->assign("servtabs",FALSE);
+ $this->is_account = true;
/* Assign smarty vars */
foreach($this->attributes as $attr){
}
if($this->initially_was_account){
$this->handle_post_events("modify");
+ new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}else{
$this->handle_post_events("add");
+ new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
show_ldap_error($ldap->get_error(), sprintf(_("Saving of server services/anti virus with dn '%s' failed."),$this->dn));
}
}
+ foreach(array("avUser"=>_("Database user"),"avHttpProxyURL"=>_("Http proxy URL"),"avDatabaseMirror"=>_("Database mirror")) as $attr => $name){
+ if(!preg_match("/^[a-z0-9:_\-\.\/]*$/",$this->$attr)){
+ $message[] = sprintf(_("Please specify a valid value for '%s'."),$name);
+ }
+ }
+
return($message);
}
{
return (array(
"plShortName" => _("Anti virus"),
- "plDescription" => _("Anti virus service"),
+ "plDescription" => _("Anti virus")." ("._("Services").")",
"plSelfModify" => FALSE,
"plDepends" => array(),
- "plPriority" => 0,
+ "plPriority" => 96,
"plSection" => array("administration"),
"plCategory" => array("server"),
"plProvidedAcls"=> array(