Mercurial > epgrec.yaz
comparison recomplete.php @ 11:065d48346fff
support mediatomb db update (testing)
author | yoneda <yoneda@debian.localnet.mda.or.jp> |
---|---|
date | Mon, 13 Jul 2009 23:46:20 +0900 |
parents | f5a9f0eb4858 |
children | b0fc647167f5 |
comparison
equal
deleted
inserted
replaced
10:152b146bd276 | 11:065d48346fff |
---|---|
9 $rrec = new DBRecord( TBL_PREFIX.RESERVE_TBL, "id" , $reserve_id ); | 9 $rrec = new DBRecord( TBL_PREFIX.RESERVE_TBL, "id" , $reserve_id ); |
10 | 10 |
11 if( file_exists( INSTALL_PATH . SPOOL . "/". $rrec->path ) ) { | 11 if( file_exists( INSTALL_PATH . SPOOL . "/". $rrec->path ) ) { |
12 // 予約完了 | 12 // 予約完了 |
13 $rrec->complete = '1'; | 13 $rrec->complete = '1'; |
14 if( MEDIATOMB_UPDATE) { | |
15 $dbh = mysql_connect( DB_HOST, DB_USER, DB_PASS ); | |
16 if( $dbh !== false ) { | |
17 $sqlstr = "use ".DB_NAME; | |
18 mysql_query( $sqlstr ); | |
19 // 別にやらなくてもいいが | |
20 $sqlstr = "set NAME utf8"; | |
21 mysql_query( $sqlstr ); | |
22 $sqlstr = "update mt_cds_object set metadata='dc:description=".$rrec->description."' where dc_title='".$rrec->path."'"; | |
23 mysql_query( $sqlstr ); | |
24 $sqlstr = "update mt_cds_object set dc_title='".$rrec->title."' where dc_title='".$rrec->path."'"; | |
25 mysql_query( $sqlstr ); | |
26 } | |
27 } | |
14 } | 28 } |
15 else { | 29 else { |
16 // 予約失敗 | 30 // 予約失敗 |
17 $rrec->delete(); | 31 $rrec->delete(); |
18 } | 32 } |