X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_baseSelector.inc;h=4da32961e827ac04fa56158b03c0ad07e3a89090;hb=7d0eab6bb81d3010130879061ea00542071f5b76;hp=baea70e5fcc27eaec6b724b3adc670990a8d7d55;hpb=98d4da0c93f8df24dc0c9bd4a92c90c27b461755;p=gosa.git diff --git a/gosa-core/include/class_baseSelector.inc b/gosa-core/include/class_baseSelector.inc index baea70e5f..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,28 +42,54 @@ class baseSelector { function __construct($bases, $base= "") { + // Initialize pid + $this->pid= preg_replace("/[^0-9]/", "", microtime(TRUE)); + + // Transfer data $this->setBases($bases); $this->setBase($base); } + function setSubmitButton($flag) + { + $this->submitButton= $flag; + } + + + function setHeight($value) + { + $this->height= $value; + } + + function setBase($base) { 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")."