$this->uri->rsegments versus $this->uri->segments: subdirectory gets lost? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: $this->uri->rsegments versus $this->uri->segments: subdirectory gets lost? (/showthread.php?tid=6294) |
$this->uri->rsegments versus $this->uri->segments: subdirectory gets lost? - El Forum - 02-21-2008 [eluser]uprocka[/eluser] Hello I use the resegment(n) function to get data from the routed uri. the problem is when there wasn a routing the VAR $this->uri->rsegments holds different data than $this->uri->segments - that seems to be wrongto me. Code: URI: /index.php/admin/order/1000/invoice/ $this->uri->rsegments versus $this->uri->segments: subdirectory gets lost? - El Forum - 06-02-2008 [eluser]kenjis[/eluser] Yes, you're. This seems to be a bug. And my friend found the below result: Code: URI: /index.php/admin/ $this->uri->rsegments versus $this->uri->segments: subdirectory gets lost? - El Forum - 07-20-2008 [eluser]uprocka[/eluser] the bug is still present in 1.6.3 Is there an offcial bugfix? Could not find one... Should I post it to the bugtracker? $this->uri->rsegments versus $this->uri->segments: subdirectory gets lost? - El Forum - 07-21-2008 [eluser]Derek Allard[/eluser] rsegment is intended to be used "in the event you are using CodeIgniter's URI Routing feature." If routing isn't being used, does it still make sense that rsegment be available? If you still think so (I'm not sure, my knee jerk is that it shouldn't but I'm open to having my mind changed) do you have a proposed code change? $this->uri->rsegments versus $this->uri->segments: subdirectory gets lost? - El Forum - 07-21-2008 [eluser]Colin Williams[/eluser] I'm kinda with you Derek. If I improperly use rsegment but don't see the err of my ways, I might be going batty when I actually do set up a route for this context. Might be good to leave the awkward handling, or even return FALSE if there is no route to parse. $this->uri->rsegments versus $this->uri->segments: subdirectory gets lost? - El Forum - 07-21-2008 [eluser]Michael Wales[/eluser] To be honest, I've never had a need for rsegment... If I have the following URL: domain.com/walesmd and I am using routing to push it to: users/view/walesmd My function would be: Code: function view($username = NULL) { Never had any problems thus far... |