From e439d2cc5a3477fbf739ea3a8e9e8b749ee7eae6 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 25 Nov 2012 10:57:15 +0000 Subject: [PATCH] config option check may change settings --- lam/lib/baseModule.inc | 2 +- lam/lib/modules.inc | 2 +- lam/lib/modules/account.inc | 6 +++++- lam/lib/modules/posixAccount.inc | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index c9563725..ede34454 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -688,7 +688,7 @@ abstract class baseModule { * * @see baseModule::get_metaData() */ - public function check_configOptions($scopes, $options) { + public function check_configOptions($scopes, &$options) { $messages = array(); $scopes[] = 'all'; // add checks that are independent of scope for ($s = 0; $s < sizeof($scopes); $s++) { diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 75c4abec..4acbfccf 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -326,7 +326,7 @@ function getConfigOptions($scopes) { * @param array $options hash array containing all options (name => array(...)) * @return array list of error messages */ -function checkConfigOptions($scopes, $options) { +function checkConfigOptions($scopes, &$options) { $return = array(); $modules = array_keys($scopes); for ($i = 0; $i < sizeof($modules); $i++) { diff --git a/lam/lib/modules/account.inc b/lam/lib/modules/account.inc index b579428d..597ce8b5 100644 --- a/lam/lib/modules/account.inc +++ b/lam/lib/modules/account.inc @@ -229,7 +229,11 @@ class account extends baseModule { */ function get_pdfEntries() { $return = array(); - $return['account_description'] = array('' . _('Description') . '' . $this->attributes['description'][0] . ''); + $description = ''; + if (isset($this->attributes['description'][0])) { + $description = $this->attributes['description'][0]; + } + $return['account_description'] = array('' . _('Description') . '' . $description . ''); $return['account_uid'] = array('' . _('User name') . '' . $this->attributes['uid'][0] . ''); return $return; } diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 40dc97b4..5fd10411 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -1513,7 +1513,7 @@ class posixAccount extends baseModule implements passwordService { * @param array $options hash array containing the settings (array('option' => array('value'))) * @return array list of error messages */ - function check_configOptions($scopes, $options) { + function check_configOptions($scopes, &$options) { $return = array(); // user settings if (in_array('user', $scopes)) {