aboutsummaryrefslogtreecommitdiffstats
path: root/admin/rating.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2014-01-17 22:20:56 +0000
committerrvelices <rv-github@modusoptimus.com>2014-01-17 22:20:56 +0000
commita5e853c618da907f14299bc78233311d5d4b036c (patch)
treea41a64708448a09ab91b96fd469e452cfd454e7b /admin/rating.php
parenta02af472bc2e39f466dcb0b658333e437a28455e (diff)
merge -r26837 from trunk to branch 2.6
admin rating improvements - use web service for deletion - use datatables for rating by user - use fontello icons git-svn-id: http://piwigo.org/svn/branches/2.6@26838 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/rating.php')
-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 .= '&amp;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 );
}