@@ -67,8 +67,10 @@ |
||
67 | 67 | $name = $ui->getAttribute('user_fullname'); |
68 | 68 | if ($name): |
69 | 69 | echo $name; |
70 | - else : |
|
70 | + else { |
|
71 | + : |
|
71 | 72 | echo $ownerName; |
73 | + } |
|
72 | 74 | endif; |
73 | 75 | ?> |
74 | 76 | </div><br> |
@@ -73,8 +73,9 @@ |
||
73 | 73 | ldap_sort($ldap, $result, "sn"); |
74 | 74 | $info = ldap_get_entries($ldap, $result); |
75 | 75 | for ($i = 0; $i < $info["count"]; $i++) { |
76 | - if ($info['count'] > 1) |
|
77 | - break; |
|
76 | + if ($info['count'] > 1) { |
|
77 | + break; |
|
78 | + } |
|
78 | 79 | |
79 | 80 | //clean |
80 | 81 | $groups = $info[$i]["memberof"]; |
@@ -16,8 +16,9 @@ |
||
16 | 16 | // specify the LDAP server to connect to |
17 | 17 | $conn = ldap_connect($this->config->item('ldapserver')) or die("Oh no can't create LDAP connection"); |
18 | 18 | // bind to the LDAP server specified above |
19 | - if (!ldap_bind($conn, $this->config->item('ldapbindun'),"@".$this->config->item('ldapdomain'), $this->config->item('ldapbindpass'))) |
|
20 | - echo "Invalid credentials."; |
|
19 | + if (!ldap_bind($conn, $this->config->item('ldapbindun'),"@".$this->config->item('ldapdomain'), $this->config->item('ldapbindpass'))) { |
|
20 | + echo "Invalid credentials."; |
|
21 | + } |
|
21 | 22 | // Search for user in directory |
22 | 23 | $cred = explode('\\', $username); |
23 | 24 | list($domain, $user) = $cred; |
@@ -23,7 +23,7 @@ |
||
23 | 23 | </tr> |
24 | 24 | </thead> |
25 | 25 | <tbody> |
26 | - <?php foreach ($status as $status_item): if ($status_item['category'] == 'network') {}else { |
|
26 | + <?php foreach ($status as $status_item): if ($status_item['category'] == 'network') {} else { |
|
27 | 27 | $sid = $status_item['id'];?> |
28 | 28 | <tr> |
29 | 29 | <td> <i class="fa <?= $status_item['icon'];?>" aria-hidden="true"></i> <?= $status_item['name'];?></td> |
@@ -16,8 +16,9 @@ |
||
16 | 16 | // specify the LDAP server to connect to |
17 | 17 | $conn = ldap_connect($this->config->item('ldapserver')) or die("Oh no can't create LDAP connection"); |
18 | 18 | // bind to the LDAP server specified above |
19 | - if (!ldap_bind($conn, $this->config->item('ldapbindun'),"@".$this->config->item('ldapdomain'), $this->config->item('ldapbindpass'))) |
|
20 | - echo "Invalid credentials."; |
|
19 | + if (!ldap_bind($conn, $this->config->item('ldapbindun'),"@".$this->config->item('ldapdomain'), $this->config->item('ldapbindpass'))) { |
|
20 | + echo "Invalid credentials."; |
|
21 | + } |
|
21 | 22 | // Search for user in directory |
22 | 23 | $cred = explode('\\', $username); |
23 | 24 | list($domain, $user) = $cred; |
@@ -69,7 +69,7 @@ |
||
69 | 69 | </tbody> |
70 | 70 | </table> |
71 | 71 | </div> |
72 | -<?php }else{?> |
|
72 | +<?php } else{?> |
|
73 | 73 | <br/> |
74 | 74 | <?php echo $this->l('list_no_items'); ?> |
75 | 75 | <br/> |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('BASEPATH')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | |
3 | 5 | /** |
4 | 6 | * Breadcrumb helper |
@@ -242,9 +244,11 @@ discard block |
||
242 | 244 | $segment .= $uri_array_original[$i].'/'; |
243 | 245 | |
244 | 246 | // If replace value is an array |
245 | - if (! in_array($i, $skip_key, TRUE) && is_array($value)) // Skip link if replace value is null |
|
247 | + if (! in_array($i, $skip_key, TRUE) && is_array($value)) { |
|
248 | + // Skip link if replace value is null |
|
246 | 249 | { |
247 | 250 | $number_added_value_array = count($value); |
251 | + } |
|
248 | 252 | |
249 | 253 | foreach ($value as $pair_values) |
250 | 254 | { |
@@ -254,8 +258,7 @@ discard block |
||
254 | 258 | if ($number_pv_array == 1) |
255 | 259 | { |
256 | 260 | $val_name = $pv_array[0]; |
257 | - } |
|
258 | - else |
|
261 | + } else |
|
259 | 262 | { |
260 | 263 | $val_name = $pv_array[1]; |
261 | 264 | } |
@@ -293,12 +296,10 @@ discard block |
||
293 | 296 | if ($number_pv_array == 1 || $val_url == $uri_array_original[$i]) |
294 | 297 | { |
295 | 298 | $new_segment_url = $segment; |
296 | - } |
|
297 | - else if ($val_url[0] == '/') |
|
299 | + } else if ($val_url[0] == '/') |
|
298 | 300 | { |
299 | 301 | $new_segment_url = base_url().substr($val_url, 1); |
300 | - } |
|
301 | - else |
|
302 | + } else |
|
302 | 303 | { |
303 | 304 | $new_segment_url = $segment.$val_url; |
304 | 305 | } |
@@ -308,14 +309,15 @@ discard block |
||
308 | 309 | $str_name = array(); |
309 | 310 | $str_name[] = ucwords($val_name); |
310 | 311 | } |
311 | - } |
|
312 | - else if (! in_array($i, $skip_key, TRUE)) // If value is NOT an array |
|
312 | + } else if (! in_array($i, $skip_key, TRUE)) { |
|
313 | + // If value is NOT an array |
|
313 | 314 | { |
314 | 315 | // Add multilanguage |
315 | 316 | if ($CI->config->item('multilang')) |
316 | 317 | { |
317 | 318 | if ($CI->lang->line($value)) { |
318 | 319 | $value = ucwords($CI->lang->line($value)); |
320 | + } |
|
319 | 321 | } |
320 | 322 | } |
321 | 323 |