You are here

function hosting_site_backup_list in Hosting 6.2

Same name and namespace in other branches
  1. 5 site/hosting_site.module \hosting_site_backup_list()
  2. 7.4 site/hosting_site.backups.inc \hosting_site_backup_list()
  3. 7.3 site/hosting_site.backups.inc \hosting_site_backup_list()

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 site/hosting_site.backups.inc
Implements hosting_task_TASK_TYPE_form().
hosting_task_restore_form in task/hosting_task.module
Customize the task confirmation form for restore.

File

site/hosting_site.backups.inc, line 53
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;
}