X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_baseSelector.inc;h=0b26ffe0bbdda9f530448fe31c623eb7d1c6a110;hb=e1e757ca6816d818fa1a393b66f165ffefb1afe7;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..0b26ffe0b 100644 --- a/gosa-core/include/class_baseSelector.inc +++ b/gosa-core/include/class_baseSelector.inc @@ -23,23 +23,35 @@ 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. - #'dc' => 'plugins/departments/images/domain.png', - #'dc' => 'plugins/departments/images/dc.png', - #'l' => 'plugins/departments/images/locality.png', - #'c' => 'plugins/departments/images/country.png', - #'o' => 'plugins/departments/images/organization.png', - #'ou' => 'plugins/departments/images/folder.png', 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 +59,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")."