mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=2754
This commit is contained in:
parent
8bb76936a1
commit
2363e68815
|
@ -8226,3 +8226,11 @@ David 7 Dec 2003
|
|||
backend_lib.C
|
||||
create_work.C
|
||||
process_result_template.C
|
||||
|
||||
David 7 Dec 2003
|
||||
- Changed db_dump so that it doesn't chdir() into the output directory
|
||||
(it it does, and it crashes, that makes its core file
|
||||
visible to the world, and that may contain private info)
|
||||
|
||||
sched/
|
||||
db_dump.C
|
||||
|
|
|
@ -432,7 +432,7 @@ function show_forum_title($forum=NULL, $thread=NULL, $helpdesk=false) {
|
|||
echo "<a href=index.php>", " Message boards</a> : ";
|
||||
}
|
||||
echo "<a href=\"forum.php?id=", $forum->id, "\">", $forum->title, "</a> : ";
|
||||
echo $thread->title;
|
||||
echo stripslashes($thread->title);
|
||||
echo "</span><br>";
|
||||
} else {
|
||||
echo "Invalid input to show_forum_title<br>";
|
||||
|
|
|
@ -43,24 +43,22 @@ if ($sort_style == NULL) {
|
|||
$is_subscribed = false;
|
||||
|
||||
if ($logged_in_user) {
|
||||
$result = mysql_query("SELECT * FROM subscriptions WHERE (userid = " . $logged_in_user->id . ") AND (threadid = " . $thread->id . ")");
|
||||
$result = mysql_query("SELECT * FROM subscriptions WHERE userid = " . $logged_in_user->id . " AND threadid = " . $thread->id);
|
||||
if ($result) {
|
||||
$is_subscribed = (mysql_num_rows($result) > 0);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Include this in show_forum_title?
|
||||
show_forum_title($forum, $thread, $category->is_helpdesk);
|
||||
|
||||
echo "
|
||||
<form action=\"thread.php\" method=\"get\">
|
||||
<input type=\"hidden\" name=\"id\" value=", $thread->id, ">
|
||||
<form action=thread.php>
|
||||
<input type=hidden name=id value=", $thread->id, ">
|
||||
<table width=100% cellspacing=0 cellpadding=0>
|
||||
<tr valign=\"bottom\">
|
||||
<td align=\"left\" style=\"border:0px\">
|
||||
<tr>
|
||||
<td align=left>
|
||||
";
|
||||
|
||||
show_forum_title($forum, $thread, $category->is_helpdesk);
|
||||
|
||||
$link = "<a href=reply.php?thread=" . $thread->id;
|
||||
if ($category->is_helpdesk) {
|
||||
$link = $link . "&helpdesk=1#input>Answer this question";
|
||||
|
@ -72,9 +70,9 @@ echo $link, "</a><br>";
|
|||
|
||||
if ($is_subscribed) {
|
||||
if ($category->is_helpdesk) {
|
||||
echo "You are currently subscribed to this question. ";
|
||||
echo "You are subscribed to this question. ";
|
||||
} else {
|
||||
echo "You are currently subscribed to this thread. ";
|
||||
echo "You are subscribed to this thread. ";
|
||||
}
|
||||
echo "<a href=subscribe.php?action=unsubscribe&thread=$thread->id>Click here to unsubscribe</a>.";
|
||||
} else {
|
||||
|
@ -91,7 +89,7 @@ if (!$category->is_helpdesk) {
|
|||
echo "<td align=\"right\" style=\"border:0px\">Sort / Filter ";
|
||||
show_combo_from_array("sort", $thread_sort_styles, $sort_style);
|
||||
show_combo_from_array("filter", $thread_filter_styles, $filter_min);
|
||||
echo "<input type=\"submit\" value=\"Sort\">\n</td>";
|
||||
echo "<input type=submit value=OK>\n</td>";
|
||||
}
|
||||
|
||||
echo "</tr>\n</table>\n</form>\n";
|
||||
|
|
|
@ -75,11 +75,18 @@ int nrecs_per_file_detail;
|
|||
|
||||
bool zip_files = false;
|
||||
string zip_cmd;
|
||||
char file_dir[256];
|
||||
|
||||
char* file_path(char* filename) {
|
||||
static char buf[256];
|
||||
sprintf(buf, "%s/%s", file_dir, filename);
|
||||
return buf;
|
||||
}
|
||||
|
||||
// class that automatically compresses on close
|
||||
class ZFILE {
|
||||
protected:
|
||||
string tag;
|
||||
string tag; // enclosing XML tag
|
||||
FILE* f;
|
||||
string filename;
|
||||
bool zip_file;
|
||||
|
@ -98,7 +105,7 @@ public:
|
|||
vsprintf(filename_buf, filename_format, ap);
|
||||
va_end(ap);
|
||||
|
||||
filename = filename_buf;
|
||||
filename = file_path(filename_buf);
|
||||
|
||||
f = fopen(filename.c_str(), "w");
|
||||
if (!f) {
|
||||
|
@ -545,16 +552,15 @@ int tables_file() {
|
|||
int main(int argc, char** argv) {
|
||||
SCHED_CONFIG config;
|
||||
int retval, i;
|
||||
char dir[256];
|
||||
|
||||
check_stop_trigger();
|
||||
|
||||
nrecs_per_file_summary = DEFAULT_NRECS_PER_FILE_SUMMARY;
|
||||
nrecs_per_file_detail = DEFAULT_NRECS_PER_FILE_DETAIL;
|
||||
strcpy(dir, "");
|
||||
strcpy(file_dir, ".");
|
||||
for (i=1; i<argc; i++) {
|
||||
if (!strcmp(argv[i], "-dir")) {
|
||||
strcpy(dir, argv[++i]);
|
||||
strcpy(file_dir, argv[++i]);
|
||||
} else if (!strcmp(argv[i], "-d")) {
|
||||
log_messages.set_debug_level(atoi(argv[++i]));
|
||||
} else if (!strcmp(argv[i], "-gzip")) {
|
||||
|
@ -592,13 +598,6 @@ int main(int argc, char** argv) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
if (strlen(dir)) {
|
||||
retval = chdir(dir);
|
||||
if (retval) {
|
||||
log_messages.printf(SchedMessages::NORMAL, "can't chdir to %s\n", dir);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
tables_file();
|
||||
team_total_credit();
|
||||
team_expavg_credit();
|
||||
|
|
Loading…
Reference in New Issue