https://src.bluestatic.org
/
viewsvn.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14208c6
)
Make fetch_prev_rev() work if there is no history
author
Robert Sesek <rsesek@bluestatic.org>
Thu, 12 Jan 2006 18:17:20 +0000
(18:17 +0000)
committer
Robert Sesek <rsesek@bluestatic.org>
Thu, 12 Jan 2006 18:17:20 +0000
(18:17 +0000)
includes/cachev.php
patch
|
blob
|
history
diff --git
a/includes/cachev.php
b/includes/cachev.php
index 16d94605b17484d1cb5beec34f113b0ddb3b2f27..2053e28c3c040d061245e32c60091f1b343047bb 100644
(file)
--- a/
includes/cachev.php
+++ b/
includes/cachev.php
@@
-139,6
+139,11
@@
class cacheV
$data = $this->fetch_node($node);
$data = $data['history'];
+ if (count($data['history']) < 1)
+ {
+ return $this->fetch_revision(0);
+ }
+
unset($data[ max(array_keys($data)) ]);
return $this->fetch_revision(max(array_keys($data)));