config option check may change settings

This commit is contained in:
Roland Gruber 2012-11-25 10:57:15 +00:00
parent 1883fe086f
commit e439d2cc5a
4 changed files with 8 additions and 4 deletions

View File

@ -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++) {

View File

@ -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++) {

View File

@ -229,7 +229,11 @@ class account extends baseModule {
*/
function get_pdfEntries() {
$return = array();
$return['account_description'] = array('<block><key>' . _('Description') . '</key><value>' . $this->attributes['description'][0] . '</value></block>');
$description = '';
if (isset($this->attributes['description'][0])) {
$description = $this->attributes['description'][0];
}
$return['account_description'] = array('<block><key>' . _('Description') . '</key><value>' . $description . '</value></block>');
$return['account_uid'] = array('<block><key>' . _('User name') . '</key><value>' . $this->attributes['uid'][0] . '</value></block>');
return $return;
}

View File

@ -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)) {