diff options
author | Simon Rettberg | 2016-03-21 18:15:31 +0100 |
---|---|---|
committer | Simon Rettberg | 2016-03-21 18:15:31 +0100 |
commit | ea385dfb9f076a09e1c11eccc037d7cabccb7bcf (patch) | |
tree | b3e382505200a7cb44594b4ad074ae5e7778a2fe /modules/sysconfig/addmodule.inc.php | |
parent | [event.inc] Remove debug output (diff) | |
download | slx-admin-ea385dfb9f076a09e1c11eccc037d7cabccb7bcf.tar.gz slx-admin-ea385dfb9f076a09e1c11eccc037d7cabccb7bcf.tar.xz slx-admin-ea385dfb9f076a09e1c11eccc037d7cabccb7bcf.zip |
[adauth] Configurable home directory mount logic
Diffstat (limited to 'modules/sysconfig/addmodule.inc.php')
-rw-r--r-- | modules/sysconfig/addmodule.inc.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/sysconfig/addmodule.inc.php b/modules/sysconfig/addmodule.inc.php index 0fed67a9..a20bda37 100644 --- a/modules/sysconfig/addmodule.inc.php +++ b/modules/sysconfig/addmodule.inc.php @@ -18,6 +18,35 @@ abstract class AddModule_Base * @var \ConfigModule */ protected $edit = false; + + protected $bag = false; + + private $bagId = false; + + protected function loadBag($createIfNone = true) + { + if ($this->bagId !== false) + return $this->bagId; + $bagId = Request::any('bag', '', 'string'); + $this->bag = Session::get($bagId); + if ($this->bag === false) { + if (!$createIfNone) + return false; + $this->bagId = dechex(rand()); + $this->bag = array(); + } else { + $this->bagId = $bagId; + } + return $this->bagId; + } + + protected function saveBag() + { + if ($this->bagId === false) + return false; + Session::set($this->bagId, $this->bag); + return true; + } /** * |