function reviews_approve_review in Reviews 7
Function for menu callback to approve a review.
1 string reference to 'reviews_approve_review'
- reviews_menu in ./
reviews.module - Implements hook_menu().
File
- includes/
reviews.admin.inc, line 356 - This file contains all the functions necessary for the admin pages of the reviews system.
Code
function reviews_approve_review($rid) {
// Update the review status to approved.
db_update('reviews')
->fields(array(
'status' => 1,
))
->condition('rid', $rid, '=')
->execute();
// Update the reviews count table.
$nid = reviews_get_nid_from_rid($rid);
if ($nid) {
reviews_update_review_count_for_node($nid);
}
drupal_set_message(t('Review approved'), 'status');
drupal_goto('admin/content/reviews/moderate');
}