#695: onGenerate callback is not run for routes with a source
---------------------+------------------------------------------------------
 Reporter:  david    |       Owner:  david                                      
   
     Type:  defect   |      Status:  new                                        
   
 Priority:  normal   |   Milestone:  0.11.1                                     
   
Component:  routing  |     Version:  0.11-HEAD                                  
   
 Severity:  major    |    Keywords:  routing callback source gen ongenerate 
options
Has_patch:  0        |  
---------------------+------------------------------------------------------
 If we have a route with a source and a callback:
 {{{
 <route name="foo" pattern"bar" source="_SERVER[BAZ]" callback="ZomgLol" />
 }}}

 Then an {{{onGenerate()}}} in {{{ZomgLol}}} is not going to be executed.

 The reason is that the {{{gen()}}} loop in {{{AgaviRouting}}} does a
 {{{continue;}}} before the callback is run. Most likely because ta the
 time that code was written, it was not yet possible for callbacks to set
 options on a route.

 Simple fix: move the
 {{{
 if($r['opt']['source']) {
         continue;
 }
 }}}
 check further down.

-- 
Ticket URL: <http://trac.agavi.org/ticket/695>
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