Re: [CakePHP : The Rapid Development Framework for PHP] #6347: beforeRedirect() doesn't work well

2009-05-13 Thread CakePHP : The Rapid Development Framework for PHP
#6347: beforeRedirect() doesn't work well
---+
Reporter:  regen   | Owner:   
Type:  Bug |Status:  closed   
Priority:  Medium  | Milestone:  1.2.x.x  
   Component:  Controller  |   Version:  1.2 Final
Severity:  Normal  |Resolution:  invalid  
Keywords:  |   Php_version:  n/a  
Cake_version:  |  
---+
Changes (by jperras):

  * status:  new = closed
  * resolution:  = invalid

Comment:

 The component beforeRedirect callback was never intended for this usage
 pattern, and thus does not constitute a 'bug'. If you would like us to
 consider this for 1.3, please submit this as an enhancement against the
 1.3 milestone.

-- 
Ticket URL: https://trac.cakephp.org/ticket/6347#comment:7
CakePHP : The Rapid Development Framework for PHP https://trac.cakephp.org/
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
tickets cakephp group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~--~~~~--~~--~--~---



Re: [CakePHP : The Rapid Development Framework for PHP] #6347: beforeRedirect() doesn't work well

2009-05-07 Thread CakePHP : The Rapid Development Framework for PHP
#6347: beforeRedirect() doesn't work well
---+
Reporter:  regen   | Owner:   
Type:  Bug |Status:  new  
Priority:  Medium  | Milestone:  1.2.x.x  
   Component:  Controller  |   Version:  1.2 Final
Severity:  Normal  |Resolution:   
Keywords:  |   Php_version:  n/a  
Cake_version:  |  
---+
Comment (by mark_story):

 So how would you have it work?  You can only redirect to one place, how
 should the decision tree be handled?

-- 
Ticket URL: https://trac.cakephp.org/ticket/6347#comment:1
CakePHP : The Rapid Development Framework for PHP https://trac.cakephp.org/
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
tickets cakephp group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~--~~~~--~~--~--~---



Re: [CakePHP : The Rapid Development Framework for PHP] #6347: beforeRedirect() doesn't work well

2009-05-07 Thread CakePHP : The Rapid Development Framework for PHP
#6347: beforeRedirect() doesn't work well
---+
Reporter:  regen   | Owner:   
Type:  Bug |Status:  new  
Priority:  Medium  | Milestone:  1.2.x.x  
   Component:  Controller  |   Version:  1.2 Final
Severity:  Normal  |Resolution:   
Keywords:  |   Php_version:  n/a  
Cake_version:  |  
---+
Comment (by regen):

 When adding parameters to URL, the problem occurs.[[BR]]

 Suppose that the passed URL is /index?foo=bar and A-Component adds
 a=ok to the URL in its beforeRedirect() and B-Component adds b=ok to
 the URL in the same way,[[BR]]
 the redirection URL is NOT /index?foo=bar'''a=okb=ok''' BUT
 /index?foo=bar'''a=ok''' or /index?foo=bar'''b=ok''' because of the
 URL is overwritten.

-- 
Ticket URL: https://trac.cakephp.org/ticket/6347#comment:2
CakePHP : The Rapid Development Framework for PHP https://trac.cakephp.org/
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
tickets cakephp group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~--~~~~--~~--~--~---



Re: [CakePHP : The Rapid Development Framework for PHP] #6347: beforeRedirect() doesn't work well

2009-05-07 Thread CakePHP : The Rapid Development Framework for PHP
#6347: beforeRedirect() doesn't work well
---+
Reporter:  regen   | Owner:   
Type:  Bug |Status:  new  
Priority:  Medium  | Milestone:  1.2.x.x  
   Component:  Controller  |   Version:  1.2 Final
Severity:  Normal  |Resolution:   
Keywords:  |   Php_version:  n/a  
Cake_version:  |  
---+
Comment (by MASA-P):

 A little while ago, regen and I discussed about this problem that occur in
 a controller that set two or more components that have beforeRedirect
 callback. Not only URL but also all response from components, are
 overwritten by the hooker in cake/libs/controllers/component.php.[[BR]]
 [[BR]]
 For example...[[BR]]
 [[BR]]
 app/controllers/foo_controller.php[[BR]]
 {{{
 class FooController extends AppController {

 var $name = 'Foo';
 var $uses = array();
 var $components = array('Hoge', 'Fuga');

 function one(){
 $this-redirect('/foo/two');
 }

 function two(){
 var_dump($this-params['named']['a']);
 var_dump($this-params['named']['b']);
 }
 }
 }}}
 [[BR]]
 app/controllers/components/hoge.php[[BR]]
 {{{
 class HogeComponent extends Object {

 function beforeRedirect($controller, $url, $status, $exit){

 //add named params
 //
 $url .= '/a:10/b:20';

 //response
 //
 return array(
 'url' = $url,
 'status' = $status,
 'exit' = $exit,
 );
 }
 }
 }}}
 [[BR]]
 app/controllers/components/huga.php[[BR]]
 {{{
 class FugaComponent extends Object {

 function beforeRedirect($controller, $url, $status, $exit){

 //add named params
 //
 $url .= '/a:100/b:200';

 //response
 //
 return array(
 'url' = $url,
 'status' = $status,
 'exit' = $exit,
 );
 }
 }
 }}}
 [[BR]]
 Access /foo/one, results are a = 100 and b = 200.[[BR]]
 [[BR]]
 Then, change a order of components. First is 'Huga', and second is 'Hoge'.
 And access /foo/one.[[BR]]
 Maybe results are a = 10 and b = 20.[[BR]]
 [[BR]]
 I think that one of solution for this problem is
 [https://trac.cakephp.org/ticket/6348 #6348].

-- 
Ticket URL: https://trac.cakephp.org/ticket/6347#comment:3
CakePHP : The Rapid Development Framework for PHP https://trac.cakephp.org/
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
tickets cakephp group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~--~~~~--~~--~--~---