Changeset 95
- Timestamp:
- 11/08/07 15:57:16 (16 years ago)
- Location:
- trunk/expressoMail1_2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.ldap_functions.inc.php
r72 r95 29 29 function quicksearch($params) 30 30 { 31 include_once("class.functions.inc.php"); 32 $functions = new functions; 31 33 32 34 $search_for = $params['search_for']; … … 54 56 55 57 $sr=ldap_search($this->ds, $this->ldap_context, $filter, $justthese); 56 58 $count_entries = ldap_count_entries($this->ds,$sr); 59 60 if ($count_entries > 200) 61 { 62 $user_dn = $_SESSION['phpgw_info']['expressomail']['user']['account_dn']; 63 $user_sector_dn = ldap_explode_dn ( $user_dn, false ); 64 array_shift($user_sector_dn); 65 array_shift($user_sector_dn); 66 $user_sector_dn = implode(",", $user_sector_dn); 67 68 // New search only on user sector 69 $sr=ldap_search($this->ds, $user_sector_dn, $filter, $justthese); 57 70 $count_entries = ldap_count_entries($this->ds,$sr); 58 71 if ($count_entries > 200){ … … 61 74 $return['error'] = "many results"; 62 75 return $return; 76 } 77 else 78 { 79 $quickSearch_only_in_userSector = true; 80 } 63 81 } 64 82 $info = ldap_get_entries($this->ds, $sr); … … 83 101 $i++; 84 102 } 103 $contacts_result['quickSearch_only_in_userSector'] = $quickSearch_only_in_userSector; 85 104 } 86 105 else 87 106 { 88 107 $options = ''; 89 include_once("class.functions.inc.php");90 $functions = new functions;91 108 92 109 foreach ($tmp as $info => $cn) … … 130 147 } 131 148 $contacts_result = $options; 132 } 149 150 if ($quickSearch_only_in_userSector) 151 { 152 $head_option = 153 '<tr class="quicksearchcontacts_unselected">' . 154 '<td colspan="2" width="100%" align="center">' . 155 $functions->getLang('More than 200 results were found') . '.<br>' . 156 $functions->getLang('Showing only the results found in your organization') . '.'; 157 '</td>' . 158 '</tr>'; 159 $contacts_result = $head_option . $contacts_result; 160 } 161 } 133 162 } 134 163 ldap_close($this->ds); -
trunk/expressoMail1_2/js/QuickCatalogSearch.js
r53 r95 11 11 _this = this; 12 12 13 var title = 'Escolha um nome:';13 var title = get_lang('Choose a name') + ':'; 14 14 var el = document.createElement("DIV"); 15 15 el.style.visibility = "hidden"; … … 23 23 el.innerHTML = ""; 24 24 25 el.innerHTML = " <b><font color='BLUE' nowrap>"+title+"</font></b>"+ 26 " <br><u></u> "; 25 if (data.quickSearch_only_in_userSector) 26 title += "<font color='BLACK' nowrap> ("+get_lang('Showing only the results found in your organization')+".)</font>" 27 28 el.innerHTML = " <b><font color='BLUE' nowrap>"+title+"</font></b><br> "; 27 29 28 30 if (document.getElementById('select_QuickCatalogSearch') == null){ … … 139 141 if(! this.arrayWin[div.id]) { 140 142 div.style.width = "600px"; 141 div.style.height = "2 50px";143 div.style.height = "230px"; 142 144 var title = get_lang('The results were found in the Global Catalog')+':'; 143 145 var wHeight = div.offsetHeight + "px"; -
trunk/expressoMail1_2/js/QuickSearchUser.js
r64 r95 77 77 78 78 emQuickSearchUser.prototype.close_window = function() { 79 Element("em_message_search").value = ""; 79 80 this.arrayWin['window_QuickSearchUser'].close(); 80 81 }
Note: See TracChangeset
for help on using the changeset viewer.