Changeset 2686

Show
Ignore:
Timestamp:
08/20/08 11:11:40 (5 months ago)
Author:
david
Message:

merge [2663:2685/branches/0.11]

Location:
branches/1.0
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/CHANGELOG

    r2683 r2686  
    4141---------------------------- 
    4242 
    43 ADD: Set current Context instance on Doctrine connections (#800) (David) 
     43ADD: Allow ignoring of (X)HTML parse errors in FPF (#613) (David) 
     44ADD: Set current Context instance on Doctrine connections (#800, #808) (David) 
    4445ADD: Support for doctrine connection settings and options (#788) (David) 
    4546 
     47CHG: Enhance HTTP status code validation for AgaviWebResponse::setRedirect() (#804) (David) 
    4648CHG: Update timezone database to 2008e (#806) (David) 
    4749CHG: Dump "xhtml" output type from sample app and introduce a replacement (#802) (David) 
    4850CHG: Assigning of "inner" content to $slots template array should be configurable (#793) (David) 
    4951 
     52FIX: AgaviView::initialize() incorrectly assigns container's response to a property (#813) (David) 
    5053FIX: AgaviExecutionTimeFilter runs only once (#801) (David) 
    5154FIX: PEAR installations place src/routing/soap files in the data directory rather than the source directory (#799) (Noah) 
  • branches/1.0/src/database/AgaviDoctrineDatabase.class.php

    r2609 r2686  
    113113       
    114114      // set the context instance as a connection parameter 
    115       $this->connection->setParam('context', $this->context, 'org.agavi'); 
     115      $this->connection->setParam('context', $databaseManager->getContext(), 'org.agavi'); 
    116116       
    117117      // charset 
  • branches/1.0/src/filter/AgaviFormPopulationFilter.class.php

    r2550 r2686  
    192192        $lm->log($m, $cfg['logging_logger']); 
    193193      } 
     194       
     195      // all in all, that didn't go so well. let's see if we should just silently abort instead of throwin an exception 
     196      if($cfg['ignore_parse_errors']) { 
     197        return; 
     198      } 
     199       
    194200      throw new AgaviParseException($emsg); 
    195201    } 
     
    896902      'multi_field_error_messages' => array(), 
    897903 
     904      'ignore_parse_errors'        => false, 
    898905      'log_parse_errors'           => true, 
    899906      'logging_severity'           => AgaviLogger::FATAL, 
  • branches/1.0/src/request/AgaviWebserviceRequest.class.php

    r2259 r2686  
    115115    $this->invokedMethod = $method; 
    116116     
    117     // let the routing update it's input 
     117    // let the routing update its input 
    118118    $this->context->getRouting()->updateInput(); 
    119119  } 
  • branches/1.0/src/response/AgaviWebResponse.class.php

    r2503 r2686  
    297297  } 
    298298   
     299  /** 
     300   * Check if the given HTTP status code is valid. 
     301   * 
     302   * @param      string A numeric HTTP status code. 
     303   * 
     304   * @return     bool True, if the code is valid, or false otherwise. 
     305   * 
     306   * @author     David Zülke <david.zuelke@bitextender.com> 
     307   * @since      0.11.3 
     308   */ 
     309  public function validateHttpStatusCode($code) 
     310  { 
     311    $code = (string)$code; 
     312    return isset($this->httpStatusCodes[$code]); 
     313  } 
    299314   
    300315  /** 
    301316   * Sets a HTTP status code for the response. 
    302317   * 
    303    * @param      string A numeric HTTP status code between 100 and 505. 
    304    * 
    305    * @author     David Zülke <dz@bitxtender.com> 
    306    * @since      0.11.0 
    307    */ 
    308   public function setHttpStatusCode($code) { 
     318   * @param      string A numeric HTTP status code. 
     319   * 
     320   * @author     David Zülke <dz@bitxtender.com> 
     321   * @since      0.11.0 
     322   */ 
     323  public function setHttpStatusCode($code) 
     324  { 
    309325    $code = (string)$code; 
    310     if(isset($this->httpStatusCodes[$code])) { 
     326    if($this->validateHttpStatusCode($code)) { 
    311327      $this->httpStatusCode = $code; 
    312328    } else { 
     
    324340   * @since      0.11.0 
    325341   */ 
    326   public function getHttpStatusCode() { 
     342  public function getHttpStatusCode() 
     343  { 
    327344    return $this->httpStatusCode; 
    328345  } 
     
    684701  public function setRedirect($location, $code = 302) 
    685702  { 
     703    if(!$this->validateHttpStatusCode($code)) { 
     704      throw new AgaviException(sprintf('Invalid %s Redirect Status code: %s', $this->context->getRequest()->getProtocol(), $code)); 
     705    } 
    686706    $this->redirect = array('location' => $location, 'code' => $code); 
    687707  } 
  • branches/1.0/src/view/AgaviView.class.php

    r2495 r2686  
    120120 
    121121    $this->context = $container->getContext(); 
    122  
    123     $this->response = $container->getResponse(); 
    124122  } 
    125123