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

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
martin42
Forum Members
Forum Members
Posts: 126
Joined: Sat Aug 20, 2005 11:35 pm

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

Post 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 ;-)
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

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

Post 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...
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

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

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “Modules/Add-Ons”