Nice, but could be improved: what if the controller is in a subsubfolder?
I don’t understand this question translate it into french????
Maybe we could process this uri->router->fetch_directory() to know at which level we are, and add the number of levels to the base segment number: 3
I think it is what i have done????
I search if there is a directory in the segments and select cases, I fix the base segment (id) at 3 or 4 and I take the activation_code at base segment + 1
+ I didn’t know about this uri->router->fetch_directory(), thanks
The CI router class parse the requested URI to defin the directory the class and the method and redirect the request to the right file and function…
it give us 3 public method:
uri->router->fetch_directory()
uri->router->fetch_class()
uri->router->fetch_method()
(if the class and method are missing in the requested URI the parser add the default one here)
fetch_directory() function have a little particularity it return the directory.’/’
and some time when ther is no directory it return ‘/’ so it is wy I use str_replace()
edit: we have some other similar harcoded segments in admin/admins (l.108 & l.320), in admin/users (l.107 & l.165 & l.333) and in FAL_front (l.325 & l.430)
About the other harcoded segments:
I am in test on freak And I will test All the code because I have to use it into some particular circonstance. First I Clean it of all freak_template view except the
the content and email one.And I have rewrite the auth controller for basic output of the page (without template System).it is because I use a personnal app librairie that include a layout system and some particularity about URI….
As you can see I my previous post I have start to control the FAL_front code because I have start by the rewriting of the auth controller.
From now I have tested the login,lougout, register and activation actions into FAL_front and Freakauth_light lib.
I will continue with the forgotten and change password action and then I will do the same on the Admin code…...
so the line 325 is the one I have corrected And the line 430 into the forgotten_password_reset() function can use exactly the same solution…..
For the others I will have to look at it when I will work on admin code….
For the moment I post only my change that are bugs or little problems and when I will have finished I’ll give you my other request…..
So I go on FAL_front password code
see you soon