re-add cmp() function which is still used in some places
authorChuck Hagenbuch <chuck@horde.org>
Sun, 29 Nov 2009 17:42:08 +0000 (12:42 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Sun, 29 Nov 2009 17:42:33 +0000 (12:42 -0500)
framework/Vcs/lib/Horde/Vcs.php

index fdabf14..e3bd59a 100644 (file)
@@ -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)