summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 27f764b)
raw | patch | inline | side by side (parent: 27f764b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Mar 2006 10:50:45 +0000 (10:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Mar 2006 10:50:45 +0000 (10:50 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2830 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/groups/class_groupGeneric.inc | patch | blob | history | |
plugins/admin/groups/group_objects.tpl | patch | blob | history |
diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc
index d3e40887177985a27f599eb8b9e453ba5aa795cf..0fcc62b1df9ad0fddf68fecb5d00d0e6fa78a918 100644 (file)
var $nagios_group =FALSE;
var $sambaGroupType;
var $dialog;
+ var $OnlyShowFirstEntries =200;
/* attribute list for save action */
var $attributes= array("cn", "description", "gidNumber","memberUid","sambaGroupType","sambaSID");
}
$gufilter= get_global('gufilter');
+ $gufilter['SubSearchGroup'] = false;
+
+ register_global('gufilter',$gufilter);
+
/* Bases / Departments */
if(isset($_SESSION['groupfilter']['depselect'])){
$this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
}
}
-
+
/* This is always an account */
$this->is_account= TRUE;
$gufilter[$type]= $_POST[$type];
}
}
+ if(isset($_POST['regex'])){
+ if(isset($_POST['SubSearchGroup'])){
+ $gufilter['SubSearchGroup'] = true;
+ }else{
+ $gufilter['SubSearchGroup'] = false;
+ }
+ }
+
if (isset($_GET['search'])){
$s= mb_substr($_GET['search'], 0, 1, "UTF8")."*";
if ($s == "**"){
$smarty->assign("tree_image", get_template_path('images/tree.png'));
$smarty->assign("deplist", $this->config->idepartments);
$smarty->assign("alphabet", generate_alphabet());
- foreach( array("dselect", "regex") as $type){
+ foreach( array("dselect", "regex","SubSearchGroup") as $type){
$smarty->assign("$type", $gufilter[$type]);
}
$smarty->assign("hint", print_sizelimit_warning());
$this->last_sorting= "invalid";
$this->users= array();
$ldap= $this->config->get_ldap_link();
- $gufilter= get_global("gufilter");
+ $MaxUser = $this->OnlyShowFirstEntries;
+
+ $gufilter= get_global("gufilter");
$ldap->cd ($this->config->current['BASE']);
- $ldap->cd (get_people_ou().$gufilter['dselect']);
- $ldap->ls ("(&(objectClass=gosaAccount)(!(objectClass=gosaUserTemplate))(!(uid=*$)))",get_people_ou().$gufilter['dselect'],array("uid", "sn", "givenName"));
+ if($gufilter['SubSearchGroup']){
+ $ldap->cd ($gufilter['dselect']);
+ $ldap->search("(&(objectClass=gosaAccount)(!(objectClass=gosaUserTemplate))(!(uid=*$)))",array("uid", "sn","givenName"));
+ }else{
+ $ldap->cd (get_people_ou().$gufilter['dselect']);
+ $ldap->ls ("(&(objectClass=gosaAccount)(!(objectClass=gosaUserTemplate))(!(uid=*$)))",get_people_ou().$gufilter['dselect'],array("uid", "sn", "givenName"));
+ }
$this->allusers= array();
- while ($attrs= $ldap->fetch()){
+
+ $i = 0 ;
+ while (($attrs= $ldap->fetch()) && ($i < $MaxUser)){
+ $i ++;
if (isset($attrs["givenName"][0]) && isset($attrs["sn"][0])){
$this->allusers[$attrs["uid"][0]]= $attrs["sn"][0].", ".
$attrs["givenName"][0]." [".$attrs["uid"][0]."]";
$this->allusers[$attrs["uid"][0]]= $attrs['uid'][0];
}
}
+
+ if(($i == $MaxUser)){
+ print_red(sprintf(_("Your search method returned more than '%s' users, only '%s' users are shown.") , $MaxUser,$MaxUser));
+ }
+
natcasesort ($this->allusers);
reset ($this->allusers);
{
/* Save additional values for possible next step */
if (isset($_POST['groupedit'])){
+
+
plugin::save_object();
$this->force_gid= 0;
index bb58eceaae90dd65387ba060fff10484f403a74a..5fcdc73a2b58628b0ff917312bf2e2709a0d78e9 100644 (file)
<table summary="" style="width:100%;border-top:1px solid #B0B0B0;background-color:#F8F8F8">
{$alphabet}
</table>
+ <table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
+ <tr>
+ <td>
+ <input type=checkbox name="SubSearchGroup" value="1" {if $SubSearchGroup == 1} checked {/if}
+ onClick="mainform.submit()" title="{t}Select to see servers{/t}">{t}Search within subtree{/t}<br>
+ </td>
+ </tr>
+ </table>
<table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
<tr>
<td>