diff --git a/application/modules/requests/models/RequestModel.php b/application/modules/requests/models/RequestModel.php index 16390e2e2e67f2b199bfc3e33d054a3a83f2be09..05a81ae62fdaedc3710d66a59dda40275f488edf 100644 --- a/application/modules/requests/models/RequestModel.php +++ b/application/modules/requests/models/RequestModel.php @@ -719,10 +719,10 @@ class Requests_RequestModel extends Unl_Model { return $this->_data['typeDescription']; } - + public function setType($type) { - if (!in_array($type, array('NewCourse', 'ChangeCourse', 'RemoveCourse', 'AddISToCourse', 'NewCourseWithIS', 'NewCourseWithACE', 'AddACEToCourse', 'AddACEAndChangeCourse', 'RemoveACEFromCourse', 'RemoveACEAndChangeCourse'))) { + if (!in_array($type, $this->getTypes())) { throw new Exception('Unknown request type!'); }