mirror of https://github.com/BOINC/boinc.git
- scheduler RPC: add <override_file_present> element to
the <working_global_preferences> element in scheduler RPC request (tells the server that there's an override file). - account manager RPC: add <working_global_preferences> element, including the override flag. - web: add "no time limit" option for forum search - web: increase show-user-post query limit to 10000 svn path=/trunk/boinc/; revision=24129
This commit is contained in:
parent
7c81d72378
commit
fa419731dd
|
@ -5608,3 +5608,23 @@ David 5 Sept
|
|||
submit_permissions.php
|
||||
inc/
|
||||
forum.inc
|
||||
|
||||
David 5 Sept
|
||||
- scheduler RPC: add <override_file_present> element to
|
||||
the <working_global_preferences> element in
|
||||
scheduler RPC request
|
||||
(tells the server that there's an override file).
|
||||
- account manager RPC: add <working_global_preferences> element,
|
||||
including the override flag.
|
||||
- web: add "no time limit" option for forum search
|
||||
- web: increase show-user-post query limit to 10000
|
||||
|
||||
lib/
|
||||
prefs.cpp,h
|
||||
client/
|
||||
cs_prefs.cpp
|
||||
acct_mgr.cpp
|
||||
html/user/
|
||||
forum_search.php
|
||||
forum_search_action.php
|
||||
forum_user_posts.php
|
||||
|
|
|
@ -170,6 +170,15 @@ int ACCT_MGR_OP::do_rpc(
|
|||
p->ended?1:0
|
||||
);
|
||||
}
|
||||
MIOFILE mf;
|
||||
mf.init_file(f);
|
||||
|
||||
// send working prefs
|
||||
//
|
||||
fprintf(f, "<working_global_preferences>\n");
|
||||
gstate.global_prefs.write(mf);
|
||||
fprintf(f, "</working_global_preferences>\n");
|
||||
|
||||
if (boinc_file_exists(GLOBAL_PREFS_FILE_NAME)) {
|
||||
FILE* fprefs = fopen(GLOBAL_PREFS_FILE_NAME, "r");
|
||||
if (fprefs) {
|
||||
|
@ -177,8 +186,6 @@ int ACCT_MGR_OP::do_rpc(
|
|||
fclose(fprefs);
|
||||
}
|
||||
}
|
||||
MIOFILE mf;
|
||||
mf.init_file(f);
|
||||
gstate.host_info.write(mf, !config.suppress_net_info, true);
|
||||
if (strlen(gstate.acct_mgr_info.opaque)) {
|
||||
fprintf(f,
|
||||
|
|
|
@ -431,6 +431,7 @@ void CLIENT_STATE::read_global_prefs(
|
|||
|
||||
// read the override file
|
||||
//
|
||||
global_prefs.override_file_present = false;
|
||||
if (override_fname) {
|
||||
f = fopen(override_fname, "r");
|
||||
if (f) {
|
||||
|
@ -441,6 +442,7 @@ void CLIENT_STATE::read_global_prefs(
|
|||
global_prefs.parse_override(xp, "", found_venue, mask);
|
||||
msg_printf(NULL, MSG_INFO, "Reading preferences override file");
|
||||
fclose(f);
|
||||
global_prefs.override_file_present = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,8 @@ row2(tra("Search limits")."<br />
|
|||
<option value=\"30\" selected>".tra("%1 days", "30")."</option>
|
||||
<option value=\"90\">".tra("%1 months", "3")."</option>
|
||||
<option value=\"180\">".tra("%1 months", "6")."</option>
|
||||
<option value=\"360\">".tra("1 year")."</option>
|
||||
<option value=\"365\">".tra("1 year")."</option>
|
||||
<option value=\"0\">".tra("no limit")."</option>
|
||||
</select>");
|
||||
|
||||
$forumid = null;
|
||||
|
|
|
@ -146,7 +146,12 @@ $search_max_time = post_int("search_max_time");
|
|||
$search_forum = post_int("search_forum");
|
||||
$search_sort = post_int("search_sort");
|
||||
$search_list = explode(" ",$search_keywords);
|
||||
$min_timestamp = time() - ($search_max_time*3600*24);
|
||||
if ($search_max_time) {
|
||||
$min_timestamp = time() - ($search_max_time*3600*24);
|
||||
} else {
|
||||
$min_timestamp = 0;
|
||||
}
|
||||
|
||||
$limit = 100;
|
||||
|
||||
if ($search_forum==-1){
|
||||
|
|
|
@ -72,7 +72,7 @@ if ($logged_in_user) {
|
|||
}
|
||||
page_head(tra("Posts by %1", $user->name));
|
||||
|
||||
$posts = BoincPost::enum("user=$userid order by id desc limit 1000");
|
||||
$posts = BoincPost::enum("user=$userid order by id desc limit 10000");
|
||||
$n = 0;
|
||||
start_table();
|
||||
$options = get_output_options($logged_in_user);
|
||||
|
|
|
@ -577,8 +577,7 @@ int GLOBAL_PREFS::parse_file(
|
|||
// This is used to write
|
||||
// 1) the app init data file
|
||||
// 2) GUI RPC get_state reply
|
||||
// Not used for scheduler request; there, we just copy the
|
||||
// global_prefs.xml file (which includes all venues).
|
||||
// 3) scheduler request (<working_global_preferences> element)
|
||||
//
|
||||
int GLOBAL_PREFS::write(MIOFILE& f) {
|
||||
f.printf(
|
||||
|
@ -614,7 +613,8 @@ int GLOBAL_PREFS::write(MIOFILE& f) {
|
|||
" <max_bytes_sec_down>%f</max_bytes_sec_down>\n"
|
||||
" <cpu_usage_limit>%f</cpu_usage_limit>\n"
|
||||
" <daily_xfer_limit_mb>%f</daily_xfer_limit_mb>\n"
|
||||
" <daily_xfer_period_days>%d</daily_xfer_period_days>\n",
|
||||
" <daily_xfer_period_days>%d</daily_xfer_period_days>\n"
|
||||
" <override_file_present>%d</override_file_present>\n",
|
||||
source_project,
|
||||
mod_time,
|
||||
run_on_batteries?1:0,
|
||||
|
@ -646,7 +646,8 @@ int GLOBAL_PREFS::write(MIOFILE& f) {
|
|||
max_bytes_sec_down,
|
||||
cpu_usage_limit,
|
||||
daily_xfer_limit_mb,
|
||||
daily_xfer_period_days
|
||||
daily_xfer_period_days,
|
||||
override_file_present?1:0
|
||||
);
|
||||
if (max_ncpus) {
|
||||
f.printf(" <max_cpus>%d</max_cpus>\n", max_ncpus);
|
||||
|
|
|
@ -169,6 +169,8 @@ struct GLOBAL_PREFS {
|
|||
char source_project[256];
|
||||
char source_scheduler[256];
|
||||
bool host_specific;
|
||||
// an account manager can set this; if set, don't propagate
|
||||
bool override_file_present;
|
||||
|
||||
GLOBAL_PREFS();
|
||||
void defaults();
|
||||
|
|
Loading…
Reference in New Issue