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";