WP-DBManager - Version 2.80.7

Version Description

Download this release

Release Info

Developer GamerZ
Plugin Icon WP-DBManager
Version 2.80.7
Comparing to
See all releases

Code changes from version 2.80.6 to 2.80.7

database-empty.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  ### Check Whether User Can Manage Database
3
- if( ! current_user_can('edit_files') ) {
4
- die('Access Denied');
5
  }
6
 
7
 
1
  <?php
2
  ### Check Whether User Can Manage Database
3
+ if ( ! current_user_can( 'install_plugins' ) ) {
4
+ die( 'Access Denied' );
5
  }
6
 
7
 
database-manage.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  ### Check Whether User Can Manage Database
3
- if( ! current_user_can('edit_files') ) {
4
- die('Access Denied');
5
  }
6
 
7
 
1
  <?php
2
  ### Check Whether User Can Manage Database
3
+ if ( ! current_user_can( 'install_plugins' ) ) {
4
+ die( 'Access Denied' );
5
  }
6
 
7
 
database-manager.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  ### Check Whether User Can Manage Database
3
- if( ! current_user_can('edit_files') ) {
4
- die('Access Denied');
5
  }
6
 
7
 
1
  <?php
2
  ### Check Whether User Can Manage Database
3
+ if ( ! current_user_can( 'install_plugins' ) ) {
4
+ die( 'Access Denied' );
5
  }
6
 
7
 
database-optimize.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  ### Check Whether User Can Manage Database
3
- if( ! current_user_can('edit_files') ) {
4
- die('Access Denied');
5
  }
6
 
7
 
1
  <?php
2
  ### Check Whether User Can Manage Database
3
+ if ( ! current_user_can( 'install_plugins' ) ) {
4
+ die( 'Access Denied' );
5
  }
6
 
7
 
database-repair.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  ### Check Whether User Can Manage Database
3
- if( ! current_user_can('edit_files') ) {
4
- die('Access Denied');
5
  }
6
 
7
 
1
  <?php
2
  ### Check Whether User Can Manage Database
3
+ if ( ! current_user_can( 'install_plugins' ) ) {
4
+ die( 'Access Denied' );
5
  }
6
 
7
 
database-run.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  ### Check Whether User Can Manage Database
3
- if( ! current_user_can('edit_files') ) {
4
- die('Access Denied');
5
  }
6
 
7
 
1
  <?php
2
  ### Check Whether User Can Manage Database
3
+ if ( ! current_user_can( 'install_plugins' ) ) {
4
+ die( 'Access Denied' );
5
  }
6
 
7
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://lesterchan.net/site/donation/
4
  Tags: database, manage, wp-dbmanager, manager, table, optimize, backup, queries, query, drop, empty, tables, table, run, repair, cron, schedule, scheduling, automatic
5
  Requires at least: 4.0
6
  Tested up to: 6.0
7
- Stable tag: 2.80.6
8
 
9
  Manages your WordPress database.
10
 
@@ -42,6 +42,9 @@ Allows you to optimize database, repair database, backup database, restore datab
42
  * To know about the difference between WP-DBManager and WP-DB-backup, checkout __What is the difference between WP-DBManager and WP-DB-Backup?__ in the [FAQ section](https://wordpress.org/plugins/wp-dbmanager/faq/).
43
 
44
  ## Changelog
 
 
 
45
  ### Version 2.80.6
46
  * FIXED: Remove 'manage_database' and use 'edit_files' to check for capability instead.
47
 
4
  Tags: database, manage, wp-dbmanager, manager, table, optimize, backup, queries, query, drop, empty, tables, table, run, repair, cron, schedule, scheduling, automatic
5
  Requires at least: 4.0
6
  Tested up to: 6.0
7
+ Stable tag: 2.80.7
8
 
9
  Manages your WordPress database.
10
 
42
  * To know about the difference between WP-DBManager and WP-DB-backup, checkout __What is the difference between WP-DBManager and WP-DB-Backup?__ in the [FAQ section](https://wordpress.org/plugins/wp-dbmanager/faq/).
43
 
44
  ## Changelog
45
+ ### Version 2.80.7
46
+ * FIXED: Changed 'edit_files' capability to 'install_plugins' instead.
47
+
48
  ### Version 2.80.6
49
  * FIXED: Remove 'manage_database' and use 'edit_files' to check for capability instead.
50
 
wp-dbmanager.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP-DBManager
4
  Plugin URI: https://lesterchan.net/portfolio/programming/php/
5
  Description: Manages your WordPress database. Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up, optimizing and repairing of database.
6
- Version: 2.80.6
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: https://lesterchan.net
9
  Text Domain: wp-dbmanager
@@ -40,16 +40,16 @@ function dbmanager_textdomain() {
40
  add_action('admin_menu', 'dbmanager_menu');
41
  function dbmanager_menu() {
42
  if (function_exists('add_menu_page')) {
43
- add_menu_page(__('Database', 'wp-dbmanager'), __('Database', 'wp-dbmanager'), 'edit_files', 'wp-dbmanager/database-manager.php', '', 'dashicons-archive');
44
  }
45
  if (function_exists('add_submenu_page')) {
46
- add_submenu_page('wp-dbmanager/database-manager.php', __('Backup DB', 'wp-dbmanager'), __('Backup DB', 'wp-dbmanager'), 'edit_files', 'wp-dbmanager/database-backup.php');
47
- add_submenu_page('wp-dbmanager/database-manager.php', __('Manage Backup DB', 'wp-dbmanager'), __('Manage Backup DB', 'wp-dbmanager'), 'edit_files', 'wp-dbmanager/database-manage.php');
48
- add_submenu_page('wp-dbmanager/database-manager.php', __('Optimize DB', 'wp-dbmanager'), __('Optimize DB', 'wp-dbmanager'), 'edit_files', 'wp-dbmanager/database-optimize.php');
49
- add_submenu_page('wp-dbmanager/database-manager.php', __('Repair DB', 'wp-dbmanager'), __('Repair DB', 'wp-dbmanager'), 'edit_files', 'wp-dbmanager/database-repair.php');
50
- add_submenu_page('wp-dbmanager/database-manager.php', __('Empty/Drop Tables', 'wp-dbmanager'), __('Empty/Drop Tables', 'wp-dbmanager'), 'edit_files', 'wp-dbmanager/database-empty.php');
51
- add_submenu_page('wp-dbmanager/database-manager.php', __('Run SQL Query', 'wp-dbmanager'), __('Run SQL Query', 'wp-dbmanager'), 'edit_files', 'wp-dbmanager/database-run.php');
52
- add_submenu_page('wp-dbmanager/database-manager.php', __('DB Options', 'wp-dbmanager'), __('DB Options', 'wp-dbmanager'), 'edit_files', 'wp-dbmanager/wp-dbmanager.php', 'dbmanager_options');
53
  }
54
  }
55
 
@@ -496,7 +496,7 @@ function dbmanager_activation( $network_wide ) {
496
  function dbmanager_activate() {
497
  dbmanager_create_backup_folder();
498
 
499
- // Remove 'manage_database', we use 'edit_files' from 2.80.6
500
  $role = get_role( 'administrator' );
501
  if( $role->has_cap( 'manage_database') ) {
502
  $role->remove_cap( 'manage_database' );
3
  Plugin Name: WP-DBManager
4
  Plugin URI: https://lesterchan.net/portfolio/programming/php/
5
  Description: Manages your WordPress database. Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up, optimizing and repairing of database.
6
+ Version: 2.80.7
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: https://lesterchan.net
9
  Text Domain: wp-dbmanager
40
  add_action('admin_menu', 'dbmanager_menu');
41
  function dbmanager_menu() {
42
  if (function_exists('add_menu_page')) {
43
+ add_menu_page(__('Database', 'wp-dbmanager'), __('Database', 'wp-dbmanager'), 'install_plugins', 'wp-dbmanager/database-manager.php', '', 'dashicons-archive');
44
  }
45
  if (function_exists('add_submenu_page')) {
46
+ add_submenu_page('wp-dbmanager/database-manager.php', __('Backup DB', 'wp-dbmanager'), __('Backup DB', 'wp-dbmanager'), 'install_plugins', 'wp-dbmanager/database-backup.php');
47
+ add_submenu_page('wp-dbmanager/database-manager.php', __('Manage Backup DB', 'wp-dbmanager'), __('Manage Backup DB', 'wp-dbmanager'), 'install_plugins', 'wp-dbmanager/database-manage.php');
48
+ add_submenu_page('wp-dbmanager/database-manager.php', __('Optimize DB', 'wp-dbmanager'), __('Optimize DB', 'wp-dbmanager'), 'install_plugins', 'wp-dbmanager/database-optimize.php');
49
+ add_submenu_page('wp-dbmanager/database-manager.php', __('Repair DB', 'wp-dbmanager'), __('Repair DB', 'wp-dbmanager'), 'install_plugins', 'wp-dbmanager/database-repair.php');
50
+ add_submenu_page('wp-dbmanager/database-manager.php', __('Empty/Drop Tables', 'wp-dbmanager'), __('Empty/Drop Tables', 'wp-dbmanager'), 'install_plugins', 'wp-dbmanager/database-empty.php');
51
+ add_submenu_page('wp-dbmanager/database-manager.php', __('Run SQL Query', 'wp-dbmanager'), __('Run SQL Query', 'wp-dbmanager'), 'install_plugins', 'wp-dbmanager/database-run.php');
52
+ add_submenu_page('wp-dbmanager/database-manager.php', __('DB Options', 'wp-dbmanager'), __('DB Options', 'wp-dbmanager'), 'install_plugins', 'wp-dbmanager/wp-dbmanager.php', 'dbmanager_options');
53
  }
54
  }
55
 
496
  function dbmanager_activate() {
497
  dbmanager_create_backup_folder();
498
 
499
+ // Remove 'manage_database', we use 'install_plugins' from 2.80.6
500
  $role = get_role( 'administrator' );
501
  if( $role->has_cap( 'manage_database') ) {
502
  $role->remove_cap( 'manage_database' );