Changeset 1407

Show
Ignore:
Timestamp:
11/30/06 01:36:24 (2 years ago)
Author:
dominik
Message:

fixed some todos

Location:
branches/0.11/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/0.11/src/config/AgaviLdmlConfigHandler.class.php

    r1359 r1407  
    519519 
    520520            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(); 
    534530                    } 
    535531                  } 
     
    652648 
    653649 
    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') { 
    658652            $data['numbers']['currencyFormats']['default'] = $itemLength->getAttribute('choice'); 
    659653          } elseif($itemLength->getName() == 'currencyFormatLength') { 
    660654            $itemLengthName = $itemLength->getAttribute('type', '__default'); 
    661655 
    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') { 
    668658                if(isset($itemFormat->pattern)) { 
    669659                  $data['numbers']['currencyFormats'][$itemLengthName] = $itemFormat->pattern->getValue(); 
  • branches/0.11/src/config/AgaviXmlConfigParser.class.php

    r1384 r1407  
    114114     
    115115    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      } 
    117120      $this->errors = array(); 
    118121      set_error_handler(array($this, 'errorHandler')); 
  • branches/0.11/src/date/AgaviGregorianCalendar.class.php

    r1312 r1407  
    175175    // of day or timezone component, and it used to compare against other 
    176176    // pure date values. 
    177     // TODO: check howto use date ... 
    178177    $cutoverDay = (int) floor($this->fGregorianCutover / AgaviDateDefinitions::MILLIS_PER_DAY); 
    179178    $this->fNormalizedGregorianCutover = $cutoverDay * AgaviDateDefinitions::MILLIS_PER_DAY;