temporarily deactivated update_cache() calls
This commit is contained in:
parent
d97c2e5afc
commit
1df507d3d4
|
@ -1533,14 +1533,14 @@ class accountContainer {
|
||||||
}
|
}
|
||||||
$success = ldap_add($_SESSION['ldap']->server(), $this->dn, $attr);
|
$success = ldap_add($_SESSION['ldap']->server(), $this->dn, $attr);
|
||||||
if ($success) {
|
if ($success) {
|
||||||
$_SESSION['cache']->update_cache($this->dn, 'add', $attr);
|
//$_SESSION['cache']->update_cache($this->dn, 'add', $attr); TODO: reactivate
|
||||||
$success = ldap_delete($_SESSION['ldap']->server(), $this->dn_orig);
|
$success = ldap_delete($_SESSION['ldap']->server(), $this->dn_orig);
|
||||||
if (!$success) {
|
if (!$success) {
|
||||||
$errors[] = array('ERROR', sprintf(_('Was unable to delete DN: %s.'), $this->dn_orig), ldap_error($_SESSION['ldap']->server()));
|
$errors[] = array('ERROR', sprintf(_('Was unable to delete DN: %s.'), $this->dn_orig), ldap_error($_SESSION['ldap']->server()));
|
||||||
$stopprocessing = true;
|
$stopprocessing = true;
|
||||||
}
|
}
|
||||||
if ($success)
|
//if ($success) TODO: reactivate
|
||||||
$_SESSION['cache']->update_cache($this->dn, 'delete_dn');
|
//$_SESSION['cache']->update_cache($this->dn, 'delete_dn'); TODO: reactivate
|
||||||
}
|
}
|
||||||
if (!$success) {
|
if (!$success) {
|
||||||
$errors[] = array('ERROR', sprintf(_('Was unable to create DN: %s.'), $this->dn), ldap_error($_SESSION['ldap']->server()));
|
$errors[] = array('ERROR', sprintf(_('Was unable to create DN: %s.'), $this->dn), ldap_error($_SESSION['ldap']->server()));
|
||||||
|
@ -1558,8 +1558,8 @@ class accountContainer {
|
||||||
$errors[] = array('ERROR', sprintf(_('Was unable to create DN: %s.'), $this->dn), ldap_error($_SESSION['ldap']->server()));
|
$errors[] = array('ERROR', sprintf(_('Was unable to create DN: %s.'), $this->dn), ldap_error($_SESSION['ldap']->server()));
|
||||||
$stopprocessing = true;
|
$stopprocessing = true;
|
||||||
}
|
}
|
||||||
else
|
//else TODO: reactivate
|
||||||
$_SESSION['cache']->update_cache($this->dn, 'add', $attr);
|
//$_SESSION['cache']->update_cache($this->dn, 'add', $attr); TODO: reactivate
|
||||||
}
|
}
|
||||||
unset($attributes[$this->dn]);
|
unset($attributes[$this->dn]);
|
||||||
}
|
}
|
||||||
|
@ -1574,8 +1574,8 @@ class accountContainer {
|
||||||
$errors[] = array('ERROR', sprintf(_('Was unable to modify attribtues from DN: %s.'), $DNs[$i]), ldap_error($_SESSION['ldap']->server()));
|
$errors[] = array('ERROR', sprintf(_('Was unable to modify attribtues from DN: %s.'), $DNs[$i]), ldap_error($_SESSION['ldap']->server()));
|
||||||
$stopprocessing = true;
|
$stopprocessing = true;
|
||||||
}
|
}
|
||||||
else
|
//else TODO: reactivate
|
||||||
$_SESSION['cache']->update_cache($this->dn, 'modify', $attributes[$this->dn]['modify']);
|
//$_SESSION['cache']->update_cache($this->dn, 'modify', $attributes[$this->dn]['modify']); TODO: reactivate
|
||||||
}
|
}
|
||||||
// add attributes
|
// add attributes
|
||||||
if (isset($attributes[$DNs[$i]]['add']) && !$stopprocessing) {
|
if (isset($attributes[$DNs[$i]]['add']) && !$stopprocessing) {
|
||||||
|
@ -1584,8 +1584,8 @@ class accountContainer {
|
||||||
$errors[] = array('ERROR', sprintf(_('Was unable to add attribtues to DN: %s.'), $DNs[$i]), ldap_error($_SESSION['ldap']->server()));
|
$errors[] = array('ERROR', sprintf(_('Was unable to add attribtues to DN: %s.'), $DNs[$i]), ldap_error($_SESSION['ldap']->server()));
|
||||||
$stopprocessing = true;
|
$stopprocessing = true;
|
||||||
}
|
}
|
||||||
else
|
//else TODO: reactivate
|
||||||
$_SESSION['cache']->update_cache($this->dn, 'add', $attributes[$this->dn]['add']);
|
//$_SESSION['cache']->update_cache($this->dn, 'add', $attributes[$this->dn]['add']); TODO: reactivate
|
||||||
}
|
}
|
||||||
// removce attributes
|
// removce attributes
|
||||||
if (isset($attributes[$DNs[$i]]['remove']) && !$stopprocessing) {
|
if (isset($attributes[$DNs[$i]]['remove']) && !$stopprocessing) {
|
||||||
|
@ -1594,8 +1594,8 @@ class accountContainer {
|
||||||
$errors[] = array('ERROR', sprintf(_('Was unable to remove attribtues from DN: %s.'), $DNs[$i]), ldap_error($_SESSION['ldap']->server()));
|
$errors[] = array('ERROR', sprintf(_('Was unable to remove attribtues from DN: %s.'), $DNs[$i]), ldap_error($_SESSION['ldap']->server()));
|
||||||
$stopprocessing = true;
|
$stopprocessing = true;
|
||||||
}
|
}
|
||||||
else
|
//else TODO: reactivate
|
||||||
$_SESSION['cache']->update_cache($this->dn, 'remove', $attributes[$this->dn]['remove']);
|
//$_SESSION['cache']->update_cache($this->dn, 'remove', $attributes[$this->dn]['remove']); TODO: reactivate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1616,6 +1616,7 @@ class accountContainer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$_SESSION['cache']->refresh_cache(true); // TODO: remove when update_cache is fixed
|
||||||
if (count($errors)!=0) return $errors;
|
if (count($errors)!=0) return $errors;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,7 +172,7 @@ if ($_POST['delete']) {
|
||||||
$errors[] = array ('ERROR', sprintf(_('Was unable to modify attribtues from DN: %s.'), $DNs[$i]), ldap_error($_SESSION['ldap']->server()));
|
$errors[] = array ('ERROR', sprintf(_('Was unable to modify attribtues from DN: %s.'), $DNs[$i]), ldap_error($_SESSION['ldap']->server()));
|
||||||
$stopprocessing = true;
|
$stopprocessing = true;
|
||||||
}
|
}
|
||||||
else $_SESSION['cache']->update_cache($DNs[$i], 'modify', $attributes[$DNs[$i]]['modify']);
|
//else $_SESSION['cache']->update_cache($DNs[$i], 'modify', $attributes[$DNs[$i]]['modify']); TODO: reactivate
|
||||||
}
|
}
|
||||||
// add attributes
|
// add attributes
|
||||||
if (isset($attributes[$DNs[$i]]['add']) && !$stopprocessing) {
|
if (isset($attributes[$DNs[$i]]['add']) && !$stopprocessing) {
|
||||||
|
@ -181,7 +181,7 @@ if ($_POST['delete']) {
|
||||||
$errors[] = array ('ERROR', sprintf(_('Was unable to add attribtues to DN: %s.'), $DNs[$i]), ldap_error($_SESSION['ldap']->server()));
|
$errors[] = array ('ERROR', sprintf(_('Was unable to add attribtues to DN: %s.'), $DNs[$i]), ldap_error($_SESSION['ldap']->server()));
|
||||||
$stopprocessing = true;
|
$stopprocessing = true;
|
||||||
}
|
}
|
||||||
else $_SESSION['cache']->update_cache($DNs[$i], 'add', $attributes[$DNs[$i]]['add']);
|
//else $_SESSION['cache']->update_cache($DNs[$i], 'add', $attributes[$DNs[$i]]['add']); TODO: reactivate
|
||||||
}
|
}
|
||||||
// removce attributes
|
// removce attributes
|
||||||
if (isset($attributes[$DNs[$i]]['remove']) && !$stopprocessing) {
|
if (isset($attributes[$DNs[$i]]['remove']) && !$stopprocessing) {
|
||||||
|
@ -190,7 +190,7 @@ if ($_POST['delete']) {
|
||||||
$errors[] = array ('ERROR', sprintf(_('Was unable to remove attribtues from DN: %s.'), $DNs[$i]), ldap_error($_SESSION['ldap']->server()));
|
$errors[] = array ('ERROR', sprintf(_('Was unable to remove attribtues from DN: %s.'), $DNs[$i]), ldap_error($_SESSION['ldap']->server()));
|
||||||
$stopprocessing = true;
|
$stopprocessing = true;
|
||||||
}
|
}
|
||||||
else $_SESSION['cache']->update_cache($DNs[$i], 'remove', $attributes[$DNs[$i]]['remove']);
|
//else $_SESSION['cache']->update_cache($DNs[$i], 'remove', $attributes[$DNs[$i]]['remove']); TODO: reactivate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,8 +218,8 @@ if ($_POST['delete']) {
|
||||||
$errors[] = array ('ERROR', sprintf(_('Was unable to delete DN: %s.'), $_SESSION['delete_dn'][$m]), ldap_error($_SESSION['ldap']->server()));
|
$errors[] = array ('ERROR', sprintf(_('Was unable to delete DN: %s.'), $_SESSION['delete_dn'][$m]), ldap_error($_SESSION['ldap']->server()));
|
||||||
$stopprocessing = true;
|
$stopprocessing = true;
|
||||||
}
|
}
|
||||||
else
|
//else TODO: reactivate
|
||||||
$_SESSION['cache']->update_cache($_SESSION['delete_dn'][$m], 'delete_dn');
|
//$_SESSION['cache']->update_cache($_SESSION['delete_dn'][$m], 'delete_dn'); TODO: reactivate
|
||||||
}
|
}
|
||||||
if (!$stopprocessing) {
|
if (!$stopprocessing) {
|
||||||
echo sprintf(_('Deleted DN: %s'), $_SESSION['delete_dn'][$m]) . "<br>\n";
|
echo sprintf(_('Deleted DN: %s'), $_SESSION['delete_dn'][$m]) . "<br>\n";
|
||||||
|
@ -232,6 +232,7 @@ if ($_POST['delete']) {
|
||||||
echo "<br>\n";
|
echo "<br>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$_SESSION['cache']->refresh_cache(true); // TODO: remove when update_cache is fixed
|
||||||
echo "<br>\n";
|
echo "<br>\n";
|
||||||
echo "<br><input name=\"cancel\" type=\"submit\" value=\"" . _('Back to list') . "\">\n";
|
echo "<br><input name=\"cancel\" type=\"submit\" value=\"" . _('Back to list') . "\">\n";
|
||||||
echo "</fieldset>\n";
|
echo "</fieldset>\n";
|
||||||
|
|
Loading…
Reference in New Issue