Subject: Wierd Behavior with Admin Home Links

Posted on: 30/03/06 11:21am
By: phpsocialclub

I have a couple of sites hosted on the same server and am have found a weird behavior.

The server is apache on linux.

The "Admin Home" links on each admin page was returning the correct link, but when clicked was going to the other site. The issue is that the $_ENV["SERVER_NAME"] has not been changed in the virtual host block by my webhost.

The link will go to the site in the $SERVER_NAME
The link will go to the correct place

I noticed that this was not a problem in any of the other links to the admin blocks, just the links to the admin home, because the other links directly address the admin pages.

After looking through the code, I noticed that in each admin block, the code that creates the "Admin Home" link looks like the following

array('url' => $_CONF['site_admin_url'],
    'text' => $LANG_ADMIN['admin_home']) 

What do the developers think about changing the code to this?

 array('url' => $_CONF['site_admin_url'] . "/",
      'text' => $LANG_ADMIN['admin_home']) 
array('url' => $_CONF['site_admin_url'] . "/moderation.php",
    'text' => $LANG_ADMIN['admin_home']) 

I know this does not affect many people, but it would seem like the correct behavior.

Geeklog - Forum