Changeset 3814
- Timestamp:
- 05/31/2006 06:03:55 AM (20 years ago)
- File:
-
- 1 edited
-
branches/2.0/wp-content/plugins/wp-db-backup.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/wp-content/plugins/wp-db-backup.php
r3447 r3814 37 37 38 38 function wpdbBackup() { 39 40 39 add_action('wp_cron_daily', array(&$this, 'wp_cron_daily')); 41 40 … … 44 43 45 44 if (isset($_POST['do_backup'])) { 45 if ( !current_user_can('import') ) die(__('You are not allowed to perform backups.')); 46 46 switch($_POST['do_backup']) { 47 47 case 'backup': … … 53 53 } 54 54 } elseif (isset($_GET['fragment'] )) { 55 if ( !current_user_can('import') ) die(__('You are not allowed to perform backups.')); 55 56 add_action('init', array(&$this, 'init')); 56 57 } elseif (isset($_GET['backup'] )) { 58 if ( !current_user_can('import') ) die(__('You are not allowed to perform backups.')); 57 59 add_action('init', array(&$this, 'init')); 58 60 } else { 61 if ( !current_user_can('import') ) die(__('You are not allowed to perform backups.')); 59 62 add_action('admin_menu', array(&$this, 'admin_menu')); 60 63 } … … 62 65 63 66 function init() { 64 global $user_level; 65 get_currentuserinfo(); 66 67 if ($user_level < 9) die(__('Need higher user level.')); 67 if ( !current_user_can('import') ) die(__('You are not allowed to perform backups.')); 68 68 69 69 if (isset($_GET['backup'])) { … … 308 308 $core_tables = $_POST['core_tables']; 309 309 $this->backup_file = $this->db_backup($core_tables, $also_backup); 310 if (FALSE !== $ backup_file) {310 if (FALSE !== $this->backup_file) { 311 311 if ('smtp' == $_POST['deliver']) { 312 312 $this->deliver_backup ($this->backup_file, $_POST['deliver'], $_POST['backup_recipient']);
Note: See TracChangeset
for help on using the changeset viewer.