after a Serverchange from Suse-Linux to a Debian server I got a problem, I´ll try to explain.
I use a function canShowNavigationEntry($id), which checks the Rights from the logged-in-User. When I load the Admin-asset I check for example this.
in admin.asset.php
- Code: Select all
if ( $loggedInUser->canShowNavigationEntry ( 21 ) )
{
...
}
in User.class.php
- Code: Select all
function canShowNavigationEntry ( $id )
{
return in_array ( $id, $this->fetchNavigationEntryIds() );
}
The problem is that the function fetchNavigationEntryIds don´t make a request. The failure occured in the following statement for getting the database connection data. But only for the admin-page. I also use this funtion(fetchNavigationEntryIds) for the main navigation, and it works. But on the admin-asset the function $this->getDatabase() didn´t call/select.
in User.class.php
- Code: Select all
function fetchNavigationEntryIds ( $disabled = NULL )
{
// Rückgabe initialisieren
$ret = array();
// Standardwerte setzen
if ( !is_bool ( $disabled ) ) $disabled = false;
// Globale Variablen
$database =& $this->getDatabase();
...
}
On our old server all functions worked fine. I put the entry "register_globals = on" in the php.ini and restart the apache2, but nothing happend. Someone have any ideas??
Greetings,
Christian