From 8a48ece6842a756ef98fcafd510c4b4e93b2744a Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 15 May 2007 08:04:14 +0000 Subject: [PATCH] Added new gosaLogService git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6381 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_gosaLogServer.inc | 102 ++++++++++++++++++ plugins/admin/systems/gosaLogServer.tpl | 35 ++++++ 2 files changed, 137 insertions(+) create mode 100644 plugins/admin/systems/class_gosaLogServer.inc create mode 100644 plugins/admin/systems/gosaLogServer.tpl diff --git a/plugins/admin/systems/class_gosaLogServer.inc b/plugins/admin/systems/class_gosaLogServer.inc new file mode 100644 index 000000000..51288754e --- /dev/null +++ b/plugins/admin/systems/class_gosaLogServer.inc @@ -0,0 +1,102 @@ +DisplayName = _("GOsa logging service"); + } + + + function execute() + { + $smarty = get_smarty(); + + $tmp = $this->plInfo(); + foreach($tmp['plProvidedAcls'] as $name => $translation){ + $smarty->assign($name."ACL",$this->getacl($name)); + } + + foreach($this->attributes as $attr){ + $smarty->assign($attr,$this->$attr); + } + return($smarty->fetch(get_template_path("gosaLogServer.tpl",TRUE,dirname(__FILE__)))); + } + + + function getListEntry() + { + $fields = goService::getListEntry(); + $fields['Message'] = _("GOsa logging service"); + $fields['AllowEdit'] = true; + $fields['AllowStart'] = FALSE; + $fields['AllowStop'] = FALSE; + $fields['AllowRestart'] = FALSE; + return($fields); + } + + + function check() + { + $message = plugin::check(); + if (empty($this->goLogDBUser)){ + $message[]= sprintf_("The attribute user is empty or contains invalid characters."); + } + if (empty($this->goLogDBPassword)){ + $message[]= sprintf_("The attribute password is empty or contains invalid characters."); + } + if (empty($this->goLogDB)){ + $message[]= sprintf_("The attribute database is empty or contains invalid characters."); + } + return($message); + } + + + function save_object() + { + if(isset($_POST['gosaLogServerPosted'])){ + plugin::save_object(); + } + } + + /* Return plugin informations for acl handling */ + function plInfo() + { + return (array( + "plShortName" => _("GOsa logging service"), + "plDescription" => _("GOsa logging service")." ("._("Services").")", + "plSelfModify" => FALSE, + "plDepends" => array(), + "plPriority" => 98, + "plSection" => array("administration"), + "plCategory" => array("server"), + + "plProvidedAcls"=> array( + "goLogDB" => _("Database"), + "goLogDBUser" => _("User"), + "goLogDBPassword" => _("Password")) + )); + } +} +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +?> diff --git a/plugins/admin/systems/gosaLogServer.tpl b/plugins/admin/systems/gosaLogServer.tpl new file mode 100644 index 000000000..7dd032a36 --- /dev/null +++ b/plugins/admin/systems/gosaLogServer.tpl @@ -0,0 +1,35 @@ +

{t}GOsa logging database{/t}

+ + + + + + + + + + + + + +
{t}Database user{/t}{$must} +{render acl=$goLogDBUserACL} + +{/render} +
{t}Password{/t}{$must} +{render acl=$goLogDBPasswordACL} + +{/render} +
{t}Database{/t}{$must} +{render acl=$goLogDBACL} + +{/render} +
+ +

 

+
+ +   + +
+ -- 2.30.2