Mercurial > epgrec.yaz
changeset 133:44811bc29179
fix: 日本語混ざりのファイル名の問題
author | yoneda <epgrec@park.mda.or.jp> |
---|---|
date | Sat, 20 Mar 2010 00:36:23 +0900 |
parents | a971ef7888b4 |
children | 58791b90221b |
files | Reservation.class.php |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Reservation.class.php Fri Mar 19 23:33:03 2010 +0900 +++ b/Reservation.class.php Sat Mar 20 00:36:23 2010 +0900 @@ -200,10 +200,8 @@ $day_of_week = array( "","","","羂","","","" ); $filename = $settings->filename_format; - // √絖_ - $fn_title = mb_ereg_replace("[ \./\*:<>\?\\|()\'\"&]","_", trim($title) ); // %TITLE% - $filename = mb_str_replace("%TITLE%", $fn_title, $filename); + $filename = mb_str_replace("%TITLE%", trim($title), $filename); // %ST% 紮ユ $filename = mb_str_replace("%ST%",date("YmdHis", $start_time), $filename ); // %ET% 腟篋ユ @@ -231,10 +229,14 @@ // %DURATION% 牙紙鐚腱鐚 $filename = mb_str_replace("%DURATION%","".$duration, $filename ); + // √絖_ + $filename = preg_replace("/[ \./\*:<>\?\\|()\'\"&]/u","_", trim($filename) ); + // 絖潟若紊 if( defined("FILESYSTEM_ENCODING") ) { $filename = mb_convert_encoding( $filename, FILESYSTEM_ENCODING, "UTF-8" ); } + $filename .= $RECORD_MODE["$mode"]['suffix']; $thumbname = $filename.".jpg";