Optimize Database after Deleting Revisions - Version 4.8.5

Version Description

[09/19/2019] = * BUG FIX: Logging bug fixed

Download this release

Release Info

Developer cageehv
Plugin Icon 128x128 Optimize Database after Deleting Revisions
Version 4.8.5
Comparing to
See all releases

Code changes from version 4.8.4 to 4.8.5

Files changed (3) hide show
  1. classes/odb-cleaner.php +27 -13
  2. readme.txt +5 -2
  3. rvg-optimize-database.php +4 -4
classes/odb-cleaner.php CHANGED
@@ -157,7 +157,9 @@ class ODB_Cleaner {
157
  <?php
158
  } // if ($action == 'analyze_detail' || $action == 'run_detail')
159
 
160
- if ($action == 'analyze_detail' || $action == 'run_summary' || $action == 'run_detail') {
 
 
161
  // NUMBER OF DELETED REVISIONS FOR LOG FILE
162
  $odb_class->log_arr["revisions"] = $total_deleted;
163
  } // if ($action == 'analyze_detail' || $action == 'run_summary' || $action == 'run_detail')
@@ -232,8 +234,11 @@ class ODB_Cleaner {
232
  } // if ($action == 'analyze_detail' || $action == 'run_detail')
233
 
234
  // LOOP THROUGH THE TRASHED ITEMS AND DELETE THEM
235
- $total_deleted = $this->odb_delete_trash($results, $scheduler, $action);
236
- if ($action == 'analyze_detail' || $action == 'run_summary' || $action == 'run_detail') {
 
 
 
237
  // NUMBER OF DELETED TRASH FOR LOG FILE
238
  $odb_class->log_arr["trash"] = $total_deleted;
239
  } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail'))
@@ -316,7 +321,9 @@ class ODB_Cleaner {
316
  // LOOP THROUGH THE SPAMMED ITEMS AND DELETE THEM
317
  $total_deleted = $this->odb_delete_spam($results, $scheduler, $action);
318
 
319
- if ($action == 'analyze_detail' || $action == 'run_summary' || $action == 'run_detail') {
 
 
320
  // NUMBER OF DELETED SPAM FOR LOG FILE
321
  $odb_class->log_arr["spam"] = $total_deleted;
322
  } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail'))
@@ -399,7 +406,9 @@ class ODB_Cleaner {
399
  // LOOP THROUGH THE UNUSED TAGS AND DELETE THEM
400
  $total_deleted = $this->odb_delete_unused_tags($results, $scheduler, $action);
401
 
402
- if ($action == 'analyze_detail' || $action == 'run_summary' || $action == 'run_detail') {
 
 
403
  // NUMBER OF UNUSED TAGS FOR LOG FILE
404
  $odb_class->log_arr["tags"] = $total_deleted;
405
  } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail'))
@@ -493,7 +502,9 @@ class ODB_Cleaner {
493
  // LOOP THROUGH THE TRANSIENTS AND DELETE THEM
494
  $total_deleted = $this->odb_delete_transients($results, $scheduler, $action, $option);
495
 
496
- if ($action == 'analyze_detail' || $action == 'run_summary' || $action == 'run_detail') {
 
 
497
  // NUMBER OF DELETED SPAM FOR LOG FILE
498
  $odb_class->log_arr["transients"] = $total_deleted;
499
  } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail'))
@@ -583,7 +594,9 @@ class ODB_Cleaner {
583
  // LOOP THROUGH THE PINGBACKS AND TRACKBACKS AND DELETE THEM
584
  $total_deleted = $this->odb_delete_pingbacks($results, $scheduler, $action);
585
 
586
- if ($action == 'analyze_detail' || $action == 'run_summary' || $action == 'run_detail') {
 
 
587
  // NUMBER OF DELETED PINGBACKS AND TRACKBACKS FOR LOG FILE
588
  $odb_class->log_arr["pingbacks"] = $total_deleted;
589
  } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail'))
@@ -594,10 +607,6 @@ class ODB_Cleaner {
594
  <?php
595
  } // if ($action == 'analyze_detail' || $action == 'run_detail')
596
 
597
- if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail')) {
598
- // NUMBER OF DELETED PINGBACKS AND TRACKBACKS FOR LOG FILE
599
- $odb_class->log_arr["pingbacks"] = $total_deleted;
600
- } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail'))
601
  } else {
602
  // NO PINGBACKS NOR TRACKBACKS FOUND
603
  if (!$scheduler) {
@@ -673,7 +682,9 @@ class ODB_Cleaner {
673
  // LOOP THROUGH THE ORPHANS THEM
674
  $total_deleted = $this->odb_delete_oembed($results, $scheduler, $action);
675
 
676
- if ($action == 'analyze_detail' || $action == 'run_summary' || $action == 'run_detail') {
 
 
677
  // NUMBER OF OEMBED CACHE ITEMS FOR LOG FILE
678
  $odb_class->log_arr["oembeds"] = $total_deleted;
679
  } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail')
@@ -761,7 +772,10 @@ class ODB_Cleaner {
761
 
762
  // LOOP THROUGH THE ORPHANS AND DELETE THEM
763
  $total_deleted = $this->odb_delete_orphans($results, $scheduler, $action);
764
- if ($action == 'analyze_detail' || $action == 'run_summary' || $action == 'run_detail') {
 
 
 
765
  // NUMBER OF ORPHANS FOR LOG FILE
766
  $odb_class->log_arr["orphans"] = $total_deleted;
767
  } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail')
157
  <?php
158
  } // if ($action == 'analyze_detail' || $action == 'run_detail')
159
 
160
+ if ($scheduler) $odb_class->log_arr["revisions"] = $total_deleted;
161
+
162
+ if ($action == 'run_summary' || $action == 'run_detail') {
163
  // NUMBER OF DELETED REVISIONS FOR LOG FILE
164
  $odb_class->log_arr["revisions"] = $total_deleted;
165
  } // if ($action == 'analyze_detail' || $action == 'run_summary' || $action == 'run_detail')
234
  } // if ($action == 'analyze_detail' || $action == 'run_detail')
235
 
236
  // LOOP THROUGH THE TRASHED ITEMS AND DELETE THEM
237
+ $total_deleted = $this->odb_delete_trash($results, $scheduler, $action);
238
+
239
+ if ($scheduler) $odb_class->log_arr["trash"] = $total_deleted;
240
+
241
+ if ($action == 'run_summary' || $action == 'run_detail') {
242
  // NUMBER OF DELETED TRASH FOR LOG FILE
243
  $odb_class->log_arr["trash"] = $total_deleted;
244
  } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail'))
321
  // LOOP THROUGH THE SPAMMED ITEMS AND DELETE THEM
322
  $total_deleted = $this->odb_delete_spam($results, $scheduler, $action);
323
 
324
+ if ($scheduler) $odb_class->log_arr["spam"] = $total_deleted;
325
+
326
+ if ($action == 'run_summary' || $action == 'run_detail') {
327
  // NUMBER OF DELETED SPAM FOR LOG FILE
328
  $odb_class->log_arr["spam"] = $total_deleted;
329
  } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail'))
406
  // LOOP THROUGH THE UNUSED TAGS AND DELETE THEM
407
  $total_deleted = $this->odb_delete_unused_tags($results, $scheduler, $action);
408
 
409
+ if ($scheduler) $odb_class->log_arr["tags"] = $total_deleted;
410
+
411
+ if ($action == 'run_summary' || $action == 'run_detail') {
412
  // NUMBER OF UNUSED TAGS FOR LOG FILE
413
  $odb_class->log_arr["tags"] = $total_deleted;
414
  } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail'))
502
  // LOOP THROUGH THE TRANSIENTS AND DELETE THEM
503
  $total_deleted = $this->odb_delete_transients($results, $scheduler, $action, $option);
504
 
505
+ if ($scheduler) $odb_class->log_arr["transients"] = $total_deleted;
506
+
507
+ if ($action == 'run_summary' || $action == 'run_detail') {
508
  // NUMBER OF DELETED SPAM FOR LOG FILE
509
  $odb_class->log_arr["transients"] = $total_deleted;
510
  } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail'))
594
  // LOOP THROUGH THE PINGBACKS AND TRACKBACKS AND DELETE THEM
595
  $total_deleted = $this->odb_delete_pingbacks($results, $scheduler, $action);
596
 
597
+ if ($scheduler) $odb_class->log_arr["pingbacks"] = $total_deleted;
598
+
599
+ if ($action == 'run_summary' || $action == 'run_detail') {
600
  // NUMBER OF DELETED PINGBACKS AND TRACKBACKS FOR LOG FILE
601
  $odb_class->log_arr["pingbacks"] = $total_deleted;
602
  } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail'))
607
  <?php
608
  } // if ($action == 'analyze_detail' || $action == 'run_detail')
609
 
 
 
 
 
610
  } else {
611
  // NO PINGBACKS NOR TRACKBACKS FOUND
612
  if (!$scheduler) {
682
  // LOOP THROUGH THE ORPHANS THEM
683
  $total_deleted = $this->odb_delete_oembed($results, $scheduler, $action);
684
 
685
+ if ($scheduler) $odb_class->log_arr["oembeds"] = $total_deleted;
686
+
687
+ if ($action == 'run_summary' || $action == 'run_detail') {
688
  // NUMBER OF OEMBED CACHE ITEMS FOR LOG FILE
689
  $odb_class->log_arr["oembeds"] = $total_deleted;
690
  } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail')
772
 
773
  // LOOP THROUGH THE ORPHANS AND DELETE THEM
774
  $total_deleted = $this->odb_delete_orphans($results, $scheduler, $action);
775
+
776
+ if ($scheduler) $odb_class->log_arr["orphans"] = $total_deleted;
777
+
778
+ if ($action == 'run_summary' || $action == 'run_detail') {
779
  // NUMBER OF ORPHANS FOR LOG FILE
780
  $odb_class->log_arr["orphans"] = $total_deleted;
781
  } // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail')
readme.txt CHANGED
@@ -10,8 +10,8 @@ Contributors: cageehv
10
  Requires at least: 2.8
11
  Requires PHP: 5.0
12
  Tested up to: 5.2.3
13
- Stable tag: 4.8.4
14
- Version: 4.8.4
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
  = 4.8.4 [09/07/2019] =
115
  * CHANGE: Improved performance
116
 
10
  Requires at least: 2.8
11
  Requires PHP: 5.0
12
  Tested up to: 5.2.3
13
+ Stable tag: 4.8.5
14
+ Version: 4.8.5
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
+ = 4.8.5 [09/19/2019] =
115
+ * BUG FIX: Logging bug fixed
116
+
117
  = 4.8.4 [09/07/2019] =
118
  * CHANGE: Improved performance
119
 
rvg-optimize-database.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * @package Optimize Database after Deleting Revisions
4
- * @version 4.8.4
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: 4.8.4
14
  */
15
 
16
  /********************************************************************************************
@@ -28,8 +28,8 @@ $odb_class = new OptimizeDatabase();
28
 
29
  class OptimizeDatabase {
30
  // VERSION
31
- var $odb_version = '4.8.4';
32
- var $odb_release_date = '09/07/2019';
33
 
34
  // PLUGIN OPTIONS
35
  var $odb_rvg_options = array();
1
  <?php
2
  /**
3
  * @package Optimize Database after Deleting Revisions
4
+ * @version 4.8.5
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: 4.8.5
14
  */
15
 
16
  /********************************************************************************************
28
 
29
  class OptimizeDatabase {
30
  // VERSION
31
+ var $odb_version = '4.8.5';
32
+ var $odb_release_date = '09/19/2019';
33
 
34
  // PLUGIN OPTIONS
35
  var $odb_rvg_options = array();