]> git.tokkee.org Git - gosa.git/commitdiff

Code

Instead of using the string "ou=apps" we use get_ou('applicationou') now.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Jan 2008 13:00:57 +0000 (13:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Jan 2008 13:00:57 +0000 (13:00 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8173 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/acl/class_aclManagement.inc
gosa-core/plugins/admin/applications/class_applicationGeneric.inc
gosa-core/plugins/admin/applications/class_applicationManagement.inc
gosa-core/plugins/admin/applications/class_divListApplication.inc
gosa-core/plugins/admin/applications/tabs_application.inc
gosa-core/plugins/admin/fai/class_faiManagement.inc
gosa-core/plugins/admin/groups/class_groupApplication.inc
gosa-core/plugins/admin/ogroups/class_ogroup.inc

index fd784ed0b8c9317a485dcc393281d0387b3f2435..d8854020652cd24dc937ac84e36886814b575afd 100644 (file)
@@ -469,7 +469,7 @@ class aclManagement extends plugin
     $fetch_this = array(
       "ME"      => array("TYPE" => "cat"    , "FLAGS" => GL_SIZELIMIT                ,"BASE"=>""),
       "SYSTEMS" => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>"ou=systems,"),
-      "APPS"    => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>"ou=apps,"),
+      "APPS"    => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>get_ou('applicationou')),
       "PEOPLE"  => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>get_people_ou()),
       "GROUPS"  => array("TYPE" => "search" , "FLAGS" => GL_SIZELIMIT | GL_SUBSEARCH ,"BASE"=>get_groups_ou()));
 
index 22fcf10be69a57a8ae2ebc16086bff996f62c453..65cb8b75afb6a98be055173301e4007411de49d2 100644 (file)
@@ -35,7 +35,7 @@ class application extends plugin
 
     $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs'));
     if(!empty($tmp)) {
-      if(!preg_match("/^ou=apps,/",$_SESSION['appfilter']['release'])){
+      if(!preg_match("/^".get_ou('applicationou')."/",$_SESSION['appfilter']['release'])){
         $this->isReleaseApplikation = true;  
       }
     }
@@ -66,7 +66,7 @@ class application extends plugin
     } else {
 
       if($this->isReleaseApplikation){
-        $this->base = preg_replace("/^.*,ou=apps,/","",$this->dn);
+        $this->base = preg_replace("/^.*,".get_ou('applicationou')."/","",$this->dn);
       }else{
         $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
       }
@@ -383,7 +383,7 @@ class application extends plugin
 
     /* Permissions for that base? */
     if ($this->base != ""){
-      $new_dn= "cn=".$this->cn.",ou=apps,".$this->base;
+      $new_dn= "cn=".$this->cn.",".get_ou('applicationou').$this->base;
     } else {
       $new_dn= $this->dn;
     }
@@ -413,7 +413,7 @@ class application extends plugin
     $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs'));
     if((!empty($tmp)) && (isset($_SESSION['appfilter']['release']))){
       $baseDn = str_replace($this->config->current['BASE'],$this->base,$_SESSION['appfilter']['release']);
-      $baseDn = preg_replace("/ou=apps,.*/","ou=apps,".$this->base,$_SESSION['appfilter']['release']);
+      $baseDn = preg_replace("/".get_ou('applicationou').".*/",get_ou('applicationou').$this->base,$_SESSION['appfilter']['release']);
       $ldap->ls("(&(objectClass=gosaApplication)(cn=".$this->cn."))",$baseDn,array("cn"));
       if($ldap->count()){
         $attrs = $ldap->fetch();
@@ -422,7 +422,7 @@ class application extends plugin
         }
       }
     }else{
-      $ldap->ls("(&(objectClass=gosaApplication)(cn=".$this->cn."))","ou=apps,".$this->base,array("cn"));
+      $ldap->ls("(&(objectClass=gosaApplication)(cn=".$this->cn."))",get_ou('applicationou').$this->base,array("cn"));
       if ($ldap->count()){
         $attrs = $ldap->fetch();
         if($this->dn != $attrs['dn']) {
index 1089c50e8a1d9f0cb9a4c027af8dc3e44a6458f9..f474b5b74676cfd210019eae954887698a41e4e4 100644 (file)
@@ -69,9 +69,9 @@ class applicationManagement extends plugin
   function getReleases($base)
   {
     $ldap                   = $this->config->get_ldap_link();
-    $dn                     = "ou=apps,".$base;
+    $dn                     = get_ou('applicationou').$base;
     $ret                    = array();
-    $ret ["ou=apps,".$base] = "/";
+    $ret [get_ou('applicationou').$base] = "/";
 
     $ldap->cd($dn);
     $ldap->search("objectClass=organizationalUnit",array("ou"));
@@ -507,12 +507,12 @@ class applicationManagement extends plugin
     $Releases   = $this->getReleases($base);
 
     if(!$this->enableReleaseManagement){
-      $use_base = "ou=apps,".$base;
+      $use_base = get_ou('applicationou').$base;
     }else{
       if(isset($Releases[$release])){
         $use_base  = $release;
       }else{
-        $use_base  = "ou=apps,".$base;
+        $use_base  = get_ou('applicationou').$base;
       }
     }
 
index 15b09c6d728502db697f0055805138dcf87039ec..8177d512966a4950cb172e89a2c69ab8f9c61a97 100755 (executable)
@@ -22,7 +22,7 @@ class divListApplication extends MultiSelectWindow
   {
     MultiSelectWindow::MultiSelectWindow($config,"Application", "application");
    
-    $this->selectedRelease = "ou=apps,".$_SESSION['CurrentMainBase'];
+    $this->selectedRelease = get_ou('applicationou').$_SESSION['CurrentMainBase'];
  
     $this->parent       = &$parent;
     $this->ui           = get_userinfo();
index 059e68335a8d0589f8c087390810fcb3010cfa8c..1683c5ef073e2aa49dd65277342343a67fc896d3 100644 (file)
@@ -14,7 +14,7 @@ class apptabs extends tabs
 
   function set_release($newRelease)
   {
-    $this->Release= preg_replace('/,ou=apps,.*$/', '', $newRelease);
+    $this->Release= preg_replace('/,'.get_ou('applicationou').'.*$/', '', $newRelease);
     if ($this->Release != ""){
       $this->Release= ",".$this->Release;
     }
@@ -29,12 +29,12 @@ class apptabs extends tabs
     $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs'));
     if((!empty($tmp)) && (isset($_SESSION['appfilter']['release']))){
       if(!$baseobject->isReleaseApplikation){
-        $new_dn= "cn=".$baseobject->cn.",ou=apps,".$baseobject->base;
+        $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationou').$baseobject->base;
       }else{
         $new_dn ="cn=".$baseobject->cn.",".$_SESSION['appfilter']['release'];
       }
     }else{
-      $new_dn= "cn=".$baseobject->cn.",ou=apps,".$baseobject->base;
+      $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationou').$baseobject->base;
     }
 
     /* Move group? */
index b9c0271102053a8529276e2c4dc86e042074cbec..048d5a00db9176c1c6da8c72c9b7aaf002b20ca1 100644 (file)
@@ -456,7 +456,7 @@ class faiManagement extends plugin
           $name = $br[$bb];
           $ldap->cd($bb);
           $ldap->recursive_remove();
-          $ldap->cd(preg_replace('/,ou=fai,ou=configs,ou=systems,/', ',ou=apps,', $bb));
+          $ldap->cd(preg_replace('/,ou=fai,ou=configs,ou=systems,/', ','.get_ou('applicationou'), $bb));
           $ldap->recursive_remove();
           $this->DivListFai->selectedBranch = "main";
 
@@ -555,8 +555,8 @@ class faiManagement extends plugin
           }
         }
 
-        $appsrc = preg_replace("/ou=fai,ou=configs,ou=systems,/","ou=apps,",$baseToUse); 
-        $appdst = preg_replace("/ou=fai,ou=configs,ou=systems,/","ou=apps,","ou=".$name.",".$baseToUse) ; 
+        $appsrc = preg_replace("/ou=fai,ou=configs,ou=systems,/",get_ou('applicationou'),$baseToUse); 
+        $appdst = preg_replace("/ou=fai,ou=configs,ou=systems,/",get_ou('applicationou'),"ou=".$name.",".$baseToUse) ; 
 
         $mimesrc = preg_replace("/ou=fai,ou=configs,ou=systems,/","ou=mime,",$baseToUse); 
         $mimedst = preg_replace("/ou=fai,ou=configs,ou=systems,/","ou=mime,","ou=".$name.",".$baseToUse) ; 
index 02d0cc9bc3ab8d2f7f12689c0c79b26836c7e4b9..418fe3bbb6a30227400e15670e9ed3b7c270a67d 100644 (file)
@@ -875,8 +875,8 @@ class appgroup extends plugin
 
     $ret =array();
     foreach($res as $attrs){
-      if(preg_match("/ou=apps,/",$attrs['dn'])){
-        $bb     = preg_replace("/ou=apps,.*/","",$attrs['dn']);
+      if(preg_match("/".get_ou('applicationou')."/",$attrs['dn'])){
+        $bb     = preg_replace("/".get_ou('applicationou').".*/","",$attrs['dn']);
         $parts  = array_reverse(split("ou=",$bb));
 
         $str ="";
@@ -1069,12 +1069,12 @@ class appgroup extends plugin
       }
 
       /* Get applications for this release */
-      $base = preg_replace("/ou=apps,.*$/","ou=apps,".$this->curbase,$base);
+      $base = preg_replace("/".get_ou('applicationou').".*$/",get_ou('applicationou').$this->curbase,$base);
       $res = get_list("(objectClass=gosaApplication)","application",$base,array("*"));
     }else{
     
       /* Get applications for this base */
-      $res = get_list("(objectClass=gosaApplication)","application","ou=apps,".$this->curbase,array("*"));
+      $res = get_list("(objectClass=gosaApplication)","application",get_ou('applicationou').$this->curbase,array("*"));
     }
     
     /* Append applications */
@@ -1097,11 +1097,11 @@ class appgroup extends plugin
       $tmp = array_flip($this->Releases);
       foreach($res as $attrs){
         
-        $testdn = preg_replace("/ou=apps,.*$/","ou=apps",$attrs['dn']);
+        $testdn = preg_replace("/".get_ou('applicationou').".*$/",get_ou('applicationou'),$attrs['dn']);
         $testdn = preg_replace("/^[^,]+/","",$testdn);
         $testdn = preg_replace("/^,/","",$testdn);
 
-        if($testdn == preg_replace("/ou=apps,.*$/","ou=apps",$tmp[$this->FAIrelease])){
+        if($testdn == preg_replace("/".get_ou('applicationou').".*$/",get_ou('applicationou'),$tmp[$this->FAIrelease])){
           $this->AllAppsForRelease[$attrs['dn']] = $attrs['cn'][0];
           $this->AllAppsForReleaseParameter[$this->FAIrelease][$attrs['cn'][0]] = $attrs;
         }
index e74b3985a637ee31a57b1afe903e4d3f4d062ea0..2660a81a52be24a53fbaf5062c795fdbc57820b1 100644 (file)
@@ -387,7 +387,7 @@ class ogroup extends plugin
 
     $p_f= array("accounts"        => array("CLASS"=>"gosaAccount"    ,"DN"=> get_people_ou()                  ,"ACL" => "users"), 
                 "groups"          => array("CLASS"=>"posixGroup"     ,"DN"=> get_groups_ou()                  ,"ACL" => "groups"), 
-                "applications"    => array("CLASS"=>"gosaApplication","DN"=> "ou=apps,"                       ,"ACL" => "application"), 
+                "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"),
                 "workstations"    => array("CLASS"=>"gotoWorkstation","DN"=> "ou=workstations,ou=systems,"    ,"ACL" => "workstation"),