summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 33c198e)
raw | patch | inline | side by side (parent: 33c198e)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 3 Sep 2009 09:11:32 +0000 (09:11 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 3 Sep 2009 09:11:32 +0000 (09:11 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14201 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_userinfo.inc | patch | blob | history | |
gosa-core/include/utils/class_xml.inc | patch | blob | history |
index 01315479d61e08eafce76df79a733e5cc2550c18..a32f07da647664216c4cd799b4ebecd6208cbefe 100644 (file)
}
/* Restrictions? */
- if (isset($attrs['gosaLoginRestrictions'])){
- $this->restrictions= $attrs['gosaLoginRestrictions'];
+ if (isset($attrs['gosaLoginRestriction'])){
+ $this->restrictions= $attrs['gosaLoginRestriction'];
unset($this->restrictions['count']);
}
index 713d099308d441ad4fa5af35fd346fa85166715f..5824e805a3c9ddc81216333db61840310d70f23f 100644 (file)
// Enable user error handling
libxml_use_internal_errors(true);
- $xml = new DOMDocument();
+ $xml= new DOMDocument();
$xml->load($file);
if (!$xml->schemaValidate($schema)) {
return($xml_array);
}
-
- static function getLocalizedAttribute($attribute, $lang)
- {
- // Return directly if there's no lang code
- if (!is_array($attribute)) {
- return($attribute);
- }
-
- // Get language index if available
- $lang= preg_replace('/_.*$/', '', $lang);
- $mapper= array();
- foreach($attribute as $index => $lv){
- if (preg_match('/_attr$/', $index) && isset($lv['xml:lang']) && $lv['xml:lang'] == $lang) {
- $li= preg_replace('/_attr$/', '', $index);
- if (isset($mapper[$li])) {
- unset($mapper[$li]);
- }
- } else {
- $mapper[$index]= $index;
- }
- }
-
- // Use some default if no index is available
- if (!$li) {
- $li= array_shift($mapper);
- }
-
- return $attribute[$li];
- }
-
}