[dev] gollem filters

Peter Arien Peter.Arien at cc.kuleuven.ac.be
Wed Sep 8 13:57:05 PDT 2004


very small patch to make gollem use filters

-- 
Peter

  K.U.Leuven - LUDIT             -=- Tel: +32 16 322219
  peter.arien at cc.kuleuven.ac.be  -=- http://ludit.kuleuven.be

I'd rather just believe that it's done by little elves.
-------------- next part --------------
--- gollem/config/backends.php.dist.orig	2004-09-08 22:06:05.000000000 +0200
+++ gollem/config/backends.php.dist	2004-09-08 22:05:41.000000000 +0200
@@ -68,7 +68,9 @@
         // The port number of the FTP server
         'port' => 21,
         // Use passive mode?
-        'pasv' => false
+        'pasv' => false,
+	// Hide all files that match this regex
+	'filter' => '^regex$'
     ),
     'attributes' => array('type', 'name', 'download', 'modified', 'size', 'permission', 'owner', 'group')
 );

--- gollem/lib/Gollem.php.orig	2004-09-08 22:07:54.000000000 +0200
+++ gollem/lib/Gollem.php	2004-09-08 22:07:37.000000000 +0200
@@ -320,7 +320,7 @@
      */
     function listFolder($dir)
     {
-        $files = $GLOBALS['vfs']->listFolder($dir, null, $GLOBALS['prefs']->getValue('show_dotfiles'));
+        $files = $GLOBALS['vfs']->listFolder($dir, $_SESSION['gollem']['params']['filter'], $GLOBALS['prefs']->getValue('show_dotfiles'));
         if (!is_a($files, 'PEAR_Error')) {
             switch ($GLOBALS['prefs']->getValue('sortby')) {
             case GOLLEM_SORT_TYPE:


More information about the dev mailing list