Code

Replaced hard coded "ou=servers,ou=systems," with get_ou('serverou')
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Jan 2008 13:27:38 +0000 (13:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Jan 2008 13:27:38 +0000 (13:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8175 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/html/getxls.php
gosa-core/include/functions.inc
gosa-core/plugins/addons/gotomasses/class_target_list.inc
gosa-core/plugins/addons/ldapmanager/class_exportxls.inc
gosa-core/plugins/admin/ogroups/class_ogroup.inc
gosa-core/plugins/admin/systems/class_servGeneric.inc
gosa-core/plugins/admin/systems/class_systemManagement.inc
gosa-core/plugins/admin/systems/services/nfs/class_servNfs.inc
gosa-core/plugins/admin/systems/services/shares/class_goShareServer.inc
gosa-core/plugins/admin/systems/tabs_server.inc

index de3607c82cc6fe4b4c7f874586080f4a314b5af3..5c2f13a072c54ec1ba3783f10a9c6258c9a26cd2 100644 (file)
@@ -181,7 +181,7 @@ function dump_ldap ($mode= 0)
      /* SYSTEMS 
        Get all systems from th $dn
        and put them into the xls work sheet */
-     case "ou=servers,ou=systems,": $servers= $ldap->gen_xls($dn,"(objectClass=*)",array("cn"));
+     case get_ou('serverou'): $servers= $ldap->gen_xls($dn,"(objectClass=*)",array("cn"));
        $intitul=array(_("Server name").":");
 
        //name of the xls file
@@ -286,7 +286,7 @@ function dump_ldap ($mode= 0)
     $computers= $ldap->gen_xls("ou=computers,".$dn,"(objectClass=*)",array("cn","description","uid"));
     $computers_intitul=array(_("Description").":",_("UID").":");
     //data about servers
-    $servers= $ldap->gen_xls("ou=servers,ou=systems,".$dn,"(objectClass=*)",array("cn"));
+    $servers= $ldap->gen_xls(get_ou('serverou').$dn,"(objectClass=*)",array("cn"));
     $servers_intitul=array(_("Name").":");
     //data about addressbook
     $address= $ldap->gen_xls("dc=addressbook,".$dn,"(objectClass=*)",
index e27fc0e65cead6050302359d62d49ac67bd2c65e..c849c7bd6a29edbd2c10723bc39a56287beda1c9 100644 (file)
@@ -1035,6 +1035,7 @@ function get_ou($name)
   global $config;
 
   $map = array( "applicationou" => "ou=apps,",
+                "serverou"      => "ou=servers,ou=systems,",
                 "mimetypeou"    => "ou=mime,");
 
   /* Preset ou... */
index 6ecd300ef6d3e1818f320b314d61bff207eaabe7..22c38b41ffbc18c71662e9c8825c5e927742b92d 100644 (file)
@@ -257,7 +257,7 @@ class target_list extends MultiSelectWindow
             array("cn","objectClass","ipHostNumber","description"), GL_SIZELIMIT );
       $res= array_merge($res,get_list($filter, "workstation",  "ou=workstations,ou=systems,".$base, 
             array("cn","objectClass","ipHostNumber","description"), GL_SIZELIMIT ));
-      $res= array_merge($res,get_list($filter, "server", "ou=servers,ou=systems,".$base, 
+      $res= array_merge($res,get_list($filter, "server", get_ou('serverou').$base, 
             array("cn","objectClass","ipHostNumber","description"), GL_SIZELIMIT ));
     }
 
index 3331cbacd10c5c30d5ac0d2899178953f16a9162..2f392faeafddeb310ab96a9aad1aded3657d40a1 100644 (file)
@@ -78,7 +78,7 @@ class xlsexport extends plugin
     $smarty->assign("choicelist",array( get_people_ou()             =>"users" ,
                                         "ou=groups,"                =>"groups" ,
                                         "ou=systems,"               =>"computers",
-                                        "ou=servers,ou=systems,"    =>"servers",
+                                        get_ou('serverou')          =>"servers",
                                         "dc=addressbook,"           =>"addressbook"));
 
     // Get the LDAP link, to generate the Export
index 2660a81a52be24a53fbaf5062c795fdbc57820b1..bec6b25a629c5cb0cdb4f7a439f9db530111d6bd 100644 (file)
@@ -389,7 +389,7 @@ class ogroup extends plugin
                 "groups"          => array("CLASS"=>"posixGroup"     ,"DN"=> get_groups_ou()                  ,"ACL" => "groups"), 
                 "applications"    => array("CLASS"=>"gosaApplication","DN"=> get_ou('applicationou')          ,"ACL" => "application"), 
                 "departments"     => array("CLASS"=>"gosaDepartment" ,"DN"=> ""                               ,"ACL" => "department"), 
-                "servers"         => array("CLASS"=>"goServer"       ,"DN"=> "ou=servers,ou=systems,"         ,"ACL" => "server"),
+                "servers"         => array("CLASS"=>"goServer"       ,"DN"=> get_ou('serverou')               ,"ACL" => "server"),
                 "workstations"    => array("CLASS"=>"gotoWorkstation","DN"=> "ou=workstations,ou=systems,"    ,"ACL" => "workstation"),
                 "terminals"       => array("CLASS"=>"gotoTerminal"   ,"DN"=> "ou=terminals,ou=systems,"       ,"ACL" => "terminal"),
                 "printers"        => array("CLASS"=>"gotoPrinter"    ,"DN"=> "ou=printers,ou=systems,"        ,"ACL" => "printer"),
index 9d29f5e59f05b4f41f1bfff56e8c3217f3aa49a9..8497ed86573826b5b3a77c41a9da2c9f514eb2aa 100644 (file)
@@ -289,7 +289,7 @@ class servgeneric extends plugin
     /* Call common method to give check the hook */
     $message= plugin::check();
     $message= array_merge($message, $this->netConfigDNS->check());
-    $this->dn= "cn=".$this->cn.",ou=servers,ou=systems,".$this->base;
+    $this->dn= "cn=".$this->cn.",".get_ou('serverou').$this->base;
 
     /* must: cn */
     if ($this->cn == ""){
@@ -308,7 +308,7 @@ class servgeneric extends plugin
       if ($ldap->count() != 0){
         while ($attrs= $ldap->fetch()){
           if ($attrs['dn'] != $this->orig_dn){
-            if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,ou=incoming,/",$attrs['dn']) && preg_match("/,ou=servers,ou=systems,/",$attrs['dn'])){
+            if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,ou=incoming,/",$attrs['dn']) && preg_match("/,".get_ou('serverou')."/",$attrs['dn'])){
               $message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn);
               break;
             }
index 7b04844043762abcf7a8a8078b375f465babfead..3f2c496034e10fb16b7f490d7e4ed6bd0ea62a2d 100644 (file)
@@ -899,7 +899,7 @@ class systems extends plugin
         "terminal"        => "ou=terminals,ou=systems,",
         "workstation"     => "ou=workstations,ou=systems,",
         "incoming"        => "ou=incoming,",
-        "server"          => "ou=servers,ou=systems,",
+        "server"          =>  get_ou('serverou'),
         "printer"         => "ou=printers,ou=systems,",
         "phone"           => "ou=phones,ou=systems,",
         "winworkstation"  => get_winstations_ou(),
@@ -972,7 +972,7 @@ class systems extends plugin
     }
 
     /* This array represents the combination between checkboxes and search filters */
-    $objs = array( "ShowServers"        => array("CLASS" => "goServer"        ,"TREE" => "ou=servers,ou=systems," ),
+    $objs = array( "ShowServers"        => array("CLASS" => "goServer"        ,"TREE" => get_ou('serverou')),
         "ShowTerminals"      => array("CLASS" => "gotoTerminal"    ,"TREE" => "ou=terminals,ou=systems,"), 
         "ShowPrinters"       => array("CLASS" => "gotoPrinter"     ,"TREE" => "ou=printers,ou=systems," ),
         "ShowDevices"        => array("CLASS" => "ieee802Device"   ,"TREE" => "ou=netdevices,ou=systems," ),
index 1386de1fc9cb8aec2c830600c797855be50f7ad1..5756866273baad0c17aba9a4d25b31130c090037 100644 (file)
@@ -119,7 +119,7 @@ class servnfs extends plugin
         $smarty->assign("mount_checked", "checked");
       } else {
         $tmp = split(",", $this->dn);
-        $clip = $tmp[0] . ",ou=servers,ou=systems,";
+        $clip = $tmp[0] . ",".get_ou('serverou');
         $mountsdn = "cn=mounts," . substr($this->dn, strlen($clip));
         switch ($this->type) {
           case "netatalk" : {
index 354d780373ab007fd7d79ad65b7b25e2eb04143d..105076c95f085740d253cad566d1c296464504f4 100644 (file)
@@ -242,7 +242,7 @@ class goShareServer extends goService{
 
    function process_mounts() {
 
-    $clip = "cn=" . $this->cn . ",ou=servers,ou=systems,";
+    $clip = "cn=" . $this->cn . ",".get_ou('serverou');
     $mountsdn = "cn=mounts," . substr($this->dn, strlen($clip));
 
     $mounts = array(
index 564e92588c539b505f19c0e04b185e0ccdda3dbd..608a02fd1e3c5b4b543bde9f34a8ccf4488ea046 100644 (file)
@@ -45,7 +45,7 @@ class servtabs extends tabs
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
     $baseobject= $this->by_object['servgeneric'];
-    $this->dn= "cn=$baseobject->cn,ou=servers,ou=systems,".$baseobject->base;
+    $this->dn= "cn=$baseobject->cn,".get_ou('serverou').$baseobject->base;
     $baseobject->dn= $this->dn;
 
     foreach ($this->by_object as $key => $obj){