summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2015-05-16 11:56:30 +0200
committerAndreas Gohr <andi@splitbrain.org>2015-05-16 11:56:30 +0200
commite7195f3c8d808e1a725b58626e7c3c7397f2417a (patch)
tree55c0c753d1e69001f5fb79960f9db5a30f06ccb4
parentdd0d7a4198ffaf4061d322de53ecd9a34eac3500 (diff)
parent689215716f1a8fc21318a4e032a96a3a592317e7 (diff)
downloadrpg-e7195f3c8d808e1a725b58626e7c3c7397f2417a.tar.gz
rpg-e7195f3c8d808e1a725b58626e7c3c7397f2417a.tar.bz2
Merge pull request #1155 from splitbrain/deprecatedrev
replace deprecated getRevisions call
-rw-r--r--inc/html.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/inc/html.php b/inc/html.php
index 4bf784502..2564c3bd6 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -776,10 +776,16 @@ function html_recent($first=0, $show_changes='both'){
$href = '';
if (!empty($recent['media'])) {
- $diff = (count(getRevisions($recent['id'], 0, 1, 8192, true)) && file_exists(mediaFN($recent['id'])));
+ $changelog = new MediaChangeLog($recent['id']);
+ $revs = $changelog->getRevisions(0, 1);
+ $diff = (count($revs) && file_exists(mediaFN($recent['id'])));
if ($diff) {
- $href = media_managerURL(array('tab_details' => 'history',
- 'mediado' => 'diff', 'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&');
+ $href = media_managerURL(array(
+ 'tab_details' => 'history',
+ 'mediado' => 'diff',
+ 'image' => $recent['id'],
+ 'ns' => getNS($recent['id'])
+ ), '&');
}
} else {
$href = wl($recent['id'],"do=diff", false, '&');