Optimize Database after Deleting Revisions - Version 4.6

Version Description

[05/08/2018] = * NEW: Logging system has been totally rewritten (from now it will store the logs in the database) * NEW: Export the log to a CSV file

Download this release

Release Info

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

Code changes from version 4.5.2 to 4.6

classes/odb-cleaner.php CHANGED
@@ -38,17 +38,15 @@ class ODB_Cleaner {
38
  // GET THE SIZE OF THE DATABASE BEFORE OPTIMIZATION
39
  $this->start_size = $odb_class->odb_utilities_obj->odb_get_db_size();
40
 
41
- // TIMESTAMP FOR LOG FILE
42
  $ct = ($scheduler) ? ' (cron)' : '';
43
- // v4.5
44
- $current_datetime = current_time('m/d/YH:i:s', 0);
45
- $odb_class->log_arr = array("time" => substr($current_datetime, 0, 10).'<br>'.substr($current_datetime,10).$ct);
46
 
 
47
  $odb_class->log_arr["after"] = 0;
48
  $odb_class->log_arr["before"] = 0;
49
  $odb_class->log_arr["orphans"] = 0;
50
  $odb_class->log_arr["pingbacks"] = 0;
51
- $odb_class->log_arr["oembed"] = 0;
52
  $odb_class->log_arr["revisions"] = 0;
53
  $odb_class->log_arr["savings"] = 0;
54
  $odb_class->log_arr["spam"] = 0;
@@ -441,8 +439,9 @@ class ODB_Cleaner {
441
  $odb_class->log_arr["after"] = $odb_class->odb_utilities_obj->odb_format_size($end_size,3);
442
  // TOTAL SAVING
443
  $odb_class->log_arr["savings"] = $odb_class->odb_utilities_obj->odb_format_size(($this->start_size - $end_size),3);
444
- // WRITE RESULTS TO LOG FILE
445
- $odb_class->odb_logger_obj->write_log($odb_class->log_arr);
 
446
 
447
  $total_savings = $odb_class->odb_rvg_options['total_savings'];
448
  $total_savings += ($this->start_size - $end_size);
@@ -505,23 +504,30 @@ class ODB_Cleaner {
505
  <?php _e('DONE!', $odb_class->odb_txt_domain);?>
506
  </h2>
507
  </div>
508
- <br />
509
- <br />
510
  <span class="odb-padding-left"><?php _e('Optimization took', $odb_class->odb_txt_domain)?>&nbsp;<strong><?php echo $total_time;?></strong>&nbsp;<?php _e('seconds', $odb_class->odb_txt_domain)?>.</span>
511
  <?php
512
  // v4.5.1
513
  $odb_class->odb_last_run_seconds = $total_time;
514
- if(file_exists($odb_class->odb_plugin_path.'logs/rvg-optimize-db-log.html'))
515
- {
516
  ?>
517
- <br />
518
- <br />
 
 
 
 
 
 
 
519
  &nbsp;
520
- <input class="button odb-normal" type="button" name="view_log" value="<?php _e('View Log File', $odb_class->odb_txt_domain);?>" onclick="window.open('<?php echo $odb_class->odb_logfile_url?>')" />
521
  &nbsp;
522
- <input class="button odb-normal" type="button" name="delete_log" value="<?php _e('Delete Log File', $odb_class->odb_txt_domain);?>" onclick="self.location='tools.php?page=rvg-optimize-database&action=delete_log'" />
523
  <?php
524
- }
525
  ?>
526
  </div><!-- /odb-done -->
527
  <?php
@@ -737,7 +743,7 @@ class ODB_Cleaner {
737
  $results_get_posts = $wpdb->get_results($sql_get_posts);
738
 
739
  for($j=0; $j<$nr_to_delete; $j++) {
740
- if(!$scheduler) echo $results_get_posts[$j]->post_modified.'<br />';
741
 
742
  $sql_delete = sprintf ("
743
  DELETE FROM %sposts
38
  // GET THE SIZE OF THE DATABASE BEFORE OPTIMIZATION
39
  $this->start_size = $odb_class->odb_utilities_obj->odb_get_db_size();
40
 
41
+ // TIMESTAMP FOR LOG FILE - v4.6
42
  $ct = ($scheduler) ? ' (cron)' : '';
 
 
 
43
 
44
+ $odb_class->log_arr["timestamp"] = current_time('YmdHis', 0);
45
  $odb_class->log_arr["after"] = 0;
46
  $odb_class->log_arr["before"] = 0;
47
  $odb_class->log_arr["orphans"] = 0;
48
  $odb_class->log_arr["pingbacks"] = 0;
49
+ $odb_class->log_arr["oembeds"] = 0;
50
  $odb_class->log_arr["revisions"] = 0;
51
  $odb_class->log_arr["savings"] = 0;
52
  $odb_class->log_arr["spam"] = 0;
439
  $odb_class->log_arr["after"] = $odb_class->odb_utilities_obj->odb_format_size($end_size,3);
440
  // TOTAL SAVING
441
  $odb_class->log_arr["savings"] = $odb_class->odb_utilities_obj->odb_format_size(($this->start_size - $end_size),3);
442
+
443
+ // WRITE RESULTS TO LOG FILE - v4.6
444
+ $odb_class->odb_logger_obj->odb_add_log($odb_class->log_arr);
445
 
446
  $total_savings = $odb_class->odb_rvg_options['total_savings'];
447
  $total_savings += ($this->start_size - $end_size);
504
  <?php _e('DONE!', $odb_class->odb_txt_domain);?>
505
  </h2>
506
  </div>
507
+ <br>
508
+ <br>
509
  <span class="odb-padding-left"><?php _e('Optimization took', $odb_class->odb_txt_domain)?>&nbsp;<strong><?php echo $total_time;?></strong>&nbsp;<?php _e('seconds', $odb_class->odb_txt_domain)?>.</span>
510
  <?php
511
  // v4.5.1
512
  $odb_class->odb_last_run_seconds = $total_time;
513
+
514
+ if($odb_class->odb_logger_obj->odb_log_count() > 0) {
515
  ?>
516
+ <script>
517
+ function confirm_delete() {
518
+ if(confirm('<?php _e('Clear the log?', $odb_class->odb_txt_domain)?>')) {
519
+ self.location = 'tools.php?page=rvg-optimize-database&action=delete_log'
520
+ return;
521
+ }
522
+ } // confirm_delete()
523
+ </script>
524
+ <br><br>
525
  &nbsp;
526
+ <input class="button odb-normal" type="button" name="view_log" value="<?php _e('View Log', $odb_class->odb_txt_domain);?>" onclick="self.location='tools.php?page=rvg-optimize-database&action=show_log'" />
527
  &nbsp;
528
+ <input class="button odb-normal" type="button" name="delete_log" value="<?php _e('Clear Log', $odb_class->odb_txt_domain);?>" onclick="return confirm_delete();" />
529
  <?php
530
+ } // if($odb_class->odb_logger_obj->odb_log_count() > 0)
531
  ?>
532
  </div><!-- /odb-done -->
533
  <?php
743
  $results_get_posts = $wpdb->get_results($sql_get_posts);
744
 
745
  for($j=0; $j<$nr_to_delete; $j++) {
746
+ if(!$scheduler) echo $results_get_posts[$j]->post_modified.'<br>';
747
 
748
  $sql_delete = sprintf ("
749
  DELETE FROM %sposts
classes/odb-displayer.php CHANGED
@@ -12,7 +12,8 @@ class ODB_Displayer {
12
  ********************************************************************************************/
13
  function __construct() {
14
  } // __construct()
15
-
 
16
  /********************************************************************************************
17
  * DISPLAY THE PAGE HEADER
18
  ********************************************************************************************/
@@ -151,7 +152,7 @@ class ODB_Displayer {
151
  /********************************************************************************************
152
  * CONVERT SECONDS TO DAYS, HOURS, MINUTES AND SECONDS
153
  ********************************************************************************************/
154
- function secondsToTime($seconds) {
155
  global $odb_class;
156
 
157
  $dtF = new \DateTime('@0');
@@ -179,22 +180,36 @@ class ODB_Displayer {
179
  <input class="button odb-normal" type="button" name="change_options" value="'.__('Change Settings', $odb_class->odb_txt_domain).'" onclick="self.location=\'options-general.php?page=odb_settings_page\'">
180
  ';
181
 
182
- if(file_exists($odb_class->odb_plugin_path.'logs/rvg-optimize-db-log.html')) {
 
183
  // THERE IS A LOG FILE
184
- echo '
185
- &nbsp;
186
- <input class="button odb-normal" type="button" name="view_log" value="'.__('View Log File', $odb_class->odb_txt_domain).'" onclick="window.open(\''.$odb_class->odb_logfile_url.'\')">
187
- &nbsp;
188
- <input class="button odb-normal" type="button" name="delete_log" value="'.__('Delete Log File', $odb_class->odb_txt_domain).'" onclick="self.location=\'tools.php?page=rvg-optimize-database&action=delete_log\'">
189
- ';
 
 
 
 
190
  } // if(file_exists($this->odb_plugin_path.'logs/rvg-optimize-db-log.html'))
191
 
192
  if($action != 'run') {
193
- // NOT RUNNING: SHOW START BUTTON
 
 
 
 
 
 
 
 
 
194
  echo '
195
  &nbsp;<input class="button-primary button-large" type="button" name="start_optimization" value="'.__('Start Optimization', $odb_class->odb_txt_domain).'" onclick="self.location=\'tools.php?page=rvg-optimize-database&action=run\'" class="odb-bold" />
196
  ';
197
- }
198
 
199
  echo '
200
  </p>
12
  ********************************************************************************************/
13
  function __construct() {
14
  } // __construct()
15
+
16
+
17
  /********************************************************************************************
18
  * DISPLAY THE PAGE HEADER
19
  ********************************************************************************************/
152
  /********************************************************************************************
153
  * CONVERT SECONDS TO DAYS, HOURS, MINUTES AND SECONDS
154
  ********************************************************************************************/
155
+ private function secondsToTime($seconds) {
156
  global $odb_class;
157
 
158
  $dtF = new \DateTime('@0');
180
  <input class="button odb-normal" type="button" name="change_options" value="'.__('Change Settings', $odb_class->odb_txt_domain).'" onclick="self.location=\'options-general.php?page=odb_settings_page\'">
181
  ';
182
 
183
+ // v4.6
184
+ if($odb_class->odb_logger_obj->odb_log_count() > 0) {
185
  // THERE IS A LOG FILE
186
+ echo "
187
+ <script>
188
+ function confirm_delete() {
189
+ if(confirm('" . __('Clear the log?', $odb_class->odb_txt_domain) . "')) {
190
+ self.location = 'tools.php?page=rvg-optimize-database&action=delete_log'
191
+ return;
192
+ }
193
+ } // confirm_delete()
194
+ </script>
195
+ ";
196
  } // if(file_exists($this->odb_plugin_path.'logs/rvg-optimize-db-log.html'))
197
 
198
  if($action != 'run') {
199
+ // NOT RUNNING: SHOW LOG- AND START BUTTONS
200
+ if($odb_class->odb_logger_obj->odb_log_count() > 0) {
201
+ echo '
202
+ &nbsp;
203
+ <input class="button odb-normal" type="button" name="view_log" value="'.__('View Log', $odb_class->odb_txt_domain).'" onclick="self.location=\'tools.php?page=rvg-optimize-database&action=show_log\'">
204
+ &nbsp;
205
+ <input class="button odb-normal" type="button" name="delete_log" value="'.__('Clear Log', $odb_class->odb_txt_domain).'" onclick="return confirm_delete();">
206
+ ';
207
+ } // if($odb_class->odb_logger_obj->odb_log_count() > 0)
208
+
209
  echo '
210
  &nbsp;<input class="button-primary button-large" type="button" name="start_optimization" value="'.__('Start Optimization', $odb_class->odb_txt_domain).'" onclick="self.location=\'tools.php?page=rvg-optimize-database&action=run\'" class="odb-bold" />
211
  ';
212
+ } // if($odb_class->odb_logger_obj->odb_log_count() > 0)
213
 
214
  echo '
215
  </p>
classes/odb-logger.php CHANGED
@@ -1,112 +1,264 @@
1
  <?php
 
 
 
 
 
 
 
2
  class ODB_Logger {
 
 
 
 
3
  /********************************************************************************************
4
  * CONSTRUCTOR
5
  ********************************************************************************************/
6
  function __construct() {
 
 
7
  } // __construct()
8
-
9
 
10
  /********************************************************************************************
11
- * WRITE RESULTS TO LOG FILE
12
  ********************************************************************************************/
13
- function write_log() {
14
- global $odb_class;
15
 
 
16
  if($odb_class->odb_rvg_options['logging_on'] == "Y") {
17
- $file = $odb_class->odb_logfile_path;
18
- if(!file_exists($file)) {
19
- // NEW LOG FILE
20
- $html = '
21
- <!doctype html>
22
- <html>
23
- <head>
24
- <meta charset="utf-8">
25
- <title>Optimize Database after Deleting Revisions v'.$odb_class->odb_version.' - LOG</title>
26
- <style type="text/css">
27
- body, td, th {
28
- font-family: Arial, Helvetica, sans-serif;
29
- font-size: 12px;
30
- }
31
- th {
32
- border-top:solid 1px #000;
33
- border-bottom:solid 1px #000;
34
- }
35
- td {
36
- padding-bottom:4px;
37
- border-bottom:dotted 1px #CCC;
38
- }
39
- #header {
40
- margin-left:6px;
41
- margin-bottom:8px;
42
- }
43
- #header a {
44
- text-decoration:none;
45
- font-weight:bold;
46
- }
47
- </style>
48
- </head>
49
- <body>
50
- <div id="header">
51
- <h2><a href="https://wordpress.org/plugins/rvg-optimize-database/" target="_blank">Optimize Database after Deleting Revisions v'.$odb_class->odb_version.'</a></h2>
52
- '.__('A WordPress Plugin by','rvg-optimize-database').' <a href="http://cagewebdev.com" target="_blank"><span class="odb-bold">CAGE Web Design</span></a> | <a href="http://rvg.cage.nl" target="_blank"><span class="odb-bold">Rolf van Gelder</span></a>, Eindhoven, '.__('The Netherlands','rvg-optimize-database').'</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  </div>
54
- <table width="100%" border="0" cellspacing="6" cellpadding="1">
55
- <tr>
56
- <th width="8%" align="left" valign="top">'.__('time','rvg-optimize-database').'</th>
57
- <th width="8%" align="right" valign="top">'.__('deleted<br />revisions','rvg-optimize-database').'</th>
58
- <th width="8%" align="right" valign="top">'.__('deleted<br />trash','rvg-optimize-database').'</th>
59
- <th width="8%" align="right" valign="top">'.__('deleted<br />spam','rvg-optimize-database').'</th>
60
- <th width="8%" align="right" valign="top">'.__('deleted<br />tags','rvg-optimize-database').'</th>
61
- <th width="8%" align="right" valign="top">'.__('deleted<br />transients','rvg-optimize-database').'</th>
62
- <th width="8%" align="right" valign="top">'.__('deleted<br />pingbacks<br />trackbacks','rvg-optimize-database').'</th>
63
- <th width="8%" align="right" valign="top">'.__('deleted<br />oEmbed<br />records','rvg-optimize-database').'</th>
64
- <th width="8%" align="right" valign="top">'.__('deleted<br />orphans','rvg-optimize-database').'</th>
65
- <th width="8%" align="right" valign="top">'.__('nr of optimized tables','rvg-optimize-database').'</th>
66
- <th width="8%" align="right" valign="top">'.__('database size BEFORE','rvg-optimize-database').'</th>
67
- <th width="8%" align="right" valign="top">'.__('database size AFTER','rvg-optimize-database').'</th>
68
- <th width="8%" align="right" valign="top">'.__('SAVINGS','rvg-optimize-database').'</th>
69
- </tr>
70
- </table>
71
- ';
72
- file_put_contents($file, $html, FILE_APPEND);
73
- } // if(!file_exists($file))
74
 
75
- $html = '
76
- <table width="100%" border="0" cellspacing="6" cellpadding="0">
77
- <tr>
78
- <td width="8%" valign="top"><span class="odb-bold">'.$odb_class->log_arr["time"].'</span></td>
79
- <td width="8%" align="right" valign="top">'.$odb_class->log_arr["revisions"].'</td>
80
- <td width="8%" align="right" valign="top">'.$odb_class->log_arr["trash"].'</td>
81
- <td width="8%" align="right" valign="top">'.$odb_class->log_arr["spam"].'</td>
82
- <td width="8%" align="right" valign="top">'.$odb_class->log_arr["tags"].'</td>
83
- <td width="8%" align="right" valign="top">'.$odb_class->log_arr["transients"].'</td>
84
- <td width="8%" align="right" valign="top">'.$odb_class->log_arr["pingbacks"].'</td>
85
- <td width="8%" align="right" valign="top">'.$odb_class->log_arr["oembeds"].'</td>
86
- <td width="8%" align="right" valign="top">'.$odb_class->log_arr["orphans"].'</td>
87
- <td width="8%" align="right" valign="top">'.$odb_class->log_arr["tables"].'</td>
88
- <td width="8%" align="right" valign="top">'.$odb_class->log_arr["before"].'</td>
89
- <td width="8%" align="right" valign="top">'.$odb_class->log_arr["after"].'</td>
90
- <td width="8%" align="right" valign="top">'.$odb_class->log_arr["savings"].'</td>
91
- </tr>
92
- </table>
 
 
 
 
 
 
93
  ';
94
- file_put_contents($file, $html, FILE_APPEND);
95
- } // if($odb_class->odb_rvg_options['logging_on'] == "Y")
96
- } // write_log()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
 
98
 
99
  /********************************************************************************************
100
- * ADD A MESSAGE TO THE DEBUG LOG FILE
101
  ********************************************************************************************/
102
- function write_debug_log($msg) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  global $odb_class;
104
 
105
- if (defined('WP_DEBUG') && WP_DEBUG) {
106
- // ONLY USE THIS LOG IN DEBUG MODE
107
- $file = $odb_class->odb_logfile_debug_path;
108
- $txt = Date('Y/m/d H:i:s').' '.$msg."\n";
109
- file_put_contents($file, $txt, FILE_APPEND);
110
- }
111
- } // write_debug_log()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  } // ODB_Logger
 
 
 
1
  <?php
2
+ /************************************************************************************************
3
+ *
4
+ * LOGGER CLASS
5
+ *
6
+ ************************************************************************************************/
7
+ ?>
8
+ <?php
9
  class ODB_Logger {
10
+
11
+ var $sql = '';
12
+ var $res = array();
13
+
14
  /********************************************************************************************
15
  * CONSTRUCTOR
16
  ********************************************************************************************/
17
  function __construct() {
18
+ // v4.6
19
+ add_action('admin_init', array(&$this, 'odb_csv_download'));
20
  } // __construct()
21
+
22
 
23
  /********************************************************************************************
24
+ * WRITE RESULTS TO LOG TABLE - v4.6
25
  ********************************************************************************************/
26
+ function odb_add_log() {
27
+ global $odb_class, $wpdb;
28
 
29
+ // IS LOGGING ENABLED?
30
  if($odb_class->odb_rvg_options['logging_on'] == "Y") {
31
+
32
+ // CONVERT A TIMESTAMP TO THE mm/dd/yyyy hh:mm:ss format
33
+ $d = $odb_class->odb_utilities_obj->odb_parse_timestamp($odb_class->log_arr['timestamp']);
34
+
35
+ $this->sql = "
36
+ INSERT INTO `" . $odb_class->odb_logtable_name . "`
37
+ (
38
+ odb_timestamp,
39
+ odb_revisions,
40
+ odb_trash,
41
+ odb_spam,
42
+ odb_tags,
43
+ odb_transients,
44
+ odb_pingbacks,
45
+ odb_oembeds,
46
+ odb_orphans,
47
+ odb_tables,
48
+ odb_before,
49
+ odb_after,
50
+ odb_savings
51
+ )
52
+ VALUES
53
+ (
54
+ '" . $d . "',
55
+ ". $odb_class->log_arr['revisions'] . ",
56
+ ". $odb_class->log_arr['trash'] . ",
57
+ ". $odb_class->log_arr['spam'] . ",
58
+ ". $odb_class->log_arr['tags'] . ",
59
+ ". $odb_class->log_arr['transients'] . ",
60
+ ". $odb_class->log_arr['pingbacks'] . ",
61
+ ". $odb_class->log_arr['oembeds'] . ",
62
+ ". $odb_class->log_arr['orphans'] . ",
63
+ ". $odb_class->log_arr['tables'] . ",
64
+ '". $odb_class->log_arr['before'] . "',
65
+ '". $odb_class->log_arr['after'] . "',
66
+ '". $odb_class->log_arr['savings'] . "'
67
+ )
68
+ ";
69
+ $wpdb->get_results($this->sql);
70
+ } // if($odb_class->odb_rvg_options['logging_on'] == "Y")
71
+ } // add_log_db()
72
+
73
+
74
+ /********************************************************************************************
75
+ * TRUNCATE THE LOG TABLE - v4.6
76
+ ********************************************************************************************/
77
+ function odb_clear_log() {
78
+ global $odb_class, $wpdb;
79
+
80
+ $this->sql = "
81
+ TRUNCATE TABLE `" . $odb_class->odb_logtable_name . "`
82
+ ";
83
+
84
+ $wpdb->get_results($this->sql);
85
+ } // clear_log()
86
+
87
+
88
+ /********************************************************************************************
89
+ * SHOW THE LOGS - v4.6
90
+ ********************************************************************************************/
91
+ function odb_show_log() {
92
+ global $odb_class, $wpdb;
93
+
94
+ $this->sql = "
95
+ SELECT * FROM `" . $odb_class->odb_logtable_name . "` ORDER BY odb_id ASC
96
+ ";
97
+ $this->res = $wpdb->get_results($this->sql, ARRAY_A);
98
+
99
+ $odb_class->odb_displayer_obj->display_header();
100
+ ?>
101
+ <div class="odb-title-bar">
102
+ <h2><?php _e('Logs',$odb_class->odb_txt_domain)?></h2>
103
  </div>
104
+ <br>
105
+ <br>
106
+ <div class="odb-log-table">
107
+ <table width="97%" border="0" cellspacing="6" cellpadding="0">
108
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
 
110
+ echo '
111
+ <tr valign="top">
112
+ ';
113
+
114
+ echo '<th align="left">'.__('date','rvg-optimize-database').'</th>';
115
+ echo '<th align="right">'.__('deleted<br>revisions','rvg-optimize-database').'</th>';
116
+ echo '<th align="right">'.__('deleted<br>trash','rvg-optimize-database').'</th>';
117
+ echo '<th align="right">'.__('deleted<br>spam','rvg-optimize-database').'</th>';
118
+ echo '<th align="right">'.__('deleted<br>tags','rvg-optimize-database').'</th>';
119
+ echo '<th align="right">'.__('deleted<br>transients','rvg-optimize-database').'</th>';
120
+ echo '<th align="right">'.__('deleted<br>pingbacks<br>trackbacks','rvg-optimize-database').'</th>';
121
+ echo '<th align="right">'.__('deleted<br>oEmbed<br>records','rvg-optimize-database').'</th>';
122
+ echo '<th align="right">'.__('deleted<br>orphans','rvg-optimize-database').'</th>';
123
+ echo '<th align="right">'.__('nr of<br>optimized<br>tables','rvg-optimize-database').'</th>';
124
+ echo '<th align="right">'.__('database<br> size<br>BEFORE','rvg-optimize-database').'</th>';
125
+ echo '<th align="right">'.__('database<br>size<br>AFTER','rvg-optimize-database').'</th>';
126
+ echo '<th align="right">'.__('SAVINGS','rvg-optimize-database').'</th>';
127
+ echo '
128
+ </tr>
129
+ ';
130
+
131
+ for($i = 0; $i < count($this->res); $i++) {
132
+ echo '
133
+ <tr valign="top">
134
  ';
135
+ echo '<td>' . $this->res[$i]['odb_timestamp'] .'</td>';
136
+ echo '<td align="right">' . $this->res[$i]['odb_revisions'].'</td>';
137
+ echo '<td align="right">' . $this->res[$i]['odb_trash'].'</td>';
138
+ echo '<td align="right">' . $this->res[$i]['odb_spam'].'</td>';
139
+ echo '<td align="right">' . $this->res[$i]['odb_tags'].'</td>';
140
+ echo '<td align="right">' . $this->res[$i]['odb_transients'].'</td>';
141
+ echo '<td align="right">' . $this->res[$i]['odb_pingbacks'].'</td>';
142
+ echo '<td align="right">' . $this->res[$i]['odb_oembeds'].'</td>';
143
+ echo '<td align="right">' . $this->res[$i]['odb_orphans'].'</td>';
144
+ echo '<td align="right">' . $this->res[$i]['odb_tables'].'</td>';
145
+ echo '<td align="right">' . $this->res[$i]['odb_before'].'</td>';
146
+ echo '<td align="right">' . $this->res[$i]['odb_after'].'</td>';
147
+ echo '<td align="right">' . $this->res[$i]['odb_savings'].'</td>';
148
+ echo '
149
+ </tr>
150
+ ';
151
+ }
152
+
153
+ echo '
154
+ </table>
155
+ ';
156
+ ?>
157
+ <script>
158
+ function odb_confirm_delete() {
159
+ if(confirm('<?php _e('Clear the log?', $odb_class->odb_txt_domain)?>')) {
160
+ self.location = 'tools.php?page=rvg-optimize-database&action=delete_log'
161
+ return;
162
+ }
163
+ }
164
+ </script>
165
+ <br>
166
+ <input class="button odb-normal" type="button" name="change_options" value="<?php _e('Change Settings', $odb_class->odb_txt_domain)?>" onclick="self.location='options-general.php?page=odb_settings_page'" />
167
+ &nbsp;
168
+ <input class="button odb-normal" type="button" name="delete_log" value="<?php _e('Clear Log', $odb_class->odb_txt_domain) ?>" onclick="return odb_confirm_delete();" />
169
+ &nbsp;
170
+ <input class="button odb-normal" type="button" name="odb_download_csv" value="<?php _e('Export to CSV', $odb_class->odb_txt_domain)?>" onclick="self.location='tools.php?page=rvg-optimize-database&action=odb_download_csv'" />
171
+ &nbsp;&nbsp;
172
+ <input class="button-primary button-large" type="button" name="start_optimization" value="<?php _e('Start Optimization', $odb_class->odb_txt_domain)?>" onclick="self.location='tools.php?page=rvg-optimize-database&action=run'" class="odb-bold" />
173
+ <?php
174
+ } // odb_show_log()
175
 
176
 
177
  /********************************************************************************************
178
+ * GET THE NUMBER OF LOG RECORDS - v4.6
179
  ********************************************************************************************/
180
+ function odb_log_count() {
181
+ global $odb_class, $wpdb;
182
+
183
+ $this->sql = "
184
+ SELECT COUNT(*) AS logcnt FROM `" . $odb_class->odb_logtable_name . "`
185
+ ";
186
+ $this->res = $wpdb->get_results($this->sql, ARRAY_A);
187
+ return $this->res[0]['logcnt'];
188
+ } // odb_log_count()
189
+
190
+
191
+ /********************************************************************************************
192
+ * WRITE THE CSV FILE - v4.6
193
+ ********************************************************************************************/
194
+ private function odb_output_csv($export_keys, $items) {
195
  global $odb_class;
196
 
197
+ $filename = 'odb_log_'. Date('Ymd') . '.csv';
198
+
199
+ header("Content-Type: text/csv; charset=utf-8");
200
+ header("Content-Disposition: attachment; filename=".$filename);
201
+ header("Pragma: no-cache");
202
+ header("Expires: 0");
203
+
204
+ // OUTPUT STREAM
205
+ $output = fopen('php://output', 'w');
206
+
207
+ $headers = '';
208
+ foreach ($export_keys as $key) {
209
+ if($headers) $headers .= ';';
210
+ $headers .= '"' . $key . '"';
211
+ } // foreach ($export_keys as $key)
212
+
213
+ // WRITE THE HEADER LINE
214
+ fwrite($output, $headers . "\r\n");
215
+
216
+ // WRITE THE DATA LINES
217
+ foreach ($items as $item) {
218
+ unset($csv_line);
219
+ foreach ($export_keys as $key => $value) {
220
+ if (isset($item[$key])) {
221
+ $csv_line[] = $item[$key];
222
+ } // if (isset($item[$key]))
223
+ } // foreach ($export_keys as $key => $value)
224
+ fputcsv($output, $csv_line, ";", '"');
225
+ } // foreach ($items as $item)
226
+
227
+ fclose($output);
228
+ } // odb_output_csv
229
+
230
+
231
+ /********************************************************************************************
232
+ * CREATE THE DATA TO DOWNLOAD - v4.6
233
+ ********************************************************************************************/
234
+ function odb_csv_download() {
235
+ global $odb_class, $wpdb;
236
+
237
+ if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'odb_download_csv') {
238
+ $export_keys = array(
239
+ 'odb_id' => __('id', $odb_class->odb_txt_domain),
240
+ 'odb_timestamp' => __('date', $odb_class->odb_txt_domain),
241
+ 'odb_revisions' => __('deleted revisions', $odb_class->odb_txt_domain),
242
+ 'odb_trash' => __('deleted trash', $odb_class->odb_txt_domain),
243
+ 'odb_spam' => __('deleted spam', $odb_class->odb_txt_domain),
244
+ 'odb_tags' => __('deleted tags', $odb_class->odb_txt_domain),
245
+ 'odb_transients' => __('deleted transients', $odb_class->odb_txt_domain),
246
+ 'odb_pingbacks' => __('deleted pingbacks', $odb_class->odb_txt_domain),
247
+ 'odb_orphans' => __('deleted orphans', $odb_class->odb_txt_domain),
248
+ 'odb_tables' => __('nr of optimized tables', $odb_class->odb_txt_domain),
249
+ 'odb_before' => __('database size BEFORE', $odb_class->odb_txt_domain),
250
+ 'odb_after' => __('database size AFTER', $odb_class->odb_txt_domain),
251
+ 'odb_savings' => __('SAVINGS', $odb_class->odb_txt_domain)
252
+ );
253
+
254
+ $this->sql = 'SELECT * FROM ' . $odb_class->odb_logtable_name . ' ORDER BY odb_id';
255
+ $items = $wpdb->get_results($this->sql, ARRAY_A);
256
+ $this->odb_output_csv($export_keys, $items);
257
+ exit();
258
+ } // if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'odb_download_csv') {
259
+ } // odb_csv_download()
260
+
261
  } // ODB_Logger
262
+
263
+
264
+
classes/odb-utilities.php CHANGED
@@ -65,6 +65,16 @@ class ODB_Utilities {
65
  return $res[0]->size;
66
  } // odb_get_db_size()
67
 
 
 
 
 
 
 
 
 
 
 
68
 
69
  /********************************************************************************************
70
  * GET DATABASE TABLES
65
  return $res[0]->size;
66
  } // odb_get_db_size()
67
 
68
+
69
+ /********************************************************************************************
70
+ * PARSE A TIMESTAMP - v4.6
71
+ ********************************************************************************************/
72
+ function odb_parse_timestamp($timestamp) {
73
+ $d = substr($timestamp, 4, 2).'/'.substr($timestamp, 6, 2).'/'.substr($timestamp, 0, 4);
74
+ $d .= ' ' . substr($timestamp, 8, 2).':'.substr($timestamp, 10, 2).':'.substr($timestamp, 12, 2);
75
+ return $d;
76
+ } // odb_parse_timestamp($timestamp)
77
+
78
 
79
  /********************************************************************************************
80
  * GET DATABASE TABLES
css/style.css CHANGED
@@ -138,5 +138,19 @@
138
  white-space: nowrap;
139
  width: 200px;
140
  }
141
- /*#odb-options-buttons {
142
- }*/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  white-space: nowrap;
139
  width: 200px;
140
  }
141
+ /********************************************************
142
+ *
143
+ * LOGS
144
+ *
145
+ ********************************************************/
146
+ .odb-log-table {
147
+ font-size: 13px;
148
+ }
149
+ .odb-log-table th {
150
+ border-top: solid 1px #000;
151
+ border-bottom: solid 1px #000;
152
+ }
153
+ .odb-log-table td {
154
+ padding-bottom: 4px;
155
+ border-bottom: dotted 1px #CCC;
156
+ }
css/style.min.css CHANGED
@@ -1 +1 @@
1
- @charset "utf-8";.odb-title-bar{width:96%;background-color:#0074a2;color:#fff!important;display:inline-block;padding-left:16px;margin-top:30px}.odb-title-bar h2{color:#fff}.odb-bold{font-weight:900}.odb-normal{font-weight:400}.odb-italic{font-style:italic}.odb-blue{color:#0074a2}#odb-running{background:rgba(0,0,0,.08) url(../images/running.gif) no-repeat 50% 50%;width:100%;height:100%;position:fixed;top:0;left:0;z-index:999}.odb-action{font-size:13px;font-weight:700;color:#000}.odb-wp-table{font-weight:700;color:#0074a2}.odb-padding-left{padding-left:8px}.odb-border-bottom{border-bottom:solid 1px #999}.odb-border-top{border-top:solid 1px #999}.odb-optimizing-table{margin-top:16px}.odb-optimized{color:#0074a2;font-weight:700}.odb-underline-red{text-decoration:underline;color:red}.odb-updated{position:relative;left:-15px}.odb-found{font-size:13px;font-weight:700;color:#000}.odb-found-number{margin-left:8px;margin-bottom:18px;font-size:13px;font-weight:700;color:#000}.odb-result-table{background-color:#e8e8e8;margin-bottom:20px}.odb-not-found{margin-left:8px;margin-bottom:16px;color:#999}.odb-post-type-select{font-size:inherit}.odb-schedule-select{font-size:inherit;padding:0;margin:0}.odb-schedulehour{display:none}.odb-schedulehour-select{font-size:inherit}.odb-table-excludes{margin-top:10px;border:solid 1px #ccc;padding:10px}.odb-table-excludes td{padding:3px}#odb-options-tables-container{text-align:center}#odb-options-tables-wrapper{width:97%;display:inline-block;margin-top:16px;margin-left:-16px;padding:8px 0 8px 0}.odb-options-table{background-color:#f0f0f0;display:inline-block;height:17px;margin:3px;border:solid 1px #e0e0e0;overflow:hidden;padding:2px;text-align:left;white-space:nowrap;width:200px}
1
+ @charset "utf-8";.odb-title-bar{width:96%;background-color:#0074a2;color:#fff!important;display:inline-block;padding-left:16px;margin-top:30px}.odb-title-bar h2{color:#fff}.odb-bold{font-weight:900}.odb-normal{font-weight:400}.odb-italic{font-style:italic}.odb-blue{color:#0074a2}#odb-running{background:rgba(0,0,0,.08) url(../images/running.gif) no-repeat 50% 50%;width:100%;height:100%;position:fixed;top:0;left:0;z-index:999}.odb-action{font-size:13px;font-weight:700;color:#000}.odb-wp-table{font-weight:700;color:#0074a2}.odb-padding-left{padding-left:8px}.odb-border-bottom{border-bottom:solid 1px #999}.odb-border-top{border-top:solid 1px #999}.odb-optimizing-table{margin-top:16px}.odb-optimized{color:#0074a2;font-weight:700}.odb-underline-red{text-decoration:underline;color:red}.odb-updated{position:relative;left:-15px}.odb-found{font-size:13px;font-weight:700;color:#000}.odb-found-number{margin-left:8px;margin-bottom:18px;font-size:13px;font-weight:700;color:#000}.odb-result-table{background-color:#e8e8e8;margin-bottom:20px}.odb-not-found{margin-left:8px;margin-bottom:16px;color:#999}.odb-post-type-select{font-size:inherit}.odb-schedule-select{font-size:inherit;padding:0;margin:0}.odb-schedulehour{display:none}.odb-schedulehour-select{font-size:inherit}.odb-table-excludes{margin-top:10px;border:solid 1px #ccc;padding:10px}.odb-table-excludes td{padding:3px}#odb-options-tables-container{text-align:center}#odb-options-tables-wrapper{width:97%;display:inline-block;margin-top:16px;margin-left:-16px;padding:8px 0 8px 0}.odb-options-table{background-color:#f0f0f0;display:inline-block;height:17px;margin:3px;border:solid 1px #e0e0e0;overflow:hidden;padding:2px;text-align:left;white-space:nowrap;width:200px}.odb-log-table{font-size:13px}.odb-log-table th{border-top:solid 1px #000;border-bottom:solid 1px #000}.odb-log-table td{padding-bottom:4px;border-bottom:dotted 1px #ccc}
includes/settings-page.php CHANGED
@@ -6,9 +6,6 @@
6
  ********************************************************************************************/
7
  ?>
8
  <?php
9
- if(isset($_REQUEST['delete_log']))
10
- if($_REQUEST['delete_log'] == "Y") @unlink(dirname(__FILE__).'/rvg-optimize-db-log.html');
11
-
12
  if (isset($_POST['info_update'])) {
13
  // SAVE SETTINGS
14
  check_admin_referer('odb_action', 'odb_nonce');
6
  ********************************************************************************************/
7
  ?>
8
  <?php
 
 
 
9
  if (isset($_POST['info_update'])) {
10
  // SAVE SETTINGS
11
  check_admin_referer('odb_action', 'odb_nonce');
language/rvg-optimize-database-nl_NL.mo CHANGED
Binary file
language/rvg-optimize-database-nl_NL.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Optimize Database after Deleting Revisions v4.3\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2018-03-21 19:55+0100\n"
6
- "PO-Revision-Date: 2018-03-21 19:55+0100\n"
7
  "Last-Translator: Rolf van Gelder <info@cagewebdev.com>\n"
8
  "Language-Team: CAGE <info@cagewebdev.com>\n"
9
  "Language: nl_NL\n"
@@ -11,7 +11,7 @@ msgstr ""
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
- "X-Generator: Poedit 2.0.6\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
17
  "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
@@ -23,462 +23,510 @@ msgstr ""
23
  msgid "Cleaning Database"
24
  msgstr "Opschonen Database"
25
 
26
- #: classes/odb-cleaner.php:83
27
  msgid "DELETED REVISIONS"
28
  msgstr "VERWIJDERDE REVISIES"
29
 
30
- #: classes/odb-cleaner.php:88 classes/odb-cleaner.php:143
31
- #: classes/odb-cleaner.php:198
32
  msgid "prefix"
33
  msgstr "prefix"
34
 
35
- #: classes/odb-cleaner.php:89
36
  msgid "post / page"
37
  msgstr "bericht / pagina"
38
 
39
- #: classes/odb-cleaner.php:90
40
  msgid "revision date"
41
  msgstr "revisiedatum"
42
 
43
- #: classes/odb-cleaner.php:91
44
  msgid "revisions deleted"
45
  msgstr "revisies verwijderd"
46
 
47
- #: classes/odb-cleaner.php:102
48
  msgid "total number of revisions deleted"
49
  msgstr "totaal aantal verwijderde revisies"
50
 
51
- #: classes/odb-cleaner.php:112
52
  msgid "No REVISIONS found to delete"
53
  msgstr "Geen REVISIES gevonden om te verwijderen"
54
 
55
- #: classes/odb-cleaner.php:138
56
  msgid "DELETED TRASHED ITEMS"
57
  msgstr "VERWIJDERDE TRASHED ITEMS"
58
 
59
- #: classes/odb-cleaner.php:144
60
  msgid "type"
61
  msgstr "type"
62
 
63
- #: classes/odb-cleaner.php:145
64
  msgid "IP address / title"
65
  msgstr "IP adres / titel"
66
 
67
- #: classes/odb-cleaner.php:146
 
68
  msgid "date"
69
  msgstr "datum"
70
 
71
- #: classes/odb-cleaner.php:157
72
  msgid "total number of trashed items deleted"
73
  msgstr "totaal aantal verwijderede trashed items"
74
 
75
- #: classes/odb-cleaner.php:167
76
  msgid "No TRASHED ITEMS found to delete"
77
  msgstr "Geen PRULLENBAK ITEMS gevonden om te verwijderen"
78
 
79
- #: classes/odb-cleaner.php:193
80
  msgid "DELETED SPAMMED ITEMS"
81
  msgstr "VERWIJDERDE SPAMMEND ITEMS"
82
 
83
- #: classes/odb-cleaner.php:199
84
  msgid "comment author"
85
  msgstr "plaatser van de reactie"
86
 
87
- #: classes/odb-cleaner.php:200
88
  msgid "comment author email"
89
  msgstr "email van de plaatser van de reactie"
90
 
91
- #: classes/odb-cleaner.php:201
92
  msgid "comment date"
93
  msgstr "datum van de reactie"
94
 
95
- #: classes/odb-cleaner.php:212
96
  msgid "total number of spammed items deleted"
97
  msgstr "totaal aantal verwijderde spammed items"
98
 
99
- #: classes/odb-cleaner.php:222
100
  msgid "No SPAMMED ITEMS found to delete"
101
  msgstr "Geen SPAM gevonden om te verwijderen"
102
 
103
- #: classes/odb-cleaner.php:244
104
  msgid "NUMBER OF UNUSED TAGS DELETED"
105
  msgstr "AANTAL VERWIJDERDE ONGEBRUIKTE TAGS"
106
 
107
- #: classes/odb-cleaner.php:251
108
  msgid "No UNUSED TAGS found to delete"
109
  msgstr "Geen ONGEBRUIKTE TAGS gevonden om te verwijderen"
110
 
111
- #: classes/odb-cleaner.php:272
112
  msgid "NUMBER OF EXPIRED TRANSIENTS DELETED"
113
  msgstr "AANTAL VERWIJDERDE VERLOPEN TRANSIËNTS"
114
 
115
- #: classes/odb-cleaner.php:274
116
  msgid "NUMBER OF TRANSIENTS DELETED"
117
  msgstr "AANTAL VERWIJDERDE VERLOPEN TRANSIËNTS"
118
 
119
- #: classes/odb-cleaner.php:284
120
  msgid "No EXPIRED TRANSIENTS found to delete"
121
  msgstr "Geen VERLOPEN TRANSIËNTS gevonden om te verwijderen"
122
 
123
- #: classes/odb-cleaner.php:286
124
  msgid "No TRANSIENTS found to delete"
125
  msgstr "Geen VERLOPEN TRANSIËNTS gevonden om te verwijderen"
126
 
127
- #: classes/odb-cleaner.php:312
128
  msgid "NUMBER OF PINGBACKS AND TRACKBACKS DELETED"
129
  msgstr "AANTAL VERWIJDERDE PINGBACKS EN TRACKBACKS"
130
 
131
- #: classes/odb-cleaner.php:319
132
  msgid "No PINGBACKS nor TRACKBACKS found to delete"
133
  msgstr "Geen PINGBACKS en TRACKBACKS gevonden om te verwijderen"
134
 
135
- #: classes/odb-cleaner.php:341
136
  msgid "NUMBER OF oEmbed RECORDS DELETED"
137
  msgstr "AANTAL VERWIJDERDE oEmbed RECORDS"
138
 
139
- #: classes/odb-cleaner.php:348
140
  msgid "No oEmbed records found to delete"
141
  msgstr "Geen oEmbed records gevonden om te verwijderen"
142
 
143
- #: classes/odb-cleaner.php:367
144
  msgid "NUMBER OF POSTMETA ORPHANS DELETED"
145
  msgstr "AANTAL VERWIJDERDE POSTMETA WEZEN"
146
 
147
- #: classes/odb-cleaner.php:374
148
  msgid "No POSTMETA ORPHANS found to delete"
149
  msgstr "Geen POSTMETA WEZEN gevonden om te verwijderen"
150
 
151
- #: classes/odb-cleaner.php:400
152
  msgid "Optimizing Database Tables"
153
  msgstr "Optimaliseren van Databasetabellen"
154
 
155
- #: classes/odb-cleaner.php:407
156
  msgid "table name"
157
  msgstr "tabelnaam"
158
 
159
- #: classes/odb-cleaner.php:408
160
  msgid "optimization result"
161
  msgstr "resultaat optimalisatie"
162
 
163
- #: classes/odb-cleaner.php:409
164
  msgid "engine"
165
  msgstr "engine"
166
 
167
- #: classes/odb-cleaner.php:410
168
  msgid "table rows"
169
  msgstr "tabelrijen"
170
 
171
- #: classes/odb-cleaner.php:411
172
  msgid "table size"
173
  msgstr "tabelgrootte"
174
 
175
- #: classes/odb-cleaner.php:457
176
  msgid "Savings"
177
  msgstr "Besparingen"
178
 
179
- #: classes/odb-cleaner.php:464
180
  msgid "size of the database"
181
  msgstr "grootte van de database"
182
 
183
- #: classes/odb-cleaner.php:467
184
  msgid "BEFORE optimization"
185
  msgstr "VOOR de optimalisatie"
186
 
187
- #: classes/odb-cleaner.php:471
188
  msgid "AFTER optimization"
189
  msgstr "NA de optimalisatie"
190
 
191
- #: classes/odb-cleaner.php:475
192
  msgid "SAVINGS THIS TIME"
193
  msgstr "DIT KEER BESPAARD"
194
 
195
- #: classes/odb-cleaner.php:479
196
  msgid "TOTAL SAVINGS SINCE THE FIRST RUN"
197
  msgstr "TOTALE BESPARING SINDS DE EERSTE UITVOERING"
198
 
199
- #: classes/odb-cleaner.php:505
200
  msgid "DONE!"
201
  msgstr "KLAAR!"
202
 
203
- #: classes/odb-cleaner.php:510
204
  msgid "Optimization took"
205
  msgstr "Optimalizatie duurde"
206
 
207
- #: classes/odb-cleaner.php:510 classes/odb-displayer.php:129
208
- #: classes/odb-displayer.php:164
209
  msgid "seconds"
210
  msgstr "seconden"
211
 
212
- #: classes/odb-cleaner.php:520 classes/odb-displayer.php:186
213
- msgid "View Log File"
214
- msgstr "Bekijk Logbestand"
 
 
 
 
 
215
 
216
- #: classes/odb-cleaner.php:522 classes/odb-displayer.php:188
217
- msgid "Delete Log File"
218
- msgstr "Verwijder Logbestand"
 
219
 
220
- #: classes/odb-cleaner.php:753
221
  msgid "of"
222
  msgstr "van"
223
 
224
- #: classes/odb-cleaner.php:1253
225
  msgid "InnoDB table: skipped..."
226
  msgstr "InnoDB tabel overgeslagen..."
227
 
228
- #: classes/odb-cleaner.php:1258 classes/odb-cleaner.php:1260
229
  msgid "<span class=\"odb-optimized\">TABLE OPTIMIZED</span>"
230
  msgstr "<span class=\"odb-optimized\">TABEL GEOPTIMALISEERD</span>"
231
 
232
- #: classes/odb-cleaner.php:1259
233
  msgid "Table is already up to date"
234
  msgstr "Tabel is al optimaal"
235
 
236
- #: classes/odb-displayer.php:28
237
  msgid "Optimize Database after Deleting Revisions"
238
  msgstr "Optimize Database after Deleting Revisions"
239
 
240
- #: classes/odb-displayer.php:31
241
  msgid ""
242
  "A popular 'one-click' plugin to clean and optimize your WordPress database."
243
  msgstr ""
244
  "Een populaire 'one-click' plugin om de WordPress database op te schonen en "
245
  "te optimaliseren."
246
 
247
- #: classes/odb-displayer.php:34
248
  msgid "Plugin version"
249
  msgstr "Plugin versie"
250
 
251
- #: classes/odb-displayer.php:35
252
  msgid "Plugin page"
253
  msgstr "Pluginpagina"
254
 
255
- #: classes/odb-displayer.php:36
256
  msgid "Download page"
257
  msgstr "Downloadpagina"
258
 
259
- #: classes/odb-displayer.php:37
260
  msgid "Author"
261
  msgstr "Auteur"
262
 
263
- #: classes/odb-displayer.php:38
264
  msgid "Company"
265
  msgstr "Bedrijf"
266
 
267
- #: classes/odb-displayer.php:39
268
  msgid "Donation page"
269
  msgstr "Donatiepagina"
270
 
271
- #: classes/odb-displayer.php:53
272
  msgid "YES"
273
  msgstr "JA"
274
 
275
- #: classes/odb-displayer.php:54
276
  msgid "NO"
277
  msgstr "NEE"
278
 
279
- #: classes/odb-displayer.php:62 includes/settings-page.php:324
280
  msgid "DELETE EXPIRED TRANSIENTS"
281
  msgstr "AANTAL VERWIJDERDE VERLOPEN TRANSIËNTS"
282
 
283
- #: classes/odb-displayer.php:64 includes/settings-page.php:327
284
  msgid "DELETE ALL TRANSIENTS"
285
  msgstr "VERWIJDER ALLE TRANSIENTS"
286
 
287
- #: classes/odb-displayer.php:76
288
  msgid "EVERY FIVE MINUTES"
289
  msgstr "IEDERE VIJF MINUTEN"
290
 
291
- #: classes/odb-displayer.php:78
292
  msgid "ONCE HOURLY"
293
  msgstr "ELK UUR"
294
 
295
- #: classes/odb-displayer.php:80
296
  msgid "TWICE DAILY"
297
  msgstr "TWEEMAAL DAAGS"
298
 
299
- #: classes/odb-displayer.php:82
300
  msgid "ONCE DAILY"
301
  msgstr "DAGELIJKS"
302
 
303
- #: classes/odb-displayer.php:84
304
  msgid "ONCE WEEKLY"
305
  msgstr "WEKELIJKS"
306
 
307
- #: classes/odb-displayer.php:86
308
  msgid "ONCE MONTHLY"
309
  msgstr "MAANDELIJKS"
310
 
311
- #: classes/odb-displayer.php:87 includes/settings-page.php:364
312
  msgid "NOT SCHEDULED"
313
  msgstr "NIET GEPLAND"
314
 
315
- #: classes/odb-displayer.php:92
316
  msgid "Current settings"
317
  msgstr "Huidige instellingen"
318
 
319
- #: classes/odb-displayer.php:107
320
  msgid "NONE"
321
  msgstr "GEEN"
322
 
323
- #: classes/odb-displayer.php:109
324
  msgid "Delete revisions of"
325
  msgstr "Verwijder revisies van"
326
 
327
- #: classes/odb-displayer.php:112 includes/settings-page.php:155
328
- #: includes/settings-page.php:266
329
  msgid "Delete revisions older than"
330
  msgstr "Verwijder revisies ouder dan"
331
 
332
- #: classes/odb-displayer.php:112 classes/odb-displayer.php:160
333
  msgid "days"
334
  msgstr "dagen"
335
 
336
- #: classes/odb-displayer.php:116
337
  msgid "Maximum number of - most recent - revisions to keep per post / page"
338
  msgstr ""
339
  "Maximaal aantal (meest recente) revisies die bewaard worden per bericht / "
340
  "pagina"
341
 
342
- #: classes/odb-displayer.php:120 includes/settings-page.php:299
343
  msgid "Delete trashed items"
344
  msgstr "Verwijder trashed items"
345
 
346
- #: classes/odb-displayer.php:121 includes/settings-page.php:305
347
  msgid "Delete spammed items"
348
  msgstr "Verwijder spammed items"
349
 
350
- #: classes/odb-displayer.php:122 includes/settings-page.php:311
351
  msgid "Delete unused tags"
352
  msgstr "Verwijder ongebruikte tags"
353
 
354
- #: classes/odb-displayer.php:123 includes/settings-page.php:317
355
  msgid "Delete transients"
356
  msgstr "Verwijder transiënts"
357
 
358
- #: classes/odb-displayer.php:124 includes/settings-page.php:336
359
  msgid "Delete pingbacks and trackbacks"
360
  msgstr "Verwijder pingback en trackbacks"
361
 
362
- #: classes/odb-displayer.php:125 includes/settings-page.php:342
363
  msgid "Clear oEmbed cache"
364
  msgstr "Leeg de oEmbed cache"
365
 
366
- #: classes/odb-displayer.php:126 includes/settings-page.php:354
367
  msgid "Keep a log"
368
  msgstr "Gebruik een logbestand"
369
 
370
- #: classes/odb-displayer.php:127
371
  msgid "Optimize InnoDB tables"
372
  msgstr "Optimaliseer InnoDB tabellen"
373
 
374
- #: classes/odb-displayer.php:128
375
  msgid "Number of excluded tables"
376
  msgstr "Aantal uitgesloten tabellen"
377
 
378
- #: classes/odb-displayer.php:129
379
  msgid "Last run"
380
  msgstr "Laatste uitvoering"
381
 
382
- #: classes/odb-displayer.php:129 includes/settings-page.php:398
383
  msgid "hrs"
384
  msgstr "uur"
385
 
386
- #: classes/odb-displayer.php:129
387
  msgid "in"
388
  msgstr "in"
389
 
390
- #: classes/odb-displayer.php:130 includes/settings-page.php:360
391
  msgid "Scheduler"
392
  msgstr "Planner"
393
 
394
- #: classes/odb-displayer.php:140
395
  msgid "Next scheduled run"
396
  msgstr "Volgende geplande uitvoering"
397
 
398
- #: classes/odb-displayer.php:145
399
  msgid "Total savings since the first run"
400
  msgstr "Totale besparing sinds de eerste uitvoering"
401
 
402
- #: classes/odb-displayer.php:161
403
  msgid "hours"
404
  msgstr "uur"
405
 
406
- #: classes/odb-displayer.php:162
407
  msgid "minutes"
408
  msgstr "minuten"
409
 
410
- #: classes/odb-displayer.php:163
411
  msgid "and"
412
  msgstr "en"
413
 
414
- #: classes/odb-displayer.php:179
415
  msgid "Change Settings"
416
  msgstr "Wijzig instellingen"
417
 
418
- #: classes/odb-displayer.php:195
419
  msgid "Start Optimization"
420
  msgstr "Start Optimalisatie"
421
 
422
- #: classes/odb-logger.php:52
423
- msgid "A WordPress Plugin by"
424
- msgstr "Een WordPress Plugin door"
 
 
 
 
 
 
 
 
 
 
 
 
425
 
426
- #: classes/odb-logger.php:52
427
- msgid "The Netherlands"
428
- msgstr "Nederland"
429
 
430
- #: classes/odb-logger.php:56
431
- msgid "time"
432
- msgstr "tijd"
433
 
434
- #: classes/odb-logger.php:57
435
- msgid "deleted<br />revisions"
436
- msgstr "verw.<br />revisies"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
437
 
438
- #: classes/odb-logger.php:58
439
- msgid "deleted<br />trash"
440
- msgstr "verw.<br />prullenbak items"
441
 
442
- #: classes/odb-logger.php:59
443
- msgid "deleted<br />spam"
444
- msgstr "verw.<br />spamitems"
445
 
446
- #: classes/odb-logger.php:60
447
- msgid "deleted<br />tags"
448
- msgstr "verw.<br /> tags"
449
 
450
- #: classes/odb-logger.php:61
451
- msgid "deleted<br />transients"
452
- msgstr "verw.<br />transiënts"
453
 
454
- #: classes/odb-logger.php:62
455
- msgid "deleted<br />pingbacks<br />trackbacks"
456
- msgstr "verwijderde<br />pingbacks<br />trackbacks"
457
 
458
- #: classes/odb-logger.php:63
459
- msgid "deleted<br />oEmbed<br />records"
460
- msgstr "verwijderde<br />oEmbed<br />records"
461
 
462
- #: classes/odb-logger.php:64
463
- msgid "deleted<br />orphans"
464
- msgstr "verw.<br />wezen"
 
 
 
 
 
 
 
 
465
 
466
  # @ rvg-optimize-database
467
- #: classes/odb-logger.php:65
468
  msgid "nr of optimized tables"
469
- msgstr "aantal geoptima-<br />liseerde tabellen"
470
 
471
- #: classes/odb-logger.php:66
472
  msgid "database size BEFORE"
473
- msgstr "database<br />grootte<br />VOOR"
474
 
475
- #: classes/odb-logger.php:67
476
  msgid "database size AFTER"
477
- msgstr "database<br />grootte<br />NA"
478
-
479
- #: classes/odb-logger.php:68
480
- msgid "SAVINGS"
481
- msgstr "BESPARINGEN"
482
 
483
  # @ default
484
  #: classes/odb-scheduler.php:38
@@ -494,11 +542,11 @@ msgstr "Maandelijks"
494
  msgid "Every Five Minutes"
495
  msgstr "Iedere vijf minuten"
496
 
497
- #: includes/settings-page.php:118
498
  msgid "Optimize Database after Deleting Revisions SETTINGS UPDATED"
499
  msgstr "Optimize Database after Deleting Revisions INSTELLINGEN AANGEPAST"
500
 
501
- #: includes/settings-page.php:120
502
  msgid ""
503
  "Click <a href=\"tools.php?page=rvg-optimize-database\" class=\"odb-bold"
504
  "\">HERE</a> to run the optimization"
@@ -506,96 +554,96 @@ msgstr ""
506
  "Klik <a href=\"tools.php?page=rvg-optimize-database\" class=\"odb-bold"
507
  "\">HIER</a> om de optimalisatie te starten"
508
 
509
- #: includes/settings-page.php:155
510
  msgid "You have to enter: "
511
  msgstr "Je moet invullen:"
512
 
513
- #: includes/settings-page.php:160
514
  msgid "<Delete revisions older than> should be a number"
515
  msgstr "<Verwijder revisites ouder dan> moet een getal zijn"
516
 
517
- #: includes/settings-page.php:168
518
  msgid "You have to enter the <Maximum number of revisions>"
519
  msgstr "Je moet het <Maximaal aantal revisies> invullen"
520
 
521
- #: includes/settings-page.php:173
522
  msgid "<Maximum number of revisions> should be a number"
523
  msgstr "<Maximaal aantal revisies> moet een getal zijn"
524
 
525
- #: includes/settings-page.php:230 rvg-optimize-database.php:429
526
  msgid "Settings"
527
  msgstr "Instellingen"
528
 
529
- #: includes/settings-page.php:235
530
  msgid "Delete revisions for the following (custom) post type(s):"
531
  msgstr "Verwijder revisies voor de volgende (custom) post type(s):"
532
 
533
- #: includes/settings-page.php:271
534
  msgid "day(s)"
535
  msgstr "dag(en)"
536
 
537
- #: includes/settings-page.php:283
538
  msgid "Maximum number of - most recent - revisions<br>to keep per post / page"
539
  msgstr ""
540
  "Maximaal aantal - meest recente - revisies<br>om te bewaren per post/pagina"
541
 
542
- #: includes/settings-page.php:289
543
  msgid "('0' means: delete <u>ALL</u> revisions)"
544
  msgstr "('0' betekent: verwijder <u>ALLE</u> revisies)"
545
 
546
- #: includes/settings-page.php:321
547
  msgid "DO NOT DELETE TRANSIENTS"
548
  msgstr "GEEN TRANSIENTS VERWIJDEREN"
549
 
550
- #: includes/settings-page.php:348
551
  msgid "Optimize InnoDB tables too"
552
  msgstr "Optimiliseer ook InnoDB tabellen"
553
 
554
- #: includes/settings-page.php:367
555
  msgid "run optimization HOURLY"
556
  msgstr "voer de optimalisatie ELK UUR uit"
557
 
558
- #: includes/settings-page.php:370
559
  msgid "run optimization TWICE A DAY"
560
  msgstr "voer de optimalisatie TWEE KEER PER DAG uit"
561
 
562
- #: includes/settings-page.php:373
563
  msgid "run optimization DAILY"
564
  msgstr "voer de optimalisatie DAGELIJKS uit"
565
 
566
- #: includes/settings-page.php:376
567
  msgid "run optimization WEEKLY"
568
  msgstr "voer de optimalisatie WEKELIJKS uit"
569
 
570
- #: includes/settings-page.php:379
571
  msgid "run optimization MONTHLY"
572
  msgstr "voer de optimalisatie MAANDELIJKS uit"
573
 
574
- #: includes/settings-page.php:389
575
  msgid "Time"
576
  msgstr "Tijd"
577
 
578
- #: includes/settings-page.php:413
579
  msgid "Show '1-click' link in Admin Bar"
580
  msgstr "Toon de '1-klik' link in de Admin Balk"
581
 
582
- #: includes/settings-page.php:419
583
  msgid "Show an icon in the Admin Menu"
584
  msgstr "Toon een icon in het Admin Menu"
585
 
586
- #: includes/settings-page.php:424
587
  msgid "change will be visible after loading the next page"
588
  msgstr "wijziging wordt pas zichtbaar na het laden van de volgende pagina"
589
 
590
- #: includes/settings-page.php:429 includes/settings-page.php:475
591
  msgid "Save Settings"
592
  msgstr "Bewaar instellingen"
593
 
594
- #: includes/settings-page.php:431 includes/settings-page.php:477
595
  msgid "Go To Optimizer"
596
  msgstr "Ga naar Optimalisatie"
597
 
598
- #: includes/settings-page.php:438
599
  msgid ""
600
  "EXCLUDE DATABASE TABLES FROM OPTIMIZATION:<br><span class=\"odb-underline-red"
601
  "\">CHECKED</span> TABLES <span class=\"odb-underline-red\">WON'T</span> BE "
@@ -605,34 +653,46 @@ msgstr ""
605
  "underline-red\">AANGEVINKTE</span> TABELLEN ZULLEN <span class=\"odb-"
606
  "underline-red\">NIET</span> GEOPTIMALISEERD WORDEN!</span>"
607
 
608
- #: includes/settings-page.php:444
609
  msgid "check all tables"
610
  msgstr "vink alle tabellen aan"
611
 
612
- #: includes/settings-page.php:446
613
  msgid "uncheck all tables"
614
  msgstr "vink alle tabellen uit"
615
 
616
- #: includes/settings-page.php:448
617
  msgid "check all NON-WordPress tables"
618
  msgstr "vink alle NIET-WordPress tabellen aan"
619
 
620
  # @ rvg-optimize-database
621
- #: rvg-optimize-database.php:401 rvg-optimize-database.php:402
622
- #: rvg-optimize-database.php:416 rvg-optimize-database.php:417
623
- #: rvg-optimize-database.php:457 rvg-optimize-database.php:458
624
- #: rvg-optimize-database.php:475 rvg-optimize-database.php:476
625
  msgid "Optimize Database"
626
  msgstr "Optimaliseer Database"
627
 
628
  # @ optimize_db
629
- #: rvg-optimize-database.php:446
630
  msgid "Optimize DB (1 click)"
631
  msgstr "Optimaliseer DB (1 klik)"
632
 
633
- #: rvg-optimize-database.php:573
634
- msgid "Optimize Database after Deleting Revisions LOG FILE HAS BEEN DELETED"
635
- msgstr "Optimize Database after Deleting Revisions LOGBESTAND VERWIJDERD"
 
 
 
 
 
 
 
 
 
 
 
 
636
 
637
  #~ msgid "current server time"
638
  #~ msgstr "huidige systeemtijd"
2
  msgstr ""
3
  "Project-Id-Version: Optimize Database after Deleting Revisions v4.3\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2018-05-08 14:04+0200\n"
6
+ "PO-Revision-Date: 2018-05-08 14:08+0200\n"
7
  "Last-Translator: Rolf van Gelder <info@cagewebdev.com>\n"
8
  "Language-Team: CAGE <info@cagewebdev.com>\n"
9
  "Language: nl_NL\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
14
+ "X-Generator: Poedit 2.0.7\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
17
  "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
23
  msgid "Cleaning Database"
24
  msgstr "Opschonen Database"
25
 
26
+ #: classes/odb-cleaner.php:81
27
  msgid "DELETED REVISIONS"
28
  msgstr "VERWIJDERDE REVISIES"
29
 
30
+ #: classes/odb-cleaner.php:86 classes/odb-cleaner.php:141
31
+ #: classes/odb-cleaner.php:196
32
  msgid "prefix"
33
  msgstr "prefix"
34
 
35
+ #: classes/odb-cleaner.php:87
36
  msgid "post / page"
37
  msgstr "bericht / pagina"
38
 
39
+ #: classes/odb-cleaner.php:88
40
  msgid "revision date"
41
  msgstr "revisiedatum"
42
 
43
+ #: classes/odb-cleaner.php:89
44
  msgid "revisions deleted"
45
  msgstr "revisies verwijderd"
46
 
47
+ #: classes/odb-cleaner.php:100
48
  msgid "total number of revisions deleted"
49
  msgstr "totaal aantal verwijderde revisies"
50
 
51
+ #: classes/odb-cleaner.php:110
52
  msgid "No REVISIONS found to delete"
53
  msgstr "Geen REVISIES gevonden om te verwijderen"
54
 
55
+ #: classes/odb-cleaner.php:136
56
  msgid "DELETED TRASHED ITEMS"
57
  msgstr "VERWIJDERDE TRASHED ITEMS"
58
 
59
+ #: classes/odb-cleaner.php:142
60
  msgid "type"
61
  msgstr "type"
62
 
63
+ #: classes/odb-cleaner.php:143
64
  msgid "IP address / title"
65
  msgstr "IP adres / titel"
66
 
67
+ #: classes/odb-cleaner.php:144 classes/odb-logger.php:114
68
+ #: classes/odb-logger.php:240
69
  msgid "date"
70
  msgstr "datum"
71
 
72
+ #: classes/odb-cleaner.php:155
73
  msgid "total number of trashed items deleted"
74
  msgstr "totaal aantal verwijderede trashed items"
75
 
76
+ #: classes/odb-cleaner.php:165
77
  msgid "No TRASHED ITEMS found to delete"
78
  msgstr "Geen PRULLENBAK ITEMS gevonden om te verwijderen"
79
 
80
+ #: classes/odb-cleaner.php:191
81
  msgid "DELETED SPAMMED ITEMS"
82
  msgstr "VERWIJDERDE SPAMMEND ITEMS"
83
 
84
+ #: classes/odb-cleaner.php:197
85
  msgid "comment author"
86
  msgstr "plaatser van de reactie"
87
 
88
+ #: classes/odb-cleaner.php:198
89
  msgid "comment author email"
90
  msgstr "email van de plaatser van de reactie"
91
 
92
+ #: classes/odb-cleaner.php:199
93
  msgid "comment date"
94
  msgstr "datum van de reactie"
95
 
96
+ #: classes/odb-cleaner.php:210
97
  msgid "total number of spammed items deleted"
98
  msgstr "totaal aantal verwijderde spammed items"
99
 
100
+ #: classes/odb-cleaner.php:220
101
  msgid "No SPAMMED ITEMS found to delete"
102
  msgstr "Geen SPAM gevonden om te verwijderen"
103
 
104
+ #: classes/odb-cleaner.php:242
105
  msgid "NUMBER OF UNUSED TAGS DELETED"
106
  msgstr "AANTAL VERWIJDERDE ONGEBRUIKTE TAGS"
107
 
108
+ #: classes/odb-cleaner.php:249
109
  msgid "No UNUSED TAGS found to delete"
110
  msgstr "Geen ONGEBRUIKTE TAGS gevonden om te verwijderen"
111
 
112
+ #: classes/odb-cleaner.php:270
113
  msgid "NUMBER OF EXPIRED TRANSIENTS DELETED"
114
  msgstr "AANTAL VERWIJDERDE VERLOPEN TRANSIËNTS"
115
 
116
+ #: classes/odb-cleaner.php:272
117
  msgid "NUMBER OF TRANSIENTS DELETED"
118
  msgstr "AANTAL VERWIJDERDE VERLOPEN TRANSIËNTS"
119
 
120
+ #: classes/odb-cleaner.php:282
121
  msgid "No EXPIRED TRANSIENTS found to delete"
122
  msgstr "Geen VERLOPEN TRANSIËNTS gevonden om te verwijderen"
123
 
124
+ #: classes/odb-cleaner.php:284
125
  msgid "No TRANSIENTS found to delete"
126
  msgstr "Geen VERLOPEN TRANSIËNTS gevonden om te verwijderen"
127
 
128
+ #: classes/odb-cleaner.php:310
129
  msgid "NUMBER OF PINGBACKS AND TRACKBACKS DELETED"
130
  msgstr "AANTAL VERWIJDERDE PINGBACKS EN TRACKBACKS"
131
 
132
+ #: classes/odb-cleaner.php:317
133
  msgid "No PINGBACKS nor TRACKBACKS found to delete"
134
  msgstr "Geen PINGBACKS en TRACKBACKS gevonden om te verwijderen"
135
 
136
+ #: classes/odb-cleaner.php:339
137
  msgid "NUMBER OF oEmbed RECORDS DELETED"
138
  msgstr "AANTAL VERWIJDERDE oEmbed RECORDS"
139
 
140
+ #: classes/odb-cleaner.php:346
141
  msgid "No oEmbed records found to delete"
142
  msgstr "Geen oEmbed records gevonden om te verwijderen"
143
 
144
+ #: classes/odb-cleaner.php:365
145
  msgid "NUMBER OF POSTMETA ORPHANS DELETED"
146
  msgstr "AANTAL VERWIJDERDE POSTMETA WEZEN"
147
 
148
+ #: classes/odb-cleaner.php:372
149
  msgid "No POSTMETA ORPHANS found to delete"
150
  msgstr "Geen POSTMETA WEZEN gevonden om te verwijderen"
151
 
152
+ #: classes/odb-cleaner.php:398
153
  msgid "Optimizing Database Tables"
154
  msgstr "Optimaliseren van Databasetabellen"
155
 
156
+ #: classes/odb-cleaner.php:405
157
  msgid "table name"
158
  msgstr "tabelnaam"
159
 
160
+ #: classes/odb-cleaner.php:406
161
  msgid "optimization result"
162
  msgstr "resultaat optimalisatie"
163
 
164
+ #: classes/odb-cleaner.php:407
165
  msgid "engine"
166
  msgstr "engine"
167
 
168
+ #: classes/odb-cleaner.php:408
169
  msgid "table rows"
170
  msgstr "tabelrijen"
171
 
172
+ #: classes/odb-cleaner.php:409
173
  msgid "table size"
174
  msgstr "tabelgrootte"
175
 
176
+ #: classes/odb-cleaner.php:456
177
  msgid "Savings"
178
  msgstr "Besparingen"
179
 
180
+ #: classes/odb-cleaner.php:463
181
  msgid "size of the database"
182
  msgstr "grootte van de database"
183
 
184
+ #: classes/odb-cleaner.php:466
185
  msgid "BEFORE optimization"
186
  msgstr "VOOR de optimalisatie"
187
 
188
+ #: classes/odb-cleaner.php:470
189
  msgid "AFTER optimization"
190
  msgstr "NA de optimalisatie"
191
 
192
+ #: classes/odb-cleaner.php:474
193
  msgid "SAVINGS THIS TIME"
194
  msgstr "DIT KEER BESPAARD"
195
 
196
+ #: classes/odb-cleaner.php:478
197
  msgid "TOTAL SAVINGS SINCE THE FIRST RUN"
198
  msgstr "TOTALE BESPARING SINDS DE EERSTE UITVOERING"
199
 
200
+ #: classes/odb-cleaner.php:504
201
  msgid "DONE!"
202
  msgstr "KLAAR!"
203
 
204
+ #: classes/odb-cleaner.php:509
205
  msgid "Optimization took"
206
  msgstr "Optimalizatie duurde"
207
 
208
+ #: classes/odb-cleaner.php:509 classes/odb-displayer.php:130
209
+ #: classes/odb-displayer.php:165
210
  msgid "seconds"
211
  msgstr "seconden"
212
 
213
+ #: classes/odb-cleaner.php:518 classes/odb-displayer.php:189
214
+ #: classes/odb-logger.php:159
215
+ msgid "Clear the log?"
216
+ msgstr "Logs wissen?"
217
+
218
+ #: classes/odb-cleaner.php:526 classes/odb-displayer.php:203
219
+ msgid "View Log"
220
+ msgstr "Bekijk Logs"
221
 
222
+ #: classes/odb-cleaner.php:528 classes/odb-displayer.php:205
223
+ #: classes/odb-logger.php:168
224
+ msgid "Clear Log"
225
+ msgstr "Wis Logs"
226
 
227
+ #: classes/odb-cleaner.php:759
228
  msgid "of"
229
  msgstr "van"
230
 
231
+ #: classes/odb-cleaner.php:1259
232
  msgid "InnoDB table: skipped..."
233
  msgstr "InnoDB tabel overgeslagen..."
234
 
235
+ #: classes/odb-cleaner.php:1264 classes/odb-cleaner.php:1266
236
  msgid "<span class=\"odb-optimized\">TABLE OPTIMIZED</span>"
237
  msgstr "<span class=\"odb-optimized\">TABEL GEOPTIMALISEERD</span>"
238
 
239
+ #: classes/odb-cleaner.php:1265
240
  msgid "Table is already up to date"
241
  msgstr "Tabel is al optimaal"
242
 
243
+ #: classes/odb-displayer.php:29
244
  msgid "Optimize Database after Deleting Revisions"
245
  msgstr "Optimize Database after Deleting Revisions"
246
 
247
+ #: classes/odb-displayer.php:32
248
  msgid ""
249
  "A popular 'one-click' plugin to clean and optimize your WordPress database."
250
  msgstr ""
251
  "Een populaire 'one-click' plugin om de WordPress database op te schonen en "
252
  "te optimaliseren."
253
 
254
+ #: classes/odb-displayer.php:35
255
  msgid "Plugin version"
256
  msgstr "Plugin versie"
257
 
258
+ #: classes/odb-displayer.php:36
259
  msgid "Plugin page"
260
  msgstr "Pluginpagina"
261
 
262
+ #: classes/odb-displayer.php:37
263
  msgid "Download page"
264
  msgstr "Downloadpagina"
265
 
266
+ #: classes/odb-displayer.php:38
267
  msgid "Author"
268
  msgstr "Auteur"
269
 
270
+ #: classes/odb-displayer.php:39
271
  msgid "Company"
272
  msgstr "Bedrijf"
273
 
274
+ #: classes/odb-displayer.php:40
275
  msgid "Donation page"
276
  msgstr "Donatiepagina"
277
 
278
+ #: classes/odb-displayer.php:54
279
  msgid "YES"
280
  msgstr "JA"
281
 
282
+ #: classes/odb-displayer.php:55
283
  msgid "NO"
284
  msgstr "NEE"
285
 
286
+ #: classes/odb-displayer.php:63 includes/settings-page.php:321
287
  msgid "DELETE EXPIRED TRANSIENTS"
288
  msgstr "AANTAL VERWIJDERDE VERLOPEN TRANSIËNTS"
289
 
290
+ #: classes/odb-displayer.php:65 includes/settings-page.php:324
291
  msgid "DELETE ALL TRANSIENTS"
292
  msgstr "VERWIJDER ALLE TRANSIENTS"
293
 
294
+ #: classes/odb-displayer.php:77
295
  msgid "EVERY FIVE MINUTES"
296
  msgstr "IEDERE VIJF MINUTEN"
297
 
298
+ #: classes/odb-displayer.php:79
299
  msgid "ONCE HOURLY"
300
  msgstr "ELK UUR"
301
 
302
+ #: classes/odb-displayer.php:81
303
  msgid "TWICE DAILY"
304
  msgstr "TWEEMAAL DAAGS"
305
 
306
+ #: classes/odb-displayer.php:83
307
  msgid "ONCE DAILY"
308
  msgstr "DAGELIJKS"
309
 
310
+ #: classes/odb-displayer.php:85
311
  msgid "ONCE WEEKLY"
312
  msgstr "WEKELIJKS"
313
 
314
+ #: classes/odb-displayer.php:87
315
  msgid "ONCE MONTHLY"
316
  msgstr "MAANDELIJKS"
317
 
318
+ #: classes/odb-displayer.php:88 includes/settings-page.php:361
319
  msgid "NOT SCHEDULED"
320
  msgstr "NIET GEPLAND"
321
 
322
+ #: classes/odb-displayer.php:93
323
  msgid "Current settings"
324
  msgstr "Huidige instellingen"
325
 
326
+ #: classes/odb-displayer.php:108
327
  msgid "NONE"
328
  msgstr "GEEN"
329
 
330
+ #: classes/odb-displayer.php:110
331
  msgid "Delete revisions of"
332
  msgstr "Verwijder revisies van"
333
 
334
+ #: classes/odb-displayer.php:113 includes/settings-page.php:152
335
+ #: includes/settings-page.php:263
336
  msgid "Delete revisions older than"
337
  msgstr "Verwijder revisies ouder dan"
338
 
339
+ #: classes/odb-displayer.php:113 classes/odb-displayer.php:161
340
  msgid "days"
341
  msgstr "dagen"
342
 
343
+ #: classes/odb-displayer.php:117
344
  msgid "Maximum number of - most recent - revisions to keep per post / page"
345
  msgstr ""
346
  "Maximaal aantal (meest recente) revisies die bewaard worden per bericht / "
347
  "pagina"
348
 
349
+ #: classes/odb-displayer.php:121 includes/settings-page.php:296
350
  msgid "Delete trashed items"
351
  msgstr "Verwijder trashed items"
352
 
353
+ #: classes/odb-displayer.php:122 includes/settings-page.php:302
354
  msgid "Delete spammed items"
355
  msgstr "Verwijder spammed items"
356
 
357
+ #: classes/odb-displayer.php:123 includes/settings-page.php:308
358
  msgid "Delete unused tags"
359
  msgstr "Verwijder ongebruikte tags"
360
 
361
+ #: classes/odb-displayer.php:124 includes/settings-page.php:314
362
  msgid "Delete transients"
363
  msgstr "Verwijder transiënts"
364
 
365
+ #: classes/odb-displayer.php:125 includes/settings-page.php:333
366
  msgid "Delete pingbacks and trackbacks"
367
  msgstr "Verwijder pingback en trackbacks"
368
 
369
+ #: classes/odb-displayer.php:126 includes/settings-page.php:339
370
  msgid "Clear oEmbed cache"
371
  msgstr "Leeg de oEmbed cache"
372
 
373
+ #: classes/odb-displayer.php:127 includes/settings-page.php:351
374
  msgid "Keep a log"
375
  msgstr "Gebruik een logbestand"
376
 
377
+ #: classes/odb-displayer.php:128
378
  msgid "Optimize InnoDB tables"
379
  msgstr "Optimaliseer InnoDB tabellen"
380
 
381
+ #: classes/odb-displayer.php:129
382
  msgid "Number of excluded tables"
383
  msgstr "Aantal uitgesloten tabellen"
384
 
385
+ #: classes/odb-displayer.php:130
386
  msgid "Last run"
387
  msgstr "Laatste uitvoering"
388
 
389
+ #: classes/odb-displayer.php:130 includes/settings-page.php:395
390
  msgid "hrs"
391
  msgstr "uur"
392
 
393
+ #: classes/odb-displayer.php:130
394
  msgid "in"
395
  msgstr "in"
396
 
397
+ #: classes/odb-displayer.php:131 includes/settings-page.php:357
398
  msgid "Scheduler"
399
  msgstr "Planner"
400
 
401
+ #: classes/odb-displayer.php:141
402
  msgid "Next scheduled run"
403
  msgstr "Volgende geplande uitvoering"
404
 
405
+ #: classes/odb-displayer.php:146
406
  msgid "Total savings since the first run"
407
  msgstr "Totale besparing sinds de eerste uitvoering"
408
 
409
+ #: classes/odb-displayer.php:162
410
  msgid "hours"
411
  msgstr "uur"
412
 
413
+ #: classes/odb-displayer.php:163
414
  msgid "minutes"
415
  msgstr "minuten"
416
 
417
+ #: classes/odb-displayer.php:164
418
  msgid "and"
419
  msgstr "en"
420
 
421
+ #: classes/odb-displayer.php:180 classes/odb-logger.php:166
422
  msgid "Change Settings"
423
  msgstr "Wijzig instellingen"
424
 
425
+ #: classes/odb-displayer.php:210 classes/odb-logger.php:172
426
  msgid "Start Optimization"
427
  msgstr "Start Optimalisatie"
428
 
429
+ #: classes/odb-logger.php:102
430
+ msgid "Logs"
431
+ msgstr "Logs"
432
+
433
+ #: classes/odb-logger.php:115
434
+ msgid "deleted<br>revisions"
435
+ msgstr "verw.<br >revisies"
436
+
437
+ #: classes/odb-logger.php:116
438
+ msgid "deleted<br>trash"
439
+ msgstr "verw.<br >prullenbak items"
440
+
441
+ #: classes/odb-logger.php:117
442
+ msgid "deleted<br>spam"
443
+ msgstr "verw.<br >spamitems"
444
 
445
+ #: classes/odb-logger.php:118
446
+ msgid "deleted<br>tags"
447
+ msgstr "verw.<br > tags"
448
 
449
+ #: classes/odb-logger.php:119
450
+ msgid "deleted<br>transients"
451
+ msgstr "verw.<br>transiënts"
452
 
453
+ #: classes/odb-logger.php:120
454
+ msgid "deleted<br>pingbacks<br>trackbacks"
455
+ msgstr "verwijderde<br>pingbacks<br>trackbacks"
456
+
457
+ #: classes/odb-logger.php:121
458
+ msgid "deleted<br>oEmbed<br>records"
459
+ msgstr "verwijderde<br>oEmbed<br>records"
460
+
461
+ #: classes/odb-logger.php:122
462
+ msgid "deleted<br>orphans"
463
+ msgstr "verw.<br>wezen"
464
+
465
+ # @ rvg-optimize-database
466
+ #: classes/odb-logger.php:123
467
+ msgid "nr of<br>optimized<br>tables"
468
+ msgstr "aantal geoptima-<br>liseerde tabellen"
469
+
470
+ #: classes/odb-logger.php:124
471
+ msgid "database<br> size<br>BEFORE"
472
+ msgstr "database<br>grootte<br>VOOR"
473
+
474
+ #: classes/odb-logger.php:125
475
+ msgid "database<br>size<br>AFTER"
476
+ msgstr "database<br>grootte<br>NA"
477
+
478
+ #: classes/odb-logger.php:126 classes/odb-logger.php:251
479
+ msgid "SAVINGS"
480
+ msgstr "BESPARINGEN"
481
 
482
+ #: classes/odb-logger.php:170
483
+ msgid "Export to CSV"
484
+ msgstr "Exporteer naar CSV"
485
 
486
+ #: classes/odb-logger.php:239
487
+ msgid "id"
488
+ msgstr "id"
489
 
490
+ #: classes/odb-logger.php:241
491
+ msgid "deleted revisions"
492
+ msgstr "verw. revisies"
493
 
494
+ #: classes/odb-logger.php:242
495
+ msgid "deleted trash"
496
+ msgstr "verw. prullenbak items"
497
 
498
+ #: classes/odb-logger.php:243
499
+ msgid "deleted spam"
500
+ msgstr "verw. spam items"
501
 
502
+ #: classes/odb-logger.php:244
503
+ msgid "deleted tags"
504
+ msgstr "verw. tags"
505
 
506
+ #: classes/odb-logger.php:245
507
+ msgid "deleted transients"
508
+ msgstr "Verwijderde transiënts"
509
+
510
+ #: classes/odb-logger.php:246
511
+ msgid "deleted pingbacks"
512
+ msgstr "verwijderde pingbacks"
513
+
514
+ #: classes/odb-logger.php:247
515
+ msgid "deleted orphans"
516
+ msgstr "verw. wezen"
517
 
518
  # @ rvg-optimize-database
519
+ #: classes/odb-logger.php:248
520
  msgid "nr of optimized tables"
521
+ msgstr "aantal geoptimaliseerde tabellen"
522
 
523
+ #: classes/odb-logger.php:249
524
  msgid "database size BEFORE"
525
+ msgstr "database grootte VOOR"
526
 
527
+ #: classes/odb-logger.php:250
528
  msgid "database size AFTER"
529
+ msgstr "database grootte NA"
 
 
 
 
530
 
531
  # @ default
532
  #: classes/odb-scheduler.php:38
542
  msgid "Every Five Minutes"
543
  msgstr "Iedere vijf minuten"
544
 
545
+ #: includes/settings-page.php:115
546
  msgid "Optimize Database after Deleting Revisions SETTINGS UPDATED"
547
  msgstr "Optimize Database after Deleting Revisions INSTELLINGEN AANGEPAST"
548
 
549
+ #: includes/settings-page.php:117
550
  msgid ""
551
  "Click <a href=\"tools.php?page=rvg-optimize-database\" class=\"odb-bold"
552
  "\">HERE</a> to run the optimization"
554
  "Klik <a href=\"tools.php?page=rvg-optimize-database\" class=\"odb-bold"
555
  "\">HIER</a> om de optimalisatie te starten"
556
 
557
+ #: includes/settings-page.php:152
558
  msgid "You have to enter: "
559
  msgstr "Je moet invullen:"
560
 
561
+ #: includes/settings-page.php:157
562
  msgid "<Delete revisions older than> should be a number"
563
  msgstr "<Verwijder revisites ouder dan> moet een getal zijn"
564
 
565
+ #: includes/settings-page.php:165
566
  msgid "You have to enter the <Maximum number of revisions>"
567
  msgstr "Je moet het <Maximaal aantal revisies> invullen"
568
 
569
+ #: includes/settings-page.php:170
570
  msgid "<Maximum number of revisions> should be a number"
571
  msgstr "<Maximaal aantal revisies> moet een getal zijn"
572
 
573
+ #: includes/settings-page.php:227 rvg-optimize-database.php:454
574
  msgid "Settings"
575
  msgstr "Instellingen"
576
 
577
+ #: includes/settings-page.php:232
578
  msgid "Delete revisions for the following (custom) post type(s):"
579
  msgstr "Verwijder revisies voor de volgende (custom) post type(s):"
580
 
581
+ #: includes/settings-page.php:268
582
  msgid "day(s)"
583
  msgstr "dag(en)"
584
 
585
+ #: includes/settings-page.php:280
586
  msgid "Maximum number of - most recent - revisions<br>to keep per post / page"
587
  msgstr ""
588
  "Maximaal aantal - meest recente - revisies<br>om te bewaren per post/pagina"
589
 
590
+ #: includes/settings-page.php:286
591
  msgid "('0' means: delete <u>ALL</u> revisions)"
592
  msgstr "('0' betekent: verwijder <u>ALLE</u> revisies)"
593
 
594
+ #: includes/settings-page.php:318
595
  msgid "DO NOT DELETE TRANSIENTS"
596
  msgstr "GEEN TRANSIENTS VERWIJDEREN"
597
 
598
+ #: includes/settings-page.php:345
599
  msgid "Optimize InnoDB tables too"
600
  msgstr "Optimiliseer ook InnoDB tabellen"
601
 
602
+ #: includes/settings-page.php:364
603
  msgid "run optimization HOURLY"
604
  msgstr "voer de optimalisatie ELK UUR uit"
605
 
606
+ #: includes/settings-page.php:367
607
  msgid "run optimization TWICE A DAY"
608
  msgstr "voer de optimalisatie TWEE KEER PER DAG uit"
609
 
610
+ #: includes/settings-page.php:370
611
  msgid "run optimization DAILY"
612
  msgstr "voer de optimalisatie DAGELIJKS uit"
613
 
614
+ #: includes/settings-page.php:373
615
  msgid "run optimization WEEKLY"
616
  msgstr "voer de optimalisatie WEKELIJKS uit"
617
 
618
+ #: includes/settings-page.php:376
619
  msgid "run optimization MONTHLY"
620
  msgstr "voer de optimalisatie MAANDELIJKS uit"
621
 
622
+ #: includes/settings-page.php:386
623
  msgid "Time"
624
  msgstr "Tijd"
625
 
626
+ #: includes/settings-page.php:410
627
  msgid "Show '1-click' link in Admin Bar"
628
  msgstr "Toon de '1-klik' link in de Admin Balk"
629
 
630
+ #: includes/settings-page.php:416
631
  msgid "Show an icon in the Admin Menu"
632
  msgstr "Toon een icon in het Admin Menu"
633
 
634
+ #: includes/settings-page.php:421
635
  msgid "change will be visible after loading the next page"
636
  msgstr "wijziging wordt pas zichtbaar na het laden van de volgende pagina"
637
 
638
+ #: includes/settings-page.php:426 includes/settings-page.php:472
639
  msgid "Save Settings"
640
  msgstr "Bewaar instellingen"
641
 
642
+ #: includes/settings-page.php:428 includes/settings-page.php:474
643
  msgid "Go To Optimizer"
644
  msgstr "Ga naar Optimalisatie"
645
 
646
+ #: includes/settings-page.php:435
647
  msgid ""
648
  "EXCLUDE DATABASE TABLES FROM OPTIMIZATION:<br><span class=\"odb-underline-red"
649
  "\">CHECKED</span> TABLES <span class=\"odb-underline-red\">WON'T</span> BE "
653
  "underline-red\">AANGEVINKTE</span> TABELLEN ZULLEN <span class=\"odb-"
654
  "underline-red\">NIET</span> GEOPTIMALISEERD WORDEN!</span>"
655
 
656
+ #: includes/settings-page.php:441
657
  msgid "check all tables"
658
  msgstr "vink alle tabellen aan"
659
 
660
+ #: includes/settings-page.php:443
661
  msgid "uncheck all tables"
662
  msgstr "vink alle tabellen uit"
663
 
664
+ #: includes/settings-page.php:445
665
  msgid "check all NON-WordPress tables"
666
  msgstr "vink alle NIET-WordPress tabellen aan"
667
 
668
  # @ rvg-optimize-database
669
+ #: rvg-optimize-database.php:426 rvg-optimize-database.php:427
670
+ #: rvg-optimize-database.php:441 rvg-optimize-database.php:442
671
+ #: rvg-optimize-database.php:482 rvg-optimize-database.php:483
672
+ #: rvg-optimize-database.php:500 rvg-optimize-database.php:501
673
  msgid "Optimize Database"
674
  msgstr "Optimaliseer Database"
675
 
676
  # @ optimize_db
677
+ #: rvg-optimize-database.php:471
678
  msgid "Optimize DB (1 click)"
679
  msgstr "Optimaliseer DB (1 klik)"
680
 
681
+ #: rvg-optimize-database.php:618
682
+ msgid "Optimize Database after Deleting Revisions LOGS HAVE BEEN CLEARED"
683
+ msgstr "Optimize Database after Deleting Revisions LOGS ZIJN VERWIJDERD"
684
+
685
+ #~ msgid "Delete Log File"
686
+ #~ msgstr "Verwijder Logbestand"
687
+
688
+ #~ msgid "A WordPress Plugin by"
689
+ #~ msgstr "Een WordPress Plugin door"
690
+
691
+ #~ msgid "The Netherlands"
692
+ #~ msgstr "Nederland"
693
+
694
+ #~ msgid "time"
695
+ #~ msgstr "tijd"
696
 
697
  #~ msgid "current server time"
698
  #~ msgstr "huidige systeemtijd"
readme.txt CHANGED
@@ -7,9 +7,9 @@ Tags: database, delete, revisions, optimize, post, posts, page, pages, clean, cl
7
  Author URI: http://cagewebdev.com
8
  Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
9
  Requires at least: 2.8
10
- Tested up to: 4.9.4
11
- Stable tag: 4.5.2
12
- Version: 4.5.2
13
  License: GPLv2 or later
14
 
15
  == Description ==
@@ -26,7 +26,7 @@ This plugin is a 'One Click' WordPress Database Cleaner / Optimizer.
26
  * Clears the 'OEMBED cache' (optional)
27
  * Deletes 'orphan postmeta items'
28
  * Optimizes the database tables (optionally you can exclude certain tables, or even specific posts/pages, from optimization)
29
- * Creates a log file of the optimizations (optional)
30
  * Optimization can be scheduled to automatically run once hourly, twice daily, once daily or once weekly at a specific time (optional)
31
  * 'Optimize DB (1 click)' link in the admin bar (optional)
32
  * 'Optimize Database' Icon in the admin menu (optional)
@@ -104,8 +104,12 @@ http://cagewebdev.com/wordpress-plugins/
104
  * If you run the plugin from any of the sites, it will cleanup ALL the sites in the network!
105
 
106
  == Changelog ==
 
 
 
 
107
  = 4.5.2 [03/21/2018] =
108
- * NEW: Clear oEmbed cache (optional)
109
  * BUG FIX: Translation corrected ('Next scheduled run: 0 days, 9 hours, 35 minutes and 27 seconds')
110
 
111
  = 4.5.1 [01/29/2018] =
7
  Author URI: http://cagewebdev.com
8
  Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
9
  Requires at least: 2.8
10
+ Tested up to: 4.9.5
11
+ Stable tag: 4.6
12
+ Version: 4.6
13
  License: GPLv2 or later
14
 
15
  == Description ==
26
  * Clears the 'OEMBED cache' (optional)
27
  * Deletes 'orphan postmeta items'
28
  * Optimizes the database tables (optionally you can exclude certain tables, or even specific posts/pages, from optimization)
29
+ * Creates a log of the optimizations (optional)
30
  * Optimization can be scheduled to automatically run once hourly, twice daily, once daily or once weekly at a specific time (optional)
31
  * 'Optimize DB (1 click)' link in the admin bar (optional)
32
  * 'Optimize Database' Icon in the admin menu (optional)
104
  * If you run the plugin from any of the sites, it will cleanup ALL the sites in the network!
105
 
106
  == Changelog ==
107
+ = 4.6 [05/08/2018] =
108
+ * NEW: Logging system has been totally rewritten (from now it will store the logs in the database)
109
+ * NEW: Export the log to a CSV file
110
+
111
  = 4.5.2 [03/21/2018] =
112
+ * NEW: Clear OEMBED cache
113
  * BUG FIX: Translation corrected ('Next scheduled run: 0 days, 9 hours, 35 minutes and 27 seconds')
114
 
115
  = 4.5.1 [01/29/2018] =
rvg-optimize-database.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * @package Optimize Database after Deleting Revisions
4
- * @version 4.5.2
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.5.2
14
  */
15
 
16
  /********************************************************************************************
@@ -24,8 +24,8 @@ $odb_class = new OptimizeDatabase();
24
 
25
  class OptimizeDatabase {
26
  // VERSION
27
- var $odb_version = '4.5.2';
28
- var $odb_release_date = '03/21/2018';
29
 
30
  // PLUGIN OPTIONS
31
  var $odb_rvg_options = array();
@@ -58,9 +58,9 @@ class OptimizeDatabase {
58
  var $odb_plugin_url;
59
  var $odb_plugin_path;
60
 
61
- // LOGGING
62
- var $odb_logfile_url;
63
- var $odb_logfile_path;
64
 
65
  // OBJECTS
66
  var $odb_cleaner_obj;
@@ -87,12 +87,39 @@ class OptimizeDatabase {
87
  * INITIALIZE PLUGIN
88
  *******************************************************************************/
89
  function odb_init() {
 
 
90
  // LOAD CLASSES
91
  $this->odb_classes();
92
 
93
  // URLS AND DIRECTORIES
94
  $this->odb_urls_dirs();
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  // GET (MULTI-SITE) NETWORK INFORMATION
97
  $this->odb_multisite_obj->odb_ms_network_info();
98
 
@@ -152,8 +179,6 @@ class OptimizeDatabase {
152
  function odb_urls_dirs() {
153
  $this->odb_plugin_url = plugins_url( '/', __FILE__ );
154
  $this->odb_plugin_path = plugin_dir_path(__FILE__);
155
- $this->odb_logfile_url = $this->odb_plugin_url.'logs/rvg-optimize-db-log.html';
156
- $this->odb_logfile_path = $this->odb_plugin_path.'logs/rvg-optimize-db-log.html';
157
  $this->odb_logfile_debug_path = $this->odb_plugin_path.'logs/rvg-optimize-db-log.txt';
158
  } // odb_urls_dirs()
159
 
@@ -517,9 +542,20 @@ class OptimizeDatabase {
517
  /*******************************************************************************
518
  * PLUGIN UN-INSTALLATION
519
  *******************************************************************************/
520
- public static function odb_uninstallation_handler() {
521
  // STOP SCHEDULER
522
  wp_clear_scheduled_hook('odb_scheduler');
 
 
 
 
 
 
 
 
 
 
 
523
  } // odb_uninstallation_handler()
524
 
525
 
@@ -552,7 +588,9 @@ class OptimizeDatabase {
552
  /*******************************************************************************
553
  * MAIN METHOD FOR CLEANING / OPTIMIZING
554
  *******************************************************************************/
555
- function odb_start($scheduler) {
 
 
556
  // PAGE LOAD TIMER
557
  $time = microtime();
558
  $time = explode(' ', $time);
@@ -562,17 +600,26 @@ class OptimizeDatabase {
562
  $action = '';
563
  if(isset($_REQUEST['action'])) {
564
  $action = $_REQUEST['action'];
565
- if($action == "delete_log") {
566
- // DELETE LOG FILE
567
- @unlink($this->odb_plugin_path.'logs/rvg-optimize-db-log.html');
 
 
 
 
 
 
 
568
 
569
  // UPDATED MESSAGE
570
- // v4.1.10
571
  echo "<script>jQuery('#odb-running').hide();</script>";
572
  echo "<div class='updated odb-bold'><p>".
573
- __('Optimize Database after Deleting Revisions LOG FILE HAS BEEN DELETED', $this->odb_txt_domain);
574
  echo "</p></div>";
575
- } // if($action == "delete_log")
 
 
576
  } // if(isset($_REQUEST['action']))
577
 
578
  if(!$scheduler) {
1
  <?php
2
  /**
3
  * @package Optimize Database after Deleting Revisions
4
+ * @version 4.6
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.6
14
  */
15
 
16
  /********************************************************************************************
24
 
25
  class OptimizeDatabase {
26
  // VERSION
27
+ var $odb_version = '4.6';
28
+ var $odb_release_date = '05/08/2018';
29
 
30
  // PLUGIN OPTIONS
31
  var $odb_rvg_options = array();
58
  var $odb_plugin_url;
59
  var $odb_plugin_path;
60
 
61
+ // DATABASE TABLE FOR LOGGING
62
+ // v4.6
63
+ var $odb_logtable_name;
64
 
65
  // OBJECTS
66
  var $odb_cleaner_obj;
87
  * INITIALIZE PLUGIN
88
  *******************************************************************************/
89
  function odb_init() {
90
+ global $wpdb;
91
+
92
  // LOAD CLASSES
93
  $this->odb_classes();
94
 
95
  // URLS AND DIRECTORIES
96
  $this->odb_urls_dirs();
97
 
98
+ // CREATE LOG TABLE (IF NOT EXISTS) - v4.6
99
+ $this->odb_logtable_name = $wpdb->base_prefix . 'odb_logs';
100
+
101
+ $sql = '
102
+ CREATE TABLE IF NOT EXISTS `' . $this->odb_logtable_name . '` (
103
+ `odb_id` int(11) NOT NULL AUTO_INCREMENT,
104
+ `odb_timestamp` varchar(20) NOT NULL,
105
+ `odb_revisions` int(11) NOT NULL,
106
+ `odb_trash` int(11) NOT NULL,
107
+ `odb_spam` int(11) NOT NULL,
108
+ `odb_tags` int(11) NOT NULL,
109
+ `odb_transients` int(11) NOT NULL,
110
+ `odb_pingbacks` int(11) NOT NULL,
111
+ `odb_oembeds` int(11) NOT NULL,
112
+ `odb_orphans` int(11) NOT NULL,
113
+ `odb_tables` int(11) NOT NULL,
114
+ `odb_before` varchar(20) NOT NULL,
115
+ `odb_after` varchar(20) NOT NULL,
116
+ `odb_savings` varchar(20) NOT NULL,
117
+ PRIMARY KEY (`odb_id`)
118
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
119
+ ';
120
+ // CREATE TABLE
121
+ $wpdb->get_results($sql);
122
+
123
  // GET (MULTI-SITE) NETWORK INFORMATION
124
  $this->odb_multisite_obj->odb_ms_network_info();
125
 
179
  function odb_urls_dirs() {
180
  $this->odb_plugin_url = plugins_url( '/', __FILE__ );
181
  $this->odb_plugin_path = plugin_dir_path(__FILE__);
 
 
182
  $this->odb_logfile_debug_path = $this->odb_plugin_path.'logs/rvg-optimize-db-log.txt';
183
  } // odb_urls_dirs()
184
 
542
  /*******************************************************************************
543
  * PLUGIN UN-INSTALLATION
544
  *******************************************************************************/
545
+ function odb_uninstallation_handler() {
546
  // STOP SCHEDULER
547
  wp_clear_scheduled_hook('odb_scheduler');
548
+
549
+ // DELETE THE OPTIONS
550
+ delete_option('odb_rvg_options');
551
+ delete_option('odb_rvg_excluded_tabs');
552
+
553
+ delete_site_option('odb_rvg_options');
554
+ delete_site_option('odb_rvg_excluded_tabs');
555
+
556
+ // DROP THE LOG TABLE
557
+ global $wpdb;
558
+ $wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}odb_logs");
559
  } // odb_uninstallation_handler()
560
 
561
 
588
  /*******************************************************************************
589
  * MAIN METHOD FOR CLEANING / OPTIMIZING
590
  *******************************************************************************/
591
+ function odb_start($scheduler) {
592
+ global $wpdb;
593
+
594
  // PAGE LOAD TIMER
595
  $time = microtime();
596
  $time = explode(' ', $time);
600
  $action = '';
601
  if(isset($_REQUEST['action'])) {
602
  $action = $_REQUEST['action'];
603
+
604
+ // v4.6
605
+ if($action == 'show_log') {
606
+ // SHOW THE LOGS
607
+ $this->odb_logger_obj->odb_show_log();
608
+ exit;
609
+ } else if($action == "delete_log") {
610
+
611
+ // CLEAR THE LOG TABLE
612
+ $this->odb_logger_obj->odb_clear_log();
613
 
614
  // UPDATED MESSAGE
615
+ // v4.6
616
  echo "<script>jQuery('#odb-running').hide();</script>";
617
  echo "<div class='updated odb-bold'><p>".
618
+ __('Optimize Database after Deleting Revisions LOGS HAVE BEEN CLEARED', $this->odb_txt_domain);
619
  echo "</p></div>";
620
+ } else if($action == "odb_download_csv") {
621
+ //$this->odb_logger_obj->odb_csv_download();
622
+ }// if($action == "delete_log")
623
  } // if(isset($_REQUEST['action']))
624
 
625
  if(!$scheduler) {