CLEANUP: deleted unused functions
authorArun Persaud <arun@nubati.net>
Sun, 29 Mar 2009 18:11:20 +0000 (11:11 -0700)
committerArun Persaud <arun@nubati.net>
Sun, 29 Mar 2009 18:11:20 +0000 (11:11 -0700)
games are not deleted from the DB anymore, so we don't need this function.

include/db.php

index ef902adaf21e73a0bc23f301f14c0a1aaddcb45b..da005a16e03c77759f34faebac5f29de36cda8e9 100644 (file)
@@ -266,34 +266,6 @@ function DB_get_gameid_by_hash($hash)
     return 0;
 }
 
-function DB_cancel_game($hash)
-{
-  $gameid = DB_get_gameid_by_hash($hash);
-
-  if(!$gameid)
-    return;
-
-  /* get the IDs of all players */
-  $result = DB_query("SELECT id FROM Hand WHERE game_id=".DB_quote_smart($gameid));
-  while($r = DB_fetch_array($result))
-    {
-      $id = $r[0];
-
-      $tmp = DB_query_array("SELECT id  FROM Hand_Card WHERE hand_id=".DB_quote_smart($id));
-      DB_query("DELETE FROM Play WHERE hand_card_id=".DB_quote_smart($tmp[0]));
-
-      DB_query("DELETE FROM Hand_Card WHERE hand_id=".DB_quote_smart($id));
-      DB_query("DELETE FROM Hand WHERE id=".DB_quote_smart($id));
-    }
-
-  /* delete game */
-  DB_query("DELETE FROM User_Game_Prefs WHERE game_id=".DB_quote_smart($gameid));
-  DB_query("DELETE FROM Trick WHERE game_id=".DB_quote_smart($gameid));
-  DB_query("DELETE FROM Game WHERE id=".DB_quote_smart($gameid));
-
-  return;
-}
-
 function DB_get_hand($me)
 {
   $cards = array();