# HG changeset patch # User Nathan Phillip Brink # Date 2012-02-11 20:06:15 # Node ID 85fd0c4b6efd18cebf09a030e5acd39ac94a9be1 # Parent d7044a583ccc44ccacb18ea16f9555960509a751 Fix regression in d7044a583ccc where the semester could not be selected when editing a saved schedule. diff --git a/input.php b/input.php --- a/input.php +++ b/input.php @@ -187,7 +187,19 @@ if ($school['id'] != 'default' */ $query = array('school' => $school['id']); if ($sch) - $query['s'] = $sch->id_get(); + { + $query['s'] = $sch->id_get(); + /* + * When editing a schedule, also canonize on the + * semester. Changes to the selected schedule which are made + * when editing an existing schedule are not saved into the + * SESSION. Thus, for the user to be able to edit a schedule + * and load courses from an alternate semester, we must ensure + * that semester remains in GET. + */ + if (!empty($semester)) + $query['semester'] = $semester['id']; + } $inputPage->canonize('input.php', $query); }