Merge "Add checkDependencies.php"
[lhc/web/wiklou.git] / includes / media / DjVuImage.php
index 7189179..13a39ed 100644 (file)
@@ -36,8 +36,9 @@ use MediaWiki\Shell\Shell;
  * @ingroup Media
  */
 class DjVuImage {
+
        /**
-        * @const DJVUTXT_MEMORY_LIMIT Memory limit for the DjVu description software
+        * Memory limit for the DjVu description software
         */
        const DJVUTXT_MEMORY_LIMIT = 300000;
 
@@ -110,7 +111,7 @@ class DjVuImage {
                                $this->dumpForm( $file, $chunkLength, $indent + 1 );
                        } else {
                                fseek( $file, $chunkLength, SEEK_CUR );
-                               if ( ( $chunkLength & 1 ) == 1 ) {
+                               if ( $chunkLength & 1 ) {
                                        // Padding byte between chunks
                                        fseek( $file, 1, SEEK_CUR );
                                }
@@ -168,7 +169,7 @@ class DjVuImage {
        private function skipChunk( $file, $chunkLength ) {
                fseek( $file, $chunkLength, SEEK_CUR );
 
-               if ( ( $chunkLength & 0x01 ) == 1 && !feof( $file ) ) {
+               if ( ( $chunkLength & 1 ) && !feof( $file ) ) {
                        // padding byte
                        fseek( $file, 1, SEEK_CUR );
                }