[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.129,1.130
From: |
Miles Lott <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.129,1.130 |
Date: |
Sun, 17 Feb 2002 10:34:15 -0500 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv20173/phpgwapi/inc
Modified Files:
class.common.inc.php
Log Message:
Fix version check and display
Index: class.common.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.common.inc.php,v
retrieving revision 1.129
retrieving revision 1.130
diff -C2 -r1.129 -r1.130
*** class.common.inc.php 3 Feb 2002 00:52:53 -0000 1.129
--- class.common.inc.php 17 Feb 2002 15:34:13 -0000 1.130
***************
*** 56,60 ****
ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)",$str1,$regs);
ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)",$str2,$regs2);
! if($debug) { echo "<br>$regs[0] - $regs2[0]"; }
for($i=1;$i<5;$i++)
--- 56,64 ----
ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)",$str1,$regs);
ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)",$str2,$regs2);
! if($debug)
! {
! echo '<br>cmp_version(' . $str1 . ',' . $str2 .
')';
! echo "<br>$regs[0] - $regs2[0]";
! }
for($i=1;$i<5;$i++)
***************
*** 63,77 ****
--- 67,89 ----
if($regs2[$i] == $regs[$i])
{
+ if($debug) { echo ' are equal...'; }
continue;
}
if($regs2[$i] > $regs[$i])
{
+ if($debug) { echo ', and a < b.
Returning 1.'; }
return 1;
}
elseif($regs2[$i] < $regs[$i])
{
+ if($debug) { echo ', and a > b.
Returning 0.'; }
return 0;
}
}
+ if($debug)
+ {
+ echo ' - all equal. Returning NULL.';
+ return '';
+ }
}
***************
*** 87,91 ****
ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)",$str1,$regs);
ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)",$str2,$regs2);
! if($debug) { echo "<br>$regs[0] - $regs2[0]"; }
for($i=1;$i<6;$i++)
--- 99,112 ----
ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)",$str1,$regs);
ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)",$str2,$regs2);
! if($debug)
! {
! echo '<br>cmp_version_long(' . $str1 . ',' .
$str2 . ')';
! echo "<br>$regs[0] - $regs2[0]";
! }
! if(!$regs[0])
! {
! if($debug) { echo '<br>calling cmp_version(' .
$str1 . ',' . $str2 . ')'; }
! return $this->cmp_version($str1,$str2,$debug);
! }
for($i=1;$i<6;$i++)
***************
*** 100,113 ****
if($regs2[$i] > $regs[$i])
{
! if($debug) { echo ', and a > b'; }
return 1;
}
elseif($regs2[$i] < $regs[$i])
{
! if($debug) { echo ', and a < b'; }
return 0;
}
}
! if($debug) { echo ' - all equal.'; }
}
--- 121,138 ----
if($regs2[$i] > $regs[$i])
{
! if($debug) { echo ', and a < b.
Returning 1.'; }
return 1;
}
elseif($regs2[$i] < $regs[$i])
{
! if($debug) { echo ', and a > b.
Returning 0.'; }
return 0;
}
}
! if($debug)
! {
! echo ' - all equal. Returning NULL.';
! return '';
! }
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.129,1.130,
Miles Lott <address@hidden> <=