Mercurial > epgrec.yaz
comparison Reservation.class.php @ 133:44811bc29179
fix: 日本語混ざりのファイル名の問題
author | yoneda <epgrec@park.mda.or.jp> |
---|---|
date | Sat, 20 Mar 2010 00:36:23 +0900 |
parents | a971ef7888b4 |
children | 58791b90221b |
comparison
equal
deleted
inserted
replaced
132:a971ef7888b4 | 133:44811bc29179 |
---|---|
198 */ | 198 */ |
199 | 199 |
200 $day_of_week = array( "","","","羂","","","" ); | 200 $day_of_week = array( "","","","羂","","","" ); |
201 $filename = $settings->filename_format; | 201 $filename = $settings->filename_format; |
202 | 202 |
203 // √絖_ | |
204 $fn_title = mb_ereg_replace("[ \./\*:<>\?\\|()\'\"&]","_", trim($title) ); | |
205 // %TITLE% | 203 // %TITLE% |
206 $filename = mb_str_replace("%TITLE%", $fn_title, $filename); | 204 $filename = mb_str_replace("%TITLE%", trim($title), $filename); |
207 // %ST% 紮ユ | 205 // %ST% 紮ユ |
208 $filename = mb_str_replace("%ST%",date("YmdHis", $start_time), $filename ); | 206 $filename = mb_str_replace("%ST%",date("YmdHis", $start_time), $filename ); |
209 // %ET% 腟篋ユ | 207 // %ET% 腟篋ユ |
210 $filename = mb_str_replace("%ET%",date("YmdHis", $end_time), $filename ); | 208 $filename = mb_str_replace("%ET%",date("YmdHis", $end_time), $filename ); |
211 // %TYPE% GR/BS | 209 // %TYPE% GR/BS |
229 // %SEC% 紮腱 | 227 // %SEC% 紮腱 |
230 $filename = mb_str_replace("%SEC%",date("s", $start_time), $filename ); | 228 $filename = mb_str_replace("%SEC%",date("s", $start_time), $filename ); |
231 // %DURATION% 牙紙鐚腱鐚 | 229 // %DURATION% 牙紙鐚腱鐚 |
232 $filename = mb_str_replace("%DURATION%","".$duration, $filename ); | 230 $filename = mb_str_replace("%DURATION%","".$duration, $filename ); |
233 | 231 |
232 // √絖_ | |
233 $filename = preg_replace("/[ \./\*:<>\?\\|()\'\"&]/u","_", trim($filename) ); | |
234 | |
234 // 絖潟若紊 | 235 // 絖潟若紊 |
235 if( defined("FILESYSTEM_ENCODING") ) { | 236 if( defined("FILESYSTEM_ENCODING") ) { |
236 $filename = mb_convert_encoding( $filename, FILESYSTEM_ENCODING, "UTF-8" ); | 237 $filename = mb_convert_encoding( $filename, FILESYSTEM_ENCODING, "UTF-8" ); |
237 } | 238 } |
239 | |
238 $filename .= $RECORD_MODE["$mode"]['suffix']; | 240 $filename .= $RECORD_MODE["$mode"]['suffix']; |
239 $thumbname = $filename.".jpg"; | 241 $thumbname = $filename.".jpg"; |
240 | 242 |
241 // 泣若 | 243 // 泣若 |
242 $gen_thumbnail = INSTALL_PATH."/gen-thumbnail.sh"; | 244 $gen_thumbnail = INSTALL_PATH."/gen-thumbnail.sh"; |