From 16905344219a6293705b71cd526fad3ba07b04eb Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 31 Jan 2010 19:02:14 +0100 Subject: first attempt to centralize all include loading Classes are loaded throug PHP5's class autoloader, all other includes are just loaded by default. This skips a lot of require_once calls. Parser and Plugin stuff isn't handled by the class loader yet. --- inc/search.php | 1 - 1 file changed, 1 deletion(-) (limited to 'inc/search.php') diff --git a/inc/search.php b/inc/search.php index 2b9a51fb3..ce4fefe06 100644 --- a/inc/search.php +++ b/inc/search.php @@ -7,7 +7,6 @@ */ if(!defined('DOKU_INC')) die('meh.'); -require_once(DOKU_INC.'inc/common.php'); /** * recurse direcory -- cgit v1.2.3 From 0af14a6e25ba35e88d96762bc73325838868e3fe Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 1 Feb 2010 15:38:41 +0100 Subject: removed more unneeded require_once() calls --- inc/search.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'inc/search.php') diff --git a/inc/search.php b/inc/search.php index ce4fefe06..9e0964404 100644 --- a/inc/search.php +++ b/inc/search.php @@ -194,7 +194,6 @@ function search_media(&$data,$base,$file,$type,$lvl,$opts){ $info['writable'] = is_writable($base.'/'.$file); if(preg_match("/\.(jpe?g|gif|png)$/",$file)){ $info['isimg'] = true; - require_once(DOKU_INC.'inc/JpegMeta.php'); $info['meta'] = new JpegMeta($base.'/'.$file); }else{ $info['isimg'] = false; @@ -320,7 +319,6 @@ function search_backlinks(&$data,$base,$file,$type,$lvl,$opts){ } //fetch instructions - require_once(DOKU_INC.'inc/parserutils.php'); $instructions = p_cached_instructions($base.$file,true); if(is_null($instructions)) return false; -- cgit v1.2.3 From dfd343c40d85231f23176cfc6683eaccc0580a6d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 22 Mar 2010 21:51:00 +0100 Subject: 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(-) (limited to 'inc/search.php') 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; -- cgit v1.2.3 From 272000286c073349cd0ba898df00c4fe81492461 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 29 Aug 2010 09:41:54 +0200 Subject: added missing keeptxt option to universal search FS#2014 --- inc/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/search.php') diff --git a/inc/search.php b/inc/search.php index 322c53e25..ea8897662 100644 --- a/inc/search.php +++ b/inc/search.php @@ -549,7 +549,7 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){ $return = true; // get ID and check if it is a valid one - $item['id'] = pathID($file); + $item['id'] = pathID($file,$opts['keeptxt']); if($item['id'] != cleanID($item['id'])){ if($opts['showmsg']) msg(hsc($item['id']).' is not a valid file name for DokuWiki - skipped',-1); -- cgit v1.2.3