diff Reservation.class.php @ 135:9c5e597ef6c6

mod: ログ機能を追加
author epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
date Sat, 20 Mar 2010 23:59:01 +0900
parents 58791b90221b
children a18df712fc7e 481e789605e3
line wrap: on
line diff
--- a/Reservation.class.php	Sat Mar 20 00:49:37 2010 +0900
+++ b/Reservation.class.php	Sat Mar 20 23:59:01 2010 +0900
@@ -3,6 +3,7 @@
 include_once( INSTALL_PATH . "/DBRecord.class.php" );
 include_once( INSTALL_PATH . "/reclib.php" );
 include_once( INSTALL_PATH . "/Settings.class.php" );
+include_once( INSTALL_PATH . "/recLog.inc.php" );
 
 
 // 篋膣
@@ -178,7 +179,6 @@
 				throw new Exception( "腟ゃゃ/腟c腟с" );
 			}
 			
-			
 			// <ゃ
 /*
 			%TITLE%	腟帥ゃ
@@ -300,6 +300,7 @@
 			}
 			else {
 				$rrec->delete();
+				reclog( "Reservation::custom at絎茵紊掩罔≧", E_ERROR);
 				throw new Exception("AT絎茵");
 			}
 			// job垩冴
@@ -313,11 +314,13 @@
 			if( $key !== false ) {
 				if( is_numeric( $rarr[$key+1]) ) {
 					$rrec->job = $rarr[$key+1];
+					reclog( "Reservation::custom 吾с".$rrec->job."牙祉吾с脂");
 					return $rrec->job;			// 
 				}
 			}
 			// 
 			$rrec->delete();
+			reclog( "Reservation::custom job垩緇紊掩",E_ERROR );
 			throw new Exception( "job垩緇紊掩" );
 		}
 		catch( Exception $e ) {
@@ -349,13 +352,16 @@
 			}
 			if( ! $rec->complete ) {
 				// 絎茵篋膣с
-				if( toTimestamp($rec->starttime) < (time() + PADDING_TIME + $settings->former_time) )
-					throw new Exception("サ牙私膣с");
+				if( toTimestamp($rec->starttime) < (time() + PADDING_TIME + $settings->former_time) ) {
+					reclog("Reservation::cancel 絎茵篋膣羔絎茵", E_ERROR );
+				}
 				exec( $settings->atrm . " " . $rec->job );
+				reclog("Reservation::cancel 吾с".$rec->job."");
 			}
 			$rec->delete();
 		}
 		catch( Exception $e ) {
+			reclog("Reservation::cancel 篋膣c潟祉DB・膓障≪祉鴻紊掩罔≧", E_ERROR );
 			throw $e;
 		}
 	}