X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_baseSelector.inc;h=4da32961e827ac04fa56158b03c0ad07e3a89090;hb=7d0eab6bb81d3010130879061ea00542071f5b76;hp=9ca0a429542758b63d761508c383eb411812e8f0;hpb=31e0e749270442feeecd317a34312e9556fd773f;p=gosa.git diff --git a/gosa-core/include/class_baseSelector.inc b/gosa-core/include/class_baseSelector.inc index 9ca0a4295..4da32961e 100644 --- a/gosa-core/include/class_baseSelector.inc +++ b/gosa-core/include/class_baseSelector.inc @@ -23,8 +23,13 @@ class baseSelector { private $base; + private $pid; + private $action; + private $height= 500; + private $submitButton= true; protected $tree; protected $pathMapping; + protected $lastState; // It would be better to get a dn -> [name, description, type] array // to avoid these tasks be done several times. Skipping for the moment. @@ -37,9 +42,24 @@ class baseSelector { function __construct($bases, $base= "") { + // Initialize pid + $this->pid= preg_replace("/[^0-9]/", "", microtime(TRUE)); + + // Transfer data $this->setBases($bases); $this->setBase($base); - $this->update(); + } + + + function setSubmitButton($flag) + { + $this->submitButton= $flag; + } + + + function setHeight($value) + { + $this->height= $value; } @@ -47,19 +67,29 @@ class baseSelector { { if (isset($this->pathMapping[$base])) { $this->base= $base; - } else { - die("Invalid base selected"); + $this->update(true); } } + function checkBase($base) + { + return isset($this->pathMapping[$base]); + } + + + function checkLastBaseUpdate() + { + return $this->lastState; + } + + function setBases($bases) { global $config; $this->pathMapping= array(); $selected= $this->base == $config->current['BASE']?"Selected":""; - $this->tree= "
"._("Root")."