[gollem] assigning seperate values to vfsroot and "home"

Liam Hoekenga liamr at umich.edu
Mon Dec 16 11:03:06 PST 2002


> Sounds like Gollem (and perhaps the VFS:: API in general) should recognize a
> seperate 'home' parameter, pretty much exactly as you said. I'd like to see
> it; I'll add it to Nag on dev.horde.org, but a patch would be great.

Ok.. I've got something that kind of works (it works with the 'file' VFS
driver.  I'm not using any of the other VFS backends right now, so I've
not tried it there).

My conf/backends.php looks like:

$backends['file'] = array(
    'name' => 'Virtual Home Directories',
    'driver' => 'file',
    'preferred' => '',
    'params' => array('vfsroot' => '/usr/local/data/home/',
                      'home' => Auth::getAuth()));

Then I made this change to lib/Gollem.php:

Index: Gollem.php
===================================================================
RCS file: /repository/gollem/lib/Gollem.php,v
retrieving revision 1.67
diff -U2 -r1.67 Gollem.php
--- Gollem.php  2 Oct 2002 04:04:29 -0000       1.67
+++ Gollem.php  16 Dec 2002 15:50:40 -0000
@@ -152,5 +152,5 @@
     function getDir()
     {
-        return $_SESSION['gollem']['label'] !== _("[home]") ?
$_SESSION['gollem']['dir'] : '';
+        return $_SESSION['gollem']['label'] !== _("[home]") ?
$_SESSION['gollem']['dir'] : $_SESSION['gollem']['params']['home'];
     }

You can replicate current functionality by doing..

    'params' => array('vfsroot' => '/usr/local/data/home/' . Auth::getAuth(),
                      'home' => '');

Liam


More information about the gollem mailing list