<?php

if (!defined('FW')) {
    die('Forbidden');
}
/**
 * @var $post_id
 * @var FW_Extension_Backup $backup
 */
$backup = fw()->extensions->get('backup');
$time = $status = $cron = $storage = __('N/A', 'fw');
$action_list = array();
$backup_info = $backup->get_backup_info($post_id);
if (!$backup_info) {
    $backup_info = new FW_Backup_Info();
    $backup_info->set_failed_at(time());
    $backup_info->set_finished_at(time());
}
try {
    $cron = $backup->cron()->get_cron_job($backup_info->get_cron_job())->get_title();
} catch (FW_Backup_Exception $exception) {
}
try {
    $storage = $backup->get_storage($backup_info->get_storage())->get_title('on');
} catch (FW_Backup_Exception $exception) {
}
if ($backup_info->get_theme()) {
    $cron = __('Demo Install', 'fw');
}
if ($backup_info->is_imported()) {
    $status = __('Imported', 'fw');