Example #1
0
    }
    /*
    Unsure whether to include this here or not?
    if ( FALSE === ( strpos( $file, 'backup-' . $prefix . '-' ) ) ) { // Not a backup for THIS site. Skip.
    	continue;
    }
    */
    $last_modified = strtotime($object->LastModified);
    $size = (double) $object->Size;
    $backup_type = backupbuddy_core::getBackupTypeFromFile($file);
    // Generate array of table rows.
    while (isset($backup_list_temp[$last_modified])) {
        // Avoid collisions.
        $last_modified += 0.1;
    }
    $backup_list_temp[$last_modified] = array($file, pb_backupbuddy::$format->date(pb_backupbuddy::$format->localize_time($last_modified)) . '<br /><span class="description">(' . pb_backupbuddy::$format->time_ago($last_modified) . ' ago)</span>', pb_backupbuddy::$format->file_size($size), backupbuddy_core::pretty_backup_type($backup_type));
}
krsort($backup_list_temp);
$backup_list = array();
foreach ($backup_list_temp as $backup_item) {
    $backup_list[$backup_item[0]] = $backup_item;
}
unset($backup_list_temp);
$urlPrefix = pb_backupbuddy::ajax_url('remoteClient') . '&destination_id=' . htmlentities(pb_backupbuddy::_GET('destination_id'));
// Render table listing files.
if (count($backup_list) == 0) {
    echo '<b>';
    _e('You have not completed sending any backups to this S3 destination for this site yet.', 'it-l10n-backupbuddy');
    echo '</b>';
} else {
    pb_backupbuddy::$ui->list_table($backup_list, array('action' => pb_backupbuddy::ajax_url('remoteClient') . '&function=remoteClient&destination_id=' . htmlentities(pb_backupbuddy::_GET('destination_id')) . '&remote_path=' . htmlentities(pb_backupbuddy::_GET('remote_path')), 'columns' => array('Backup File', 'Uploaded <img src="' . pb_backupbuddy::plugin_url() . '/images/sort_down.png" style="vertical-align: 0px;" title="Sorted most recent first">', 'File Size', 'Type'), 'hover_actions' => array($urlPrefix . '&cpy_file=' => 'Copy to Local', $urlPrefix . '&downloadlink_file=' => 'Get download link'), 'hover_action_column_key' => '0', 'bulk_actions' => array('delete_backup' => 'Delete'), 'css' => 'width: 100%;'));
Example #2
0
    	continue;
    }
    */
    if ('' != $remotePath && !backupbuddy_core::startsWith(basename($file['filename']), $remotePath)) {
        // Only show backups for this site unless set to show all.
        continue;
    }
    $last_modified = $file['uploaded_timestamp'];
    $size = (double) $file['size'];
    $backup_type = backupbuddy_core::getBackupTypeFromFile($file['filename']);
    // Generate array of table rows.
    while (isset($backup_list_temp[$last_modified])) {
        // Avoid collisions.
        $last_modified += 0.1;
    }
    $backup_list_temp[$last_modified] = array(array(base64_encode($file['url']), '<span title="' . $file['filename'] . '">' . basename($file['filename']) . '</span>'), pb_backupbuddy::$format->date(pb_backupbuddy::$format->localize_time($last_modified)) . '<br /><span class="description">(' . pb_backupbuddy::$format->time_ago($last_modified) . ' ago)</span>', pb_backupbuddy::$format->file_size($size), backupbuddy_core::pretty_backup_type($backup_type));
}
krsort($backup_list_temp);
$backup_list = array();
foreach ($backup_list_temp as $backup_item) {
    $backup_list[$backup_item[0][0]] = $backup_item;
}
unset($backup_list_temp);
$urlPrefix = pb_backupbuddy::ajax_url('remoteClient') . '&destination_id=' . htmlentities(pb_backupbuddy::_GET('destination_id'));
$quota = pb_backupbuddy_destination_stash2::get_quota($settings);
echo pb_backupbuddy_destination_stash2::get_quota_bar($quota, $settings, true);
// Render table listing files.
if (count($backup_list) == 0) {
    echo '<center><br><b>';
    _e('You have not completed sending any backups to this destination for this site yet.', 'it-l10n-backupbuddy');
    echo '</b></center>';