CodeIgniter Forums
Filters System Bug - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Filters System Bug (/thread-1744.html)



Filters System Bug - El Forum - 06-24-2007

[eluser]marcoss[/eluser]
I've been using hooks for a long time now, but I've decided to try the Filters System because it seems to be a better approach to accomplish some basic routines.

Unfortunately there is a bug in the system, when you try to apply a filter to a controller placed withing a directory it won't trigger. I went over the code and find out that the way it handles the matches is where the problem resides, it is exploding the match by the '/' on in, so CI thinks it is a class instead of a directory.

As an example, if i want to apply a filter to "admin/login" where admin is the directory and login the class name it won't work.

Any ideas on a better implementation of it?


Filters System Bug - El Forum - 06-27-2007

[eluser]barbazul[/eluser]
I think the filters system just got out of date.


Read post #43 of this page


Filters System Bug - El Forum - 06-27-2007

[eluser]marcoss[/eluser]
[quote author="barbazul" date="1182981267"]I think the filters system just got out of date.


Read post #43 of this page[/quote]

Too bad it is not active developed anymore, it was a good idea, I'll try to fix the sub folders issue and post it back.

Anyway, thanks for the notice, seems like I've done a bad search.


Filters System Bug - El Forum - 06-27-2007

[eluser]barbazul[/eluser]
Look at the previous posts in the thread. It seems as if Seele is considering a new release soon

Hope he does


Filters System Bug - El Forum - 06-27-2007

[eluser]barbazul[/eluser]
I'm posting a quick fix for this "bug"

I overrided the _matches function to consider one level of subfolders within controllers

http://ellislab.com/forums/viewthread/46009/P30/


Filters System Bug - El Forum - 06-27-2007

[eluser]marcoss[/eluser]
[quote author="barbazul" date="1183023316"]I'm posting a quick fix for this "bug"

I overrided the _matches function to consider one level of subfolders within controllers

http://ellislab.com/forums/viewthread/46009/P30/[/quote]

Great! Eventhough it uses a core function is a good patch until the system itself gets updated. Thanks Wink


Filters System Bug - El Forum - 07-24-2010

[eluser]Unknown[/eluser]
I don't know why I cant access the bug fix thread, keep saying "You're not authorized to perform this action"

any other way I cud get the fix?


Filters System Bug - El Forum - 05-10-2011

[eluser]Drubo[/eluser]
[quote author="Imam" date="1280017702"]I don't know why I cant access the bug fix thread, keep saying "You're not authorized to perform this action"

any other way I cud get the fix?[/quote]

This is the case for me too.