Clean tabs/spaces for r73853
[lhc/web/wiklou.git] / maintenance / 7zip.inc
index 617083b..049bbf1 100644 (file)
@@ -1,4 +1,11 @@
 <?php
+/**
+ * 7z stream wrapper
+ *
+ * @file
+ * @ingroup Maintenance
+ */
+
 /**
  * Stream wrapper around 7za filter program.
  * Required since we can't pass an open file resource to XMLReader->open()
@@ -15,21 +22,21 @@ class SevenZipStream {
        }
        
        function stream_open( $path, $mode, $options, &$opened_path ) {
-               if( $mode[0] == 'r' ) {
+               if ( $mode[0] == 'r' ) {
                        $options = 'e -bd -so';
-               } elseif( $mode[0] == 'w' ) {
+               } elseif ( $mode[0] == 'w' ) {
                        $options = 'a -bd -si';
                } else {
                        return false;
                }
                $arg = wfEscapeShellArg( $this->stripPath( $path ) );
                $command = "7za $options $arg";
-               if( !wfIsWindows() ) {
+               if ( !wfIsWindows() ) {
                        // Suppress the stupid messages on stderr
                        $command .= ' 2>/dev/null';
                }
                $this->stream = popen( $command, $mode );
-               return ($this->stream !== false);
+               return ( $this->stream !== false );
        }
        
        function url_stat( $path, $flags ) {
@@ -37,7 +44,7 @@ class SevenZipStream {
        }
        
        // This is all so lame; there should be a default class we can extend
-       
+
        function stream_close() {
                return fclose( $this->stream );
        }