diff --git a/include/class_ldap.inc b/include/class_ldap.inc index cc84bc9b24f87d6f0779eaf49a3627279dff74a8..66e2cbde9cbccdc9db04c11e38446a57fc988740 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -572,7 +572,10 @@ class LDAP function rm($attrs = "", $dn = "") { if ($this->hascon) { - if ($this->reconnect) $this->connect(); + if ($this->reconnect) { + $this->connect(); + } + if ($dn == "") $dn = $this->basedn; @@ -588,7 +591,10 @@ class LDAP function mod_add($attrs = "", $dn = "") { if ($this->hascon) { - if ($this->reconnect) $this->connect(); + if ($this->reconnect) { + $this->connect(); + } + if ($dn == "") $dn = $this->basedn; @@ -609,7 +615,10 @@ class LDAP function rmdir($deletedn) { if ($this->hascon) { - if ($this->reconnect) $this->connect(); + if ($this->reconnect) { + $this->connect(); + } + $r = @ldap_delete($this->cid, LDAP::fix($deletedn)); $this->error = @ldap_error($this->cid); return ($r ? $r : 0); @@ -654,7 +663,10 @@ class LDAP $dest_rdn = preg_replace("/,.*$/", "", $dest); if ($this->hascon) { - if ($this->reconnect) $this->connect(); + if ($this->reconnect) { + $this->connect(); + } + $r = ldap_rename($this->cid, @LDAP::fix($source), @LDAP::fix($dest_rdn), @LDAP::fix($parent), FALSE); $this->error = ldap_error($this->cid); @@ -683,7 +695,9 @@ class LDAP function rmdir_recursive($srp, $deletedn) { if ($this->hascon) { - if ($this->reconnect) $this->connect(); + if ($this->reconnect) { + $this->connect(); + } $delarray = array(); /* Get sorted list of dn's to delete */ @@ -743,7 +757,9 @@ class LDAP return 0; } if ($this->hascon) { - if ($this->reconnect) $this->connect(); + if ($this->reconnect) { + $this->connect(); + } $r = @ldap_modify($this->cid, LDAP::fix($this->basedn), $attrs); $this->error = @ldap_error($this->cid); if (!$this->success()) { @@ -764,7 +780,9 @@ class LDAP function add($attrs) { if ($this->hascon) { - if ($this->reconnect) $this->connect(); + if ($this->reconnect) { + $this->connect(); + } $r = @ldap_add($this->cid, LDAP::fix($this->basedn), $attrs); $this->error = @ldap_error($this->cid); if (!$this->success()) { @@ -869,7 +887,9 @@ class LDAP /* Fill in MUST values - but do not overwrite existing ones. */ if (is_array($classes[$ocname]['MUST'])) { foreach ($classes[$ocname]['MUST'] as $attr) { - if (isset($na[$attr]) && !empty($na[$attr])) continue; + if (isset($na[$attr]) && !empty($na[$attr])) { + continue; + } $na[$attr] = 'filled'; } } diff --git a/include/class_management.inc b/include/class_management.inc index dd27c6a9ef1452fcdb0d9af54009ee2fb66df77b..c109b54c1e7aa60a8570f50484ee5fc28dfa14af 100644 --- a/include/class_management.inc +++ b/include/class_management.inc @@ -200,8 +200,9 @@ class management } // No bases specified? Try base - if (!count($bases)) $bases[] = $this->headpage->getBase(); - + if (!count($bases)) { + $bases[] = $this->headpage->getBase(); + } $this->snapHandler->setSnapshotBases($bases); } @@ -379,9 +380,12 @@ class management $tabClass = $this->tabClass; $aclCategory = $this->aclCategory; - if (!empty($altTabClass)) $tabClass = $altTabClass; - if (!empty($altTabType)) $tabType = $altTabType; - if (!empty($altAclCategory)) $aclCategory = $altAclCategory; + if (!empty($altTabClass)) + $tabClass = $altTabClass; + if (!empty($altTabType)) + $tabType = $altTabType; + if (!empty($altAclCategory)) + $aclCategory = $altAclCategory; @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $target, "Entry removal confirmed!"); @@ -423,9 +427,15 @@ class management return array(); } $action = $this->headpage->getAction(); - if (isset($_POST['edit_apply'])) $action['action'] = 'apply'; - if (isset($_POST['edit_finish'])) $action['action'] = 'save'; - if (isset($_POST['edit_cancel'])) $action['action'] = 'cancel'; + if (isset($_POST['edit_apply'])) { + $action['action'] = 'apply'; + } + if (isset($_POST['edit_finish'])) { + $action['action'] = 'save'; + } + if (isset($_POST['edit_cancel'])) { + $action['action'] = 'cancel'; + } if (!$this->is_modal_dialog()) { if (isset($_POST['delete_confirmed'])) { $action['action'] = 'removeConfirmed'; @@ -545,8 +555,9 @@ class management } // No bases specified? Try base - if (!count($bases)) $bases[] = $this->headpage->getBase(); - + if (!count($bases)) { + $bases[] = $this->headpage->getBase(); + } if (!count($target)) { // No target, open the restore removed object dialog. $this->dn = $this->headpage->getBase(); @@ -652,9 +663,15 @@ class management $tabType = $this->tabType; $tabClass = $this->tabClass; $aclCategory = $this->aclCategory; - if (!empty($altTabClass)) $tabClass = $altTabClass; - if (!empty($altTabType)) $tabType = $altTabType; - if (!empty($altAclCategory)) $aclCategory = $altAclCategory; + if (!empty($altTabClass)) { + $tabClass = $altTabClass; + } + if (!empty($altTabType)) { + $tabType = $altTabType; + } + if (!empty($altAclCategory)) { + $aclCategory = $altAclCategory; + } // Check locking & lock entry if required $this->displayApplyBtn = FALSE; @@ -726,9 +743,15 @@ class management $tabType = $this->tabType; $tabClass = $this->tabClass; $aclCategory = $this->aclCategory; - if (!empty($altTabClass)) $tabClass = $altTabClass; - if (!empty($altTabType)) $tabType = $altTabType; - if (!empty($altAclCategory)) $aclCategory = $altAclCategory; + if (!empty($altTabClass)) { + $tabClass = $altTabClass; + } + if (!empty($altTabType)) { + $tabType = $altTabType; + } + if (!empty($altAclCategory)) { + $aclCategory = $altAclCategory; + } $this->displayApplyBtn = count($target) == 1; diff --git a/include/class_userinfo.inc b/include/class_userinfo.inc index 4145e79dca791febb26347d89d3e04107235f417..081ef3b59716b113eb543343a5c85d8643143883 100644 --- a/include/class_userinfo.inc +++ b/include/class_userinfo.inc @@ -678,7 +678,9 @@ class userinfo /* For all gosaDepartments */ foreach ($config->departments as $dn) { - if (isset($deps[$dn])) continue; + if (isset($deps[$dn])) { + continue; + } $acl = ""; if (strpos($mod, '/')) { $acl .= $this->get_permissions($dn, $mod); diff --git a/include/functions_debug.inc b/include/functions_debug.inc index a5322e2d71eb92b8b5d7d4d9b0e6d607ef216016..709a9711af9254ffbd13b4a0a4169a349ab81c5b 100644 --- a/include/functions_debug.inc +++ b/include/functions_debug.inc @@ -326,7 +326,9 @@ function show_vars($show_all_vars = FALSE, $show_object_vars = FALSE) } foreach ($vars_arr as $vars_name => $vars_data) { - if ($vars_name != 'script_globals') global $$vars_name; + if ($vars_name != 'script_globals') { + global $$vars_name; + } if ($$vars_name) { print '<div class="vars-container" style="background-color:'.$vars_data[1].';"><span class="varsname">'.$vars_data[0].'</span><br />'; print_a($$vars_name, FALSE, $show_object_vars, FALSE );