Review Preview in Admin Panel is broken

Description

When you goto reviews in the admin panel you can click again on the selected review to see a "preview" of it, however no fields are populated on the preview page.

To fix this;

Open /catalog/admin/reviews.php

Starting around line 166 find;
$reviews_query = tep_db_query("select r.reviews_id, r.products_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, rd.reviews_text, r.reviews_rating from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int)$rID . "' and r.reviews_id = rd.reviews_id");
$reviews = tep_db_fetch_array($reviews_query);

$articles_name_query = tep_db_query("select articles_name from " . TABLE_ARTICLES_DESCRIPTION . " where articles_id = '" . (int)$reviews['articles_id'] . "' and language_id = '" . (int)$languages_id . "'");
$articles_name = tep_db_fetch_array($articles_name_query);

$rInfo_array = array_merge($reviews, $articles, $articles_name);
$rInfo = new objectInfo($rInfo_array);

Change that code to;
$reviews_query = tep_db_query('SELECT r.reviews_id, r.customers_name, r.reviews_rating, r.date_added, rd.reviews_text, pd.products_name FROM ' . TABLE_REVIEWS . ' r, ' . TABLE_REVIEWS_DESCRIPTION . ' rd, ' . TABLE_PRODUCTS_DESCRIPTION . ' pd WHERE r.reviews_id=rd.reviews_id AND r.products_id=pd.products_id AND r.reviews_id=' . (int)$rID);
$reviews = tep_db_fetch_array($reviews_query);

$rInfo = new objectInfo($reviews);

Environment

None

Steps to reproduce

None

Assignee

Giles Marshall

Reporter

Scott Murphy

Labels

None

Severity

Minor

Components

Fix versions

Affects versions

Priority

Configure