[Affelio-cvs 1372] CVS update: affelio/lib/Affelio/Managing

Back to archive index

Tadashi Okoshi slash****@users*****
2006年 6月 26日 (月) 02:58:17 JST


Index: affelio/lib/Affelio/Managing/ApplicationManager.pm
diff -u affelio/lib/Affelio/Managing/ApplicationManager.pm:1.18 affelio/lib/Affelio/Managing/ApplicationManager.pm:1.19
--- affelio/lib/Affelio/Managing/ApplicationManager.pm:1.18	Fri Apr 28 17:11:16 2006
+++ affelio/lib/Affelio/Managing/ApplicationManager.pm	Mon Jun 26 02:58:17 2006
@@ -14,7 +14,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #
-# $Id: ApplicationManager.pm,v 1.18 2006/04/28 08:11:16 slash5234 Exp $
+# $Id: ApplicationManager.pm,v 1.19 2006/06/25 17:58:17 slash5234 Exp $
 
 package Affelio::Managing::ApplicationManager;
 {
@@ -549,7 +549,7 @@
 	
             #############################################
 	    #Table of this application does not exist!
-	    #Thus, we will make the table
+	    #Thus, we will make the table.
 
 	    my $create_table_SQL="CREATE TABLE $my_table_name (pid INTEGER, type TEXT, target_id  TEXT, ";
 	    my $new_rec_SQL="insert into $my_table_name(pid, type, target_id,";
@@ -586,10 +586,21 @@
 	    # Find all records from AFuser_CORE_permission and
 	    # prepare 0-filled records into my table
 	    my $CORE_perm_tbl = $af->getPERM->get_all_permission();
+	    my $counter = 0;
 	    while( my($pid, $type, $target, $dummy) = $CORE_perm_tbl->fetchrow_array ){
 
 		my $SQL = $new_rec_SQL . " values ('$pid','$type','$target',";
-		$SQL .= "1,1,";
+		if($counter < 2){
+		    #For friends
+		    #For friends of friends...
+		    $SQL .= "1, 1,";
+		}else{
+		    #For others, 
+		    #For any groups...
+		    $SQL .= "0, 0,";
+		}
+		$counter++;
+
 		for($i=2; $i < $num_action_types; $i++){
 		    $SQL .= "0,";
 		}


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