summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/changelog.php1
-rw-r--r--inc/html.php21
-rw-r--r--inc/media.php4
3 files changed, 15 insertions, 11 deletions
diff --git a/inc/changelog.php b/inc/changelog.php
index 578a04298..188670397 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -209,6 +209,7 @@ function getRecents($first,$num,$ns='',$flags=0){
} else {
$lines_position--;
$x = $rec;
+ if ($flags & RECENTS_MEDIA_CHANGES) $x['media'] = true;
$rec = false;
}
if(--$first >= 0) continue; // skip first entries
diff --git a/inc/html.php b/inc/html.php
index 4bbfe6a31..1df61dc7e 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -680,13 +680,20 @@ function html_recent($first=0, $show_changes='both'){
$form->addElement(form_makeOpenTag('div', array('class' => 'li')));
+ if ($recent['media']) {
+ $form->addElement(media_printicon($recent['id']));
+ } else {
+ $icon = DOKU_BASE.'lib/images/fileicons/file.png';
+ $form->addElement('<img src="'.$icon.'" alt="'.$filename.'" class="icon" />');
+ }
+
$form->addElement(form_makeOpenTag('span', array('class' => 'date')));
$form->addElement($date);
$form->addElement(form_makeCloseTag('span'));
if ($recent['media']) {
$href = media_managerURL(array('tab_details' => 'history',
- 'mediado' => 'diff', 'image' => $recent['id']), '&');
+ 'mediado' => 'diff', 'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&');
} else {
$href = wl($recent['id'],"do=diff", false, '&');
}
@@ -701,7 +708,8 @@ function html_recent($first=0, $show_changes='both'){
$form->addElement(form_makeCloseTag('a'));
if ($recent['media']) {
- $href = media_managerURL(array('tab_details' => 'history', 'image' => $recent['id']), '&');
+ $href = media_managerURL(array('tab_details' => 'history',
+ 'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&');
} else {
$href = wl($recent['id'],"do=revisions",false,'&');
}
@@ -716,13 +724,8 @@ function html_recent($first=0, $show_changes='both'){
$form->addElement(form_makeCloseTag('a'));
if ($recent['media']) {
- // Prepare fileicons
- list($ext,$mime,$dl) = mimetype($recent['id'],false);
- $class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext);
- $class = 'mediafile mf_'.$class;
-
- $href = media_managerURL(array('tab_details' => 'view', 'image' => $recent['id']), '&');
- $form->addElement(form_makeOpenTag('a', array('class' => 'wikilink1 '.$class, 'href' => $href)));
+ $href = media_managerURL(array('tab_details' => 'view', 'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&');
+ $form->addElement(form_makeOpenTag('a', array('class' => 'wikilink1', 'href' => $href)));
$form->addElement($recent['id']);
$form->addElement(form_makeCloseTag('a'));
} else {
diff --git a/inc/media.php b/inc/media.php
index a08d394ef..5f9fb63de 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -1338,7 +1338,7 @@ function media_printicon($filename){
$icon = DOKU_BASE.'lib/images/fileicons/file.png';
}
- echo '<img src="'.$icon.'" alt="'.$filename.'" class="icon" />';
+ return '<img src="'.$icon.'" alt="'.$filename.'" class="icon" />';
}
@@ -1363,7 +1363,7 @@ function media_printfile_thumbs($item,$auth,$jump=false){
} else {
echo '<a name="d_:'.$item['id'].'" class="image" title="'.$item['id'].'" href="'.
media_managerURL(array('image' => hsc($item['id']))).'"><div>';
- media_printicon($item['id']);
+ echo media_printicon($item['id']);
echo '</div></a>';
}
//echo '<input type=checkbox />';