BUGFIX: some email messages had newlines missing before the footer
authorArun Persaud <arun@nubati.net>
Tue, 12 May 2009 00:39:16 +0000 (17:39 -0700)
committerArun Persaud <arun@nubati.net>
Tue, 12 May 2009 05:02:45 +0000 (22:02 -0700)
all emails now have a "\n\n" at the end of the message.

include/cancelgame.php
include/game.php
include/newgame.php

index 71bb58bee2b74a993bb15f16c1c5da29a262d976..b0b4db9ba392bd1babc919d86deccf048f2b9056 100644 (file)
@@ -38,7 +38,7 @@ if(time()-strtotime($r[0]) > 60*60*24*30) /* = 1 month */
   {
     $message = "Hello, \n\n".
       "Game ".DB_format_gameid($gameid).
   {
     $message = "Hello, \n\n".
       "Game ".DB_format_gameid($gameid).
-      " has been canceled since nothing happend for a while and $myname requested it.\n";
+      " has been canceled since nothing happend for a while and $myname requested it.\n\n";
 
     /* email to all players */
     $userids = DB_get_all_userid_by_gameid($gameid);
 
     /* email to all players */
     $userids = DB_get_all_userid_by_gameid($gameid);
index 9c8c427a1caac49b48ee2ac652f245d1fbab36bc..f9daf6523dc916dd7517854925c98d5fcdbf9fec 100644 (file)
@@ -302,7 +302,7 @@ switch($mystatus)
          {
            /* cancel the game */
            $message = "Hello, \n\n".
          {
            /* cancel the game */
            $message = "Hello, \n\n".
-             "the game has been canceled due to the request of one of the players.\n";
+             "the game has been canceled due to the request of one of the players.\n\n";
 
            $userids = DB_get_all_userid_by_gameid($gameid);
            foreach($userids as $user)
 
            $userids = DB_get_all_userid_by_gameid($gameid);
            foreach($userids as $user)
@@ -593,7 +593,7 @@ switch($mystatus)
              " the game has been canceled because ".DB_get_name('userid',$nines).
              " has five or more nines and nobody is playing solo.\n\n".
              " To redeal either start a new game or, in case the game was part of a tournament, \n".
              " the game has been canceled because ".DB_get_name('userid',$nines).
              " has five or more nines and nobody is playing solo.\n\n".
              " To redeal either start a new game or, in case the game was part of a tournament, \n".
-             " go to the last game and use the link at the bottom of the page to redeal.";
+             " go to the last game and use the link at the bottom of the page to redeal.\n\n";
 
            $userids = DB_get_all_userid_by_gameid($gameid);
            foreach($userids as $user)
 
            $userids = DB_get_all_userid_by_gameid($gameid);
            foreach($userids as $user)
@@ -940,7 +940,7 @@ switch($mystatus)
            if($mypos+$next>4)
              {
                $message = "Hello, \n\n".
            if($mypos+$next>4)
              {
                $message = "Hello, \n\n".
-                 "Game ".DB_format_gameid($gameid)." has been canceled since nobody wanted to take the trump.\n";
+                 "Game ".DB_format_gameid($gameid)." has been canceled since nobody wanted to take the trump.\n\n";
 
                $userids = DB_get_all_userid_by_gameid($gameid);
                foreach($userids as $user)
 
                $userids = DB_get_all_userid_by_gameid($gameid);
                foreach($userids as $user)
@@ -1807,7 +1807,7 @@ switch($mystatus)
                      $link = "$name: ".$HOST.$INDEX."?action=game&me=".$hash."\n" ;
                      $message .= $link;
                    }
                      $link = "$name: ".$HOST.$INDEX."?action=game&me=".$hash."\n" ;
                      $message .= $link;
                    }
-                 $message .= "\n\n (you can use reply all on this email to reach all the players.)\n";
+                 $message .= "\n\n (you can use reply all on this email to reach all the players.)\n\n";
                  $subject = ' Game over (game '.DB_format_gameid($gameid).') ';
                  mymail($userids,$subject,$message);
              }
                  $subject = ' Game over (game '.DB_format_gameid($gameid).') ';
                  mymail($userids,$subject,$message);
              }
index 7d776122b907ec39745287a020b922da65c48896..b41dc8b44fe867c4e9fd503eb6a9283c4b2c682b 100644 (file)
@@ -178,14 +178,14 @@ else
          "$PlayerB\n".
          "$PlayerC\n".
          "$PlayerD\n\n".
          "$PlayerB\n".
          "$PlayerC\n".
          "$PlayerD\n\n".
-         "If you want to join this game, please follow this link:\n\n".
+         "If you want to join this game, please follow this link:\n".
          "".$HOST.$INDEX."?action=game&me=";
 
        $subject = 'You are invited to a game of DoKo (game '.DB_format_gameid($gameid).')';
          "".$HOST.$INDEX."?action=game&me=";
 
        $subject = 'You are invited to a game of DoKo (game '.DB_format_gameid($gameid).')';
-       mymail($useridA,$subject, $message.$hashA);
-       mymail($useridB,$subject, $message.$hashB);
-       mymail($useridC,$subject, $message.$hashC);
-       mymail($useridD,$subject, $message.$hashD);
+       mymail($useridA,$subject, $message.$hashA."\n\n");
+       mymail($useridB,$subject, $message.$hashB."\n\n");
+       mymail($useridC,$subject, $message.$hashC."\n\n");
+       mymail($useridD,$subject, $message.$hashD."\n\n");
 
        echo "<div class=\"message\">You started a new game. The emails have been sent out!</div>\n";
         display_user_menu($myid);
 
        echo "<div class=\"message\">You started a new game. The emails have been sent out!</div>\n";
         display_user_menu($myid);