You are here

function progress_get_progress in Progress 6

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

Get progress

Parameters

string $name: Name of progress

Return value

object Object containing all the progress data

File

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

Code

function progress_get_progress($name) {
  $result = db_fetch_object(db_query("SELECT name, progress, message, start_stamp, end_stamp, current_stamp FROM {progress} WHERE name = '%s'", $name));
  if ($result) {
    $result->start = $result->start_stamp;
    $result->end = $result->end_stamp;
    $result->current = $result->current_stamp;
  }
  return $result;
}