Ignore:
Timestamp:
Nov 21, 2013, 11:02:44 AM (10 years ago)
Author:
mistic100
Message:

feature 2999: documentation of functions_rate and functions_session

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_rate.inc.php

    r19703 r25614  
    2323
    2424/**
    25  * rate a picture by a user
     25 * @package functions\rate
     26 */
     27
     28
     29/**
     30 * Rate a picture by the current user.
    2631 *
    27  * @param int image identifier
    28  * @param int rate
    29  * @return void
     32 * @param int $image_id
     33 * @param float $rate
     34 * @return array as return by update_rating_score()
    3035 */
    3136function rate_picture($image_id, $rate)
     
    121126
    122127
    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
    130136*/
    131137function update_rating_score($element_id = false)
Note: See TracChangeset for help on using the changeset viewer.