Skip to content
Snippets Groups Projects
Commit 22b3e49d authored by Tim Steiner's avatar Tim Steiner
Browse files

Modify the code to check that a request type is valid to pull the list of types from the database.

parent f564e6cd
No related branches found
No related tags found
No related merge requests found
......@@ -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!');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment