Skip to content

Commit

Permalink
MDL-17364 forum ajax rating - erasing some unused print_error(). Exce…
Browse files Browse the repository at this point in the history
…ptions handle that now
  • Loading branch information
stronk7 committed Jan 17, 2009
1 parent 3e7f959 commit 2ee07c3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions mod/forum/rate_ajax.php
Expand Up @@ -122,9 +122,7 @@
if ($rate != $oldrating->rating) {
$oldrating->rating = $rate;
$oldrating->time = time();
if (!$DB->update_record('forum_ratings', $oldrating)) {
print_error('cannotupdaterate', 'error', '', (object)array('id'=>$post->id, 'rating'=>$rate));
}
$DB->update_record('forum_ratings', $oldrating);
}

/// Inserting rate
Expand All @@ -134,10 +132,7 @@
$newrating->time = time();
$newrating->post = $post->id;
$newrating->rating = $rate;

if (! $DB->insert_record('forum_ratings', $newrating)) {
print_error('cannotinsertrate', 'error', '', (object)array('id'=>$postid, 'rating'=>$rate));
}
$DB->insert_record('forum_ratings', $newrating);
}

/// Update grades
Expand Down

0 comments on commit 2ee07c3

Please sign in to comment.