commit 70b12494334c9953714efc68bdda9068071778e5
parent 65f8bb93bdcc1a60e67b35936216feeba84dddb8
Author: Georges Dupéron <jahvascriptmaniac+github@free.fr>
Date: Tue, 8 Mar 2011 23:29:16 +0100
Bug.
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/code/serveur/dump2sqlite.sh b/code/serveur/dump2sqlite.sh
@@ -26,7 +26,7 @@ create table node(eid integer primary key autoincrement, name, type, weight);
create table relation(rid integer primary key autoincrement, start, end, type, weight);
create table type_node(name, num);
create table type_relation(name, num, extended_name, info);
-create table user(login primary key, mail, hash_passwd, score, group);
+create table user(login primary key, mail, hash_passwd, score, ugroup);
create table game(gid integer primary key autoincrement, eid_central_word, relation_1, relation_2, difficulty);
create table game_cloud(gid, num, difficulty, eid_word, totalWeight, probaR1, probaR2, probaR0, probaTrash);
create table played_game(pgid integer primary key autoincrement, gid, login, timestamp);
@@ -34,7 +34,7 @@ create table played_game_cloud(pgid, gid, type, num, relation, weight, score);
create table random_cloud_node(eid,nbneighbors);
create table random_center_node(eid);
-insert into user(login, mail, hash_passwd, score, group) values('$(echo "$user" | sed -e "s/'/''/g")', 'foo@isp.com', '$(echo "$passwd" | dd bs=1 count="${#passwd}" | (if which md5sum >/dev/null 2>&1; then md5sum; else md5; fi) | cut -d ' ' -f 1)', 0, 1);
+insert into user(login, mail, hash_passwd, score, ugroup) values('$(echo "$user" | sed -e "s/'/''/g")', 'foo@isp.com', '$(echo "$passwd" | dd bs=1 count="${#passwd}" | (if which md5sum >/dev/null 2>&1; then md5sum; else md5; fi) | cut -d ' ' -f 1)', 0, 1);
EOF
# tr : pour virer le CRLF qui traîne
diff --git a/code/serveur/php/signup.php b/code/serveur/php/signup.php
@@ -79,7 +79,7 @@ if(isset($_POST['signuppswd2'])){
if(count($msg) == 0 && $newpage == false)
{
- $ok = ($db->query("INSERT INTO user(mail, login, hash_passwd, score, group) VALUES ('" . SQLite3::escapeString($signupemail)
+ $ok = ($db->query("INSERT INTO user(mail, login, hash_passwd, score, ugroup) VALUES ('" . SQLite3::escapeString($signupemail)
. "', '" . SQLite3::escapeString($signupid)
. "', '" . SQLite3::escapeString(md5($signuppswd1))
. "', 0, 1);"));