index a8bd21d8106a3447c4654cf41f917ebb8b79b63c..4439b559abb49c2a550fcce68b4cefe0c6ca699a 100644 (file)
protected $snapHandler = null;
// The listing handlers
- protected $headpage = null;
- protected $filter = null;
+ private $headpage = null;
+ private $filter = null;
// A list of configured actions/events
protected $actions = array();
}
$this->snapHandler->setSnapshotBases($bases);
}
-
+
+ // Display list
+ return($this->renderList());
+ }
+
+ function renderList()
+ {
$this->headpage->update();
$display = $this->headpage->render();
return($this->getHeader().$display);
}
+ function getHeadpage()
+ {
+ return($this->headpage);
+ }
+ function getFilter()
+ {
+ return($this->filter);
+ }
/*! \brief Generates the plugin header which is displayed whenever a tab object is
* opened.
// Check if there is a dialog opened - We don't need any buttons in this case.
if($this->tabObject->by_object[$this->tabObject->current]){
$current = $this->tabObject->by_object[$this->tabObject->current];
- if(is_object($current->dialog)){
+ if(isset($current->dialog) && (is_object($current->dialog) || $current->dialog)){
return("");
}
}
$this->tabObject= new $tabClass($this->config,$this->config->data['TABS'][$tabType], $this->dn, $aclCategory);
$this->tabObject->set_acl_base($this->dn);
$this->tabObject->delete ();
+ $this->tabObject->parent = &$this;
// Remove the lock for the current object.
del_lock($this->dn);
*/
function detectPostActions()
{
+ if(!is_object($this->headpage)){
+ trigger_error("No valid headpage given....!");
+ return(array());
+ }
$action= $this->headpage->getAction();
if(isset($_POST['edit_apply'])) $action['action'] = "apply";
if(isset($_POST['edit_finish'])) $action['action'] = "save";
if(!empty($entry) && $this->ui->allow_snapshot_create($entry,$this->aclCategory)){
$this->dialogObject = new SnapShotDialog($this->config,$entry,$this);
$this->dialogObject->aclCategories = array($this->aclCategory);
+ $this->dialogObject->parent = &$this;
}else{
msg_dialog::display(_("Permission"),sprintf(_("You are not allowed to create a snapshot for %s."),$entry),
$this->dialogObject->set_snapshot_bases($bases);
$this->dialogObject->display_all_removed_objects = true;
$this->dialogObject->display_restore_dialog = true;
+ $this->dialogObject->parent = &$this;
}else{
msg_dialog::display(_("Permission"),sprintf(_("You are not allowed to restore a snapshot for %s."),$entry),
ERROR_DIALOG);
$this->dialogObject = new SnapShotDialog($this->config,$entry,$this);
$this->dialogObject->set_snapshot_bases($bases);
$this->dialogObject->display_restore_dialog = true;
+ $this->dialogObject->parent = &$this;
}else{
msg_dialog::display(_("Permission"),sprintf(_("You are not allowed to restore a snapshot for %s."),$entry),
ERROR_DIALOG);
}else{
$this->tabObject= new $tabClass($this->config,$this->config->data['TABS'][$tabType], $this->dn, $aclCategory);
$this->tabObject->set_acl_base($this->headpage->getBase());
+ $this->tabObject->parent = &$this;
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dn,"Create new entry initiated!");
}
}
$this->tabObject= new $tab($this->config,$this->config->data['TABS'][$tabType], $this->dn,$aclCategory);
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dn,"Edit entry initiated!");
$this->tabObject->set_acl_base($this->dn);
+ $this->tabObject->parent = &$this;
}
}else{