Changeset 240 for Dev/branches/jos-branch/setQuestion.php
- Timestamp:
- 01/18/12 17:13:25 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/jos-branch/setQuestion.php
r237 r240 13 13 $question_results = Question::get(array("uid" => $input->uid)); 14 14 if (!empty($question_results)) { 15 $question = $question s[0];15 $question = $question_results[0]; 16 16 } else { 17 17 die("Error: attempt to edit a non-existing database object!"); … … 22 22 if ($input->title) $question->title = $input->title; 23 23 if ($input->description) $question->description = $input->description; 24 if ( $input->category) $question->category = null;25 if ( $input->answers) $question->answers = null;24 if (isset($input->category) ) $question->category = null; 25 if (isset($input->answers)) $question->answers = null; 26 26 $question->save(); 27 27 $outputArray = array("created"=>false, "uid"=>$question->uid);
Note: See TracChangeset
for help on using the changeset viewer.