From f7f0e633f735842dfb466878eef440245a9bd3e1 Mon Sep 17 00:00:00 2001 From: Myron Turner <turnermm02@shaw.ca> Date: Wed, 6 Apr 2011 22:00:00 +0200 Subject: [PATCH] fixed two errors in safefnrecode plugin --- lib/plugins/safefnrecode/action.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plugins/safefnrecode/action.php b/lib/plugins/safefnrecode/action.php index 76d02e4c7..5d3eaae3a 100644 --- a/lib/plugins/safefnrecode/action.php +++ b/lib/plugins/safefnrecode/action.php @@ -39,8 +39,8 @@ class action_plugin_safefnrecode extends DokuWiki_Action_Plugin { } if(!file_exists($conf['mediadir'].'_safefn.recoded')){ - $this->recode($conf['metadir']); - touch($conf['metadir'].'_safefn.recoded'); + $this->recode($conf['mediadir']); + touch($conf['mediadir'].'_safefn.recoded'); } } @@ -55,7 +55,7 @@ class action_plugin_safefnrecode extends DokuWiki_Action_Plugin { while (($file = readdir($dh)) !== false) { if($file == '.' || $file == '..') continue; # cur and upper dir if(is_dir("$dir/$file")) $this->recode("$dir/$file"); #recurse - if(strpos('%',$file) === false) continue; # no encoding used + if(strpos($file,'%') === false) continue; # no encoding used $new = preg_replace('/(%[^\]]*?)\./','\1]',$file); # new post indicator if(preg_match('/%[^\]]+$/',$new)) $new .= ']'; # fix end FS#2122 rename("$dir/$file","$dir/$new"); # rename it -- GitLab