You are here

protected function StatsPro::add_day_data in Statistics Pro 6.2

Same name and namespace in other branches
  1. 6 statspro.inc \statspro::add_day_data()

Add day data.

Parameters

string $date:

int $amount:

8 calls to StatsPro::add_day_data()
StatsPro::get_data_auser in ./statspro.inc
Returns the number of authenticated users that accessed the site per day since the last run.
StatsPro::get_data_cnode in ./statspro.inc
Returns the number of nodes changed per day since the last run.
StatsPro::get_data_comment in ./statspro.inc
Returns the number of new comments created per day since the last run.
StatsPro::get_data_nnode in ./statspro.inc
Returns the number of new nodes created per day since the last run.
StatsPro::get_data_nuser in ./statspro.inc
Returns the number of new users registered per day since the last run.

... See full list

File

./statspro.inc, line 625
statspro class for Statistics Pro module.

Class

StatsPro
Manages the data saving and retrieval according to the user defined parameters.

Code

protected function add_day_data($date, $amount) {
  if (!empty($date)) {
    $amount = (int) $amount;
    if (isset($this->days[$date][$this->current_field]) && $this->days[$date][$this->current_field] > 0) {
      $this->days[$date][$this->current_field] += $amount;
    }
    else {
      $this->days[$date][$this->current_field] = $amount;
    }
  }
}