Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv27475/lib
Modified Files:
diff.php
Log Message:
Fix for PHP warning: "lib/diff.php:197: Notice[8]: Undefined index: ..."
Index: diff.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/diff.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** diff.php 2001/11/14 21:05:38 1.14
--- diff.php 2001/12/07 17:39:45 1.15
***************
*** 186,191 ****
$numer = $xlim - $xoff + $nchunks - 1;
$x = $xoff;
! for ($chunk = 0; $chunk < $nchunks; $chunk++)
! {
if ($chunk > 0)
for ($i = 0; $i <= $this->lcs; $i++)
--- 186,190 ----
$numer = $xlim - $xoff + $nchunks - 1;
$x = $xoff;
! for ($chunk = 0; $chunk < $nchunks; $chunk++) {
if ($chunk > 0)
for ($i = 0; $i <= $this->lcs; $i++)
***************
*** 193,202 ****
$x1 = $xoff + (int)(($numer + ($xlim-$xoff)*$chunk) / $nchunks);
! for ( ; $x < $x1; $x++)
! {
! $matches = $ymatches[$flip ? $this->yv[$x] : $this->xv[$x]];
! if (!$matches)
continue;
! reset($matches);
while (list ($junk, $y) = each($matches))
if (empty($this->in_seq[$y]))
--- 192,201 ----
$x1 = $xoff + (int)(($numer + ($xlim-$xoff)*$chunk) / $nchunks);
! for ( ; $x < $x1; $x++) {
! $line = $flip ? $this->yv[$x] : $this->xv[$x];
! if (empty($ymatches[$line]))
continue;
! $matches = $ymatches[$line];
! reset($matches);
while (list ($junk, $y) = each($matches))
if (empty($this->in_seq[$y]))
***************
*** 225,230 ****
}
}
! }
! }
$seps[] = $flip ? array($yoff, $xoff) : array($xoff, $yoff);
--- 224,229 ----
}
}
! }
! }
$seps[] = $flip ? array($yoff, $xoff) : array($xoff, $yoff);
|