better support for new meta HTML

This commit is contained in:
Roland Gruber 2010-06-10 15:39:35 +00:00
parent 5f621063ac
commit 2c16303759
1 changed files with 22 additions and 4 deletions

View File

@ -648,9 +648,23 @@ abstract class baseModule {
public function get_configOptions($scopes, $allScopes) { public function get_configOptions($scopes, $allScopes) {
$return = array(); $return = array();
for ($i = 0; $i < sizeof($scopes); $i++) { for ($i = 0; $i < sizeof($scopes); $i++) {
if (isset($this->meta['config_options'][$scopes[$i]])) $return = array_merge($return, $this->meta['config_options'][$scopes[$i]]); if (isset($this->meta['config_options'][$scopes[$i]])) {
if (is_array($this->meta['config_options'][$scopes[$i]])) {
$return = array_merge($return, $this->meta['config_options'][$scopes[$i]]);
}
else {
$return[] = $this->meta['config_options'][$scopes[$i]];
}
}
}
if (isset($this->meta['config_options']['all'])) {
if (is_array($this->meta['config_options']['all'])) {
$return = array_merge($return, $this->meta['config_options']['all']);
}
else {
$return[] = $this->meta['config_options']['all'];
}
} }
if (isset($this->meta['config_options']['all'])) $return = array_merge($return, $this->meta['config_options']['all']);
return $return; return $return;
} }
@ -1247,8 +1261,12 @@ abstract class baseModule {
* @see parseHtml() * @see parseHtml()
*/ */
public function getSelfServiceSettings() { public function getSelfServiceSettings() {
if (isset($this->meta['selfServiceSettings']) && is_array($this->meta['selfServiceSettings'])) return $this->meta['selfServiceSettings']; if (isset($this->meta['selfServiceSettings'])) {
else return array(); return $this->meta['selfServiceSettings'];
}
else {
return array();
}
} }
/** /**