You are here

function hosting_site_backup_list in Hostmaster (Aegir) 6

Retrieve a list of backup generated for a site.

Parameters

site: The node if of the site backups are being retrieved for

Return value

An associative array of backups existing for the site, indexed by bid and sorted reverse chronologically.

2 calls to hosting_site_backup_list()
hosting_task_backup_delete_form in modules/hosting/task/hosting_task.module
hosting_task_restore_form in modules/hosting/task/hosting_task.module
Customize the task confirmation form for restore.

File

modules/hosting/site/hosting_site.backups.inc, line 54
Site backup functions.

Code

function hosting_site_backup_list($site) {
  $result = db_query("SELECT bid, description, size, timestamp FROM {hosting_site_backups} WHERE site=%d ORDER BY timestamp DESC", $site);
  while ($object = db_fetch_object($result)) {

    #needs to be cleaned up. but i am NOT generating a theme func for this right now.
    $backups[$object->bid] = '<strong>' . format_date($object->timestamp) . '</strong> - ' . format_size($object->size) . ' - ' . filter_xss($object->description);
  }
  return $backups;
}