small bugfixes to get comments for examples comments working
authorarun <arun@nubati.net>
Tue, 12 Dec 2006 11:25:47 +0000 (11:25 +0000)
committerarun <arun>
Tue, 12 Dec 2006 11:25:47 +0000 (11:25 +0000)
db.php
functions.php
index.php

diff --git a/db.php b/db.php
index 7f47c66e3068936fe0ad3b04c94f34994478cd0e..bf82544266ab092ce4b7a36b58d7fc6992c8e0ee 100644 (file)
--- a/db.php
+++ b/db.php
@@ -264,11 +264,14 @@ function DB_set_sickness_by_hash($me,$sickness)
 
 function DB_get_current_trickid($gameid)
 {
+  $trickid  = NULL;
+  $sequence = NULL;
+
   $result = mysql_query("SELECT Trick.id,MAX(Play.sequence) FROM Play ".
                        "LEFT JOIN Trick ON Play.trick_id=Trick.id ".
                        "WHERE Trick.game_id=".DB_quote_smart($gameid)." ".
                        "GROUP BY Trick.id");
-  while(  $r = mysql_fetch_array($result,MYSQL_NUM) )
+  while( $r = mysql_fetch_array($result,MYSQL_NUM) )
     {
       $trickid  = $r[0];
       $sequence = $r[1];
index a530177043d5cb6ac504447dbae0a2bc7165d3c3..0168ce3922b3769198ed166ef16bc9ec59d53c4b 100644 (file)
@@ -6,7 +6,7 @@
 
 $host  = "http://doko.nubati.net/database/index.php";
 $wiki  = "http://wiki.nubati.net/index.php?title=EmailDoko";
-$debug = 1;
+$debug = 0;
 
 $last=-2;
 
@@ -420,7 +420,7 @@ function display_news()
   global $wiki;
   echo "<div class=\"bug\"> ".
     "Please hit shift+reload.<br /><hr />".
-    "New Database backend, lost a few features on the way.<br /><hr />".
+    "Fixed a few bugs, comments might be working again <br /><hr />".
     "If you find more bugs, please list them in the <a href=\"".$wiki.
     "\">wiki</a>.</div>\n";
   return;
index 6daea5e20ae67dc82332270b7daa195005812b22..f23f4cd1550c20e38c7707239d3e2dac1f433689 100644 (file)
--- a/index.php
+++ b/index.php
@@ -232,7 +232,7 @@ else if(isset($_REQUEST["me"]))
        break;
        
       case 'check':
-       echo "no checking at the moment... you need to play a normal game";
+       echo "no checking at the moment... you need to play a normal game. At the moment you need to reload this page to finish the setup.";
        if(!isset($_REQUEST["solo"])    || 
           !isset($_REQUEST["wedding"]) ||
           !isset($_REQUEST["poverty"]) ||
@@ -307,7 +307,8 @@ else if(isset($_REQUEST["me"]))
                              "       Hand.position as position,".
                              "       Play.sequence as sequence, ".
                              "       Hand.hash     as hash,     ".
-                             "       Trick.id ".
+                             "       Trick.id, ".
+                             "       Comment.comment ".
                              "FROM Trick ".
                              "LEFT JOIN Play ON Trick.id=Play.trick_id ".
                              "LEFT JOIN Hand_Card ON Play.hand_card_id=Hand_Card.id ".