Global Call
I was just playing around with FreeTSP code.
Both takeeditaltusercp.php & takeeditusercp.php At the bottom of the file have the return header Code:
header("Location: $site_url/usercp.php?edited=1&action=$action".$urladd); Code:
header("Location: $site_url/altusercp.php?edited=1&action=$action".$urladd); Which is exactly what it does. But it should not work. Because no global for $site_url has been defined. Example Code:
global $site_url; Now both files call function_main.php. And that file calls function_config.php. Which contains the definition of $site_url. If that is the reason it works. That then raises the question. Do we really need to use the global define at all in any file ?? I have just removed all the global defines from the index.php. Some things work fine without the global call, yet others give errors ?? I have checked U232 V4 takeeditcp.php And the same thing. No main or any global call. But the same line at the bottom of the file. Code:
header("Location: {$INSTALLER09['baseurl']}/usercp.php?edited=1&action=$action" . $urladd); It is just me wondering WHY? Can any one shed any light on this for me. |
more then likely your getting something like
Code:
Location: /usercp.php?edited=1 if you look at most themes you well see they dont put site url in them for images and they work fine |
Just as Joe said, its only used for mail, is actually defined on takeeditcp
Code:
$urladd.= "&mailsent=1"; |
All times are GMT +2. The time now is 12:25. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.