From 61551a5880352fe00859959c4c36a2efd96885f6 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 31 May 2006 06:34:57 +0000 Subject: [PATCH] Backup plugin fixes. git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@3820 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/plugins/wp-db-backup.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-content/plugins/wp-db-backup.php b/wp-content/plugins/wp-db-backup.php index 49cfcd29f7..914135c5d0 100644 --- a/wp-content/plugins/wp-db-backup.php +++ b/wp-content/plugins/wp-db-backup.php @@ -58,7 +58,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')); } } @@ -884,6 +883,11 @@ class wpdbBackup { } // wp_cron_db_backup } -$mywpdbbackup = new wpdbBackup(); +function wpdbBackup_init() { + global $mywpdbbackup; + $mywpdbbackup = new wpdbBackup(); +} + +add_action('plugins_loaded', 'wpdbBackup_init'); ?>