fix errors (wrong params, tables names and so on)
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Wed, 11 Sep 2013 16:36:57 +0000 (18:36 +0200)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Wed, 11 Sep 2013 16:36:57 +0000 (18:36 +0200)
web/Obj/dbase_pgsql.phh
web/Obj/sac-a-push.phh
web/briskin5/Obj/briskin5.phh
web/briskin5/index_wr.php

index 327a893..bd4dfb3 100644 (file)
@@ -323,7 +323,7 @@ class BriskDB
                     break;
                 }
                 for ($i = 0 ; $i < $n ; $i++) {
-                    $ord_sql = sprintf("INSERT INTO %sbin5_table_order (mcode, ucode, pos) VALUES (%d, %d, %d);",
+                    $ord_sql = sprintf("INSERT INTO %sbin5_table_orders (mcode, ucode, pos) VALUES (%d, %d, %d);",
                                        $G_dbpfx, $G_dbpfx, $sql_ttok, $ucode[$i], $i);
                     if (($ord_pg = $this->query($ord_sql)) == FALSE || pg_affected_rows($ord_pg) != 1 ) {
                         log_crit(sprintf("bin5_points_save: failed at insert table order [%s]", $ord_sql));
index 0ae856e..ec5abd2 100644 (file)
@@ -709,7 +709,7 @@ class Sac_a_push {
                         if ($buf == FALSE || mb_strlen($buf, "ASCII") == 0) {
                             // close socket case
                             if ($buf == FALSE) {
-                                printf("ERROR READING\n");
+                                printf("INFO: read return false\n");
                             }
                             if ($sock === $this->list) {
                                 printf("Arrivati %d bytes da list\n", mb_strlen($buf, "ASCII"));
index 12a5230..9e7fa04 100644 (file)
@@ -584,7 +584,7 @@ class Bin5_table extends Table {
             else {
                 log_points($remote_addr, $curtime, $user, "STAT:BRISKIN5:FINISH_GAME", "DATABASE CONNECTION FAILED");
             }
-            log_points($curtime, $user, "STAT:BRISKIN5:FINISH_GAME", $plist);
+            log_points($remote_addr, $curtime, $user, "STAT:BRISKIN5:FINISH_GAME", $plist);
         }
 
         $this->game_init(&$bri->user);
index 91cf53c..c2cb21c 100644 (file)
@@ -209,7 +209,7 @@ function bin5_index_wr_main(&$bri, $remote_addr_full, $get, $post, $cookie)
 
                 /* $table->game_init(&$bri->user); */
 
-                if ($table->rules_engine(&$bri, BIN5_RULES_ABANDON, $user)) {
+                if ($table->rules_engine(&$bri, $curtime, BIN5_RULES_ABANDON, $user)) {
                     for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
                         $user_cur = &$bri->user[$table->player[$i]];
 
@@ -315,7 +315,7 @@ function bin5_index_wr_main(&$bri, $remote_addr_full, $get, $post, $cookie)
                         else if ($table->asta_pla_n == 0) {
                             log_wr("PASSANO TUTTI!");
 
-                            if ($table->rules_engine(&$bri, BIN5_RULES_ALLPASS, $user)) {
+                            if ($table->rules_engine(&$bri, $curtime, BIN5_RULES_ALLPASS, $user)) {
                                 for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
                                     $user_cur = &$bri->user[$table->player[$i]];
 
@@ -536,7 +536,7 @@ function bin5_index_wr_main(&$bri, $remote_addr_full, $get, $post, $cookie)
 
                         /* $table->game_init(&$bri->user); */
 
-                        if ($table->rules_engine(&$bri, BIN5_RULES_FINISH, $user)) {
+                        if ($table->rules_engine(&$bri, $curtime, BIN5_RULES_FINISH, $user)) {
                             for ($i = 0 ; $i < BIN5_PLAYERS_N ; $i++) {
                                 $user_cur = &$bri->user[$table->player[$i]];
                                 $retar[$i] .= show_table(&$bri,&$user_cur,$user_cur->step+1,TRUE, TRUE);