Code

* Added test stub for filters in class_userManagement.inc
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Aug 2009 10:03:22 +0000 (10:03 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Aug 2009 10:03:22 +0000 (10:03 +0000)
* Added not automatically loaded scriptacolous files
* Modified dummy autocompleter to return some test values

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

gosa-core/html/autocomplete.php
gosa-core/ihtml/themes/default/headers.tpl
gosa-core/plugins/admin/users/class_userManagement.inc

index b88b89bee011027d53cac61020d83b8594e47c62..4aaca3bed08195ee1b9d4551027ec3bd2c61c77c 100644 (file)
@@ -37,15 +37,15 @@ if (!session::global_is_set('ui')){
 if(isset($_POST['NAME'])){
 
   /* Get configuration from session */
-  $config= $_SESSION['ui'];
+  $config= $_SESSION['config'];
   $ldap= $config->get_ldap_link();
   $ldap->cd($config->current['BASE']);
   $n= normalizeLDAP($_POST['NAME']);
-  $res= $ldap->search ("(&(objectClass=gosaAccount)(cn=*$n*)(givenName=*$n*)(sn=*$n*)(uid=*$n*))", array("cn"));
+  $ldap->search ("(&(objectClass=gosaAccount)(|(cn=*$n*)(givenName=*$n*)(sn=*$n*)(uid=*$n*)))", array("cn"));
 
   echo '<ul>';
-  foreach($res as $attrs){
-    echo '<li>'.$line['cn'][0].'</li>';
+  while ($attrs= $ldap->fetch()){
+    echo '<li>'.$attrs['cn'][0].'</li>';
   }
   echo '</ul>';
 }
index 72f05c1a082d89d044d27d0bfe331074f1e9e9e4..520ecd0c4eb157ec2e2b6eb1c1493db60c4561fc 100644 (file)
@@ -31,5 +31,7 @@
   <script language="javascript" src="include/layersmenu.js" type="text/javascript"></script>
   <script language="javascript" src="include/prototype.js" type="text/javascript"></script>
   <script language="javascript" src="include/scriptaculous.js" type="text/javascript"></script>
+  <script language="javascript" src="include/effects.js" type="text/javascript"></script>
+  <script language="javascript" src="include/controls.js" type="text/javascript"></script>
 </head>
 
index 5278c648099235f06dc8f30f3e19295766bd6b45..1d1a6e98c23869c5e1045472353781df90984c19 100644 (file)
@@ -968,7 +968,6 @@ class userManagement extends plugin
     }
   
     /* Return rendered main page */
-        /* Display dialog with system list */
     $this->DivListUsers->parent = $this;
     $this->DivListUsers->execute();
 
@@ -978,6 +977,22 @@ class userManagement extends plugin
     }
     $this->reload();
     $this->DivListUsers->setEntries($this->list);
+
+    # FILTER Test #################################################
+    #$filter = new filter(CONFIG_DIR."/filters/user-filter.xml");
+    #$filter->setObjectStorage(get_people_ou());
+    #$filter->setCategory("users");
+    #$filter->setCurrentBase($this->DivListUsers->selectedBase);
+    #$filter->update();
+    #if (!$filter->isValid()){
+    #  msg_dialog::display(_("Filter error"), _("The filter is uncomplete!"), ERROR_DIALOG);
+    #} else {
+    #  print "Filter results:";
+    #  print_a($filter->query());
+    #}
+    #return($filter->renderFilter().$this->DivListUsers->Draw());
+    ################################################### FILTER Test
+
     return($this->DivListUsers->Draw());
   }