Version Description
Download this release
Release Info
Developer | GamerZ |
Plugin | WP-DBManager |
Version | 2.80.6 |
Comparing to | |
See all releases |
Code changes from version 2.80.5 to 2.80.6
- database-backup.php +1 -1
- database-empty.php +1 -1
- database-manage.php +1 -1
- database-manager.php +1 -1
- database-optimize.php +1 -1
- database-repair.php +1 -1
- database-run.php +1 -1
- readme.txt +5 -2
- wp-dbmanager.php +13 -14
database-backup.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
### Check Whether User Can Manage Database
|
3 |
-
if(!current_user_can('
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
|
1 |
<?php
|
2 |
### Check Whether User Can Manage Database
|
3 |
+
if( ! current_user_can('edit_files') ) {
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
|
database-empty.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
### Check Whether User Can Manage Database
|
3 |
-
if(!current_user_can('
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
|
1 |
<?php
|
2 |
### Check Whether User Can Manage Database
|
3 |
+
if( ! current_user_can('edit_files') ) {
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
|
database-manage.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
### Check Whether User Can Manage Database
|
3 |
-
if(!current_user_can('
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
|
1 |
<?php
|
2 |
### Check Whether User Can Manage Database
|
3 |
+
if( ! current_user_can('edit_files') ) {
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
|
database-manager.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
### Check Whether User Can Manage Database
|
3 |
-
if(!current_user_can('
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
|
1 |
<?php
|
2 |
### Check Whether User Can Manage Database
|
3 |
+
if( ! current_user_can('edit_files') ) {
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
|
database-optimize.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
### Check Whether User Can Manage Database
|
3 |
-
if(!current_user_can('
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
|
1 |
<?php
|
2 |
### Check Whether User Can Manage Database
|
3 |
+
if( ! current_user_can('edit_files') ) {
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
|
database-repair.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
### Check Whether User Can Manage Database
|
3 |
-
if(!current_user_can('
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
|
1 |
<?php
|
2 |
### Check Whether User Can Manage Database
|
3 |
+
if( ! current_user_can('edit_files') ) {
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
|
database-run.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
### Check Whether User Can Manage Database
|
3 |
-
if(!current_user_can('
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
|
1 |
<?php
|
2 |
### Check Whether User Can Manage Database
|
3 |
+
if( ! current_user_can('edit_files') ) {
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: GamerZ
|
|
3 |
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:
|
7 |
-
Stable tag: 2.80.
|
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.5
|
46 |
* FIXED: Changed utf8 to utf8mb4 for backing up
|
47 |
|
3 |
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 |
* 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 |
+
|
48 |
### Version 2.80.5
|
49 |
* FIXED: Changed utf8 to utf8mb4 for backing up
|
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.
|
7 |
Author: Lester 'GaMerZ' Chan
|
8 |
Author URI: https://lesterchan.net
|
9 |
Text Domain: wp-dbmanager
|
@@ -11,7 +11,7 @@ Text Domain: wp-dbmanager
|
|
11 |
|
12 |
|
13 |
/*
|
14 |
-
Copyright
|
15 |
|
16 |
This program is free software; you can redistribute it and/or modify
|
17 |
it under the terms of the GNU General Public License as published by
|
@@ -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'), '
|
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'), '
|
47 |
-
add_submenu_page('wp-dbmanager/database-manager.php', __('Manage Backup DB', 'wp-dbmanager'), __('Manage Backup DB', 'wp-dbmanager'), '
|
48 |
-
add_submenu_page('wp-dbmanager/database-manager.php', __('Optimize DB', 'wp-dbmanager'), __('Optimize DB', 'wp-dbmanager'), '
|
49 |
-
add_submenu_page('wp-dbmanager/database-manager.php', __('Repair DB', 'wp-dbmanager'), __('Repair DB', 'wp-dbmanager'), '
|
50 |
-
add_submenu_page('wp-dbmanager/database-manager.php', __('Empty/Drop Tables', 'wp-dbmanager'), __('Empty/Drop Tables', 'wp-dbmanager'), '
|
51 |
-
add_submenu_page('wp-dbmanager/database-manager.php', __('Run SQL Query', 'wp-dbmanager'), __('Run SQL Query', 'wp-dbmanager'), '
|
52 |
-
add_submenu_page('wp-dbmanager/database-manager.php', __('DB Options', 'wp-dbmanager'), __('DB Options', 'wp-dbmanager'), '
|
53 |
}
|
54 |
}
|
55 |
|
@@ -496,11 +496,10 @@ function dbmanager_activation( $network_wide ) {
|
|
496 |
function dbmanager_activate() {
|
497 |
dbmanager_create_backup_folder();
|
498 |
|
499 |
-
//
|
500 |
$role = get_role( 'administrator' );
|
501 |
-
if(
|
502 |
-
|
503 |
-
$role->add_cap( 'manage_database' );
|
504 |
}
|
505 |
}
|
506 |
|
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
|
11 |
|
12 |
|
13 |
/*
|
14 |
+
Copyright 2022 Lester Chan (email : lesterchan@gmail.com)
|
15 |
|
16 |
This program is free software; you can redistribute it and/or modify
|
17 |
it under the terms of the GNU General Public License as published by
|
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 |
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' );
|
|
|
503 |
}
|
504 |
}
|
505 |
|