Version Description
[02/26/2021] = * BUG FIX: Field names INFORMATION_SCHEMA corrected
Download this release
Release Info
Developer | cageehv |
Plugin | Optimize Database after Deleting Revisions |
Version | 5.0.4 |
Comparing to | |
See all releases |
Code changes from version 5.0.3 to 5.0.4
- classes/odb-cleaner.php +9 -7
- readme.txt +6 -3
- rvg-optimize-database.php +4 -4
classes/odb-cleaner.php
CHANGED
@@ -1912,19 +1912,21 @@ function odb_confirm_delete() {
|
|
1912 |
$cnt++;
|
1913 |
|
1914 |
$sql = sprintf ("
|
1915 |
-
SELECT
|
1916 |
FROM information_schema.TABLES
|
1917 |
WHERE table_schema = '%s'
|
1918 |
AND table_name = '%s'
|
1919 |
", DB_NAME, $odb_class->odb_tables[$i][0]);
|
|
|
1920 |
$table_info = $wpdb->get_results($sql);
|
|
|
1921 |
|
1922 |
-
if($odb_class->odb_rvg_options["optimize_innodb"] == 'N' && strtolower($table_info[0]->
|
1923 |
// SKIP InnoDB tables
|
1924 |
$msg = __('InnoDB table: skipped...', 'rvg-optimize-database');
|
1925 |
} else {
|
1926 |
// v4.6.3
|
1927 |
-
if (@strtolower($table_info[0]->
|
1928 |
$result = $this->odb_optimize_myisam($odb_class->odb_tables[$i][0]);
|
1929 |
$msg = $result[0]->Msg_text;
|
1930 |
if ($msg == 'OK') {
|
@@ -1940,8 +1942,8 @@ function odb_confirm_delete() {
|
|
1940 |
} else {
|
1941 |
$msg = __('<span class="odb-optimized">TABLE OPTIMIZED</span>', 'rvg-optimize-database');
|
1942 |
}
|
1943 |
-
} // if (strtolower($table_info[0]->
|
1944 |
-
} // if($odb_class->odb_rvg_options["optimize_innodb"] == 'N' && strtolower($table_info[0]->
|
1945 |
|
1946 |
if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')) {
|
1947 |
?>
|
@@ -1949,8 +1951,8 @@ function odb_confirm_delete() {
|
|
1949 |
<td align="right" valign="top"><?php echo $cnt?>.</td>
|
1950 |
<td valign="top" class="odb-bold"><?php echo $odb_class->odb_tables[$i][0] ?></td>
|
1951 |
<td valign="top"><?php echo $msg ?></td>
|
1952 |
-
<td valign="top"><?php echo $table_info[0]->
|
1953 |
-
<td align="right" valign="top"><?php echo $table_info[0]->
|
1954 |
<td align="right" valign="top"><?php echo $odb_class->odb_utilities_obj->odb_format_size($table_info[0]->size) ?></td>
|
1955 |
</tr>
|
1956 |
<?php
|
1912 |
$cnt++;
|
1913 |
|
1914 |
$sql = sprintf ("
|
1915 |
+
SELECT ENGINE, (data_length + index_length) AS size, TABLE_ROWS
|
1916 |
FROM information_schema.TABLES
|
1917 |
WHERE table_schema = '%s'
|
1918 |
AND table_name = '%s'
|
1919 |
", DB_NAME, $odb_class->odb_tables[$i][0]);
|
1920 |
+
//echo $sql.'<br>';
|
1921 |
$table_info = $wpdb->get_results($sql);
|
1922 |
+
//print_r($table_info);
|
1923 |
|
1924 |
+
if($odb_class->odb_rvg_options["optimize_innodb"] == 'N' && strtolower($table_info[0]->ENGINE) == 'innodb') {
|
1925 |
// SKIP InnoDB tables
|
1926 |
$msg = __('InnoDB table: skipped...', 'rvg-optimize-database');
|
1927 |
} else {
|
1928 |
// v4.6.3
|
1929 |
+
if (@strtolower($table_info[0]->ENGINE) == 'myisam') {
|
1930 |
$result = $this->odb_optimize_myisam($odb_class->odb_tables[$i][0]);
|
1931 |
$msg = $result[0]->Msg_text;
|
1932 |
if ($msg == 'OK') {
|
1942 |
} else {
|
1943 |
$msg = __('<span class="odb-optimized">TABLE OPTIMIZED</span>', 'rvg-optimize-database');
|
1944 |
}
|
1945 |
+
} // if (strtolower($table_info[0]->ENGINE) == 'myisam')
|
1946 |
+
} // if($odb_class->odb_rvg_options["optimize_innodb"] == 'N' && strtolower($table_info[0]->ENGINE) == 'innodb')
|
1947 |
|
1948 |
if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')) {
|
1949 |
?>
|
1951 |
<td align="right" valign="top"><?php echo $cnt?>.</td>
|
1952 |
<td valign="top" class="odb-bold"><?php echo $odb_class->odb_tables[$i][0] ?></td>
|
1953 |
<td valign="top"><?php echo $msg ?></td>
|
1954 |
+
<td valign="top"><?php echo $table_info[0]->ENGINE ?></td>
|
1955 |
+
<td align="right" valign="top"><?php echo $table_info[0]->TABLE_ROWS ?></td>
|
1956 |
<td align="right" valign="top"><?php echo $odb_class->odb_utilities_obj->odb_format_size($table_info[0]->size) ?></td>
|
1957 |
</tr>
|
1958 |
<?php
|
readme.txt
CHANGED
@@ -9,9 +9,9 @@ Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
|
9 |
Contributors: cageehv
|
10 |
Requires at least: 2.8
|
11 |
Requires PHP: 5.0
|
12 |
-
Tested up to: 5.
|
13 |
-
Stable tag: 5.0.
|
14 |
-
Version: 5.0.
|
15 |
License: GPLv2 or later
|
16 |
|
17 |
== Description ==
|
@@ -111,6 +111,9 @@ http://cagewebdev.com/category/news-tech-art/wordpress/
|
|
111 |
* If you run the plugin from any of the sites, it will cleanup ALL the sites in the network!
|
112 |
|
113 |
== Changelog ==
|
|
|
|
|
|
|
114 |
= 5.0.3 [11/17/2020] =
|
115 |
* BUG FIX: Creating log table if not exists
|
116 |
|
9 |
Contributors: cageehv
|
10 |
Requires at least: 2.8
|
11 |
Requires PHP: 5.0
|
12 |
+
Tested up to: 5.8
|
13 |
+
Stable tag: 5.0.4
|
14 |
+
Version: 5.0.4
|
15 |
License: GPLv2 or later
|
16 |
|
17 |
== Description ==
|
111 |
* If you run the plugin from any of the sites, it will cleanup ALL the sites in the network!
|
112 |
|
113 |
== Changelog ==
|
114 |
+
= 5.0.4 [02/26/2021] =
|
115 |
+
* BUG FIX: Field names INFORMATION_SCHEMA corrected
|
116 |
+
|
117 |
= 5.0.3 [11/17/2020] =
|
118 |
* BUG FIX: Creating log table if not exists
|
119 |
|
rvg-optimize-database.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* @package Optimize Database after Deleting Revisions
|
4 |
-
* @version 5.0.
|
5 |
*/
|
6 |
/*
|
7 |
Plugin Name: Optimize Database after Deleting Revisions
|
@@ -10,7 +10,7 @@ Description: Optimizes the Wordpress Database after Cleaning it out
|
|
10 |
Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
11 |
Author URI: http://cagewebdev.com
|
12 |
Network: True
|
13 |
-
Version: 5.0.
|
14 |
*/
|
15 |
|
16 |
/********************************************************************************************
|
@@ -28,8 +28,8 @@ $odb_class = new OptimizeDatabase();
|
|
28 |
|
29 |
class OptimizeDatabase {
|
30 |
// VERSION
|
31 |
-
var $odb_version = '5.0.
|
32 |
-
var $odb_release_date = '
|
33 |
|
34 |
// PLUGIN OPTIONS
|
35 |
var $odb_rvg_options = array();
|
1 |
<?php
|
2 |
/**
|
3 |
* @package Optimize Database after Deleting Revisions
|
4 |
+
* @version 5.0.4
|
5 |
*/
|
6 |
/*
|
7 |
Plugin Name: Optimize Database after Deleting Revisions
|
10 |
Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
11 |
Author URI: http://cagewebdev.com
|
12 |
Network: True
|
13 |
+
Version: 5.0.4
|
14 |
*/
|
15 |
|
16 |
/********************************************************************************************
|
28 |
|
29 |
class OptimizeDatabase {
|
30 |
// VERSION
|
31 |
+
var $odb_version = '5.0.4';
|
32 |
+
var $odb_release_date = '02/26/2021';
|
33 |
|
34 |
// PLUGIN OPTIONS
|
35 |
var $odb_rvg_options = array();
|