summaryrefslogtreecommitdiffstats
path: root/db.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2007-06-24 13:28:50 +0200
committerArun Persaud <arun@nubati.net>2007-06-24 18:44:52 +0200
commit26c07fd03d0bf3bdd6142f0474b625afcfae508b (patch)
tree0350cb39e8abd0bcbe2752898724264a9ee74589 /db.php
parent0bf8233e0ef1db60e09269db5a2372fdd67f290d (diff)
downloade-DoKo-26c07fd03d0bf3bdd6142f0474b625afcfae508b.tar.gz
e-DoKo-26c07fd03d0bf3bdd6142f0474b625afcfae508b.tar.bz2
e-DoKo-26c07fd03d0bf3bdd6142f0474b625afcfae508b.zip
BUGFIX: include $call in $ruleset
$call wasn't added everywhere where a new ruleset was defined;
Diffstat (limited to 'db.php')
-rw-r--r--db.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/db.php b/db.php
index 75cd8a0..a78afb6 100644
--- a/db.php
+++ b/db.php
@@ -705,12 +705,13 @@ function DB_get_hashes_by_session($session,$user)
return $r;
}
-function DB_get_ruleset($dullen,$schweinchen)
+function DB_get_ruleset($dullen,$schweinchen,$call)
{
$r = array();
$result = mysql_query("SELECT id FROM Rulesets WHERE".
" dullen=".DB_quote_smart($dullen)." AND ".
+ " call=".DB_quote_smart($call)." AND ".
" schweinchen=".DB_quote_smart($schweinchen));
if($result)
$r = mysql_fetch_array($result,MYSQL_NUM);
@@ -722,7 +723,8 @@ function DB_get_ruleset($dullen,$schweinchen)
/* create new one */
$result = mysql_query("INSERT INTO Rulesets VALUES (NULL, NULL, ".
DB_quote_smart($dullen).",".
- DB_quote_smart($schweinchen).
+ DB_quote_smart($schweinchen).",".
+ DB_quote_smart($call).
", NULL)");
if($result)
return mysql_insert_id();