From 7fa8c7c8dd1bdebb3d3e53acfb7a713228f3ed24 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 8 Sep 2006 19:51:33 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=11125 --- checkin_notes | 11 ++++++++++ doc/logo.php | 39 +++++++++++++++++++++--------------- doc/recruit.php | 5 +++-- doc/web_rpc.php | 22 ++++++++++++++++++-- html/inc/xml.inc | 5 +++++ html/user/am_set_info.php | 2 +- html/user/create_account.php | 17 ++++++---------- html/user/create_team.php | 2 +- 8 files changed, 70 insertions(+), 33 deletions(-) diff --git a/checkin_notes b/checkin_notes index e6c0f687f4..3d9a194678 100755 --- a/checkin_notes +++ b/checkin_notes @@ -9990,3 +9990,14 @@ David 8 Sept 2006 procinfo_win.C win_build/ boinc_cli_curl.vcproj + +David 8 Sept 2006 + - Web RPCs: return correct error codes + + html/ + inc/ + xml.inc + user/ + am_set_info.php + create_account.php + create_team.php diff --git a/doc/logo.php b/doc/logo.php index f15fef2694..f3a41d5685 100644 --- a/doc/logo.php +++ b/doc/logo.php @@ -5,7 +5,7 @@ page_head("Logos and graphics"); echo " -

The BOINC logo

+

The current BOINC logo and icons

-We welcome alternative ideas. +

+The 'B in a circle' icon was designed by Tim Lan. +The Mac variant was contributed by Juho Viitasalo. + +

New BOINC logo?

+

+We are looking for a new graphical identity for BOINC. Our criteria:

Here are some submissions:

@@ -100,12 +113,6 @@ If you have an opinion, please contact us. -

BOINC icons

-

-The 'B in a circle' icon was designed by Tim Lan. -The Mac variant was contributed by Juho Viitasalo. -

-

Coinage

Tony/Knightrider/Chuggybus has created BOINC coinage. See the large diff --git a/doc/recruit.php b/doc/recruit.php index 4ca14eb586..8e90350e60 100644 --- a/doc/recruit.php +++ b/doc/recruit.php @@ -58,8 +58,9 @@ Will it be released to the public? When, and under what terms?
  • Show all the scientific results of the computation so far, and any publications that arise from these results. -(Folding@home -provides a good example of this). +(Rosetta@home +and Folding@home +provide good examples of this). Announce new results and publications on the News column. Make sure your News column is being properly published as an RSS feed.
  • Give some personal information about your team members: diff --git a/doc/web_rpc.php b/doc/web_rpc.php index 4dc9ea94e8..4f55f95adb 100644 --- a/doc/web_rpc.php +++ b/doc/web_rpc.php @@ -48,8 +48,26 @@ If an RPC fails, the returned XML document is N xxx ")." -where N is a BOINC error number -(see lib/error_numbers.h) and xxx is a textual description. +where N is a BOINC error number and xxx is a textual description. +BOINC error numbers are in lib/error_numbers.h; common errors are: +"; +list_start(); +list_item("-1", "Generic error (error_string may have more info)"); +list_item("-112", "Invalid XML (e.g., the preferences passed to am_set_info.php are invalid)"); +list_item("-136", "Item not found in database + (bad ID of any sort, or ID refers to an item not owned by the caller)"); +list_item("-137", "Name is not unique (Can't create account because + email address already in use, + or can't create team because name is in use)"); +list_item("-138", "Can't access database (treat same as -183)"); +list_item("-161", "Item not found (deprecated; treat same as -136)"); +list_item("-183", "Project is temporarily down"); +list_item("-205", "Email address has invalid syntax"); +list_item("-206", "Wrong password"); +list_item("-207", "Non-unique email address (treat same as -137)"); +list_item("-208", "Account creation disabled"); +list_end(); +echo "
  • The output is XML.
  • diff --git a/html/inc/xml.inc b/html/inc/xml.inc index 9642270132..5f024a7e6e 100644 --- a/html/inc/xml.inc +++ b/html/inc/xml.inc @@ -22,10 +22,15 @@ function xml_header() { function xml_error($num, $msg=null) { if (!$msg) { switch($num) { + case -112: $msg = "Invalid XML"; break; case -136: $msg = "Invalid ID"; break; + case -137: $msg = "Name or email address is not unique"; break; case -138: $msg = "Can't access database"; break; case -183: $msg = "Project is temporarily offline"; break; + case -205: $msg = "Email address has invalid syntax"; break; case -206: $msg = "Invalid password"; break; + case -207: $msg = "Email address is not unique"; break; + case -208: $msg = "Account creation is disabled"; break; default: "Unknown error"; break; } } diff --git a/html/user/am_set_info.php b/html/user/am_set_info.php index 2a7321f9d1..fa81613f4c 100644 --- a/html/user/am_set_info.php +++ b/html/user/am_set_info.php @@ -81,7 +81,7 @@ if ($project_prefs) { $project_prefs = str_replace("\\r\\n", "\n", $project_prefs); $x = bad_xml($project_prefs, "", ""); if ($x) { - xml_error(-1, "Invalid project preferences: $x"); + xml_error(-112, "Invalid project preferences: $x"); } $query .= " project_prefs='$project_prefs', "; } diff --git a/html/user/create_account.php b/html/user/create_account.php index cfe2503ebd..eb585b7a1f 100644 --- a/html/user/create_account.php +++ b/html/user/create_account.php @@ -27,14 +27,13 @@ if (!is_valid_email_addr($email_addr)) { } if (strlen($passwd_hash) != 32) { - xml_error(-206); + xml_error(-1, "password hash length not 32"); } $user = lookup_user_email_addr($email_addr); -$bad = false; if ($user) { if ($user->passwd_hash != $passwd_hash) { - $bad = true; + xml_error(-206); } else { $authenticator = $user->authenticator; } @@ -45,17 +44,13 @@ if ($user) { $query = "insert into user (create_time, email_addr, name, authenticator, expavg_time, send_email, show_hosts, cross_project_id, passwd_hash) values($now, '$email_addr', '$user_name', '$authenticator', unix_timestamp(), 1, 1, '$cross_project_id', '$passwd_hash')"; $result = mysql_query($query); if (!$result) { - $bad = true; + xml_error(-137); } } -if ($bad) { - xml_error(-207); -} else { - echo " \n"; - echo " $authenticator\n"; - echo "\n"; -} +echo " \n"; +echo " $authenticator\n"; +echo "\n"; ?> diff --git a/html/user/create_team.php b/html/user/create_team.php index ae63bce19c..a06a0de5bc 100644 --- a/html/user/create_team.php +++ b/html/user/create_team.php @@ -55,7 +55,7 @@ if ($result) { "; } else { - xml_error(-1, "could not create team"); + xml_error(-137, "could not create team"); } ?>