diff options
author | rvelices <rv-github@modusoptimus.com> | 2011-08-02 19:20:50 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2011-08-02 19:20:50 +0000 |
commit | 86ae4d8b3ae8d1a4b3f78567dd8f67aa48ef43a8 (patch) | |
tree | cf4067b3b6298d2f700b6b5f59187ffe8e4efc55 /admin | |
parent | a61fea92834dcadc8c1a648ca1fdb2c56d2079cd (diff) |
rename #images.average_rate to rating_score
git-svn-id: http://piwigo.org/svn/trunk@11893 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/configuration.php | 4 | ||||
-rw-r--r-- | admin/element_set_ranks.php | 14 | ||||
-rw-r--r-- | admin/rating.php | 4 | ||||
-rw-r--r-- | admin/themes/default/template/configuration.tpl | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/admin/configuration.php b/admin/configuration.php index f22b0f4fb..9915af3cc 100644 --- a/admin/configuration.php +++ b/admin/configuration.php @@ -98,7 +98,7 @@ $display_info_checkboxes = array( 'tags', 'categories', 'visits', - 'average_rate', + 'rating_score', 'privacy_level', ); @@ -109,7 +109,7 @@ $sort_fields = array( 'file' => l10n('File name'), 'date_creation' => l10n('Creation date'), 'date_available' => l10n('Post date'), - 'average_rate' => l10n('Rating score'), + 'rating_score' => l10n('Rating score'), 'hit' => l10n('Most visited'), 'id' => 'Id', ); diff --git a/admin/element_set_ranks.php b/admin/element_set_ranks.php index f11aa68b1..f37ff4a34 100644 --- a/admin/element_set_ranks.php +++ b/admin/element_set_ranks.php @@ -92,7 +92,7 @@ if (isset($_POST['submit'])) if (isset($_POST['rank_of_image'])) { asort($_POST['rank_of_image'], SORT_NUMERIC); - + save_images_order( $page['category_id'], array_keys($_POST['rank_of_image']) @@ -105,12 +105,12 @@ if (isset($_POST['submit'])) } $image_order = null; - if (!empty($_POST['image_order_choice']) + if (!empty($_POST['image_order_choice']) && in_array($_POST['image_order_choice'], $image_order_choices)) { $image_order_choice = $_POST['image_order_choice']; } - + if ($image_order_choice=='user_define') { for ($i=1; $i<=3; $i++) @@ -141,7 +141,7 @@ UPDATE '.CATEGORIES_TABLE.' SET image_order=\''.$image_order.'\' if (isset($_POST['image_order_subcats'])) { $cat_info = get_cat_info($page['category_id']); - + $query = ' UPDATE '.CATEGORIES_TABLE.' SET image_order = '.(isset($image_order) ? '\''.$image_order.'\'' : 'NULL').' @@ -172,7 +172,7 @@ if ($category['image_order']=='rank') { $image_order_choice = 'rank'; } -elseif ($category['image_order']!='') +elseif ($category['image_order']!='') { $image_order_choice = 'user_define'; } @@ -217,7 +217,7 @@ if (pwg_db_num_rows($result) > 0) while ($row = pwg_db_fetch_assoc($result)) { $src = get_thumbnail_url($row); - + $thumbnail_size = getimagesize($src); if ( !empty( $row['name'] ) ) { @@ -273,7 +273,7 @@ $sort_fields = array( '' => '', 'date_creation' => l10n('Creation date'), 'date_available' => l10n('Post date'), - 'average_rate' => l10n('Rating score'), + 'rating_score' => l10n('Rating score'), 'hit' => l10n('Most visited'), 'file' => l10n('File name'), 'id' => 'Id', diff --git a/admin/rating.php b/admin/rating.php index 339f3044a..5d5a1971c 100644 --- a/admin/rating.php +++ b/admin/rating.php @@ -164,7 +164,7 @@ SELECT i.id, i.path, i.file, i.tn_ext, - i.average_rate AS score, + i.rating_score AS score, MAX(r.date) AS recently_rated, ROUND(AVG(r.rate),2) AS avg_rates, COUNT(r.rate) AS nb_rates, @@ -176,7 +176,7 @@ SELECT i.id, i.path, i.file, i.tn_ext, - i.average_rate, + i.rating_score, r.element_id ORDER BY ' . $available_order_by[$order_by_index][1] .' LIMIT '.$elements_per_page.' OFFSET '.$start.' diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl index 9162cad18..895d52295 100644 --- a/admin/themes/default/template/configuration.tpl +++ b/admin/themes/default/template/configuration.tpl @@ -416,7 +416,7 @@ jQuery(document).ready(function () { <li> <label> <span class="property">{'Rating score'|@translate}</span> - <input type="checkbox" name="picture_informations[average_rate]" {if ($display.picture_informations.average_rate)}checked="checked"{/if}> + <input type="checkbox" name="picture_informations[rating_score]" {if ($display.picture_informations.rating_score)}checked="checked"{/if}> </label> </li> |