diff options
author | Klap-in <klapinklapin@gmail.com> | 2013-08-03 15:00:34 +0200 |
---|---|---|
committer | Klap-in <klapinklapin@gmail.com> | 2013-08-03 15:00:34 +0200 |
commit | 092b7683d60c4d6b25213d459346b60a87c21c62 (patch) | |
tree | 08b614fc8252ffeb68589ca9fe7501536052ed06 | |
parent | 6acfab8732e1784b953c8cc2ae7408f84fda7ce8 (diff) | |
download | rpg-092b7683d60c4d6b25213d459346b60a87c21c62.tar.gz rpg-092b7683d60c4d6b25213d459346b60a87c21c62.tar.bz2 |
for negative or zero number of revs to return return empty array by getRevisions
-rw-r--r-- | inc/changelog.php | 2 |
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; |