#579: Routing callback cannot set optional parameters
---------------------+------------------------------------------------------
 Reporter:  v-dogg   |       Owner:  dominik  
     Type:  defect   |      Status:  new      
 Priority:  normal   |   Milestone:  0.11     
Component:  routing  |     Version:  0.11.0RC5
 Severity:  normal   |    Keywords:           
---------------------+------------------------------------------------------
 routing.xml:
 {{{
 <route name="test" pattern="^(/{test:\d+})?/foo" module="Default"
 action="Foo" callback="TestCallback" />
 }}}

 callback's onGenerate:
 {{{
 if (!isset($userParameters['test'])) {
   $userParameters['test'] = 'automatic';
 }
 return true;
 }}}

 Now I would expect {{{ $this->context->getRouting()->gen('test'); }}} to
 generate {{{/automatic/foo}}} but the optional parameter is ignored.
 HOWEVER if the the isset-test is removed and the optional parameter is
 given, the callback '''overwrites''' it.

-- 
Ticket URL: <http://trac.agavi.org/ticket/579>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5


_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets

Reply via email to