From: Chuck Hagenbuch Date: Sun, 29 Nov 2009 17:42:08 +0000 (-0500) Subject: re-add cmp() function which is still used in some places X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=59d12738cfc47a8ed013385ad762707e8b89eebf;p=horde.git re-add cmp() function which is still used in some places --- 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)