aboutsummaryrefslogtreecommitdiffstats
path: root/admin/rating.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/rating.php28
1 files changed, 7 insertions, 21 deletions
diff --git a/admin/rating.php b/admin/rating.php
index 0edd1369b..381b5c4cc 100644
--- a/admin/rating.php
+++ b/admin/rating.php
@@ -212,10 +212,11 @@ ORDER BY date DESC;';
$nb_rates = pwg_db_num_rows($result);
$tpl_image =
- array(
- 'U_THUMB' => $thumbnail_src,
- 'U_URL' => $image_url,
- 'SCORE_RATE' => $image['score'],
+ array(
+ 'id' => $image['id'],
+ 'U_THUMB' => $thumbnail_src,
+ 'U_URL' => $image_url,
+ 'SCORE_RATE' => $image['score'],
'AVG_RATE' => $image['avg_rates'],
'SUM_RATE' => $image['sum_rates'],
'NB_RATES' => (int)$image['nb_rates'],
@@ -226,16 +227,6 @@ ORDER BY date DESC;';
while ($row = pwg_db_fetch_assoc($result))
{
-
- $url_del = PHPWG_ROOT_PATH.'admin.php'.
- get_query_string_diff(array('del'));
-
- $del_param = 'e='.$image['id'].
- '&u='.$row['user_id'].
- '&a='.$row['anonymous_id'];
-
- $url_del .= '&del='.urlencode(urlencode($del_param));
-
if ( isset($users[$row['user_id']]) )
{
$user_rate = $users[$row['user_id']];
@@ -249,13 +240,8 @@ ORDER BY date DESC;';
$user_rate .= '('.$row['anonymous_id'].')';
}
- $tpl_image['rates'][] =
- array(
- 'DATE' => /*format_date*/($row['date']),
- 'RATE' => $row['rate'],
- 'USER' => $user_rate,
- 'U_DELETE' => $url_del
- );
+ $row['USER'] = $user_rate;
+ $tpl_image['rates'][] = $row;
}
$template->append( 'images', $tpl_image );
}