[gollem] multiple backends -problem

pkarttun at siba.fi pkarttun at siba.fi
Sun Jun 8 04:07:46 PDT 2003


Hi!
I think there is a problem in the class Gollem ('lib/Gollem.php'). The function
'getCurrentBackend()' returns the first backend on the configuration file
backends.php - if it doesn't get any form input.

Say I have configured backends 'ftp',ftp2' in the backends.php and I select the
'ftp2' from the list. Now when I click the 'Home'-button on the navigation bar I
get following messages:

Notice: Undefined index: ftp in /var/www/html/horde/gollem/lib/Gollem.php on
line 530

Notice: Undefined index: ftp in /var/www/html/horde/gollem/lib/Gollem.php on
line 530

Notice: Undefined index: home in /var/www/html/horde/gollem/lib/Gollem.php on
line 267 

...and so on. It jumps to the first backend on the list...
I think the function should therefore check the possible $_SESSION -data for any
current backends. I made the following patch in the 'lib/Gollem.php' which helped: 

function getCurrentBackend()
    {
    $backend_key = Horde::getFormData('backend_key');
    if (!$backend_key) {
        foreach ($_SESSION['gollem'] as $backend_key => $backend) {
	    return $backend_key;	     
        }	
    }
    ... ...
    

I'm using the version 0.0.1-cvs

:pete


More information about the gollem mailing list