Page 1 of 1

Changing the redirect() calls in /admin/*.php

Posted: Fri Jun 02, 2006 10:02 pm
by martin42
Each time I upgrade CMSMS, I edit /admin/*.php so that all calls to redirect() use the config variables root_url and admin_dir.

For example:
        redirect("listcontent.php");
becomes
        redirect($config["root_url"]."/".$config["admin_dir"]."/"."listcontent.php");

This lets me to take the whole admin interface out-of-band, sticking it on its own HTTPS instance with extra password pre-auth in front of the CMSMS login.

I don't know how many people would find this useful (most people aren't as paranoid as me) but I was wondering whether this change to the redirect() calls in /admin/*.php would be safe to commit into the core dev branch.  This would make future updates easier for me ;-)

Re: Changing the redirect() calls in /admin/*.php

Posted: Mon Jun 12, 2006 9:29 pm
by Elijah Lofgren
Good idea.  ;)
I'm guessing that the redirect() function in lib/misc.functions.php could be modified instead of changing all those files...

Re: Changing the redirect() calls in /admin/*.php

Posted: Thu Jun 29, 2006 4:15 am
by calguy1000
possibly, but you'd have to check, because the Module API's, Redirect function calls that function in misc.functions.php

changes to this, could cause problems with all of the modules.  especially mine, I use redirect everywhere :)

and if somebody is doing something a little weird with the redirect thing, then it could get bad.  You could "try" possibly not checking for / or \ in the string, but I don't think that would work either, esp. wrt pretty url's etc.