Changeset 1407
- Timestamp:
- 11/30/06 01:36:24 (2 years ago)
- Location:
- branches/0.11/src
- Files:
-
- 3 modified
-
config/AgaviLdmlConfigHandler.class.php (modified) (2 diffs)
-
config/AgaviXmlConfigParser.class.php (modified) (1 diff)
-
date/AgaviGregorianCalendar.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/src/config/AgaviLdmlConfigHandler.class.php
r1359 r1407 519 519 520 520 if(isset($calendar->fields)) { 521 if(isset($calendar->fields->alias)) { 522 throw new AgaviException('TODO: alias handling in calendar/fields'); 523 } else { 524 foreach($calendar->fields as $field) { 525 $type = $field->getAttribute('type'); 526 if(isset($field->displayName)) { 527 $data['calendars'][$calendarName]['fields'][$type]['displayName'] = $field->displayName->getValue(); 528 } 529 if(isset($field->relative)) { 530 foreach($field as $relative) { 531 if($relative->getName() == 'relative') { 532 $data['calendars'][$calendarName]['fields'][$type]['relatives'][$relative->getAttribute('type')] = $relative->getValue(); 533 } 521 foreach($this->getChildsOrAlias($calendar->fields) as $field) { 522 $type = $field->getAttribute('type'); 523 if(isset($field->displayName)) { 524 $data['calendars'][$calendarName]['fields'][$type]['displayName'] = $field->displayName->getValue(); 525 } 526 if(isset($field->relative)) { 527 foreach($field as $relative) { 528 if($relative->getName() == 'relative') { 529 $data['calendars'][$calendarName]['fields'][$type]['relatives'][$relative->getAttribute('type')] = $relative->getValue(); 534 530 } 535 531 } … … 652 648 653 649 654 foreach($cf as $itemLength) { 655 if($itemLength->getName() == 'alias') { 656 throw new AgaviException('TODO: alias handling in calendar/fields'); 657 } elseif($itemLength->getName() == 'default') { 650 foreach($this->getChildsOrAlias($cf) as $itemLength) { 651 if($itemLength->getName() == 'default') { 658 652 $data['numbers']['currencyFormats']['default'] = $itemLength->getAttribute('choice'); 659 653 } elseif($itemLength->getName() == 'currencyFormatLength') { 660 654 $itemLengthName = $itemLength->getAttribute('type', '__default'); 661 655 662 foreach($itemLength as $itemFormat) { 663 if($itemFormat->getName() == 'alias') { 664 // TODO: alias handling 665 throw new AgaviException('TODO: alias handling in calendar/fields'); 666 continue; 667 } elseif($itemFormat->getName() == 'currencyFormat') { 656 foreach($this->getChildsOrAlias($itemLength) as $itemFormat) { 657 if($itemFormat->getName() == 'currencyFormat') { 668 658 if(isset($itemFormat->pattern)) { 669 659 $data['numbers']['currencyFormats'][$itemLengthName] = $itemFormat->pattern->getValue(); -
branches/0.11/src/config/AgaviXmlConfigParser.class.php
r1384 r1407 114 114 115 115 if($validationFile) { 116 // TODO: check for file existance 116 if(!is_readable($validationFile)) { 117 $error = 'Validation file "' . $validationFile . '" for configuration file "' . $config . '" does not exist or is unreadable'; 118 throw new AgaviUnreadableException($error); 119 } 117 120 $this->errors = array(); 118 121 set_error_handler(array($this, 'errorHandler')); -
branches/0.11/src/date/AgaviGregorianCalendar.class.php
r1312 r1407 175 175 // of day or timezone component, and it used to compare against other 176 176 // pure date values. 177 // TODO: check howto use date ...178 177 $cutoverDay = (int) floor($this->fGregorianCutover / AgaviDateDefinitions::MILLIS_PER_DAY); 179 178 $this->fNormalizedGregorianCutover = $cutoverDay * AgaviDateDefinitions::MILLIS_PER_DAY;

