diff options
author | Guillaume Turri <guillaume.turri@gmail.com> | 2013-01-10 08:02:26 +0100 |
---|---|---|
committer | Guillaume Turri <guillaume.turri@gmail.com> | 2013-01-10 23:45:42 +0100 |
commit | f8591821bac23569788706524f8d6b14bd73775c (patch) | |
tree | f8f8f5b70df89a562b5227bbd1e5068a3a62b874 | |
parent | e47e9c10c754a8b04f2f5fb07877e55863ffdea5 (diff) | |
download | rpg-f8591821bac23569788706524f8d6b14bd73775c.tar.gz rpg-f8591821bac23569788706524f8d6b14bd73775c.tar.bz2 |
Don't remove page version from result if uneeded
It may happen when the page has few versions
-rw-r--r-- | inc/RemoteAPICore.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index c04a14f5c..fef0b81dd 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -654,7 +654,9 @@ class RemoteAPICore { if(count($revisions)>0 && $first==0) { array_unshift($revisions, ''); // include current revision - array_pop($revisions); // remove extra log entry + if ( count($revisions) > $conf['recent'] ){ + array_pop($revisions); // remove extra log entry + } } if(count($revisions) > $conf['recent']) { |