[Affelio-cvs 192] CVS update: affelio/lib/Affelio/App/Admin

Back to archive index

Tadashi Okoshi slash****@users*****
2005年 6月 27日 (月) 13:14:21 JST


Index: affelio/lib/Affelio/App/Admin/AffelioNews.pm
diff -u affelio/lib/Affelio/App/Admin/AffelioNews.pm:1.1 affelio/lib/Affelio/App/Admin/AffelioNews.pm:1.2
--- affelio/lib/Affelio/App/Admin/AffelioNews.pm:1.1	Mon Jun 27 01:39:37 2005
+++ affelio/lib/Affelio/App/Admin/AffelioNews.pm	Mon Jun 27 13:14:21 2005
@@ -4,7 +4,7 @@
 #    http://affelio.jp/ (Japan)
 #    http://affelio.jp/ (USA and other area)
 #
-# $Id: AffelioNews.pm,v 1.1 2005/06/26 16:39:37 slash5234 Exp $
+# $Id: AffelioNews.pm,v 1.2 2005/06/27 04:14:21 slash5234 Exp $
 
 package Affelio::App::Admin::AffelioNews;
 {
@@ -42,12 +42,17 @@
 	}
 
 	#Load last-updated time
-	sysopen(IN, "$af->{site__user_dir}/AffelioNews/update", O_RDONLY);
-	my $updated_time = <IN>;
+	my $updated_time =0;
 	my $cur_time = get_timestamp();
-	if($cur_time < $updated_time + 030000){
-	    return;
+	sysopen(IN, "$af->{site__user_dir}/AffelioNews/update", O_RDONLY);
+	if($@){
+	}else{
+	    $updated_time = <IN>;
+	    if($cur_time < $updated_time + 030000){
+		return;
+	    }
 	}
+	close(IN);
 
 	my $rss = new XML::RSS;
 	my $url = 'http://www.okoshi.org/tadashi/bbs2/archives/cat_0206affelio.rdf';
@@ -70,6 +75,7 @@
 	    $line = $line + 1;
 	}
 
+	print OUT "\n\0";
 	close(OUT);
 
 	#Record current time


Affelio-cvs メーリングリストの案内
Back to archive index