From: cajus Date: Thu, 3 Sep 2009 09:11:32 +0000 (+0000) Subject: Add remaining files X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d1902dd692c64af932efe36a9c5e6a469362f67e;p=gosa.git Add remaining files git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14201 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_userinfo.inc b/gosa-core/include/class_userinfo.inc index 01315479d..a32f07da6 100644 --- a/gosa-core/include/class_userinfo.inc +++ b/gosa-core/include/class_userinfo.inc @@ -59,8 +59,8 @@ class userinfo } /* Restrictions? */ - if (isset($attrs['gosaLoginRestrictions'])){ - $this->restrictions= $attrs['gosaLoginRestrictions']; + if (isset($attrs['gosaLoginRestriction'])){ + $this->restrictions= $attrs['gosaLoginRestriction']; unset($this->restrictions['count']); } diff --git a/gosa-core/include/utils/class_xml.inc b/gosa-core/include/utils/class_xml.inc index 713d09930..5824e805a 100644 --- a/gosa-core/include/utils/class_xml.inc +++ b/gosa-core/include/utils/class_xml.inc @@ -25,7 +25,7 @@ class xml { // Enable user error handling libxml_use_internal_errors(true); - $xml = new DOMDocument(); + $xml= new DOMDocument(); $xml->load($file); if (!$xml->schemaValidate($schema)) { @@ -179,34 +179,4 @@ class xml { 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]; - } - }