Changeset 13565 for modules/branches
- Timestamp:
- 02/23/12 11:59:57 (1 year ago)
- Files:
-
- modules/branches/2.10/backup/bin/backup.php (modified) (2 diffs)
- modules/branches/2.10/backup/functions.inc/backup.php (modified) (4 diffs)
- modules/branches/2.10/backup/functions.inc/restore.php (modified) (1 diff)
- modules/branches/2.10/backup/page.backup.php (modified) (2 diffs)
- modules/branches/2.10/backup/views/backup/backup.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.10/backup/bin/backup.php
r13184 r13565 31 31 backup_log(_('Intializing Backup') . ' ' .$vars['id']); 32 32 $b->init(); 33 34 33 if ($b->b['bu_server'] == "0") { 35 34 //get lock to prevent backups from being run cuncurently … … 123 122 $b->run_hooks('post-backup'); 124 123 124 //disable registered trunks if requested 125 if ($b->b['diabletrunks'] == 'true') { 126 //TODO: do soemthing 127 } 128 129 //apply configs if requested 130 if ($b->b['applyconfigs'] == 'true') { 131 do_reload(); 132 } 125 133 backup_log(_('Backup successfully completed!')); 126 134 } modules/branches/2.10/backup/functions.inc/backup.php
r13184 r13565 37 37 case '': 38 38 $ret = array( 39 'applyconfigs' => '', 39 40 'bu_server' => '', 40 41 'cron_dom' => array(), … … 49 50 'delete_time_type' => '', 50 51 'delete_time' => 0, 52 'diabletrunks' => '', 51 53 'exclude' => '', 52 54 'host' => '', … … 131 133 132 134 //ensure bool's are initialized 133 $ret['restore'] = isset($ret['restore']) ? $ret['restore'] : false; 135 $ret['restore'] = isset($ret['restore']) ? $ret['restore'] : false; 136 $ret['applyconfigs'] = isset($ret['applyconfigs']) ? $ret['applyconfigs'] : false; 137 $ret['diabletrunks'] = isset($ret['diabletrunks']) ? $ret['diabletrunks'] : false; 134 138 135 139 //get items … … 220 224 case 'prebu_hook': 221 225 case 'prere_hook': 226 if ($value !== '') { 227 $data[] = array($var['id'], $key, '', $value); 228 } 229 break; 222 230 case 'restore': 223 //only save if we have a value 224 if ($value !== '') { 231 //only save if we have a value and we didnt select the local server 232 if ($value !== '' && $var['bu_server'] > 0) { 233 $data[] = array($var['id'], $key, '', $value); 234 } 235 break; 236 case 'diabletrunks': 237 case 'applyconfigs': 238 //only save if we have a value, we didnt select the local server, and were doing a restore 239 if ($value !== '' && $var['bu_server'] > 0 && $var['restore'] == 'true') { 225 240 $data[] = array($var['id'], $key, '', $value); 226 241 } modules/branches/2.10/backup/functions.inc/restore.php
r13562 r13565 584 584 585 585 } 586 586 587 ?> modules/branches/2.10/backup/page.backup.php
r12988 r13565 1 1 <?php 2 2 3 if (!defined('FREEPBX_IS_AUTH')) { die('No direct script access allowed'); } 3 4 $get_vars = array( 4 5 'action' => '', 6 'applyconfigs' => '', 5 7 'bu_server' => '', 6 8 'cron_dom' => array(), … … 15 17 'delete_time_type' => '', 16 18 'delete_time' => '', 19 'diabletrunks' => '', 17 20 'display' => '', 18 21 'exclude' => '', modules/branches/2.10/backup/views/backup/backup.php
r13560 r13565 132 132 133 133 //disbale trunks 134 $label = fpbx_label(_('Disable Registered trunks'),134 $label = fpbx_label(_('Disable Trunks'), 135 135 'After a restore, disable any trunks that use registration. This is helpfull to ' 136 136 . 'prevent the Primary sytem and the Standby systems from "fighting" for the ' … … 147 147 148 148 //apply configs 149 $label = fpbx_label(_('Apply Config after Restore'),149 $label = fpbx_label(_('Apply Configs'), 150 150 'Equivalence of clicking the red button, will happen automatically after a restore on a Standby system'); 151 151 $data = array(
