From dfd343c40d85231f23176cfc6683eaccc0580a6d Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Mon, 22 Mar 2010 21:51:00 +0100
Subject: [PATCH] fixed hashing in mediaSearch()

The hash option did not hash the correct content for the
found media files. This causes troubles in the sync plugin
http://github.com/splitbrain/dokuwiki-plugin-sync/issues#issue/1
---
 inc/search.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inc/search.php b/inc/search.php
index 9e0964404..322c53e25 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -199,7 +199,7 @@ function search_media(&$data,$base,$file,$type,$lvl,$opts){
         $info['isimg'] = false;
     }
     if($opts['hash']){
-        $info['hash'] = md5(io_readFile(wikiFN($info['id']),false));
+        $info['hash'] = md5(io_readFile(mediaFN($info['id']),false));
     }
 
     $data[] = $info;
-- 
GitLab