Skip to content

Commit

Permalink
Merged branch 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Tuke committed Oct 16, 2012
1 parent 06ea9c1 commit 8b01286
Show file tree
Hide file tree
Showing 3,169 changed files with 191,827 additions and 253,859 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ _darcs/*
CVS/*
.svn/*
RCS/*
*.backup*

# kdevelop
.kdev
*.kdev4
*.kate-swp

# Lokalize
*lokalize*
Expand Down
182 changes: 0 additions & 182 deletions .tx/config

This file was deleted.

83 changes: 51 additions & 32 deletions 3rdparty/Archive/Tar.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @author Vincent Blavet <[email protected]>
* @copyright 1997-2010 The Authors
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @version CVS: $Id: Tar.php 323476 2012-02-24 15:27:26Z mrook $
* @version CVS: $Id: Tar.php 324840 2012-04-05 08:44:41Z mrook $
* @link http://pear.php.net/package/Archive_Tar
*/

Expand All @@ -50,7 +50,7 @@
* @package Archive_Tar
* @author Vincent Blavet <[email protected]>
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @version $Revision: 323476 $
* @version $Revision: 324840 $
*/
class Archive_Tar extends PEAR
{
Expand Down Expand Up @@ -577,7 +577,7 @@ function setAttribute()
}

// ----- Get the arguments
$v_att_list = func_get_args();
$v_att_list = &func_get_args();

// ----- Read the attributes
$i=0;
Expand Down Expand Up @@ -649,14 +649,14 @@ function setIgnoreList($list)
// {{{ _error()
function _error($p_message)
{
$this->error_object = $this->raiseError($p_message);
$this->error_object = &$this->raiseError($p_message);
}
// }}}

// {{{ _warning()
function _warning($p_message)
{
$this->error_object = $this->raiseError($p_message);
$this->error_object = &$this->raiseError($p_message);
}
// }}}

Expand Down Expand Up @@ -981,7 +981,7 @@ function _addList($p_list, $p_add_dir, $p_remove_dir)
// }}}

// {{{ _addFile()
function _addFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir,$v_stored_filename=null)
function _addFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $v_stored_filename=null)
{
if (!$this->_file) {
$this->_error('Invalid file descriptor');
Expand All @@ -992,31 +992,32 @@ function _addFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir,$v_stored_f
$this->_error('Invalid file name');
return false;
}
if(is_null($v_stored_filename)){

// ----- Calculate the stored filename
$p_filename = $this->_translateWinPath($p_filename, false);
$v_stored_filename = $p_filename;
if (strcmp($p_filename, $p_remove_dir) == 0) {
return true;
}
if ($p_remove_dir != '') {
if (substr($p_remove_dir, -1) != '/')
$p_remove_dir .= '/';

if (substr($p_filename, 0, strlen($p_remove_dir)) == $p_remove_dir)
$v_stored_filename = substr($p_filename, strlen($p_remove_dir));
}
$v_stored_filename = $this->_translateWinPath($v_stored_filename);
if ($p_add_dir != '') {
if (substr($p_add_dir, -1) == '/')
$v_stored_filename = $p_add_dir.$v_stored_filename;
else
$v_stored_filename = $p_add_dir.'/'.$v_stored_filename;
}

$v_stored_filename = $this->_pathReduction($v_stored_filename);
}

// ownCloud change to make it possible to specify the filename to use
if(is_null($v_stored_filename)) {
// ----- Calculate the stored filename
$p_filename = $this->_translateWinPath($p_filename, false);
$v_stored_filename = $p_filename;
if (strcmp($p_filename, $p_remove_dir) == 0) {
return true;
}
if ($p_remove_dir != '') {
if (substr($p_remove_dir, -1) != '/')
$p_remove_dir .= '/';

if (substr($p_filename, 0, strlen($p_remove_dir)) == $p_remove_dir)
$v_stored_filename = substr($p_filename, strlen($p_remove_dir));
}
$v_stored_filename = $this->_translateWinPath($v_stored_filename);
if ($p_add_dir != '') {
if (substr($p_add_dir, -1) == '/')
$v_stored_filename = $p_add_dir.$v_stored_filename;
else
$v_stored_filename = $p_add_dir.'/'.$v_stored_filename;
}

$v_stored_filename = $this->_pathReduction($v_stored_filename);
}

if ($this->_isArchive($p_filename)) {
if (($v_file = @fopen($p_filename, "rb")) == 0) {
Expand Down Expand Up @@ -1775,12 +1776,20 @@ function _openAppend()
}

if ($this->_compress_type == 'gz') {
$end_blocks = 0;

while (!@gzeof($v_temp_tar)) {
$v_buffer = @gzread($v_temp_tar, 512);
if ($v_buffer == ARCHIVE_TAR_END_BLOCK || strlen($v_buffer) == 0) {
$end_blocks++;
// do not copy end blocks, we will re-make them
// after appending
continue;
} elseif ($end_blocks > 0) {
for ($i = 0; $i < $end_blocks; $i++) {
$this->_writeBlock(ARCHIVE_TAR_END_BLOCK);
}
$end_blocks = 0;
}
$v_binary_data = pack("a512", $v_buffer);
$this->_writeBlock($v_binary_data);
Expand All @@ -1789,9 +1798,19 @@ function _openAppend()
@gzclose($v_temp_tar);
}
elseif ($this->_compress_type == 'bz2') {
$end_blocks = 0;

while (strlen($v_buffer = @bzread($v_temp_tar, 512)) > 0) {
if ($v_buffer == ARCHIVE_TAR_END_BLOCK) {
if ($v_buffer == ARCHIVE_TAR_END_BLOCK || strlen($v_buffer) == 0) {
$end_blocks++;
// do not copy end blocks, we will re-make them
// after appending
continue;
} elseif ($end_blocks > 0) {
for ($i = 0; $i < $end_blocks; $i++) {
$this->_writeBlock(ARCHIVE_TAR_END_BLOCK);
}
$end_blocks = 0;
}
$v_binary_data = pack("a512", $v_buffer);
$this->_writeBlock($v_binary_data);
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/MDB2/Driver/Datatype/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,7 @@ function _quoteTimestamp($value, $quote, $escape_wildcards)
if (PEAR::isError($db)) {
return $db;
}
if (isset($db->function) && is_object($this->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) {
if (isset($db->function) && is_object($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) {
return $db->function->now('timestamp');
}
return 'CURRENT_TIMESTAMP';
Expand Down
Loading

0 comments on commit 8b01286

Please sign in to comment.