[Affelio-cvs 1162] CVS update: affelio

Back to archive index

Tadashi Okoshi slash****@users*****
2006年 3月 8日 (水) 15:36:41 JST


Index: affelio/LICENSE-sjis.txt
diff -u affelio/LICENSE-sjis.txt:1.1.1.1 affelio/LICENSE-sjis.txt:1.2
--- affelio/LICENSE-sjis.txt:1.1.1.1	Tue Jun 14 12:53:29 2005
+++ affelio/LICENSE-sjis.txt	Wed Mar  8 15:36:41 2006
@@ -1,9 +1,11 @@
 Affelioソフトウェアのライセンスについて
 
 本ソフトウェアは、GPLおよびAffelioコマーシャルライセンスのデュアルライセンス
-です。詳しくは、affelio.jp内: http://affelio.jp/modules/tinyd5/ をご参照
-ください。
+です。詳しくは、open.affelio.jp内: 
+ http://open.affelio.jp/modules/tinyd5/ をご参照ください。
+
+コマーシャルライセンスバージョンは、Affelio株式会社 http://affelio.jp
+より販売いたしております。
 
 
 Affelio Project
-April 2005
Index: affelio/README-sjis.txt
diff -u affelio/README-sjis.txt:1.9 affelio/README-sjis.txt:1.10
--- affelio/README-sjis.txt:1.9	Mon Jul  4 11:31:19 2005
+++ affelio/README-sjis.txt	Wed Mar  8 15:36:41 2006
@@ -1,6 +1,14 @@
-Affelio: The Open Social Network 
+AffelioCore Snapshot
+	
+	‚±‚̃pƒbƒP[ƒW‚́AAffelioCore‚̃XƒiƒbƒvƒVƒ‡ƒbƒg‚Å‚·B
+	ŠJ”­‚Í http://open.affelio.jp ‚ɂčs‚í‚ê‚Ä‚¢‚Ü‚·B
+
+	AffelioCore‚́A’èŠú“I‚É"snapshot"‚ðA.zip‚Æ.tar.gz‚̃A[ƒJƒCƒu
+	Œ`Ž®‚ɂāAhttp://open.affelio.jp ‚ɂĔz•z‚µ‚Ä‚¨‚è‚Ü‚·B
 
-	 Version: 1.0.0   July 4, 2005
+	‚æ‚èÅV‚ÌŠJ”­ƒo[ƒWƒ‡ƒ“‚ð“üŽè‚³‚ꂽ‚¢ê‡‚́A
+	http://sourceforge.jp/projects/affelio@‚É‚ ‚éCVSƒcƒŠ[‚ð
+	“üŽè‚µ‚Ä‚­‚¾‚³‚¢B
 
 
 ‚±‚̃o[ƒWƒ‡ƒ“‚ɂ‚¢‚Ă̂²’ˆÓ
@@ -42,7 +50,6 @@
 	‚Ü‚½AƒoƒO•ñ‚àŠ½Œ}‚¢‚½‚µ‚Ü‚·Bhttp://affelio.jp “àuƒoƒO•ñv
 	ƒR[ƒi[‚܂łæ‚낵‚­‚¨Šè‚¢‚¢‚½‚µ‚Ü‚·B
 
-
 ƒCƒ“ƒXƒg[ƒ‹—vŒ
 
 	EUnixŒnWebƒT[ƒo
@@ -57,7 +64,6 @@
 		DBD::mysql (MySQL4.1ˆÈ~‚ðƒf[ƒ^ƒx[ƒX‚Æ‚µ‚ÄŽg—p‚·‚éê‡)
 		DBD::SQLite (SQLite‚ðƒf[ƒ^ƒx[ƒX‚Æ‚µ‚ÄŽg—p‚·‚éê‡)
 
-
 ƒCƒ“ƒXƒg[ƒ‹•û–@
 
 	(1)‘S•”‚̃tƒ@ƒCƒ‹‚ðFTP‚ÅWebƒT[ƒoã‚ɃAƒbƒvƒ[ƒh‚µ‚Ä‚­‚¾‚³‚¢B
@@ -69,25 +75,25 @@
 	@ ‚ªŠJŽn‚µ‚Ü‚·‚̂ŁAŽwަ‚ɏ]‚Á‚Đi‚ñ‚Å‚­‚¾‚³‚¢B
 
 	Ú‚µ‚­‚͈ȉº‚ÌURL‚ð‚²——‰º‚³‚¢‚Ü‚¹B
-	http://affelio.jp/modules/tinyd9/
+	http://open.affelio.jp/modules/tinyd9/
 
 
 Žg‚¢•û
 	ƒCƒ“ƒXƒg[ƒ‹Œã‚ÌAffelio‚ÌŽg‚¢•û‚ÉŠÖ‚µ‚ẮAAffelio‰^‰cƒTƒCƒg
-	http://affelio.jp “àA¶‘¤‚̃ƒjƒ…[‚æ‚èuŽg‚¢•ûv‚ðA‚²ŽQÆ
+	http://open.affelio.jp “àA¶‘¤‚̃ƒjƒ…[‚æ‚èuŽg‚¢•ûv‚ðA‚²ŽQÆ
 	‰º‚³‚¢B
 
 
 ƒTƒ|[ƒg
 	ƒTƒ|[ƒg‚́AAffelio‰^‰cƒTƒCƒg‚ɂčs‚Á‚Ä‚¨‚è‚Ü‚·BƒTƒCƒgã‚ÌŒfަ”Â
 	‚܂ŋCŒy‚ɃAƒNƒZƒX‚µ‚Ä‚­‚¾‚³‚¢B
-
+	http://open.affelio.jp
 
 ƒ‰ƒCƒZƒ“ƒXE—˜—p‹K–ñ
 	Affelio‚́AGPL‚¨‚æ‚ÑAffelioƒRƒ}[ƒVƒƒƒ‹ƒ‰ƒCƒZƒ“ƒX‚̃fƒ…ƒAƒ‹
 	ƒ‰ƒCƒZƒ“ƒX‚Å‚·B–”A–{ƒo[ƒWƒ‡ƒ“‚ÍGPLƒo[ƒWƒ‡ƒ“‚Å‚·B
-	ƒ‰ƒCƒZƒ“ƒXE—˜—p‹K–ñ‚ÉŠÖ‚µ‚ďڂµ‚­‚́Aaffelio.jp“à
-	http://affelio.jp/modules/tinyd5/ ‚ð‚²ŽQÆ‚­‚¾‚³‚¢B
+	ƒ‰ƒCƒZƒ“ƒXE—˜—p‹K–ñ‚ÉŠÖ‚µ‚ďڂµ‚­‚́Aopen.affelio.jp“à
+	http://open.affelio.jp/modules/tinyd5/ ‚ð‚²ŽQÆ‚­‚¾‚³‚¢B
 
 
 ’˜ìŒ E¤•W
Index: affelio/README.txt
diff -u affelio/README.txt:1.4 affelio/README.txt:1.5
--- affelio/README.txt:1.4	Mon Jul  4 11:09:35 2005
+++ affelio/README.txt	Wed Mar  8 15:36:41 2006
@@ -1,8 +1,3 @@
-Affelio: The Open Social Network
-
-	 Version: 1.0.0   July 4, 2005
-
-
 Caution!
 	This version is a "RC" (Release Candidate) version of Affelio.
 	Users need to understand following points.
Index: affelio/upgrade.cgi
diff -u /dev/null affelio/upgrade.cgi:1.5
--- /dev/null	Wed Mar  8 15:36:41 2006
+++ affelio/upgrade.cgi	Wed Mar  8 15:36:41 2006
@@ -0,0 +1,269 @@
+#!/usr/bin/perl 
+
+use strict;
+
+use CGI qw(-unique_headers);
+use Cwd;
+use DBI;
+use lib("./extlib");
+use HTML::Template;
+use Error qw(:try);
+use lib("./lib");
+use Affelio;
+use Affelio::misc::Debug qw(debug_print);
+
+############################################################################
+#Main
+############################################################################
+my $g_username="";
+my $g_password="";
+my $g_nickname="";
+my $g_email="";
+my $q = new CGI;
+my $g_fsroot = cwd();
+my $g_webroot = $q->self_url();
+
+#########################################################################
+#1st screen
+#########################################################################
+if($q->url_param("mode") ne "go"){
+    print "Content-type: text/html; charset=UTF-8\n";
+    print "Pragma: no-cache", "\n\n"; 
+    print <<EOM;
+<HTML>
+<h1>Affelio Upgrade Script</h1>
+<P>
+<H2>1. Copy your affelio.cfg to config/affelio.cfg</H2>
+Location of <B>affelio.cfg</B> file changed. Create <B>config/</B> 
+directory and move <b>affelio.cfg</b> to <B>config/</B> directory.
+<P>
+<H2>2. Upgrade your Affelio data</H2>
+Push the button below and upgrade your data!
+<P>
+<FORM ACTION="upgrade.cgi?mode=go" method=POST>
+<INPUT TYPE="submit" VALUE="Upgrade">
+</FORM>
+</HTML>
+EOM
+exit(1);
+
+
+#########################################################################
+#Do upgrade
+#########################################################################
+}else{
+    print "Content-type: text/html; charset=UTF-8\n";
+    print "Pragma: no-cache", "\n\n"; 
+
+    ################################
+    #Start Affelio
+    ################################
+    my $af;
+    try{
+	$af = new Affelio(ConfigDir => "./config/",
+			  Mode => "init");
+    }catch Error with{
+	my $e = shift;
+	print("Affelio load error.\n" . $e->stacktrace);
+	exit(1);
+    };
+
+    ################################
+    #Create application table
+    ################################
+    {
+	my $query = 'SELECT * from AFuser_CORE_apps';
+        my $sth;
+	eval{
+	    $sth = $af->getDB->prepare($query);
+	    $sth->execute;
+	};
+	if($@){
+	    print "We confirmed that the app table does not exist.<BR>";
+	    print "So, We will make it<BR>";
+	    my $query = <<EOT;
+CREATE TABLE AFuser_CORE_apps(appid INTEGER PRIMARY KEY AUTOINCREMENT, 
+			      install_name TEXT, 
+			      install_title TEXT,
+			      app_URI TEXT,
+			      app_name TEXT,
+			      app_version TEXT,
+			      app_desc TEXT,
+			      app_author TEXT,
+			      guest_index TEXT,
+			      owner_index TEXT,
+			      action_types TEXT,
+			      action_types_desc TEXT)
+EOT
+            my $sth;
+	    eval{
+		$sth = $af->getDB->prepare($query);
+		$sth->execute;
+	    };
+	    if($@){
+		print 'Error occured in creating the table<BR><BR>' .  $@;
+		exit(1);
+	    }
+
+	}else{
+	    #Application table already exists.
+	    #So, do nothing.
+	    print 'We confirmed that the app table already exists.<BR>';
+	    print 'So, We will do nothing.<BR>';
+	}
+    }#block
+
+    ################################
+    #Create nghr_news
+    ################################
+    {
+	my $query = 'SELECT * from AFuser_CORE_nghr_news';
+        my $sth;
+	eval{
+	    $sth = $af->getDB->prepare($query);
+	    $sth->execute;
+	};
+	if($@){
+	    print "We confirmed that nghr_news table does not exist.<BR>";
+	    print "So, We will make it<BR>";
+	    my $query = <<EOT;
+CREATE TABLE AFuser_CORE_nghr_news(nid INTEGER PRIMARY KEY AUTOINCREMENT, 
+				   datetime INTEGER,
+				   af_id TEXT,
+				   nickname TEXT,
+				   app_install_name TEXT,
+				   title TEXT,
+				   description TEXT,
+				   creator TEXT,
+				   URL TEXT)
+EOT
+            my $sth;
+	    eval{
+		$sth = $af->getDB->prepare($query);
+		$sth->execute;
+	    };
+	    if($@){
+		print 'Error occured in creating the table<BR><BR>' .  $@;
+		exit(1);
+	    }
+
+	}else{
+	    #Application table already exists.
+	    #So, do nothing.
+	    print 'We confirmed that nghr_news table already exists.<BR>';
+	    print 'So, We will do nothing.<BR>';
+	}
+    }#block
+
+    ################################
+    #Create my_news
+    ################################
+    {
+	my $query = 'SELECT * from AFuser_CORE_my_news';
+        my $sth;
+	eval{
+	    $sth = $af->getDB->prepare($query);
+	    $sth->execute;
+	};
+	if($@){
+	    print "We confirmed that my_news table does not exist.<BR>";
+	    print "So, We will make it<BR>";
+	    my $query = <<EOT;
+CREATE TABLE AFuser_CORE_my_news(nid INTEGER PRIMARY KEY AUTOINCREMENT, 
+				   datetime INTEGER,
+				   app_install_name TEXT,
+				   title TEXT,
+				   description TEXT,
+				   creator TEXT,
+				   URL TEXT)
+EOT
+            my $sth;
+	    eval{
+		$sth = $af->getDB->prepare($query);
+		$sth->execute;
+	    };
+	    if($@){
+		print 'Error occured in creating the table<BR><BR>' .  $@;
+		exit(1);
+	    }
+
+	}else{
+	    #Application table already exists.
+	    #So, do nothing.
+	    print 'We confirmed that my_news table already exists.<BR>';
+	    print 'So, We will do nothing.<BR>';
+	}
+    }#block
+
+    ################################
+    #Add columns to friend tale
+    ################################
+    add_column($af, 'AFuser_CORE_friends', 'last_news_in', "INTEGER", 0);
+    add_column($af, 'AFuser_CORE_friends', 'last_news_out', "INTEGER", 0);
+    #
+    add_column($af, 'AFuser_CORE_friends', 'last_access', "INTEGER", 0);
+    add_column($af, 'AFuser_CORE_friends', 'count_access', "INTEGER", 0);
+    #
+    add_column($af, 'AFuser_CORE_friends', 'last_incoming', "INTEGER", 0);
+    add_column($af, 'AFuser_CORE_friends', 'count_incoming', "INTEGER", 0);
+    #
+    add_column($af, 'AFuser_CORE_friends', 'last_outgoing', "INTEGER", 0);
+    add_column($af, 'AFuser_CORE_friends', 'count_outgoing', "INTEGER", 0);
+    #
+    add_column($af, 'AFuser_CORE_friends', 'apps', "TEXT", "' '");
+
+    ################################
+    #Create small images
+    ################################
+    print "We will make resized profile images...";
+    eval{
+	require Affelio::misc::ImageEditor;
+	Affelio::misc::ImageEditor::resize_image("$af->{site__user_dir}/profile_face.jpg", "$af->{site__user_dir}/profile_face_100x100.jpg", 100);
+	Affelio::misc::ImageEditor::resize_image("$af->{site__user_dir}/profile_face.jpg", "$af->{site__user_dir}/profile_face_150x150.jpg", 150);
+    };
+    if($@){
+	print 'Error occured in creating resized images...<BR><BR>' .  $@;
+	exit(1);
+    }
+
+    print "Done.<BR>";
+
+    print '<h2>OK. Successfuly done.</H2><P><B>Delete this CGI immediately!!</B>';
+    exit(1);
+}
+
+
+
+sub add_column{
+    my $af= shift;
+    my $table = shift;
+    my $col = shift;
+    my $type = shift;
+    my $def = shift;
+
+    my $query = "SELECT $col from $table";
+    my $sth;
+    eval{
+	$sth = $af->getDB->prepare($query);
+	$sth->execute;
+    };
+    if($@){
+	print "We confirmed that table [$table] needs column [$col]<BR>";
+	my $query2 = "ALTER TABLE $table ADD COLUMN $col $type DEFAULT $def";
+	my $sth;
+	eval{
+	    $af->getDB->do($query2);
+	};
+	if($@){
+	    print 'Error occured in modifying the table<BR><BR>' .  $@;
+	    exit(1);
+	}
+	print "Successfully added [$col].<BR>";
+	
+    }else{
+	#Application table already exists.
+	#So, do nothing.
+	print "We confirmed that table [$table] already has [$col]<BR>"; 
+	print 'So, We will do nothing.<BR>';
+    }
+}


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