Commit 9128cadf authored by Tristan Olive's avatar Tristan Olive

Remove remnants from XML when clearing preference sets

If a preference set is established for a user (e.g. Home, Work), it is stored in the database with a <venue> wrapper. If all of these sets are then cleared from the account, a <venue/> tag was remaining, which causes parser issues in BOINC. Remove the <venue> element when all preference sets are cleared.

parent a6913a75
......@@ -762,6 +762,11 @@ function boincwork_save_prefs($prefs, $type = 'general', $venue = null, $account
else {
// If prefs is null, clear out this preference set
if (count($main_prefs['venue']) == 0) {
// If that was the only preference set configured, unset the
// venue tag altogether
$new_venue = false;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment