Changeset 7655 for trunk/reports/inc/class.ldap_functions.inc.php
- Timestamp:
- 12/14/12 14:30:35 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/reports/inc/class.ldap_functions.inc.php
r5291 r7655 61 61 $entries = ldap_get_entries($this->ldap, $groups_list); 62 62 63 for ($i=0; $i<$entries["count"]; $i++){63 for ($i=0; $i<$entries["count"]; ++$i){ 64 64 $u_tmp[$entries[$i]["uidnumber"][0]] = $entries[$i]["cn"][0]; 65 65 } … … 93 93 94 94 $options = ''; 95 for ($i=0; $i<$entries['count']; $i++)95 for ($i=0; $i<$entries['count']; ++$i) 96 96 { 97 97 $options .= "<option value=" . $entries[$i]['gidnumber'][0] . ">" . $entries[$i]['cn'][0] . "</option>"; … … 114 114 115 115 $options = ''; 116 for ($i=0; $i<$entries['count']; $i++)116 for ($i=0; $i<$entries['count']; ++$i) 117 117 { 118 118 $options .= "<option value=" . $entries[$i]['uid'][0] . ">" . $entries[$i]['uid'][0] . " (" . $entries[$i]['mail'][0] . ")" . "</option>"; … … 136 136 $entry[0]['dn'] = strtolower($entry[0]['dn']); 137 137 $sector_dn_array = explode(",", $entry[0]['dn']); 138 for($i=1; $i<count($sector_dn_array); $i++)138 for($i=1; $i<count($sector_dn_array); ++$i) 139 139 $sector_dn .= $sector_dn_array[$i] . ','; 140 140 //Retira ultimo pipe. … … 164 164 165 165 // Samba 166 for ($i=0; $i<$entry[0]['objectclass']['count']; $i++)166 for ($i=0; $i<$entry[0]['objectclass']['count']; ++$i) 167 167 { 168 168 if ($entry[0]['objectclass'][$i] == 'sambaSamAccount') … … 205 205 ldap_sort($this->ldap, $search, "cn"); 206 206 $entries = ldap_get_entries($this->ldap, $search); 207 for ($i=0; $i<$entries['count']; $i++)207 for ($i=0; $i<$entries['count']; ++$i) 208 208 { 209 209 $result['groups_ldap'][ $entries[$i]['gidnumber'][0] ] = $entries[$i]['cn'][0]; … … 233 233 $entries = ldap_get_entries($ldapMasterConnect, $search); 234 234 235 for ($i=0; $i<$entries['count']; $i++)235 for ($i=0; $i<$entries['count']; ++$i) 236 236 { 237 237 $result[ $entries[$i]['uid'][0] ]['uid'] = $entries[$i]['uid'][0]; … … 268 268 $entry[0]['dn'] = strtolower($entry[0]['dn']); 269 269 $sector_dn_array = explode(",", $entry[0]['dn']); 270 for($i=1; $i<count($sector_dn_array); $i++)270 for($i=1; $i<count($sector_dn_array); ++$i) 271 271 $sector_dn .= $sector_dn_array[$i] . ','; 272 272 //Retira ultimo pipe. … … 281 281 282 282 //MemberUid 283 for ($i=0; $i<$entry[0]['memberuid']['count']; $i++)283 for ($i=0; $i<$entry[0]['memberuid']['count']; ++$i) 284 284 { 285 285 $justthese = array("cn","uid","uidnumber"); … … 287 287 // Montagem dinamica do filtro 288 288 $filter="(&(phpgwAccountType=u)(|"; 289 for ($k=0; (($k<10) && ($i<$entry[0]['memberuid']['count'])); $k++)289 for ($k=0; (($k<10) && ($i<$entry[0]['memberuid']['count'])); ++$k) 290 290 { 291 291 $filter .= "(uid=".$entry[0]['memberuid'][$i].")"; 292 $i++;292 ++$i; 293 293 } 294 294 $i--; … … 298 298 $user_entry = ldap_get_entries($this->ldap, $search); 299 299 300 for ($j=0; $j<$user_entry['count']; $j++)300 for ($j=0; $j<$user_entry['count']; ++$j) 301 301 { 302 302 $result['memberuid_info'][$user_entry[$j]['uid'][0]]['cn'] = $user_entry[$j]['cn'][0]; … … 328 328 329 329 // Samba 330 for ($i=0; $i<$entry[0]['objectclass']['count']; $i++)330 for ($i=0; $i<$entry[0]['objectclass']['count']; ++$i) 331 331 { 332 332 if ($entry[0]['objectclass'][$i] == 'sambaGroupMapping') … … 366 366 $entry[0]['dn'] = strtolower($entry[0]['dn']); 367 367 $sector_dn_array = explode(",", $entry[0]['dn']); 368 for($i=1; $i<count($sector_dn_array); $i++)368 for($i=1; $i<count($sector_dn_array); ++$i) 369 369 $sector_dn .= $sector_dn_array[$i] . ','; 370 370 //Retira ultimo pipe. … … 381 381 382 382 //Members 383 for ($i=0; $i<$entry[0]['mailforwardingaddress']['count']; $i++)383 for ($i=0; $i<$entry[0]['mailforwardingaddress']['count']; ++$i) 384 384 { 385 385 $justthese = array("cn", "uidnumber", "uid", "phpgwaccounttype", "mail"); … … 387 387 // Montagem dinamica do filtro, para nao ter muitas conexoes com o ldap 388 388 $filter="(&(|(phpgwAccountType=u)(phpgwAccountType=l))(|"; 389 for ($k=0; (($k<10) && ($i<$entry[0]['mailforwardingaddress']['count'])); $k++)389 for ($k=0; (($k<10) && ($i<$entry[0]['mailforwardingaddress']['count'])); ++$k) 390 390 { 391 391 $filter .= "(mail=".$entry[0]['mailforwardingaddress'][$i].")"; 392 $i++;392 ++$i; 393 393 } 394 394 $i--; … … 398 398 $user_entry = ldap_get_entries($ldap_conn_following_ref, $search); 399 399 400 for ($j=0; $j<$user_entry['count']; $j++)400 for ($j=0; $j<$user_entry['count']; ++$j) 401 401 { 402 402 $result['mailForwardingAddress_info'][$user_entry[$j]['mail'][0]]['uid'] = $user_entry[$j]['uid'][0]; … … 471 471 } 472 472 473 $i++;473 ++$i; 474 474 } 475 475 } … … 513 513 514 514 $options = ''; 515 for ($i=0; $i<$entries['count']; $i++)515 for ($i=0; $i<$entries['count']; ++$i) 516 516 { 517 517 $options .= "<option value=" . $entries[$i]['uid'][0] . ">" . $entries[$i]['cn'][0] . " (".$entries[$i]['mail'][0].")" . "</option>";
Note: See TracChangeset
for help on using the changeset viewer.