Author: kn
Date: Thu Oct  4 14:00:46 2007
New Revision: 6358

Log:
- Added option to hide files

Modified:
    trunk/Webdav/src/backends/file.php
    trunk/Webdav/src/options/backend_file_options.php
    trunk/Webdav/tests/backend_file_options_test.php

Modified: trunk/Webdav/src/backends/file.php
==============================================================================
--- trunk/Webdav/src/backends/file.php [iso-8859-1] (original)
+++ trunk/Webdav/src/backends/file.php [iso-8859-1] Thu Oct  4 14:00:46 2007
@@ -820,6 +820,8 @@
         while( $file = readdir( $dh ) )
         {
             // Skip files used for somethig else...
+            //
+            // @TODO: Mind hideDotFiles option
             if ( ( $file === '.' ) ||
                  ( $file === '..' ) ||
                  ( strpos( $file, $this->options->lockFileName ) !== false ) ||

Modified: trunk/Webdav/src/options/backend_file_options.php
==============================================================================
--- trunk/Webdav/src/options/backend_file_options.php [iso-8859-1] (original)
+++ trunk/Webdav/src/options/backend_file_options.php [iso-8859-1] Thu Oct  4 
14:00:46 2007
@@ -29,6 +29,8 @@
  *           Indicates wheather to use PHPs extensions to receive the correct
  *           mime time for a file instead of just returning the mime type
  *           originally set by the client.
+ * @property bool $hideDotFiles
+ *           Indicates wheather to hide files starting with a dot
  *
  * @package Webdav
  * @version //autogen//
@@ -54,6 +56,7 @@
         $this->properties['directoryMode']          = 0755;
         $this->properties['fileMode']               = 0644;
         $this->properties['useMimeExts']            = true;
+        $this->properties['hideDotFiles']           = true;
 
         parent::__construct( $options );
     }
@@ -75,6 +78,7 @@
         {
             case 'noLock':
             case 'useMimeExts':
+            case 'hideDotFiles':
                 if ( !is_bool( $value ) )
                 {
                     throw new ezcBaseValueException( $name, $value, 'bool' );

Modified: trunk/Webdav/tests/backend_file_options_test.php
==============================================================================
--- trunk/Webdav/tests/backend_file_options_test.php [iso-8859-1] (original)
+++ trunk/Webdav/tests/backend_file_options_test.php [iso-8859-1] Thu Oct  4 
14:00:46 2007
@@ -38,6 +38,7 @@
             'directoryMode'         => 0755,
             'fileMode'              => 0644,
             'useMimeExts'           => true,
+            'hideDotFiles'          => true,
         );
         $this->workingValues = array(
             'noLock'                => array(
@@ -65,6 +66,10 @@
                 100
             ),
             'useMimeExts'           => array(
+                true,
+                false
+            ),
+            'hideDotFiles'          => array(
                 true,
                 false
             ),
@@ -119,6 +124,13 @@
                 array(),
                 new stdClass(),
             ),
+            'hideDotFiles'          => array(
+                23,
+                23.34,
+                'foo',
+                array(),
+                new stdClass(),
+            ),
         );
     }
 


-- 
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to