Commit eb30a024 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes #3914 Removed last references of tabs class

Showing with 9 additions and 22 deletions
+9 -22
...@@ -172,6 +172,7 @@ class CopyPasteHandler ...@@ -172,6 +172,7 @@ class CopyPasteHandler
if (isset($entry['type'])) { if (isset($entry['type'])) {
$entry['object'] = objects::open($entry['dn'], $entry['type']); $entry['object'] = objects::open($entry['dn'], $entry['type']);
} else { } else {
trigger_error('Call to deprecated tabs constructor');
// old way // old way
$tab_c = $entry['tab_class']; $tab_c = $entry['tab_class'];
$tab_o = $entry['tab_object']; $tab_o = $entry['tab_object'];
......
...@@ -194,7 +194,7 @@ class management ...@@ -194,7 +194,7 @@ class management
} }
// Display tab object. // Display tab object.
if ($this->tabObject instanceOf tabs) { if ($this->tabObject instanceOf simpleTabs) {
$this->tabObject->save_object(); $this->tabObject->save_object();
$display = $this->tabObject->execute(); $display = $this->tabObject->execute();
$display .= $this->_getTabFooter(); $display .= $this->_getTabFooter();
...@@ -275,7 +275,7 @@ class management ...@@ -275,7 +275,7 @@ class management
protected function _getTabFooter() protected function _getTabFooter()
{ {
// Do not display tab footer for non tab objects // Do not display tab footer for non tab objects
if (!($this->tabObject instanceOf tabs)) { if (!($this->tabObject instanceOf simpleTabs)) {
return ""; return "";
} }
...@@ -756,7 +756,7 @@ class management ...@@ -756,7 +756,7 @@ class management
*/ */
protected function saveChanges() protected function saveChanges()
{ {
if ($this->tabObject instanceOf tabs) { if ($this->tabObject instanceOf simpleTabs) {
$this->tabObject->save_object(); $this->tabObject->save_object();
$msgs = $this->tabObject->check(); $msgs = $this->tabObject->check();
if (count($msgs)) { if (count($msgs)) {
...@@ -791,7 +791,7 @@ class management ...@@ -791,7 +791,7 @@ class management
*/ */
protected function applyChanges() protected function applyChanges()
{ {
if ($this->tabObject instanceOf tabs) { if ($this->tabObject instanceOf simpleTabs) {
$this->tabObject->save_object(); $this->tabObject->save_object();
$msgs = $this->tabObject->check(); $msgs = $this->tabObject->check();
if (count($msgs)) { if (count($msgs)) {
......
...@@ -23,25 +23,11 @@ class deptabs extends simpleTabs ...@@ -23,25 +23,11 @@ class deptabs extends simpleTabs
{ {
function save() function save()
{ {
$baseobject = $this->getBaseObject(); parent::save();
$new_dn = $baseobject->compute_dn();
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $new_dn, "Saving");
/* Move ? */ /* Update department cache */
if ($this->dn != $new_dn) { global $config;
/* Write entry on new 'dn' */ $config->get_departments();
if ($this->dn != 'new') {
$baseobject->move($this->dn, $new_dn);
}
/* Happen to use the new one */
$this->dn = $new_dn;
/* Update department cache */
global $config;
$config->get_departments();
}
tabs::save();
} }
} }
?> ?>
  • bmortier @bmortier

    mentioned in issue #1300

    By Côme Chilliet on 2017-09-02T15:21:26 (imported from GitLab)

    ·

    mentioned in issue #1300

    By Côme Chilliet on 2017-09-02T15:21:26 (imported from GitLab)

    Toggle commit list
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment