From 59d12738cfc47a8ed013385ad762707e8b89eebf Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Sun, 29 Nov 2009 12:42:08 -0500 Subject: [PATCH] re-add cmp() function which is still used in some places --- framework/Vcs/lib/Horde/Vcs.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/framework/Vcs/lib/Horde/Vcs.php b/framework/Vcs/lib/Horde/Vcs.php index fdabf14d6..e3bd59a39 100644 --- a/framework/Vcs/lib/Horde/Vcs.php +++ b/framework/Vcs/lib/Horde/Vcs.php @@ -199,6 +199,21 @@ class Horde_Vcs } /** + * Given two revisions, this figures out which one is greater than the + * the other. + * + * @param string $rev1 Revision string. + * @param string $rev2 Second revision string. + * + * @return integer 1 if the first is greater, -1 if the second if greater, + * and 0 if they are equal + */ + public function cmp($rev1, $rev2) + { + return strcasecmp($rev1, $rev2); + } + + /** * TODO */ public function isFile($where) -- 2.11.0