Code

Do not reload the object references on each page reload
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 23 Apr 2010 11:49:55 +0000 (11:49 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 23 Apr 2010 11:49:55 +0000 (11:49 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17817 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/generic/references/class_reference.inc

index 9687cb03152a785cb4f6b1aefe619a19232a8294..641f06192f7388078065296dd2ce12e7003c1814 100644 (file)
@@ -74,12 +74,6 @@ class reference extends plugin
             'filter' => "(&(objectClass=gosaAccount)(manager=".normalizeLdap($this->dn)."))",
             'attrs'  => array('givenName' => _("Given name"),'sn' => _("Surname"),'uid'=>_("Uid")),
             'msg'    => _("User manager"));
-    }
-
-    function execute()
-    {
-        // Mark plugin as viewed
-        plugin::execute();
 
         // Go through filters and detect possible references  
         $ldap = $this->config->get_ldap_link();
@@ -118,16 +112,21 @@ class reference extends plugin
                 $str .= "<div class='v-spacer'></div>";
             }
         }
+        $this->objectList = $str;
+    }
+
+    function execute()
+    {
+        // Mark plugin as viewed
+        plugin::execute();
 
         $smarty = get_smarty();        
-        $smarty->assign('objectList', $str);
+        $smarty->assign('objectList', $this->objectList);
         $smarty->assign("acls",$this->aclResolver->getReadableACL());
         $smarty->assign("usePrototype", "true");
         session::set('autocomplete', $this->aclResolver);
         return ($smarty->fetch (get_template_path('contents.tpl', TRUE, dirname(__FILE__))));
     }
-
-
 }
 
 ?>