Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv12583/lib
Modified Files:
Tag: release-1_2-branch
diff.php ziplib.php
Log Message:
Fixes for PHP4 E_NOTICE warnings
Index: diff.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/diff.php,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -C2 -r1.4.2.1 -r1.4.2.2
*** diff.php 2001/02/08 18:28:31 1.4.2.1
--- diff.php 2001/02/10 05:26:00 1.4.2.2
***************
*** 159,162 ****
--- 159,164 ----
function _diag ($xoff, $xlim, $yoff, $ylim, $nchunks)
{
+ $flip = false;
+
if ($xlim - $xoff > $ylim - $yoff)
{
***************
*** 196,200 ****
reset($matches);
while (list ($junk, $y) = each($matches))
! if (! $this->in_seq[$y])
{
$k = $this->_lcs_pos($y);
--- 198,202 ----
reset($matches);
while (list ($junk, $y) = each($matches))
! if (empty($this->in_seq[$y]))
{
$k = $this->_lcs_pos($y);
***************
*** 214,218 ****
$this->in_seq[$y] = 1;
}
! else if (! $this->in_seq[$y])
{
$k = $this->_lcs_pos($y);
--- 216,220 ----
$this->in_seq[$y] = 1;
}
! else if (empty($this->in_seq[$y]))
{
$k = $this->_lcs_pos($y);
Index: ziplib.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/ziplib.php,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -r1.2.2.1 -r1.2.2.2
*** ziplib.php 2001/02/08 18:28:31 1.2.2.1
--- ziplib.php 2001/02/10 05:26:00 1.2.2.2
***************
*** 67,70 ****
--- 67,71 ----
if (!($fp = gzopen($filename, "rb")))
die("gzopen failed");
+ $unz = '';
while ($buf = gzread($fp, 4096))
$unz .= $buf;
***************
*** 265,269 ****
}
! if ($attrib['write_protected'])
$atx = (0100444 << 16) | 1; // S_IFREG + read permissions to everybody.
else
--- 266,270 ----
}
! if (!empty($attrib['write_protected']))
$atx = (0100444 << 16) | 1; // S_IFREG + read permissions to everybody.
else
***************
*** 272,276 ****
$ati = $attrib['is_ascii'] ? 1 : 0;
! if (!$attrib['mtime'])
$attrib['mtime'] = time();
list ($mod_date, $mod_time) = unixtime2dostime($attrib['mtime']);
--- 273,277 ----
$ati = $attrib['is_ascii'] ? 1 : 0;
! if (empty($attrib['mtime']))
$attrib['mtime'] = time();
list ($mod_date, $mod_time) = unixtime2dostime($attrib['mtime']);
***************
*** 278,282 ****
// Construct parts common to "Local file header" and "Central
// directory file header."
!
$head = pack("vvvvvVVVvv",
20, // Version needed to extract (FIXME: is this right?)
--- 279,287 ----
// Construct parts common to "Local file header" and "Central
// directory file header."
! if (!isset($attrib['extra_field']))
! $attrib['extra_field'] = '';
! if (!isset($attrib['file_comment']))
! $attrib['file_comment'] = '';
!
$head = pack("vvvvvVVVvv",
20, // Version needed to extract (FIXME: is this right?)
***************
*** 456,460 ****
preg_match('/^([ !-<>-~]*)(?:([!-<>-~]$)|(.))/s', $string, $match);
$quoted .= $match[1] . $match[2];
! if ($match[3])
$quoted .= sprintf("=%02X", ord($match[3]));
$string = substr($string, strlen($match[0]));
--- 461,465 ----
preg_match('/^([ !-<>-~]*)(?:([!-<>-~]$)|(.))/s', $string, $match);
$quoted .= $match[1] . $match[2];
! if (!empty($match[3]))
$quoted .= sprintf("=%02X", ord($match[3]));
$string = substr($string, strlen($match[0]));
|