mirror of https://github.com/BOINC/boinc.git
Ops: increase mod_time when repairing preferences
Increasing mod_time will trigger a resend of the repaired preferences on the next RPC to the Client updating the preferences there.
This commit is contained in:
parent
2e07e83275
commit
b3ff3b8fcb
|
@ -34,8 +34,13 @@ function process_set($users) {
|
|||
echo "repairing prefs for user $user->id\n";
|
||||
$p = repair_prefs($user->global_prefs);
|
||||
if ($p) {
|
||||
$retval = @simplexml_load_string($p);
|
||||
if ($retval) {
|
||||
$xml_obj = @simplexml_load_string($p);
|
||||
if ($xml_obj) {
|
||||
// increase mod_time by 1 second so new preferences are propagated to the Client
|
||||
$xml_obj->mod_time = 1 + intval($xml_obj->mod_time);
|
||||
$p = $xml_obj->asXML();
|
||||
// remove XML header
|
||||
$p = implode("\n", array_slice(explode("\n", $p), 1));
|
||||
$user->update("global_prefs='$p'");
|
||||
echo " repair succeeded\n";
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue