Merge "CologneBlue rewrite: kill mWatchLinkNum, watchThisPage() is only called once...
[lhc/web/wiklou.git] / includes / ZipDirectoryReader.php
index a7a2b94..0e84583 100644 (file)
@@ -1,4 +1,24 @@
 <?php
+/**
+ * ZIP file directories reader, for the purposes of upload verification.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
 
 /**
  * A class for reading ZIP file directories, for the purposes of upload
@@ -426,6 +446,7 @@ class ZipDirectoryReader {
 
        /**
         * Interpret ZIP64 "extra field" data and return an associative array.
+        * @return array|bool
         */
        function unpackZip64Extra( $extraField ) {
                $extraHeaderInfo = array(
@@ -520,6 +541,7 @@ class ZipDirectoryReader {
         * If there are not enough bytes in the file to satsify the request, the
         * return value will be truncated. If a request is made for a segment beyond
         * the end of the file, an empty string will be returned.
+        * @return string
         */
        function getSegment( $segIndex ) {
                if ( !isset( $this->buffer[$segIndex] ) ) {
@@ -542,6 +564,7 @@ class ZipDirectoryReader {
 
        /**
         * Get the size of a structure in bytes. See unpack() for the format of $struct.
+        * @return int
         */
        function getStructSize( $struct ) {
                $size = 0;
@@ -673,10 +696,10 @@ class ZipDirectoryReader {
  * Internal exception class. Will be caught by private code.
  */
 class ZipDirectoryReaderError extends Exception {
-       var $code;
+       var $errorCode;
 
        function __construct( $code ) {
-               $this->code = $code;
+               $this->errorCode = $code;
                parent::__construct( "ZipDirectoryReader error: $code" );
        }
 
@@ -684,6 +707,6 @@ class ZipDirectoryReaderError extends Exception {
         * @return mixed
         */
        function getErrorCode() {
-               return $this->code;
+               return $this->errorCode;
        }
 }