Code

Updated rSyslogPlugin to use the correct schemata
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 29 Dec 2009 09:55:01 +0000 (09:55 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 29 Dec 2009 09:55:01 +0000 (09:55 +0000)
-

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14972 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc
gosa-plugins/rsyslog/admin/systems/services/rsyslog/class_rSyslogServer.inc
gosa-plugins/rsyslog/admin/systems/services/rsyslog/rSyslogServer.tpl

index 5f92a45a2c83a233b838be406448fc38f977ae5c..696503ec1f0d16b2766aac2cd3f1216cb3511e3d 100644 (file)
@@ -32,16 +32,16 @@ class rsyslog extends plugin
     // Get list of rsyslog servers 
     $ldap = $this->config->get_ldap_link();
     $ldap->cd($this->config->current['BASE']);
-    $ldap->search("objectClass=gosaLogServer",array("cn","goLogDBUser","goLogDB","goLogDBPassword"));
+    $ldap->search("objectClass=goLogDBServer",array("cn","goLogAdmin","gosaLogDB","goLogPassword"));
     while($attrs = $ldap->fetch()){
       if(empty($this->selected_server)) $this->selected_server = $attrs['cn'][0];
       $s = array('cn' => $attrs['cn'][0], 'dn' => $attrs['dn'], 'Password' => '', 'status' => 'ok');
-      $s['User'] = $attrs['goLogDBUser'][0]; 
-      $s['Database'] = $attrs['goLogDB'][0]; 
+      $s['User'] = $attrs['goLogAdmin'][0]; 
+      $s['Database'] = $attrs['gosaLogDB'][0]; 
       $s['Hosts'] = array();
       $s['Priorities'] = array();
       $s['ACL'] = "";
-      if(isset($attrs['goLogDBPassword'])) $s['Password'] = $attrs['goLogDBPassword'][0];
+      if(isset($attrs['goLogPassword'])) $s['Password'] = $attrs['goLogPassword'][0];
       $this->servers[$attrs['cn'][0]] = $s;
     }
 
index c8bb4132a8a0ac4fe18c3662abd940b51f084fe3..9204611423f96fd2ee136c8eaa17d6db169b4712 100644 (file)
@@ -3,20 +3,20 @@
 class rSyslogServer extends goService{
        
   /* This plugin only writes its objectClass */
-  var $objectclasses    = array("gosaLogServer");
-  var $attributes       = array("goLogDB","goLogDBUser","goLogDBPassword");
+  var $objectclasses    = array("goLogDBServer");
+  var $attributes       = array("gosaLogDB","goLogAdmin","goLogPassword");
   var $StatusFlag       = "";
 
   /* This class can't be assigned twice so it conflicts with itsself */
-  var $conflicts        = array("gosaLogServer");
+  var $conflicts        = array("goLogDBServer");
 
   var $DisplayName      = "";
   var $dn               = NULL;
   var $acl;
   var $cn                 = "";
-  var $goLogDB    = "Syslog";
-  var $goLogDBUser        = "rsyslog";
-  var $goLogDBPassword    = "";  
+  var $gosaLogDB    = "Syslog";
+  var $goLogAdmin        = "rsyslog";
+  var $goLogPassword    = "";  
   var $view_logged  =FALSE;
 
 
@@ -63,13 +63,13 @@ class rSyslogServer extends goService{
   function check()
   { 
     $message = plugin::check();
-    if (empty($this->goLogDBUser)){
+    if (empty($this->goLogAdmin)){
       $message[]= msgPool::required(_("User"));
     }
-    if (empty($this->goLogDBPassword)){
+    if (empty($this->goLogPassword)){
       $message[]= msgPool::required(_("Password"));
     }
-    if (empty($this->goLogDB)){
+    if (empty($this->gosaLogDB)){
       $message[]= msgPool::required(_("Database"));
     }
     return($message);
@@ -96,9 +96,9 @@ class rSyslogServer extends goService{
           "plCategory"    => array("server"),
 
           "plProvidedAcls"=> array(
-            "goLogDB" => _("Database"),
-            "goLogDBUser"     => _("User"),
-            "goLogDBPassword" => _("Password"), 
+            "gosaLogDB" => _("Database"),
+            "goLogAdmin"     => _("User"),
+            "goLogPassword" => _("Password"), 
             "viewEntries"     => _("Allow view of entries on this server")) 
           ));
   }
index 194e14e70f67b745b71698b0cd4881aadd250939..aaa903d8041bc9745f7030698cd5e75fc0894f1a 100644 (file)
@@ -3,24 +3,24 @@
     <tr>
      <td>{t}Database{/t}{$must}</td>
      <td>
-{render acl=$goLogDBACL}
-       <input name="goLogDB" id="goLogDB" size=30 maxlength=60 value="{$goLogDB}">
+{render acl=$gosaLogDBACL}
+       <input name="gosaLogDB" id="gosaLogDB" size=30 maxlength=60 value="{$gosaLogDB}">
 {/render}
      </td>
     </tr>
     <tr>
      <td>{t}Database user{/t}{$must}</td>
      <td>
-{render acl=$goLogDBUserACL}
-       <input name="goLogDBUser" id="goLogDBUser" size=30 maxlength=60 value="{$goLogDBUser}">
+{render acl=$goLogAdminACL}
+       <input name="goLogAdmin" id="goLogAdmin" size=30 maxlength=60 value="{$goLogAdmin}">
 {/render}
      </td>
     </tr>
     <tr>
      <td>{t}Password{/t}{$must}</td>
      <td>
-{render acl=$goLogDBPasswordACL}
-       <input type="password" name="goLogDBPassword" id="goLogDBPassword" size=30 maxlength=60 value="{$goLogDBPassword}">
+{render acl=$goLogPasswordACL}
+       <input type="password" name="goLogPassword" id="goLogPassword" size=30 maxlength=60 value="{$goLogPassword}">
 {/render}
      </td>
     </tr>