<?php

// custom code for this hook
global $rInfo;

if (isset($rInfo) && is_object($rInfo)) {
    $this->smarty->assign(array('reviewsID' => $rInfo->reviews_id));

    $query_reviews_raw = "select customers_id from " . TABLE_REVIEWS . " r where r.reviews_id = '" . $rInfo->reviews_id . "' ";

    $query_reviews = mh_db_query($query_reviews_raw);
    $review_item = mh_db_fetch_array($query_reviews);

    if (isset($review_item['customers_id'])) {
        $this->set_customer_id($review_item['customers_id']);
    }
}

