diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/JpegMeta.php | 4 | ||||
-rw-r--r-- | inc/Mailer.class.php | 2 | ||||
-rw-r--r-- | inc/TarLib.class.php | 4 | ||||
-rw-r--r-- | inc/ZipLib.class.php | 4 | ||||
-rw-r--r-- | inc/actions.php | 2 | ||||
-rw-r--r-- | inc/feedcreator.class.php | 4 | ||||
-rw-r--r-- | inc/infoutils.php | 2 | ||||
-rw-r--r-- | inc/io.php | 2 | ||||
-rw-r--r-- | inc/media.php | 2 | ||||
-rw-r--r-- | inc/pageutils.php | 2 | ||||
-rw-r--r-- | inc/parser/code.php | 2 | ||||
-rw-r--r-- | inc/parser/xhtml.php | 6 | ||||
-rw-r--r-- | inc/search.php | 4 |
13 files changed, 20 insertions, 20 deletions
diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php index ac29bca66..ce643a7e6 100644 --- a/inc/JpegMeta.php +++ b/inc/JpegMeta.php @@ -1209,7 +1209,7 @@ class JpegMeta { function _parseFileInfo() { if (file_exists($this->_fileName) && is_file($this->_fileName)) { $this->_info['file'] = array(); - $this->_info['file']['Name'] = basename($this->_fileName); + $this->_info['file']['Name'] = utf8_basename($this->_fileName); $this->_info['file']['Path'] = fullpath($this->_fileName); $this->_info['file']['Size'] = filesize($this->_fileName); if ($this->_info['file']['Size'] < 1024) { @@ -1300,7 +1300,7 @@ class JpegMeta { } } else { $this->_info['file'] = array(); - $this->_info['file']['Name'] = basename($this->_fileName); + $this->_info['file']['Name'] = utf8_basename($this->_fileName); $this->_info['file']['Url'] = $this->_fileName; } diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index c85e61395..cbd1eb0a9 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -69,7 +69,7 @@ class Mailer { */ public function attachFile($path, $mime, $name = '', $embed = '') { if(!$name) { - $name = basename($path); + $name = utf8_basename($path); } $this->attach[] = array( diff --git a/inc/TarLib.class.php b/inc/TarLib.class.php index 36c1fee83..126604cd1 100644 --- a/inc/TarLib.class.php +++ b/inc/TarLib.class.php @@ -261,14 +261,14 @@ class TarLib { function sendClient($name = '', $archive = '', $headers = true) { if(!$name && !$this->_nomf) return -9; if(!$archive && !$this->_memdat) return -10; - if(!$name) $name = basename($this->_nomf); + if(!$name) $name = utf8_basename($this->_nomf); if($archive){ if(!file_exists($archive)) return -11; } else $decoded = $this->getDynamicArchive(); if($headers) { header('Content-Type: application/x-gtar'); - header('Content-Disposition: attachment; filename='.basename($name)); + header('Content-Disposition: attachment; filename='.utf8_basename($name)); header('Accept-Ranges: bytes'); header('Content-Length: '.($archive ? filesize($archive) : strlen($decoded))); } diff --git a/inc/ZipLib.class.php b/inc/ZipLib.class.php index cf89a40a4..918d38579 100644 --- a/inc/ZipLib.class.php +++ b/inc/ZipLib.class.php @@ -52,8 +52,8 @@ class ZipLib { $fn = $files[$i]; if(!in_Array(dirname($fn[0]),$this->dirs)) $this->add_Dir(dirname($fn[0])); - if(basename($fn[0])) - $ret[basename($fn[0])]=$this->add_File($fn[1],$fn[0],$compact); + if(utf8_basename($fn[0])) + $ret[utf8_basename($fn[0])]=$this->add_File($fn[1],$fn[0],$compact); } return $ret; } diff --git a/inc/actions.php b/inc/actions.php index fc15713d8..4356662d7 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -651,7 +651,7 @@ function act_sitemap($act) { if (is_readable($sitemap)) { // Send headers header('Content-Type: '.$mime); - header('Content-Disposition: attachment; filename='.basename($sitemap)); + header('Content-Disposition: attachment; filename='.utf8_basename($sitemap)); http_conditionalRequest(filemtime($sitemap)); diff --git a/inc/feedcreator.class.php b/inc/feedcreator.class.php index 435add6ac..ea8cc7b15 100644 --- a/inc/feedcreator.class.php +++ b/inc/feedcreator.class.php @@ -597,8 +597,8 @@ class FeedCreator extends HtmlDescribable { // HTTP redirect, some feed readers' simple HTTP implementations don't follow it //Header("Location: ".$filename); - header("Content-Type: ".$this->contentType."; charset=".$this->encoding."; filename=".basename($filename)); - header("Content-Disposition: inline; filename=".basename($filename)); + header("Content-Type: ".$this->contentType."; charset=".$this->encoding."; filename=".utf8_basename($filename)); + header("Content-Disposition: inline; filename=".utf8_basename($filename)); readfile($filename, "r"); die(); } diff --git a/inc/infoutils.php b/inc/infoutils.php index d602fc7b7..9ee1a717d 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -284,7 +284,7 @@ function msg($message,$lvl=0,$line='',$file=''){ $errors[1] = 'success'; $errors[2] = 'notify'; - if($line || $file) $message.=' ['.basename($file).':'.$line.']'; + if($line || $file) $message.=' ['.utf8_basename($file).':'.$line.']'; if(!isset($MSG)) $MSG = array(); $MSG[]=array('lvl' => $errors[$lvl], 'msg' => $message); diff --git a/inc/io.php b/inc/io.php index c76d2f44c..4c6eb97df 100644 --- a/inc/io.php +++ b/inc/io.php @@ -485,7 +485,7 @@ function io_download($url,$file,$useAttachment=false,$defaultName='',$maxSize=20 if (is_string($content_disposition) && preg_match('/attachment;\s*filename\s*=\s*"([^"]*)"/i', $content_disposition, $match)) { - $name = basename($match[1]); + $name = utf8_basename($match[1]); } } diff --git a/inc/media.php b/inc/media.php index 43bbd2560..35112f274 100644 --- a/inc/media.php +++ b/inc/media.php @@ -189,7 +189,7 @@ function media_delete($id,$auth){ // trigger an event - MEDIA_DELETE_FILE $data['id'] = $id; - $data['name'] = basename($file); + $data['name'] = utf8_basename($file); $data['path'] = $file; $data['size'] = (@file_exists($file)) ? filesize($file) : 0; diff --git a/inc/pageutils.php b/inc/pageutils.php index 5e741c491..d6abff894 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -35,7 +35,7 @@ function getID($param='id',$clean=true){ if($param != 'id') { $relpath = 'lib/exe/'; } - $script = $conf['basedir'].$relpath.basename($_SERVER['SCRIPT_FILENAME']); + $script = $conf['basedir'].$relpath.utf8_basename($_SERVER['SCRIPT_FILENAME']); }elseif($_SERVER['PATH_INFO']){ $request = $_SERVER['PATH_INFO']; diff --git a/inc/parser/code.php b/inc/parser/code.php index ff44a4e1e..21fb0dc3c 100644 --- a/inc/parser/code.php +++ b/inc/parser/code.php @@ -19,7 +19,7 @@ class Doku_Renderer_code extends Doku_Renderer { global $INPUT; if(!$language) $language = 'txt'; if(!$filename) $filename = 'snippet.'.$language; - $filename = basename($filename); + $filename = utf8_basename($filename); if($this->_codeblock == $INPUT->str('codeblock')){ header("Content-Type: text/plain; charset=utf-8"); diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 2f09dbd4f..e18718746 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -1067,7 +1067,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { // return the title of the picture if (!$title) { // just show the sourcename - $title = $this->_xmlEntities(basename(noNS($src))); + $title = $this->_xmlEntities(utf8_basename(noNS($src))); } return $title; } @@ -1096,7 +1096,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { // return the title of the flash if (!$title) { // just show the sourcename - $title = basename(noNS($src)); + $title = utf8_basename(noNS($src)); } return $this->_xmlEntities($title); } @@ -1115,7 +1115,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $ret .= $this->_xmlEntities($title); }else{ // just show the sourcename - $ret .= $this->_xmlEntities(basename(noNS($src))); + $ret .= $this->_xmlEntities(utf8_basename(noNS($src))); } return $ret; diff --git a/inc/search.php b/inc/search.php index a26ae4808..a02b86b34 100644 --- a/inc/search.php +++ b/inc/search.php @@ -171,7 +171,7 @@ function search_media(&$data,$base,$file,$type,$lvl,$opts){ return false; } - $info['file'] = basename($file); + $info['file'] = utf8_basename($file); $info['size'] = filesize($base.'/'.$file); $info['mtime'] = filemtime($base.'/'.$file); $info['writable'] = is_writable($base.'/'.$file); @@ -589,7 +589,7 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){ $item['open'] = $return; if($opts['meta']){ - $item['file'] = basename($file); + $item['file'] = utf8_basename($file); $item['size'] = filesize($base.'/'.$file); $item['mtime'] = filemtime($base.'/'.$file); $item['rev'] = $item['mtime']; |