Feature #11266 ยป 0001-Add-option-to-list-ACB-restores-in-reverse-order.-Fe.patch
| src/etc/inc/acb.inc | ||
|---|---|---|
| 338 | 338 |
// Create a crontab entry for scheduled backups |
| 339 | 339 |
// if frequency == "cron", a new crontab entry is created, otherwise any existing |
| 340 | 340 |
// ACB entry is removed |
| 341 |
function setup_ACB($enable, $hint, $frequency, $minute, $hours, $month, $day, $dow, $numman, $pwd) {
|
|
| 341 |
function setup_ACB($enable, $hint, $frequency, $minute, $hours, $month, $day, $dow, $numman, $reverse, $pwd) {
|
|
| 342 | 342 |
global $config; |
| 343 | 343 | |
| 344 | 344 |
init_config_arr(array('system', 'acb'));
|
| ... | ... | |
| 357 | 357 |
$config['system']['acb']['day'] = $day; |
| 358 | 358 |
$config['system']['acb']['dow'] = $dow; |
| 359 | 359 |
$config['system']['acb']['numman'] = $numman; |
| 360 |
$config['system']['acb']['reverse'] = $reverse; |
|
| 360 | 361 |
if (strlen($pwd) >= 8) {
|
| 361 | 362 |
$config['system']['acb']['encryption_password'] = $pwd; |
| 362 | 363 |
} |
| src/usr/local/www/services_acb.php | ||
|---|---|---|
| 412 | 412 | |
| 413 | 413 |
<?php |
| 414 | 414 |
$counter = 0; |
| 415 |
if ($config['system']['acb']['reverse'] == "yes"){
|
|
| 416 |
$confvers = array_reverse($confvers); |
|
| 417 |
} |
|
| 418 | ||
| 415 | 419 |
foreach ($confvers as $cv): |
| 416 | 420 |
?> |
| 417 | 421 |
<tr> |
| src/usr/local/www/services_acb_settings.php | ||
|---|---|---|
| 92 | 92 |
$pconfig['day'], |
| 93 | 93 |
$pconfig['dow'], |
| 94 | 94 |
$pconfig['numman'], |
| 95 |
$pconfig['reverse'], |
|
| 95 | 96 |
$pwd |
| 96 | 97 |
); |
| 97 | 98 |
} |
| ... | ... | |
| 207 | 208 |
))->setHelp("It may be useful to specify how many manual backups are retained on the server so that automatic backups do not overwrite them." .
|
| 208 | 209 |
"A maximum of 50 retained manual backups (of the 100 total backups) is permitted."); |
| 209 | 210 | |
| 211 |
$section->addInput(new Form_Checkbox( |
|
| 212 |
'reverse', |
|
| 213 |
'Reverse List', |
|
| 214 |
'List backups in reverse order', |
|
| 215 |
($pconfig['reverse'] == "yes") |
|
| 216 |
))->setHelp("List backups in reverse order (newest first) when viewing the restore section.");
|
|
| 217 | ||
| 210 | 218 |
$form->add($section); |
| 211 | 219 | |
| 212 | 220 |
print $form; |