Skip to content

Commit

Permalink
sql backups list now show only files
Browse files Browse the repository at this point in the history
  • Loading branch information
nightflyza committed Apr 10, 2019
1 parent f81fb38 commit f9a70dd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.7 rev 6772
0.9.7 rev 6773
32 changes: 17 additions & 15 deletions modules/general/backups/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,23 @@ function web_AvailableDBBackupsList() {
$rows = wf_TableRow($cells, 'row1');

foreach ($availbacks as $eachDump) {
$fileDate = filectime($backupsPath . $eachDump);
$fileDate = date("Y-m-d H:i:s", $fileDate);
$fileSize = filesize($backupsPath . $eachDump);
$fileSize = stg_convert_size($fileSize);
$encodedDumpPath = base64_encode($backupsPath . $eachDump);
$downloadLink = wf_Link('?module=backups&download=' . $encodedDumpPath, $eachDump, false, '');
$actLinks = wf_JSAlert('?module=backups&deletedump=' . $encodedDumpPath, web_delete_icon(), __('Removing this may lead to irreparable results')) . ' ';
$actLinks.= wf_Link('?module=backups&download=' . $encodedDumpPath, wf_img('skins/icon_download.png', __('Download')), false, '');
$actLinks.= wf_JSAlert('?module=backups&restore=true&restoredump=' . $encodedDumpPath, wf_img('skins/icon_restoredb.png', __('Restore DB')), __('Are you serious'));

$cells = wf_TableCell($fileDate);
$cells.= wf_TableCell($fileSize);
$cells.= wf_TableCell($downloadLink);
$cells.= wf_TableCell($actLinks);
$rows.= wf_TableRow($cells, 'row3');
if (is_file($backupsPath . $eachDump)) {
$fileDate = filectime($backupsPath . $eachDump);
$fileDate = date("Y-m-d H:i:s", $fileDate);
$fileSize = filesize($backupsPath . $eachDump);
$fileSize = stg_convert_size($fileSize);
$encodedDumpPath = base64_encode($backupsPath . $eachDump);
$downloadLink = wf_Link('?module=backups&download=' . $encodedDumpPath, $eachDump, false, '');
$actLinks = wf_JSAlert('?module=backups&deletedump=' . $encodedDumpPath, web_delete_icon(), __('Removing this may lead to irreparable results')) . ' ';
$actLinks.= wf_Link('?module=backups&download=' . $encodedDumpPath, wf_img('skins/icon_download.png', __('Download')), false, '');
$actLinks.= wf_JSAlert('?module=backups&restore=true&restoredump=' . $encodedDumpPath, wf_img('skins/icon_restoredb.png', __('Restore DB')), __('Are you serious'));

$cells = wf_TableCell($fileDate);
$cells.= wf_TableCell($fileSize);
$cells.= wf_TableCell($downloadLink);
$cells.= wf_TableCell($actLinks);
$rows.= wf_TableRow($cells, 'row3');
}
}
$result = wf_TableBody($rows, '100%', '0', 'sortable');
}
Expand Down

0 comments on commit f9a70dd

Please sign in to comment.