mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Update functions signature for compatibility with PHP 5.4
This commit is contained in:
@@ -61,7 +61,7 @@ class ZipArchiveImproved extends ZipArchive
|
|||||||
* @param int $flags
|
* @param int $flags
|
||||||
* return mixed
|
* return mixed
|
||||||
*/
|
*/
|
||||||
public function open($fileName, $flags)
|
public function open($fileName, $flags = null)
|
||||||
{
|
{
|
||||||
$this->_archiveFileName = $fileName;
|
$this->_archiveFileName = $fileName;
|
||||||
$this->_newAddedFilesCounter = 0;
|
$this->_newAddedFilesCounter = 0;
|
||||||
@@ -106,26 +106,18 @@ class ZipArchiveImproved extends ZipArchive
|
|||||||
* @param string [optional] $localname the name of the file in the ZIP archive
|
* @param string [optional] $localname the name of the file in the ZIP archive
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function addFile($fileName)
|
public function addFile($fileName, $localname = null, $start = 0, $length = 0)
|
||||||
{
|
{
|
||||||
if ($this->_newAddedFilesCounter >= $this->_newAddedFilesSize) {
|
if ($this->_newAddedFilesCounter >= $this->_newAddedFilesSize) {
|
||||||
$this->reopen();
|
$this->reopen();
|
||||||
}
|
}
|
||||||
if (func_num_args() > 1) {
|
|
||||||
$flags = func_get_arg(1);
|
|
||||||
$added = parent::addFile($fileName, $flags);
|
|
||||||
if ($added) {
|
|
||||||
$this->_newAddedFilesCounter ++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $added;
|
$added = parent::addFile($fileName, $localname, $start, $length);
|
||||||
}
|
|
||||||
$added = parent::addFile($fileName);
|
|
||||||
if ($added) {
|
if ($added) {
|
||||||
$this->_newAddedFilesCounter ++;
|
$this->_newAddedFilesCounter ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $added;
|
return $added;
|
||||||
}
|
}
|
||||||
// public function addFile()
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user