Code

Updated roles
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 26 Nov 2009 16:31:23 +0000 (16:31 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 26 Nov 2009 16:31:23 +0000 (16:31 +0000)
-do not collect visiual related data until we've seen the ui

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

gosa-plugins/rolemanagement/admin/roleManagement/class_roleGeneric.inc

index 6674ddf94988b43f90bb3282c3a6aeddd93f701e..c07e1edd816007c92620ce5063a767ccdb308277 100644 (file)
@@ -50,6 +50,8 @@ class roleGeneric extends plugin {
   var $attributes = array("cn","description",
     "telephoneNumber","facsimileTelephoneNumber","roleOccupant");
  
+  // 
+  var $objCacheLoaded = FALSE;
 
   /* Initialize the class 
    */
@@ -76,9 +78,6 @@ class roleGeneric extends plugin {
     $this->orig_base = $this->base;
     $this->orig_dn = $dn;
     $this->orig_cn = $this->cn;
-
-    // Reload the occupant cache. 
-    $this->reload();
   }
 
 
@@ -131,6 +130,11 @@ class roleGeneric extends plugin {
     // Get list of possible ldap bases, will be selectable in the ui.
     $tmp = $this->allowedBasesToMoveTo();
 
+    // Reload the occupant cache. 
+    if(!$this->objCacheLoaded){
+      $this->reload();
+      $this->objCacheLoaded = TRUE;
+    }
 
     /***************
      * Dialog handling