Author: Derick Rethans
Date: 2007-05-04 14:26:26 +0200 (Fri, 04 May 2007)
New Revision: 5044
Log:
- Fixed CS.
Modified:
trunk/Archive/src/archive.php
trunk/Archive/src/file/block_file.php
trunk/Archive/src/zip/headers/zip_central_directory.php
trunk/Archive/src/zip/zip.php
Modified: trunk/Archive/src/archive.php
===================================================================
--- trunk/Archive/src/archive.php 2007-05-04 10:03:17 UTC (rev 5043)
+++ trunk/Archive/src/archive.php 2007-05-04 12:26:26 UTC (rev 5044)
@@ -513,7 +513,7 @@
case ezcArchiveEntry::IS_DIRECTORY:
$permissions = $entry->getPermissions();
- if( $permissions === null || $permissions === false )
+ if ( $permissions === null || $permissions === false )
{
$permissions = 0777;
}
Modified: trunk/Archive/src/file/block_file.php
===================================================================
--- trunk/Archive/src/file/block_file.php 2007-05-04 10:03:17 UTC (rev
5043)
+++ trunk/Archive/src/file/block_file.php 2007-05-04 12:26:26 UTC (rev
5044)
@@ -304,7 +304,7 @@
{
if ( !$this->isEmpty && !$this->isValid )
{
- throw new ezcArchiveInternalException ("Not at a valid block
position to append");
+ throw new ezcArchiveInternalException( "Not at a valid block
position to append" );
}
}
}
@@ -383,7 +383,7 @@
$this->switchWriteMode();
- $localFile = @fopen( $fileName, "rb");
+ $localFile = @fopen( $fileName, "rb" );
if ( !$localFile )
{
throw new ezcArchiveException( "Cannot open the file: <$fileName>
for reading." );
@@ -553,7 +553,7 @@
{
if ( $whence == SEEK_CUR )
{
- throw new ezcArchiveException("Cannot seek SEEK_CUR with
an invalid block position");
+ throw new ezcArchiveException( "Cannot seek SEEK_CUR with
an invalid block position" );
}
$this->rewind();
@@ -565,7 +565,7 @@
while ( $this->next() );
}
- switch ($whence )
+ switch ( $whence )
{
case SEEK_CUR: $searchBlock = $this->blockNumber +=
$blockOffset; break;
case SEEK_END: $searchBlock = $this->lastBlock +=
$blockOffset; break;
Modified: trunk/Archive/src/zip/headers/zip_central_directory.php
===================================================================
--- trunk/Archive/src/zip/headers/zip_central_directory.php 2007-05-04
10:03:17 UTC (rev 5043)
+++ trunk/Archive/src/zip/headers/zip_central_directory.php 2007-05-04
12:26:26 UTC (rev 5044)
@@ -260,7 +260,7 @@
case ezcArchiveStatMode::S_IFLNK: return
ezcArchiveEntry::IS_SYMBOLIC_LINK; break;
default:
- if( substr( $this->properties["fileName"], -1) == "/" )
+ if ( substr( $this->properties["fileName"], -1) == "/" )
{
return ezcArchiveEntry::IS_DIRECTORY;
}
Modified: trunk/Archive/src/zip/zip.php
===================================================================
--- trunk/Archive/src/zip/zip.php 2007-05-04 10:03:17 UTC (rev 5043)
+++ trunk/Archive/src/zip/zip.php 2007-05-04 12:26:26 UTC (rev 5044)
@@ -121,42 +121,42 @@
// read the central end headers
- $this->file->seek(-22, SEEK_END);
+ $this->file->seek( -22, SEEK_END );
$filesize = $this->file->key() + 22;
$endRecordPosition = $filesize - 22;
- $sig = $this->file->read(4);
+ $sig = $this->file->read( 4 );
if ( ezcArchiveCentralDirectoryEndHeader::isSignature( $sig ) )
{
$this->endRecord = new ezcArchiveCentralDirectoryEndHeader(
$this->file );
- if( $this->endRecord->commentLength != 0 )
+ if ( $this->endRecord->commentLength != 0 )
{
- throw new ezcArchiveException("Comment length invalid.");
+ throw new ezcArchiveException( "Comment length invalid." );
}
}
else
{
$signatureString = "PK\005\006";
- $startPosition = max( $filesize - (5 * 1024), 0);
+ $startPosition = max( $filesize - ( 5 * 1024 ), 0 );
// Maybe there is a comment at the end of the archive.
- $this->file->seek($startPosition);
- $data = $this->file->read($filesize - $startPosition);
+ $this->file->seek( $startPosition );
+ $data = $this->file->read( $filesize - $startPosition );
- $pos = strpos( $data, $signatureString);
+ $pos = strpos( $data, $signatureString );
- if ($pos === false)
+ if ( $pos === false )
{
- throw new ezcArchiveException("Could not find the
central-directory header");
+ throw new ezcArchiveException( "Could not find the
central-directory header" );
}
$endRecordPosition = $startPosition + $pos;
- $this->file->seek($endRecordPosition);
- $sig = $this->file->read(4);
+ $this->file->seek( $endRecordPosition );
+ $sig = $this->file->read( 4 );
if ( ezcArchiveCentralDirectoryEndHeader::isSignature( $sig ) )
{
@@ -164,22 +164,22 @@
}
else
{
- throw new ezcArchiveException("Zip file corrupt");
+ throw new ezcArchiveException( "Zip file corrupt" );
}
- if( $this->endRecord->commentLength != $filesize -
$endRecordPosition - 22)
+ if ( $this->endRecord->commentLength != $filesize -
$endRecordPosition - 22 )
{
- throw new ezcArchiveException("Comment length invalid.");
+ throw new ezcArchiveException( "Comment length invalid." );
}
}
- if( $endRecordPosition - $this->endRecord->centralDirectorySize !==
$this->endRecord->centralDirectoryStart)
+ if ( $endRecordPosition - $this->endRecord->centralDirectorySize !==
$this->endRecord->centralDirectoryStart )
{
- throw new ezcArchiveException("Unable to determine the central
directory start.");
+ throw new ezcArchiveException( "Unable to determine the central
directory start." );
}
- $this->file->seek( $endRecordPosition -
$this->endRecord->centralDirectorySize);
- $sig = $this->file->read(4);
+ $this->file->seek( $endRecordPosition -
$this->endRecord->centralDirectorySize );
+ $sig = $this->file->read( 4 );
$i = 0;
while ( ezcArchiveCentralDirectoryHeader::isSignature( $sig ) )
@@ -201,7 +201,7 @@
{
$struct = new ezcArchiveFileStructure();
- //$this->localHeaders[$i]->setArchiveFileStructure( $struct );
+ // $this->localHeaders[$i]->setArchiveFileStructure( $struct );
$this->centralHeaders[$i]->setArchiveFileStructure( $struct );
@@ -256,10 +256,10 @@
public function getLocalHeader( $fileNumber )
{
- if ( !isset($this->localHeaders[$fileNumber]) )
+ if ( !isset( $this->localHeaders[$fileNumber] ) )
{
// Read the local header
- //
+ //
$this->file->seek( $this->localHeaderPositions[$fileNumber] );
$sig = $this->file->read( 4 );
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components