Skip to content
Snippets Groups Projects
Commit f7f0e633 authored by Myron Turner's avatar Myron Turner Committed by Andreas Gohr
Browse files

fixed two errors in safefnrecode plugin

parent 903e5bc8
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment