changeset 98:f7b6ae03a2a7

removed trailing whitespace
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Wed, 03 Mar 2010 06:24:22 +0900
parents ee348c378f2d
children 10b2306693d9
files storeProgram.php
diffstat 1 files changed, 18 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/storeProgram.php	Wed Mar 03 05:12:57 2010 +0900
+++ b/storeProgram.php	Wed Mar 03 06:24:22 2010 +0900
@@ -3,8 +3,8 @@
 
   $type = $argv[1];	// BS CS GR
   $file = $argv[2];	// XMLファイル
-  
-  
+
+
   // SIGTERMシグナル
   function handler( $signo = 0 ) {
 	global $file;
@@ -13,7 +13,7 @@
 	}
 	exit();
   }
-  
+
   // デーモン化
   function daemon() {
 	if( pcntl_fork() != 0 )
@@ -23,37 +23,37 @@
 		exit;
 	pcntl_signal(SIGTERM, "handler");
   }
-  
-  
+
+
   // デーモン化
   daemon();
   // プライオリティ低に
   pcntl_setpriority(20);
-  
+
   include_once('config.php');
   include_once( INSTALL_PATH . '/DBRecord.class.php' );
   include_once( INSTALL_PATH . '/Reservation.class.php' );
   include_once( INSTALL_PATH . '/Keyword.class.php' );
   include_once( INSTALL_PATH . '/Settings.class.php' );
-  
+
   $settings = Settings::factory();
-  
+
   if( file_exists( $file ) ) {
 	storeProgram( $type, $file );
 	@unlink( $file );
   }
-  
+
   // 不要なプログラムの削除
   // 8日以上前のプログラムを消す
   $arr = array();
   $arr = DBRecord::createRecords(  PROGRAM_TBL, "WHERE endtime < subdate( now(), 8 )" );
   foreach( $arr as $val ) $val->delete();
-	
+
   // 8日以上先のデータがあれば消す
   $arr = array();
   $arr = DBRecord::createRecords(  PROGRAM_TBL, "WHERE starttime  > adddate( now(), 8 )" );
   foreach( $arr as $val ) $val->delete();
-  
+
   // キーワード自動録画予約
   $arr = array();
   $arr = Keyword::createKeywords();
@@ -66,7 +66,7 @@
 	}
   }
   exit();
-  
+
   function storeProgram( $type, $xmlfile ) {
 	global $BS_CHANNEL_MAP, $GR_CHANNEL_MAP, $CS_CHANNEL_MAP;
 	// チャンネルマップファイルの準備
@@ -74,7 +74,7 @@
 	if( $type == "BS" ) $map = $BS_CHANNEL_MAP;
 	else if( $type == "GR") $map = $GR_CHANNEL_MAP;
 	else if( $type == "CS") $map = $CS_CHANNEL_MAP;
-	
+
 	// XML parse
   	$xml = @simplexml_load_file( $xmlfile );
 	if( $xml === false ) {
@@ -107,13 +107,13 @@
 	 }
 	}
 	// channel 終了
-	
+
 	// programme 取得
-	
+
 	foreach( $xml->programme as $program ) {
-		$channel_disc = $program['channel']; 
+		$channel_disc = $program['channel'];
 		if( ! array_key_exists( "$channel_disc", $map ) ) continue;
-		
+
 		$channel = $map["$channel_disc"];
 		$starttime = str_replace(" +0900", '', $program['start'] );
 		$endtime = str_replace( " +0900", '', $program['stop'] );
@@ -194,4 +194,4 @@
 		}
 	}
   }
-?>
\ No newline at end of file
+?>