diff options
author | jim-p <jimp@pfsense.org> | 2011-02-10 08:33:48 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-02-10 08:34:23 -0500 |
commit | bda131b275f0761f15533da8dc633a4c0a452bf2 (patch) | |
tree | 25062867972c347b60e6568d7887e6abe01dd904 /etc | |
parent | 30ef6f8dd093a6ff7c9f3e2533297903ed2d1ec3 (diff) | |
download | pfsense-bda131b275f0761f15533da8dc633a4c0a452bf2.zip pfsense-bda131b275f0761f15533da8dc633a4c0a452bf2.tar.gz |
Fix a date compare bug, resolves #1273
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 5d948de..113de9a 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1674,9 +1674,9 @@ function version_compare_dates($a, $b) { if ((!$a_time) || (!$b_time)) { return FALSE; } else { - if ($a < $b) + if ($a_time < $b_time) return -1; - elseif ($a == $b) + elseif ($$a_time == $b_time) return 0; else return 1; @@ -1735,7 +1735,7 @@ function version_compare_numeric($a, $b) { } function pfs_version_compare($cur_time, $cur_text, $remote) { // First try date compare - $v = version_compare_dates($cur_time, $b); + $v = version_compare_dates($cur_time, $remote); if ($v === FALSE) { // If that fails, try to compare by string // Before anything else, simply test if the strings are equal |