Added fetch_head_rev()
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 22 Jan 2006 03:00:16 +0000 (03:00 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 22 Jan 2006 03:00:16 +0000 (03:00 +0000)
includes/cachev.php

index 6b167684336bc1a1cfca722ebb52927a17b0536a..e70af2f09ad2535f6ac07e9106686f26a84866a1 100644 (file)
@@ -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