Beispiel #1
0
    }
    // If periodic looks to be running now, say so.
    $last_activity_ago = microtime(true) - $state['stats']['last_activity'];
    if ($last_activity_ago < backupbuddy_core::adjustedMaxExecutionTime() + 60) {
        $stats['next_periodic_restart'] = '-1';
        $stats['next_periodic_restart_pretty'] = __('In Progress...', 'it-l10n-backupbuddy');
    }
    // If db process running, say so.
    if ('database_snapshot' == $state['step']['function'] || 'send_pending_db_snapshots' == $state['step']['function'] || 'process_table_deletions' == $state['step']['function']) {
        $stats['next_db_snapshot'] = '-1';
        $stats['next_db_snapshot_pretty'] = __('In Progress...', 'it-l10n-backupbuddy');
    }
}
// Current function.
$stats['current_function'] = $state['step']['function'];
$stats['current_function_pretty'] = backupbuddy_live::pretty_function($state['step']['function']);
if ('database_snapshot' == $state['step']['function']) {
    // For db dump include current table count.
    if (count($state['step']['args']) > 0) {
        $total_tables = count($state['step']['args'][0]);
        $remaining_tables = count($state['step']['args'][1]);
        $sent_tables = $total_tables - $remaining_tables;
        $stats['current_function_pretty'] .= ' (' . $sent_tables . ' / ' . $total_tables . ' ' . __('tables', 'it-l10n-backupbuddy') . ')';
    }
}
// First completion.
$stats['first_completion'] = $state['stats']['first_completion'];
if (0 != $stats['first_completion']) {
    $stats['first_completion_pretty'] = pb_backupbuddy::$format->date(pb_backupbuddy::$format->localize_time($state['stats']['first_completion']));
    $stats['first_completion_ago'] = pb_backupbuddy::$format->time_ago($state['stats']['first_completion']);
}