diff --git a/checkin_notes b/checkin_notes
index 127f50c1f0..360f808d2a 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -15248,3 +15248,38 @@ Brian 14 July 2004
Rom July 15 2004
- Tag for 4.00 release, all platforms
boinc_release_4_00
+
+David
+ - server: better messages on DB errors
+ - web: cache system looks for "format=xml" in cache args,
+ sends as MIME type XML if so
+ - added CGI interface to get user stats as XML
+ - top_*.php: forgot to exit() in case of too-large offset
+ - xml_escape(): change \n to space
+ - db_dump: error checking; add fields to team output;
+ only output items with nonzero total_credit
+ - scheduler: we were doing an optimization of not opening the DB
+ in case there's no work and client not returning results.
+ Don't do this if this is initial request from host
+ (otherwise it won't get hostid, and will detach project)
+ - add "enforce_delay_bound" to SCHED_CONFIG
+ (NOTE TO PROJECTS: unless you pub
Your account ID has been emailed to $email_addr.
- Please wait until you receive this email (it may take a minute or two).
+ Please wait until you receive this email.
+ If it doesn't arrive in a minute or two,
+ your ISP may be blocking it as 'spam'.
+ In this case please contact your ISP and
+ ask them to not block email from ".URL_BASE.".
";
} else {
echo "
If your computer is not one of the above types, you can - download and compile the BOINC software yourself. +
BOINC can be customized for languages other than English diff --git a/html/user/show_user.php b/html/user/show_user.php index 1dffb4de1c..2ce272ce06 100644 --- a/html/user/show_user.php +++ b/html/user/show_user.php @@ -1,25 +1,42 @@ name"); - start_table(); - show_user_summary_public($user); - end_table(); - page_tail(); + if ($format == "xml") { + require_once("../inc/xml.inc"); + if ($user) { + show_user_xml($user); + } else { + xml_error("no such user ID"); + } } else { - page_head("Can't find user"); - echo "There is no account with that id.\n
"; - page_tail(); + if ($user) { + page_head("Account data for $user->name"); + start_table(); + show_user_summary_public($user); + end_table(); + page_tail(); + } else { + page_head("Can't find user"); + echo "There is no account with that ID.\n
";
+ page_tail();
+ }
}
+ end_cache($cache_args);
?>
diff --git a/html/user/top_hosts.php b/html/user/top_hosts.php
index c822d1cd58..1554f2f032 100644
--- a/html/user/top_hosts.php
+++ b/html/user/top_hosts.php
@@ -18,7 +18,7 @@
page_head("Limit exceeded");
echo "Sorry - first 1000 only.";
page_tail();
-
+ exit();
}
require_once("../inc/db.inc");
diff --git a/html/user/top_teams.php b/html/user/top_teams.php
index a1983892c3..d0282d82fa 100644
--- a/html/user/top_teams.php
+++ b/html/user/top_teams.php
@@ -18,7 +18,7 @@
page_head("Limit exceeded");
echo "Sorry - first 1000 only.";
page_tail();
-
+ exit();
}
require_once("../inc/db.inc");
diff --git a/html/user/top_users.php b/html/user/top_users.php
index 28c649ea5e..789241818f 100644
--- a/html/user/top_users.php
+++ b/html/user/top_users.php
@@ -18,6 +18,7 @@
page_head("Limit exceeded");
echo "Sorry - first 1000 only.";
page_tail();
+ exit();
}
require_once("../inc/db.inc");
diff --git a/lib/parse.C b/lib/parse.C
index c05cf6deb1..2f5c8e4df6 100644
--- a/lib/parse.C
+++ b/lib/parse.C
@@ -271,12 +271,19 @@ void xml_escape(string& in, string& out) {
out += "<";
} else if (in[i] == '&') {
out += "&";
+ } else if (in[i] == '\n') {
+ out += " ";
} else {
out += in[i];
}
}
}
+void xml_escape(char* in, string& out) {
+ string foo = in;
+ xml_escape(foo, out);
+}
+
void xml_unescape(string& in, string& out) {
int i;
out = "";
@@ -292,4 +299,3 @@ void xml_unescape(string& in, string& out) {
}
}
}
-
diff --git a/lib/parse.h b/lib/parse.h
index c544be8276..aa0fd2600b 100644
--- a/lib/parse.h
+++ b/lib/parse.h
@@ -43,6 +43,7 @@ extern int read_file_malloc(const char* pathname, char*& str);
extern void replace_element(char* buf, char* start, char* end, char* replacement);
extern char* sgets(char* buf, int len, char* &in);
extern void xml_escape(std::string&, std::string&);
+extern void xml_escape(char*, std::string&);
extern void xml_unescape(std::string&, std::string&);
extern void extract_venue(char*, char*, char*);
diff --git a/sched/db_dump.C b/sched/db_dump.C
index 093b0f06e1..c42f050551 100644
--- a/sched/db_dump.C
+++ b/sched/db_dump.C
@@ -204,15 +204,12 @@ protected:
int compression;
public:
FILE* f;
- ZFILE(string tag_, int comp)
- : tag(tag_), compression(comp), f(0)
- {printf("zfile const comp %d\n", compression);}
+ ZFILE(string tag_, int comp): tag(tag_), compression(comp), f(0) {}
~ZFILE() { close(); }
void open(const char* filename) {
close();
- printf("opening %s\n", filename);
f = fopen(filename, "w");
if (!f) {
log_messages.printf(SCHED_MSG_LOG::CRITICAL, "db_dump: Couldn't open %s for output\n", filename);
@@ -234,16 +231,13 @@ public:
if (f) {
fprintf(f, "%s>\n", tag.c_str());
fclose(f);
- printf("close compression: %d\n", compression);
switch(compression) {
case COMPRESSION_ZIP:
sprintf(buf, "zip -q %s", current_path);
- printf("system: %s\n", buf);
system(buf);
break;
case COMPRESSION_GZIP:
sprintf(buf, "gzip -fq %s", current_path);
- printf("system: %s\n", buf);
system(buf);
break;
}
@@ -278,6 +272,7 @@ void NUMBERED_ZFILE::set_id(int id) {
}
}
+#if 0
void string_replace(string& str, string& old, string& newstr) {
string::size_type oldlen = old.size();
string::size_type newlen = newstr.size();
@@ -309,8 +304,11 @@ void xml_escape(char* in, string& out) {
string_replace(out, x4, y4);
string_replace(out, x5, y5);
}
+#endif
void write_host(HOST& host, FILE* f, bool detail) {
+ int retval;
+
fprintf(f,
"