- user web: in RSS item for private message, don't say anything

about the message (sender, title, or content)
- user web: don't send an RSS item for a thread with no posts (i.e., hidden)
- client simulator: support global_prefs_override.xml

svn path=/trunk/boinc/; revision=22545
This commit is contained in:
David Anderson 2010-10-17 20:12:14 +00:00
parent 612362d6dc
commit 020a4d4ed1
5 changed files with 33 additions and 9 deletions

View File

@ -7421,3 +7421,15 @@ David 16 Oct 2010
client/
cs_notice.cpp
David 16 Oct 2010
- user web: in RSS item for private message, don't say anything
about the message (sender, title, or content)
- user web: don't send an RSS item for a thread with no posts (i.e., hidden)
- client simulator: support global_prefs_override.xml
html/inc/
pm.inc
forum_rss.inc
client/
sim.cpp

View File

@ -956,7 +956,7 @@ void cull_projects() {
}
void do_client_simulation() {
char buf[256];
char buf[256], buf2[256];
msg_printf(0, MSG_INFO, "SIMULATION START");
sprintf(buf, "%s%s", file_prefix, CONFIG_FILE);
@ -975,10 +975,12 @@ void do_client_simulation() {
buf
);
sprintf(buf, "%s%s", file_prefix, GLOBAL_PREFS_FILE_NAME);
gstate.read_global_prefs(buf);
sprintf(buf2, "%s%s", file_prefix, GLOBAL_PREFS_OVERRIDE_FILE);
gstate.read_global_prefs(buf, buf2);
fprintf(index_file,
"<br><a href=%s>Preferences file (global_prefs.xml)</a>\n",
buf
"<br><a href=%s>Preferences file (global_prefs.xml)</a>\n"
"<br><a href=%s>Preferences override file (global_prefs_override.xml)</a>\n",
buf, buf2
);
cull_projects();
int j=0;

View File

@ -17,6 +17,12 @@ function show_form() {
<textarea name=global_prefs rows=10 cols=80>
</textarea>
<p>
<b>global_prefs_override.xml:</b> (the host's preferences override file)
<br>
<textarea name=global_prefs_override rows=10 cols=80>
</textarea>
<p>
<b>cc_config.xml:</b> (the client configuration options)
<br>
@ -68,15 +74,18 @@ if ($_POST['submit']) {
$state_fname = $prefix."client_state.xml";
file_put_contents_aux($state_fname, $x);
$prefs_name = null;
$config_name = null;
$x = $_POST['global_prefs'];
if (strlen($x)) {
$prefs_fname = $prefix."global_prefs.xml";
file_put_contents_aux($prefs_fname, $x);
}
$x = $_POST['global_prefs_override'];
if (strlen($x)) {
$prefs_override_fname = $prefix."global_prefs_override.xml";
file_put_contents_aux($prefs_override_fname, $x);
}
$x = $_POST['cc_config'];
if (strlen($x)) {
$config_fname = $prefix."cc_config.xml";

View File

@ -32,6 +32,7 @@ function show_forum_rss_item($thread, $userid, $threads_only, $truncate) {
} else {
$posts = BoincPost::enum("thread=$thread->id $clause2 order by timestamp desc limit 1");
}
if (!count($posts)) return;
$post = $posts[0];
$post_date = gmdate('D, d M Y H:i:s',$post->timestamp).' GMT';
$t = bb2html($post->content, true);

View File

@ -199,8 +199,8 @@ function pm_email_remind($user) {
function pm_rss($notify, &$title, &$msg, &$url) {
$pm = BoincPrivateMessage::lookup_id($notify->opaque);
$from_user = BoincUser::lookup_id($pm->senderid);
$title = tra("Private message from")." $from_user->name: $pm->subject";
$msg = "$pm->content";
$title = tra("Private message");
$msg = "You have received a <a href=".URL_BASE."pm.php>private message</a>.";
$url = URL_BASE."pm.php";
}