summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b441af5)
raw | patch | inline | side by side (parent: b441af5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Aug 2006 05:40:14 +0000 (05:40 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Aug 2006 05:40:14 +0000 (05:40 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4353 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_goSpamServer.inc b/plugins/admin/systems/class_goSpamServer.inc
index 055496bf8bafb945fdb438285b39b5081671ff9a..de52e20647409e4e0f55782360cabb15eb53cc96 100644 (file)
<?php
-class goSpamServer extends plugin{
-
+class gospamserver extends plugin{
+
+ /* CLI vars */
+ var $cli_summary= "Manage server base objects";
+ var $cli_description= "Some longer text\nfor help";
+ var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
+
/* This plugin only writes its objectClass */
var $objectclasses = array("goSpamServer");
var $attributes = array("saRewriteHeader","saTrustedNetworks","saRequiredScore","saFlags","saRule");
var $ui = NULL;
var $acl = NULL;
- function goSpamServer($config,$dn)
+ function gospamserver($config,$dn)
{
/* Init class */
plugin::plugin($config,$dn);
function check()
{
$message = plugin::check();
+
+ /* Check if required score is numeric */
+ if(!is_numeric($this->saRequiredScore)){
+ $message[] = _("Required score must be a numeric value.");
+ }
+
return($message);
}
function save_object()
{
if(isset($_POST['goSpamServer'])){
+
plugin::save_object();
+
+ /* Check flags */
foreach($this->Flags as $flag){
$var = "saFlags".$flag;
if(isset($_POST[$var])){
diff --git a/plugins/admin/systems/class_goSpamServerRule.inc b/plugins/admin/systems/class_goSpamServerRule.inc
index 4883ba99fa46ddc4866987b6b42806d7d73c38dd..178269534bc3d159d37e6fa2290a0951ce15e588 100644 (file)
function save_object()
{
plugin::save_object();
+ foreach($this->attributes as $attr){
+ if(isset($_POST[$attr])){
+ $this->$attr = $_POST[$attr];
+ }
+ }
}
return($messages);
}
}
-
+// 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 273fba3ce389a68849db32ba884592ca16bce716..3cd2469cfb04bb4ae12efedd2ff2ba1965c491d8 100644 (file)
<?php
-class goVirusServer extends plugin{
+class govirusserver extends plugin{
/* This plugin only writes its objectClass */
var $objectclasses = array("goVirusServer");
var $avHttpProxyURL = "";
var $avDatabaseMirror = "";
- function goVirusServer($config,$dn)
+ function gvirusserver($config,$dn)
{
/* Init class */
plugin::plugin($config,$dn);