summaryrefslogtreecommitdiff
path: root/inc/changelog.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-08-04 03:39:06 -0700
committerAndreas Gohr <andi@splitbrain.org>2013-08-04 03:39:06 -0700
commitf1d14ca3e1d6216eada296b33886c2800428ab06 (patch)
tree3b14a7fb59a36089eb197612c66a61b840c4d738 /inc/changelog.php
parent9ead67782d3bf9976a4bd1f0d748d59094ed6bd6 (diff)
parent7d8f3226a5cc8d52fb823089894cff8a3ad11eaa (diff)
downloadrpg-f1d14ca3e1d6216eada296b33886c2800428ab06.tar.gz
rpg-f1d14ca3e1d6216eada296b33886c2800428ab06.tar.bz2
Merge pull request #237 from splitbrain/changelogtestsonly
Added tests for getRevisions and getRevisionInfo from page changelog
Diffstat (limited to 'inc/changelog.php')
-rw-r--r--inc/changelog.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/inc/changelog.php b/inc/changelog.php
index 9768fea51..6ff1e0eca 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -460,6 +460,8 @@ function getRevisions($id, $first, $num, $chunk_size=8192, $media=false) {
$file = metaFN($id, '.changes');
}
$num = max($num, 0);
+ if ($num == 0) { return $revs; }
+
$chunk_size = max($chunk_size, 0);
if ($first<0) {
$first = 0;