load configuration before meta data

This commit is contained in:
Roland Gruber 2009-10-03 15:45:41 +00:00
parent b61e8c69c5
commit ceb60ad1a3
1 changed files with 5 additions and 4 deletions

View File

@ -85,13 +85,14 @@ abstract class baseModule {
* @param string $scope the account type (user, group, host) * @param string $scope the account type (user, group, host)
*/ */
public function __construct($scope) { public function __construct($scope) {
// load configuration
if (isset($_SESSION['config'])) $this->moduleSettings = $_SESSION['config']->get_moduleSettings();
if (isset($_SESSION['selfServiceProfile'])) $this->selfServiceSettings = $_SESSION['selfServiceProfile'];
// initialize module
$this->scope = $scope; $this->scope = $scope;
$this->load_Messages(); $this->load_Messages();
$this->meta = $this->get_metaData(); $this->meta = $this->get_metaData();
$this->autoAddObjectClasses = true; $this->autoAddObjectClasses = true;
// load configuration
if (isset($_SESSION['config'])) $this->moduleSettings = $_SESSION['config']->get_moduleSettings();
if (isset($_SESSION['selfServiceProfile'])) $this->selfServiceSettings = $_SESSION['selfServiceProfile'];
} }
/** /**
@ -634,7 +635,7 @@ abstract class baseModule {
* *
* Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> * Calling this method does not require the existence of an enclosing {@link accountContainer}.<br>
* <br> * <br>
* The type "fieldset" is not allowed here. The name attributes are used as keywords to load and save settings. * The type "fieldset" is not allowed here. The attribute names are used as keywords to load and save settings.
* We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming conflicts. * We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming conflicts.
* *
* @param array $scopes account types (user, group, host) * @param array $scopes account types (user, group, host)