You are here

function progress_get_progresses in Progress 6

Same name and namespace in other branches
  1. 8 progress.module \progress_get_progresses()
  2. 7 progress.module \progress_get_progresses()

Get all progresses

Return value

array Array of objects containing all progress data

File

./progress.module, line 140
Progress framework for keeping track of progresses

Code

function progress_get_progresses() {
  $progresses = array();
  $result = db_query("SELECT name, progress, message, start_stamp, end_stamp, current_stamp FROM {progress}");
  while ($progress = db_fetch_object($result)) {
    $progress->start = $progress->start_stamp;
    $progress->end = $progress->end_stamp;
    $progress->current = $progress->current_stamp;
    $progresses[$progress->name] = $progress;
  }
  return $progresses;
}