From d3d7c6b706aef16d2412b7d45dee003025c73bc4 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 22 Jan 2006 03:00:16 +0000 Subject: [PATCH] Added fetch_head_rev() --- includes/cachev.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/includes/cachev.php b/includes/cachev.php index 6b16768..e70af2f 100644 --- a/includes/cachev.php +++ b/includes/cachev.php @@ -152,6 +152,24 @@ class cacheV return $this->fetch_revision(max(array_keys($data))); } + // ################################################################### + /** + * Returns the latest revision that the file is at + * + * @access public + * + * @param string Node path + * + * @return integer HEAD revision + */ + function fetch_head_revision($node) + { + $data = $this->fetch_node($node); + $data = $data['history']; + + return max(array_keys($data)); + } + // ################################################################### /** * Fetches the latest revision for a given path -- 2.43.5