From a9c6ba939110501f5d6a7b95e0ebbd59db552b89 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 31 May 2006 06:33:37 +0000 Subject: [PATCH] Backup plugin fixes. git-svn-id: http://svn.automattic.com/wordpress/trunk@3818 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/plugins/wp-db-backup.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-content/plugins/wp-db-backup.php b/wp-content/plugins/wp-db-backup.php index e25c401b56..cb2764ac06 100644 --- a/wp-content/plugins/wp-db-backup.php +++ b/wp-content/plugins/wp-db-backup.php @@ -60,7 +60,6 @@ class wpdbBackup { if ( !current_user_can('import') ) die(__('You are not allowed to perform backups.')); add_action('init', array(&$this, 'init')); } else { - if ( !current_user_can('import') ) die(__('You are not allowed to perform backups.')); add_action('admin_menu', array(&$this, 'admin_menu')); } } @@ -883,6 +882,13 @@ class wpdbBackup { } // wp_cron_db_backup } -$mywpdbbackup = new wpdbBackup(); +function wpdbBackup_init() { + global $mywpdbbackup; + $mywpdbbackup = new wpdbBackup(); +} + +add_action('plugins_loaded', 'wpdbBackup_init'); + + ?>