From bc427e4a8e2db884f063f070f7b5623937008612 Mon Sep 17 00:00:00 2001 From: Fawaz Date: Wed, 25 May 2011 11:34:26 +0000 Subject: [PATCH] Added : New sqlQuery Updated : show_rating function --- sql/2.4~2.4.5.txt | 2 ++ upload/includes/functions.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sql/2.4~2.4.5.txt b/sql/2.4~2.4.5.txt index 2af657de..51467c61 100644 --- a/sql/2.4~2.4.5.txt +++ b/sql/2.4~2.4.5.txt @@ -19,3 +19,5 @@ UPDATE `clipbucket_svn`.`cb_pages` SET `page_order` = '5' WHERE `cb_pages`.`page UPDATE `clipbucket_svn`.`cb_pages` SET `page_order` = '6' WHERE `cb_pages`.`page_id` =6 LIMIT 1 ; ALTER TABLE `cb_users` ADD `voted` TEXT NOT NULL AFTER `last_commented` + +INSERT INTO `clipbucket_svn`.`cb_config` (`configid`, `name`, `value`) VALUES (NULL, 'rating_style', 'percentage'); diff --git a/upload/includes/functions.php b/upload/includes/functions.php index 907d9ffb..c1281efa 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -2807,6 +2807,8 @@ $ratings = $params['ratings']; $total = $params['total']; $style = $params['style']; + if(empty($style)) + $style = config('rating_style'); //Checking Percent if($rating<=0) { $perc = '0'; $disperc = '0'; }