Changeset 25614 for trunk/include/functions_rate.inc.php
- Timestamp:
- Nov 21, 2013, 11:02:44 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_rate.inc.php
r19703 r25614 23 23 24 24 /** 25 * rate a picture by a user 25 * @package functions\rate 26 */ 27 28 29 /** 30 * Rate a picture by the current user. 26 31 * 27 * @param int image identifier28 * @param intrate29 * @return void32 * @param int $image_id 33 * @param float $rate 34 * @return array as return by update_rating_score() 30 35 */ 31 36 function rate_picture($image_id, $rate) … … 121 126 122 127 123 /* update images.rating_score field 124 * we use a bayesian average (http://en.wikipedia.org/wiki/Bayesian_average) with 125 C = average number of rates per item 126 m = global average rate (all rates) 127 128 * param int $element_id optional, otherwise applies to all 129 * @return array(rating_score, count) if element_id is specified 128 /** 129 * Update images.rating_score field. 130 * We use a bayesian average (http://en.wikipedia.org/wiki/Bayesian_average) with 131 * C = average number of rates per item 132 * m = global average rate (all rates) 133 * 134 * @param int|false $element_id if false applies to all 135 * @return array (score, average, count) values are null if $element_id is false 130 136 */ 131 137 function update_rating_score($element_id = false)
Note: See TracChangeset
for help on using the changeset viewer.