$x = $venue ? "&venue={$venue}" : ""; echo PREFS_FORM_DESC1; echo PREFS_FORM_ERROR_DESC; print_prefs_form("add", $subset, $venue, $user, $new_prefs, $columns, $error); } else { $prefs->{$venue} = $new_prefs; global_prefs_update($user, $prefs); Header("Location: prefs.php?subset={$subset}{$c}"); } } else { $prefs = prefs_parse_project($user->project_prefs); $prefs->{$venue} = $prefs; $project_error = prefs_project_parse_form($new_prefs); $error = prefs_resource_parse_form($new_prefs); if ($project_has_beta) { prefs_beta_parse_form($new_prefs); } if ($error != false || $project_error != false) { $title = "Edit " . subset_name($subset) . " preferences"; if ($venue) { $title = "{$title} for {$venue}"; } page_head($title); $x = $venue ? "&venue={$venue}" : ""; echo PREFS_FORM_ERROR_DESC; print_prefs_form("add", $subset, $venue, $user, $new_prefs, $columns, $error, $project_error); } else { $prefs->{$venue} = $new_prefs; project_prefs_update($user, $prefs); Header("Location: prefs.php?subset={$subset}&c"); }
$main_prefs = $prefs; } global_prefs_update($user, $main_prefs); Header("Location: prefs.php?subset={$subset}&updated=1{$c}"); } } else { $main_prefs = prefs_parse_project($user->project_prefs); if ($venue) { $prefs = $main_prefs->{$venue}; } else { $prefs = $main_prefs; } $project_error = prefs_project_parse_form($prefs); $error = prefs_resource_parse_form($prefs); if ($project_has_beta) { prefs_beta_parse_form($prefs); } if ($error != false || $project_error != false) { $title = "Edit " . subset_name($subset) . " preferences"; if ($venue) { $title = "{$title} for {$venue}"; } page_head($title); $x = $venue ? "&venue={$venue}" : ""; echo PREFS_FORM_ERROR_DESC; print_prefs_form("edit", $subset, $venue, $user, $prefs, $columns, $error, $project_error); } else { if ($venue) { $main_prefs->{$venue} = $prefs; } else { $main_prefs = $prefs;