MDL-18293 removed obsoleted checking of return values from insert and update_record + unused strings cleanup

This commit is contained in:
skodak 2009-06-13 17:55:51 +00:00
parent a8c31db2a3
commit 0bcf8b6f0d
10 changed files with 21 additions and 83 deletions

View file

@ -88,9 +88,7 @@
} else if ($rating != $oldrating->rating) {
$oldrating->rating = $rating;
$oldrating->time = time();
if (! $DB->update_record("glossary_ratings", $oldrating)) {
print_error('cannotinsertrate', 'error', '', (object)array('id'=>$entry->id, 'rating'=>$rating));
}
$DB->update_record("glossary_ratings", $oldrating);
glossary_update_grades($glossary, $entry->userid);
}
@ -101,9 +99,7 @@
$newrating->entryid = $entry->id;
$newrating->rating = $rating;
if (! $DB->insert_record("glossary_ratings", $newrating)) {
print_error('cannotinsertrate', 'error', '', (object)array('id'=>$entry->id, 'rating'=>$rating));
}
$DB->insert_record("glossary_ratings", $newrating);
glossary_update_grades($glossary, $entry->userid);
}
}