Skip to:
Content

bbPress.org

Changeset 1274


Ignore:
Timestamp:
03/11/2008 03:07:54 AM (14 years ago)
Author:
mdawaffe
Message:

number of days should be an integer. Fixes #812 for branches/0.8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.8/bb-includes/statistics-functions.php

    r1078 r1274  
    6666}
    6767function get_registrations_per_day() {
    68     return get_total_users() / ( time() - bb_get_inception( 'timestamp' ) ) * 3600 * 24;
     68    return get_total_users() / ceil( ( time() - bb_get_inception( 'timestamp' ) ) / 3600 / 24 );
    6969}
    7070
     
    7474
    7575function get_posts_per_day() {
    76     return get_total_posts() / ( time() - bb_get_inception( 'timestamp' ) ) * 3600 * 24;
     76    return get_total_posts() / ceil( ( time() - bb_get_inception( 'timestamp' ) ) / 3600 / 24 );
    7777}
    7878
     
    8282
    8383function get_topics_per_day() {
    84     return get_total_topics() / ( time() - bb_get_inception( 'timestamp' ) ) * 3600 * 24;
     84    return get_total_topics() / ceil( ( time() - bb_get_inception( 'timestamp' ) ) / 3600 / 24 );
    8585}
    8686
Note: See TracChangeset for help on using the changeset viewer.