Mercurial > epgrec.yaz
changeset 149:5b192e94f49d
fix: 予約済み定数を使ってしまったミスを修正。エラーレベルに警告を追加
author | epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp> |
---|---|
date | Sat, 27 Mar 2010 16:04:54 +0900 |
parents | fadae5e39857 |
children | 3a6ec345ab0c 784e3c82926e |
files | Reservation.class.php recLog.inc.php recomplete.php storeProgram.inc.php templates/logTable.html |
diffstat | 5 files changed, 23 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/Reservation.class.php Mon Mar 22 22:43:11 2010 +0900 +++ b/Reservation.class.php Sat Mar 27 16:04:54 2010 +0900 @@ -303,7 +303,7 @@ } else { $rrec->delete(); - reclog( "Reservation::custom at絎茵紊掩罔≧", E_ERROR); + reclog( "Reservation::custom at絎茵紊掩罔≧", EPGREC_ERROR); throw new Exception("AT絎茵"); } // job垩冴 @@ -323,7 +323,7 @@ } // $rrec->delete(); - reclog( "Reservation::custom job垩緇紊掩",E_ERROR ); + reclog( "Reservation::custom job垩緇紊掩",EPGREC_ERROR ); throw new Exception( "job垩緇紊掩" ); } catch( Exception $e ) { @@ -356,7 +356,8 @@ if( ! $rec->complete ) { // 絎茵篋膣с if( toTimestamp($rec->starttime) < (time() + PADDING_TIME + $settings->former_time) ) { - reclog("Reservation::cancel 絎茵篋膣羔絎茵", E_ERROR ); + reclog("Reservation::cancel 絎茵篋膣羔絎茵", EPGREC_ERROR ); + throw new Exception("絎茵篋膣с"); } exec( $settings->atrm . " " . $rec->job ); reclog("Reservation::cancel 吾с".$rec->job.""); @@ -364,7 +365,7 @@ $rec->delete(); } catch( Exception $e ) { - reclog("Reservation::cancel 篋膣c潟祉DB・膓障≪祉鴻紊掩罔≧", E_ERROR ); + reclog("Reservation::cancel 篋膣c潟祉DB・膓障≪祉鴻紊掩罔≧", EPGREC_ERROR ); throw $e; } }
--- a/recLog.inc.php Mon Mar 22 22:43:11 2010 +0900 +++ b/recLog.inc.php Sat Mar 27 16:04:54 2010 +0900 @@ -1,10 +1,11 @@ <?php -define( "E_INFO" , 0 ); -define( "E_ERROR", 2 ); +define( "EPGREC_INFO" , 0 ); +define( "EPGREC_WARN" , 1 ); +define( "EPGREC_ERROR", 2 ); -function reclog( $message , $level = E_INFO ) { +function reclog( $message , $level = EPGREC_INFO ) { try { $log = new DBRecord( LOG_TBL );
--- a/recomplete.php Mon Mar 22 22:43:11 2010 +0900 +++ b/recomplete.php Sat Mar 27 16:04:54 2010 +0900 @@ -39,13 +39,13 @@ } else { // 篋膣紊掩 - reclog( "recomplete:: 篋膣ID". $rrec->id .":".$rrec->type.$rrec->channel.$rrec->title."牙祉紊掩罔≧", E_ERROR ); + reclog( "recomplete:: 篋膣ID". $rrec->id .":".$rrec->type.$rrec->channel.$rrec->title."牙祉紊掩罔≧", EPGREC_ERROR ); $rrec->delete(); } } catch( exception $e ) { - reclog( "recomplete:: 篋膣若≪祉鴻紊掩罔≧", E_ERROR ); - reclog( "recomplete:: ".$e->getMessage()."" , E_ERROR ); + reclog( "recomplete:: 篋膣若≪祉鴻紊掩罔≧", EPGREC_ERROR ); + reclog( "recomplete:: ".$e->getMessage()."" , EPGREC_ERROR ); exit( $e->getMessage() ); }
--- a/storeProgram.inc.php Mon Mar 22 22:43:11 2010 +0900 +++ b/storeProgram.inc.php Sat Mar 27 16:04:54 2010 +0900 @@ -45,7 +45,7 @@ // XML parse $xml = @simplexml_load_file( $xmlfile ); if( $xml === false ) { - reclog( "getepg:: 罩e幻".$xmlfile."篏c罔≧(冗絽с馹障)" ); + reclog( "getepg:: 罩e幻".$xmlfile."篏c罔≧(冗絽с馹障)", EPGREC_WARN ); return; // XML茯水篏 } // channel遵 @@ -71,7 +71,7 @@ } } catch( Exception $e ) { - reclog( "getepg::DB・膓障c潟若吾莨若帥紊掩", E_ERROR ); + reclog( "getepg::DB・膓障c潟若吾莨若帥紊掩", EPGREC_ERROR ); } } // channel 腟篋 @@ -89,7 +89,7 @@ $channel_rec = new DBRecord(CHANNEL_TBL, "channel_disc", "$channel_disc" ); } catch( Exception $e ) { - reclog( "getepg::c潟潟若 $channel_disc 肴с", E_ERROR ); + reclog( "getepg::c潟潟若 $channel_disc 肴с", EPGREC_ERROR ); } if( $channel_rec == null ) continue; // 緇莎激 if( $channel_rec->skip == 1 ) continue; // 篆<c潟 @@ -126,8 +126,8 @@ $cat_rec = new DBRecord(CATEGORY_TBL, "category_disc" , $category_disc ); } catch( Exception $e ) { - reclog("getepg:: 眼若≪祉鴻紊掩罔≧", E_ERROR ); - reclog("getepg:: ".$e->getMessage()."" ,E_ERROR ); + reclog("getepg:: 眼若≪祉鴻紊掩罔≧", EPGREC_ERROR ); + reclog("getepg:: ".$e->getMessage()."" ,EPGREC_ERROR ); exit( $e->getMessage() ); } @@ -196,8 +196,8 @@ } } catch(Exception $e) { - reclog( "getepg:: 違若馹罔≧", E_ERROR ); - reclog( "getepg:: ".$e->getMessage()."" , E_ERROR); + reclog( "getepg:: 違若馹罔≧", EPGREC_ERROR ); + reclog( "getepg:: ".$e->getMessage()."" , EPGREC_ERROR); exit( $e->getMessage() ); } }
--- a/templates/logTable.html Mon Mar 22 22:43:11 2010 +0900 +++ b/templates/logTable.html Sat Mar 27 16:04:54 2010 +0900 @@ -37,8 +37,8 @@ } table#log_table td.errorlevel0 {background-color: #FFFFFF;} -table#log_table td.errorlevel1 {background-color: red;} - +table#log_table td.errorlevel1 {background-color: yellow;} +table#log_table td.errorlevel2 {background-color: red;} --> </style> @@ -63,7 +63,8 @@ <tr> <td class="errorlevel{$log->level}"> {if $log->level == 0} - {elseif $log->level == 1} + {elseif $log->level == 1}茘 + {elseif $log->level == 2} {/if} </td> <td>{$log->logtime}</td>