You are here

private function statspro::add_day_data in Statistics Pro 6

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

Add day data.

Parameters

string $date:

int $amount:

11 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_error in ./statspro.inc
Returns the number of total errors 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.

... See full list

File

./statspro.inc, line 473
statspro class for statistics pro module.

Class

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

Code

private 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;
    }
  }
}