[Toss-devel-svn] SF.net SVN: toss:[1521] trunk/Toss
Status: Beta
Brought to you by:
lukaszkaiser
|
From: <luk...@us...> - 2011-07-30 17:34:30
|
Revision: 1521
http://toss.svn.sourceforge.net/toss/?rev=1521&view=rev
Author: lukaszkaiser
Date: 2011-07-30 17:34:24 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
Small WebClient corrections.
Modified Paths:
--------------
trunk/Toss/Server/ReqHandler.ml
trunk/Toss/WebClient/index.html
Modified: trunk/Toss/Server/ReqHandler.ml
===================================================================
--- trunk/Toss/Server/ReqHandler.ml 2011-07-29 10:13:18 UTC (rev 1520)
+++ trunk/Toss/Server/ReqHandler.ml 2011-07-30 17:34:24 UTC (rev 1521)
@@ -564,7 +564,10 @@
let list_friends all uid =
if all then List.map (fun a -> a.(0)) (dbtable "" "users") else
let friends = dbtable ("id='" ^ uid ^ "'") "friends" in
- List.map (fun a -> a.(1)) friends in
+ let friends = List.map (fun a -> a.(1)) friends in
+ let contacts = dbtable ("fid='" ^ uid ^ "'") "friends" in
+ let contacts = List.map (fun a -> a.(0)) contacts in
+ Aux.unique_sorted (friends @ contacts) in
let open_db pid =
let res = dbtable (game_select_s pid) "cur_states" in
let (move, info) = ((List.hd res).(4), (List.hd res).(7)) in
@@ -574,11 +577,11 @@
if res = [] then "NONE" else (List.hd res).(7) in
let add_opponent uid oppid =
if uid = "" then "You must login first to add opponents." else
- let (name, _, _) = get_user_name_surname_mail oppid in
- if name = "" then "No such opponent found among tPlay users." else (
- DB.insert_table dbFILE "friends" "id, fid" [uid; oppid];
- "OK"
- ) in
+ let (name, _, _) = get_user_name_surname_mail oppid in
+ if name = "" then "No such opponent found among tPlay users." else (
+ DB.insert_table dbFILE "friends" "id, fid" [uid; oppid];
+ "OK"
+ ) in
let change_user_data uid udata =
if uid = "" then "You must login first to change data." else
if Array.length udata <> 3 then "Internal error, data not changed." else
Modified: trunk/Toss/WebClient/index.html
===================================================================
--- trunk/Toss/WebClient/index.html 2011-07-29 10:13:18 UTC (rev 1520)
+++ trunk/Toss/WebClient/index.html 2011-07-30 17:34:24 UTC (rev 1521)
@@ -177,6 +177,7 @@
<div id="news">
<h3>News</h3>
<ul id="welcome-list-news" class="welcome-list">
+<li><b>30/07/11</b> Corrected opponent lists in the Profile tab</li>
<li><b>03/07/11</b> Added game descriptions viewable when playing</li>
<li><b>30/06/11</b> View previous moves in a play</li>
<li><b>27/06/11</b> Tabs and searching opponents in the profile page</li>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|