X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_baseSelector.inc;h=0b26ffe0bbdda9f530448fe31c623eb7d1c6a110;hb=e1e757ca6816d818fa1a393b66f165ffefb1afe7;hp=18f363e3fabb2dddc9a2b7f8b20d235236054b88;hpb=d262f0b8e5bc54bfe76b60970ffe3b86e0c84fe0;p=gosa.git diff --git a/gosa-core/include/class_baseSelector.inc b/gosa-core/include/class_baseSelector.inc index 18f363e3f..0b26ffe0b 100644 --- a/gosa-core/include/class_baseSelector.inc +++ b/gosa-core/include/class_baseSelector.inc @@ -23,42 +23,65 @@ 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); } + 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")."