Patch to make show_dotfiles work
Marcus I. Ryan
marcus@riboflavin.net
Thu, 28 Feb 2002 13:08:47 -0600
NOTE: This patch needs to either have show_dotfiles removed from
server.php.dist or needs to have it set to a boolean value. The value
in the servers.php file overrides the global in conf.php.
Thoughts?
--- Gollem.php.orig Thu Feb 28 12:43:57 2002
+++ Gollem.php Thu Feb 28 12:56:52 2002
@@ -56,9 +56,16 @@
$svr = &$HTTP_POST_VARS['server'];
$gollem['server'] = $servers[$svr]['server'];
$gollem['port'] = $servers[$svr]['port'];
+ if (isset($conf['server']['show_dotfiles'])) {
+ $gollem['show_dotfiles'] =
$conf['server']['show_dotfiles'];
+ }
+ if (isset($servers[$svr]['show_dotfiles'])) {
+ $gollem['show_dotfiles'] = $servers[$svr]['show_dotfiles'];
+ }
} else {
$gollem['server'] = Horde::getFormData('server');
$gollem['port'] = Horde::getFormData('port');
+ $gollem['show_dotfiles'] = $conf['server']['show_dotfiles'];
}
$GLOBALS['HTTP_SESSION_VARS']['gollem'] = &$gollem;
@@ -239,7 +246,7 @@
if (preg_match('/^\.\.?\/?$/', $file['name'])) {
continue;
}
- if (isset($GLOBALS['gollem']['svr']['show_dotfiles'])
&& !$GLOBALS['gollem']['svr']['show_dotfiles'] && (substr($file['name'],
0, 1) === '.')) {
+ if (isset($GLOBALS['gollem']['show_dotfiles']) &&
!$GLOBALS['gollem']['show_dotfiles'] && (substr($file['name'], 0, 1) ===
'.')) {
continue;
}
$p1 = substr($file['perms'], 0, 1);
--
Marcus I. Ryan, marcus@riboflavin.net
-----------------------------------------------------------------------
"Love is a snowmobile racing across the tundra and then suddenly it
flips over, pinning you underneath. At night, the ice weasels come."
-- Matt Groening
-----------------------------------------------------------------------
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/