Version Description
[05/26/2019] = * NEW: New analyze / optimize options (summary or detail)
Download this release
Release Info
Developer | cageehv |
Plugin | Optimize Database after Deleting Revisions |
Version | 4.8.0 |
Comparing to | |
See all releases |
Code changes from version 4.7.4 to 4.8.0
- classes/odb-cleaner.php +810 -550
- classes/odb-displayer.php +8 -3
- classes/odb-logger.php +3 -1
- language/rvg-optimize-database-nl_NL.mo +0 -0
- language/rvg-optimize-database-nl_NL.po +262 -176
- readme.txt +13 -10
- rvg-optimize-database.php +78 -27
classes/odb-cleaner.php
CHANGED
@@ -9,27 +9,37 @@
|
|
9 |
class ODB_Cleaner {
|
10 |
var $start_size;
|
11 |
var $nr_of_optimized_tables;
|
|
|
12 |
|
13 |
|
14 |
/********************************************************************************************
|
|
|
15 |
* CONSTRUCTOR
|
|
|
16 |
********************************************************************************************/
|
17 |
function __construct() {
|
18 |
} // __construct()
|
19 |
|
20 |
|
21 |
/********************************************************************************************
|
|
|
22 |
* RUN CLEANER
|
|
|
23 |
********************************************************************************************/
|
24 |
-
function odb_run_cleaner($scheduler, $
|
25 |
global $odb_class;
|
26 |
|
27 |
if(!$scheduler) {
|
28 |
-
if ($
|
|
|
|
|
|
|
|
|
|
|
29 |
echo '
|
30 |
<div id="odb-cleaner" class="odb-padding-left">
|
31 |
<div class="odb-title-bar">
|
32 |
-
<h2>'.__(
|
33 |
</div>
|
34 |
<br>
|
35 |
<br>
|
@@ -55,7 +65,6 @@ class ODB_Cleaner {
|
|
55 |
$odb_class->log_arr["timestamp"] = current_time('YmdHis', 0);
|
56 |
$odb_class->log_arr["after"] = 0;
|
57 |
$odb_class->log_arr["before"] = 0;
|
58 |
-
$odb_class->log_arr["orphans"] = 0;
|
59 |
$odb_class->log_arr["pingbacks"] = 0;
|
60 |
$odb_class->log_arr["oembeds"] = 0;
|
61 |
$odb_class->log_arr["orphans"] = 0;
|
@@ -65,38 +74,66 @@ class ODB_Cleaner {
|
|
65 |
$odb_class->log_arr["tables"] = 0;
|
66 |
$odb_class->log_arr["tags"] = 0;
|
67 |
$odb_class->log_arr["transients"] = 0;
|
68 |
-
$odb_class->log_arr["trash"] = 0;
|
69 |
-
|
70 |
/****************************************************************************************
|
|
|
71 |
* DELETE REVISIONS
|
|
|
72 |
****************************************************************************************/
|
73 |
if($odb_class->odb_rvg_options['delete_older'] == 'Y' || $odb_class->odb_rvg_options['rvg_revisions'] == 'Y') {
|
|
|
74 |
// FIND REVISIONS
|
75 |
$results_older_than = array();
|
76 |
if($odb_class->odb_rvg_options['delete_older'] == 'Y') {
|
77 |
$results_older_than = $this->odb_get_revisions_older_than();
|
78 |
-
}
|
79 |
|
80 |
$results_keep_revisions = array();
|
81 |
if($odb_class->odb_rvg_options['rvg_revisions'] == 'Y') {
|
82 |
$results_keep_revisions = $this->odb_get_revisions_keep_revisions();
|
83 |
-
}
|
84 |
-
|
85 |
-
$
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
} else {
|
93 |
-
|
94 |
-
$
|
95 |
-
|
|
|
|
|
|
|
96 |
?>
|
97 |
<table border="0" cellspacing="8" cellpadding="2" class="odb-result-table">
|
98 |
<tr>
|
99 |
-
<td colspan="4"><div class="odb-found"
|
|
|
|
|
100 |
</tr>
|
101 |
<tr>
|
102 |
<th align="right" class="odb-border-bottom">#</th>
|
@@ -105,58 +142,78 @@ class ODB_Cleaner {
|
|
105 |
<th align="left" class="odb-border-bottom"><?php _e('revision date', $odb_class->odb_txt_domain);?></th>
|
106 |
<th align="right" class="odb-border-bottom"><?php echo $msg2?></th>
|
107 |
</tr>
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
$msg1 = __('total number of revisions', $odb_class->odb_txt_domain);
|
117 |
-
} else {
|
118 |
-
$msg1 = __('total number of revisions deleted', $odb_class->odb_txt_domain);
|
119 |
-
} // if (!$analyzing)
|
120 |
-
?>
|
121 |
<tr>
|
122 |
-
<td colspan="5" align="right" class="odb-border-top odb-bold"><?php echo $
|
123 |
</tr>
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
if(!$scheduler) {
|
129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
<div class="odb-not-found">
|
131 |
<?php _e('No REVISIONS found to delete', $odb_class->odb_txt_domain);?>
|
132 |
</div>
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
// NUMBER OF DELETED REVISIONS FOR LOG FILE
|
138 |
-
$odb_class->log_arr["revisions"] = $total_deleted;
|
139 |
} // if($odb_class->odb_rvg_options['delete_older'] == 'Y' || $odb_class->odb_rvg_options['rvg_revisions'] == 'Y')
|
140 |
|
141 |
|
142 |
/****************************************************************************************
|
|
|
143 |
* DELETE TRASHED ITEMS
|
|
|
144 |
****************************************************************************************/
|
145 |
-
if($odb_class->odb_rvg_options['clear_trash'] == 'Y') {
|
146 |
-
|
147 |
-
$results
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
//
|
152 |
-
if(
|
153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
$msg1 = __('TRASHED ITEMS', $odb_class->odb_txt_domain);
|
155 |
$msg2 = __('total number of trashed items', $odb_class->odb_txt_domain);
|
156 |
} else {
|
|
|
157 |
$msg1 = __('DELETED TRASHED ITEMS', $odb_class->odb_txt_domain);
|
158 |
-
$msg2 = __('total number of trashed items deleted', $odb_class->odb_txt_domain);
|
159 |
-
} // if ($
|
160 |
?>
|
161 |
<table border="0" cellspacing="8" cellpadding="2" class="odb-result-table">
|
162 |
<tr>
|
@@ -171,53 +228,74 @@ class ODB_Cleaner {
|
|
171 |
<th align="left" class="odb-border-bottom"><?php _e('IP address / title', $odb_class->odb_txt_domain);?></th>
|
172 |
<th align="left" nowrap="nowrap" class="odb-border-bottom"><?php _e('date', $odb_class->odb_txt_domain);?></th>
|
173 |
</tr>
|
174 |
-
<?php
|
175 |
-
} // if(
|
176 |
-
|
177 |
// LOOP THROUGH THE TRASHED ITEMS AND DELETE THEM
|
178 |
-
$total_deleted = $this->odb_delete_trash($results, $scheduler, $
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
|
|
188 |
} else {
|
189 |
-
|
190 |
-
|
|
|
191 |
<div class="odb-not-found">
|
192 |
<?php _e('No TRASHED ITEMS found to delete', $odb_class->odb_txt_domain);?>
|
193 |
</div>
|
194 |
-
|
195 |
-
} // if(!$scheduler)
|
196 |
-
} // if(count($results)>0)
|
197 |
-
|
198 |
-
// NUMBER OF DELETED TRASH FOR LOG FILE
|
199 |
-
$odb_class->log_arr["trash"] = $total_deleted;
|
200 |
} // if($odb_class->odb_rvg_options['clear_trash'] == 'Y')
|
201 |
-
|
202 |
-
|
203 |
/****************************************************************************************
|
|
|
204 |
* DELETE SPAMMED ITEMS
|
|
|
205 |
****************************************************************************************/
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
if (
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
?>
|
222 |
<table border="0" cellspacing="8" cellpadding="2" class="odb-result-table">
|
223 |
<tr>
|
@@ -232,54 +310,77 @@ class ODB_Cleaner {
|
|
232 |
<th align="left" class="odb-border-bottom"><?php _e('comment author email', $odb_class->odb_txt_domain);?></th>
|
233 |
<th align="left" nowrap="nowrap" class="odb-border-bottom"><?php _e('comment date', $odb_class->odb_txt_domain);?></th>
|
234 |
</tr>
|
235 |
-
<?php
|
236 |
-
} // if (
|
237 |
-
|
238 |
-
// LOOP THROUGH SPAMMED ITEMS AND DELETE THEM
|
239 |
-
$total_deleted = $this->odb_delete_spam($results, $scheduler, $
|
240 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
if (!$scheduler) {
|
242 |
-
|
243 |
-
<tr>
|
244 |
-
<td colspan="5" align="right" class="odb-border-top odb-bold"><?php echo $msg2 ?>: <?php echo $total_deleted?></td>
|
245 |
-
</tr>
|
246 |
-
</table>
|
247 |
-
<?php
|
248 |
-
} // if (!$scheduler)
|
249 |
-
} else{
|
250 |
-
if (!$scheduler) {
|
251 |
-
?>
|
252 |
<div class="odb-not-found">
|
253 |
<?php _e('No SPAMMED ITEMS found to delete', $odb_class->odb_txt_domain);?>
|
254 |
</div>
|
255 |
-
|
256 |
} // if (!$scheduler)
|
257 |
-
} // if(count($results)>0)
|
|
|
|
|
258 |
|
259 |
-
// NUMBER OF SPAM DELETED FOR LOG FILE
|
260 |
-
$odb_class->log_arr["spam"] = $total_deleted;
|
261 |
-
} // if($odb_class->odb_rvg_options['clear_spam'] == 'Y')
|
262 |
-
|
263 |
-
|
264 |
/****************************************************************************************
|
|
|
265 |
* DELETE UNUSED TAGS
|
|
|
266 |
****************************************************************************************/
|
267 |
-
if($odb_class->odb_rvg_options['clear_tags'] == 'Y') {
|
268 |
// GET UNUSED TAGS
|
269 |
-
$results = $this->odb_get_unused_tags(
|
270 |
-
|
271 |
-
$total_deleted = 0;
|
272 |
|
273 |
-
if(count($results)>0) {
|
274 |
-
//
|
275 |
-
|
276 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
$msg1 = __('UNUSED TAGS', $odb_class->odb_txt_domain);
|
278 |
-
$msg2 = __('total number of unused tags', $odb_class->odb_txt_domain);
|
279 |
} else {
|
|
|
280 |
$msg1 = __('DELETED UNUSED TAGS', $odb_class->odb_txt_domain);
|
281 |
-
$msg2 = __('total number of unused tags deleted', $odb_class->odb_txt_domain);
|
282 |
-
}
|
283 |
?>
|
284 |
<table border="0" cellspacing="8" cellpadding="2" class="odb-result-table">
|
285 |
<tr>
|
@@ -292,133 +393,170 @@ class ODB_Cleaner {
|
|
292 |
<th align="left" class="odb-border-bottom"><?php _e('prefix', $odb_class->odb_txt_domain);?></th>
|
293 |
<th align="left" class="odb-border-bottom"><?php _e('tag', $odb_class->odb_txt_domain);?></th>
|
294 |
</tr>
|
295 |
-
<?php
|
296 |
-
} // if (
|
297 |
|
298 |
-
// LOOP THROUGH UNUSED TAGS AND DELETE THEM
|
299 |
-
$total_deleted = $this->odb_delete_unused_tags($results, $scheduler, $
|
|
|
|
|
|
|
|
|
|
|
300 |
|
301 |
-
if (
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
</table>
|
307 |
-
<?php
|
308 |
-
} // if (!$scheduler)
|
309 |
} else {
|
|
|
310 |
if (!$scheduler) {
|
311 |
-
|
312 |
<div class="odb-not-found">
|
313 |
-
<?php _e('No UNUSED
|
314 |
</div>
|
315 |
-
|
316 |
} // if (!$scheduler)
|
317 |
-
} // if(count($results)>0)
|
318 |
-
|
319 |
-
|
320 |
-
$odb_class->log_arr["tags"] = $total_deleted;
|
321 |
-
} // if($odb_class->odb_rvg_options['clear_spam'] == 'Y')
|
322 |
-
|
323 |
|
324 |
/****************************************************************************************
|
325 |
-
*
|
|
|
|
|
326 |
****************************************************************************************/
|
327 |
-
|
328 |
-
|
329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
|
331 |
-
if (
|
332 |
-
//
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
//
|
344 |
-
|
345 |
-
|
346 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
} else {
|
348 |
-
|
349 |
-
$
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
<td valign="top"><?php echo $res[$j]['option_name']; ?></td>
|
376 |
-
</tr>
|
377 |
-
<?php
|
378 |
-
$nr++;
|
379 |
-
} // for ($j = 0; $j < count($res);$j++) {
|
380 |
?>
|
381 |
-
|
382 |
-
<td colspan="3" align="right" class="odb-border-top odb-bold"<?php echo $msg2 ?>: <?php echo $total_deleted?></td>
|
383 |
-
</tr>
|
384 |
-
</table>
|
385 |
-
<?php
|
386 |
-
} else {
|
387 |
-
?>
|
388 |
-
<div class="odb-not-found">
|
389 |
<?php
|
390 |
-
if ($
|
391 |
-
$msg = _e('No EXPIRED TRANSIENTS found to delete', $odb_class->odb_txt_domain);
|
392 |
-
} else {
|
393 |
-
$msg = _e('No TRANSIENTS found to delete', $odb_class->odb_txt_domain);
|
394 |
-
}
|
395 |
-
?>
|
396 |
-
</div>
|
397 |
-
<?php
|
398 |
-
}
|
399 |
} else {
|
400 |
-
|
401 |
-
|
402 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
403 |
|
404 |
/****************************************************************************************
|
|
|
405 |
* DELETE PINGBACKS AND TRACKBACKS
|
406 |
-
|
407 |
-
|
|
|
408 |
// GET PINGBACKS AND TRACKBACKS
|
409 |
-
$results = $this->odb_get_pingbacks(
|
410 |
-
|
411 |
-
$
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
416 |
$msg1 = __('PINGBACKS AND TRACKBACKS', $odb_class->odb_txt_domain);
|
417 |
$msg2 = __('total number of pingbacks and trackbacks', $odb_class->odb_txt_domain);
|
418 |
} else {
|
|
|
419 |
$msg1 = __('DELETED PINGBACKS AND TRACKBACKS', $odb_class->odb_txt_domain);
|
420 |
$msg2 = __('total number of pingbacks and trackbacks deleted', $odb_class->odb_txt_domain);
|
421 |
-
} // if ($
|
422 |
?>
|
423 |
<table border="0" cellspacing="8" cellpadding="2" class="odb-result-table">
|
424 |
<tr>
|
@@ -433,54 +571,82 @@ class ODB_Cleaner {
|
|
433 |
<th align="left" class="odb-border-bottom"><?php _e('comment_author', $odb_class->odb_txt_domain);?></th>
|
434 |
<th align="left" nowrap="nowrap" class="odb-border-bottom"><?php _e('date', $odb_class->odb_txt_domain);?></th>
|
435 |
</tr>
|
436 |
-
<?php
|
437 |
-
} // if(
|
438 |
-
|
439 |
-
// LOOP THROUGH THE TRASHED ITEMS AND DELETE THEM
|
440 |
-
$total_deleted = $this->odb_delete_pingbacks($results, $scheduler, $analyzing);
|
441 |
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
} else {
|
451 |
-
|
452 |
-
|
|
|
453 |
<div class="odb-not-found">
|
454 |
<?php _e('No PINGBACKS nor TRACKBACKS found to delete', $odb_class->odb_txt_domain);?>
|
455 |
</div>
|
456 |
-
|
457 |
-
} // if(!$scheduler)
|
458 |
-
} // if(count($results)>0)
|
459 |
-
|
460 |
-
// NUMBER OF DELETED PINGBACKS FOR LOG FILE
|
461 |
-
$odb_class->log_arr["pingbacks"] = $total_deleted;
|
462 |
-
} // if($odb_class->odb_rvg_options['clear_pingbacks'] == 'Y')
|
463 |
|
464 |
|
465 |
/****************************************************************************************
|
|
|
466 |
* DELETE OEMBED CACHE
|
467 |
-
|
468 |
-
|
|
|
469 |
|
470 |
// GET OEMBED CACHE
|
471 |
-
$results = $this->odb_get_oembed(
|
472 |
-
|
473 |
-
$
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
480 |
} else {
|
481 |
-
|
482 |
-
$
|
483 |
-
|
|
|
484 |
?>
|
485 |
<table border="0" cellspacing="8" cellpadding="2" class="odb-result-table">
|
486 |
<tr>
|
@@ -494,117 +660,137 @@ class ODB_Cleaner {
|
|
494 |
<th align="left" class="odb-border-bottom"><?php _e('meta key', $odb_class->odb_txt_domain);?></th>
|
495 |
<th align="left" class="odb-border-bottom"><?php _e('meta value', $odb_class->odb_txt_domain);?></th>
|
496 |
</tr>
|
497 |
-
<?php
|
498 |
-
} // if(
|
499 |
-
|
500 |
-
// LOOP THROUGH THE
|
501 |
-
$total_deleted = $this->odb_delete_oembed($results, $scheduler, $
|
502 |
|
503 |
-
if(!$scheduler) {
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
|
|
|
|
511 |
} else {
|
512 |
-
|
513 |
-
|
|
|
514 |
<div class="odb-not-found">
|
515 |
-
<?php _e('No
|
516 |
</div>
|
517 |
-
|
518 |
-
} // if(!$scheduler)
|
519 |
-
} // if(count($results)>0)
|
520 |
-
|
521 |
-
|
522 |
-
$odb_class->log_arr["oembeds"] = $total_deleted;
|
523 |
-
} // if($odb_class->odb_rvg_options['clear_oembed'] == 'Y')
|
524 |
|
525 |
-
|
526 |
/****************************************************************************************
|
|
|
527 |
* DELETE ORPHANS
|
|
|
528 |
****************************************************************************************/
|
529 |
if($odb_class->odb_rvg_options['clear_orphans'] == 'Y') {
|
530 |
-
|
531 |
-
|
532 |
-
$total_deleted = count($results);
|
533 |
-
|
534 |
-
//$total_deleted = $this->odb_delete_orphans($analyzing);
|
535 |
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
540 |
$msg2 = __('total number of orphans', $odb_class->odb_txt_domain);
|
541 |
} else {
|
542 |
-
|
543 |
-
$
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
<
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
</tr>
|
576 |
-
</table>
|
577 |
-
|
578 |
-
<?php
|
579 |
-
} // if (!$scheduler)
|
580 |
} else {
|
|
|
581 |
if (!$scheduler) {
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
} // if (!$scheduler)
|
588 |
-
} // if($
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
} // if($odb_class->odb_rvg_options['clear_oembed'] == 'Y')
|
598 |
} // odb_run_cleaner()
|
599 |
|
600 |
|
601 |
/********************************************************************************************
|
|
|
602 |
* RUN OPTIMIZER
|
|
|
603 |
********************************************************************************************/
|
604 |
-
function odb_run_optimizer($scheduler) {
|
605 |
global $odb_class;
|
606 |
|
607 |
-
if(!$scheduler) {
|
608 |
?>
|
609 |
<div class="odb-optimizing-table" class="odb-padding-left">
|
610 |
<div class="odb-title-bar">
|
@@ -622,24 +808,26 @@ class ODB_Cleaner {
|
|
622 |
<th class="odb-border-bottom" align="right"><?php _e('table size', $odb_class->odb_txt_domain);?></th>
|
623 |
</tr>
|
624 |
<?php
|
625 |
-
} // if(!$scheduler)
|
626 |
|
627 |
# OPTIMIZE THE DATABASE TABLES
|
628 |
-
$this->nr_of_optimized_tables = $this->odb_optimize_tables($scheduler);
|
629 |
|
630 |
-
if(!$scheduler) {
|
631 |
?>
|
632 |
</table>
|
633 |
</div><!-- /odb-optimizing-table -->
|
634 |
<?php
|
635 |
-
} // if(!$scheduler)
|
636 |
} // odb_run_optimizer()
|
637 |
|
638 |
|
639 |
/********************************************************************************************
|
|
|
640 |
* CALCULATE AND DISPLAY SAVINGS
|
|
|
641 |
********************************************************************************************/
|
642 |
-
function odb_savings($scheduler) {
|
643 |
global $odb_class;
|
644 |
global $odb_logger_obj;
|
645 |
|
@@ -653,9 +841,11 @@ class ODB_Cleaner {
|
|
653 |
// TOTAL SAVING
|
654 |
$odb_class->log_arr["savings"] = $odb_class->odb_utilities_obj->odb_format_size(($this->start_size - $end_size),3);
|
655 |
|
656 |
-
|
657 |
-
|
658 |
-
|
|
|
|
|
659 |
$total_savings = $odb_class->odb_rvg_options['total_savings'];
|
660 |
$total_savings += ($this->start_size - $end_size);
|
661 |
$odb_class->odb_rvg_options['total_savings'] = $total_savings;
|
@@ -699,7 +889,9 @@ class ODB_Cleaner {
|
|
699 |
|
700 |
|
701 |
/********************************************************************************************
|
|
|
702 |
* SHOW LOADING TIME
|
|
|
703 |
********************************************************************************************/
|
704 |
function odb_done($analyze = false) {
|
705 |
global $odb_class;
|
@@ -758,7 +950,9 @@ function odb_confirm_delete() {
|
|
758 |
|
759 |
|
760 |
/********************************************************************************************
|
|
|
761 |
* GET REVISIONS (OLDER THAN x DAYS)
|
|
|
762 |
********************************************************************************************/
|
763 |
function odb_get_revisions_older_than() {
|
764 |
global $odb_class, $wpdb;
|
@@ -828,7 +1022,9 @@ function odb_confirm_delete() {
|
|
828 |
|
829 |
|
830 |
/********************************************************************************************
|
|
|
831 |
* GET REVISIONS (KEEP MAX NUMBER OF REVISIONS)
|
|
|
832 |
********************************************************************************************/
|
833 |
function odb_get_revisions_keep_revisions() {
|
834 |
global $odb_class, $wpdb;
|
@@ -870,7 +1066,11 @@ function odb_confirm_delete() {
|
|
870 |
|
871 |
$sql = sprintf ("
|
872 |
SELECT '%s' AS site,
|
873 |
-
p1.`ID`,
|
|
|
|
|
|
|
|
|
874 |
FROM %sposts p1, %sposts p2
|
875 |
WHERE p1.`post_type` = 'revision'
|
876 |
AND p1.`post_parent` = p2.ID
|
@@ -902,14 +1102,15 @@ function odb_confirm_delete() {
|
|
902 |
} // odb_get_revisions_keep_revisions()
|
903 |
|
904 |
|
905 |
-
|
|
|
906 |
* DELETE THE REVISIONS
|
|
|
907 |
********************************************************************************************/
|
908 |
-
function odb_delete_revisions($scheduler, $
|
909 |
global $odb_class, $wpdb;
|
910 |
|
911 |
$total_deleted = 0;
|
912 |
-
$nr = 1;
|
913 |
|
914 |
if($odb_class->odb_rvg_options['delete_older'] == 'Y') {
|
915 |
// DELETE REVISIONS OLDER THAN x DAYS
|
@@ -917,52 +1118,51 @@ function odb_confirm_delete() {
|
|
917 |
$older_than = $odb_class->odb_rvg_options['older_than'];
|
918 |
$total_deleted += count($results);
|
919 |
|
920 |
-
for($i=0; $i<count($results); $i++) {
|
921 |
-
if (!$scheduler) {
|
922 |
?>
|
923 |
<tr>
|
924 |
-
<td align="right" valign="top"><?php echo $
|
925 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
926 |
<td valign="top" class="odb-bold"><?php echo $results[$i]['post_title']?></td>
|
927 |
<td valign="top" class="odb-bold"><?php echo $results[$i]['post_modified']?></td><?php
|
928 |
-
} // if (!$scheduler)
|
929 |
|
930 |
-
if (
|
931 |
$sql_delete = sprintf ("
|
932 |
DELETE FROM %sposts
|
933 |
WHERE `ID` = %d
|
934 |
", $results[$i]['site'], $results[$i]['ID']);
|
935 |
|
936 |
$wpdb->get_results($sql_delete);
|
937 |
-
} // if (
|
938 |
|
939 |
-
$
|
940 |
-
if(!$scheduler) {
|
941 |
?>
|
942 |
<td align="right" valign="top" class="odb-bold">1</td>
|
943 |
</tr>
|
944 |
<?php
|
945 |
-
} // if(!$scheduler)
|
946 |
} // for($i=0; $i<count($results); $i++)
|
947 |
} // if($odb_class->odb_rvg_options['delete_older'] == 'Y')
|
948 |
|
949 |
if($odb_class->odb_rvg_options['rvg_revisions'] == 'Y') {
|
950 |
-
// KEEP MAX NUMBER OF REVISIONS
|
951 |
$results = $this->odb_get_revisions_keep_revisions();
|
952 |
$max_revisions = $odb_class->odb_rvg_options['nr_of_revisions'];
|
953 |
|
954 |
-
for($i=0; $i<count($results); $i++) {
|
955 |
$nr_to_delete = $results[$i]['cnt'] - $max_revisions;
|
956 |
$total_deleted += $nr_to_delete;
|
957 |
|
958 |
-
if (!$scheduler) {
|
959 |
?>
|
960 |
<tr>
|
961 |
-
<td align="right" valign="top"><?php echo $
|
962 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
963 |
<td valign="top" class="odb-bold"><?php echo $results[$i]['post_title']?></td>
|
964 |
-
<td valign="top"><?php
|
965 |
-
} // if (!$scheduler)
|
966 |
|
967 |
$sql_get_posts = sprintf( "
|
968 |
SELECT `ID`, `post_modified`
|
@@ -974,26 +1174,25 @@ function odb_confirm_delete() {
|
|
974 |
|
975 |
$results_get_posts = $wpdb->get_results($sql_get_posts);
|
976 |
|
977 |
-
for($j=0; $j
|
978 |
-
if(!$scheduler) echo $results_get_posts[$j]->post_modified.'<br>';
|
979 |
-
if (
|
980 |
$sql_delete = sprintf ("
|
981 |
DELETE FROM %sposts
|
982 |
WHERE `ID` = %d
|
983 |
", $results[$i]['site'], $results_get_posts[$j]->ID);
|
984 |
|
985 |
$wpdb->get_results($sql_delete);
|
986 |
-
} // if (
|
987 |
-
} // for($j=0; $j
|
988 |
|
989 |
-
$
|
990 |
-
if(!$scheduler) {
|
991 |
?></td>
|
992 |
<td align="right" valign="top" class="odb-bold"><?php echo $nr_to_delete?> <?php _e('of', $odb_class->odb_txt_domain)?> <?php echo $results[$i]['cnt'];?></td>
|
993 |
</tr>
|
994 |
<?php
|
995 |
-
} // if(!$scheduler)
|
996 |
-
} // for($i=0; $i<count($results); $i++)
|
997 |
} // if($odb_class->odb_rvg_options['rvg_revisions'] == 'Y')
|
998 |
|
999 |
return $total_deleted;
|
@@ -1001,7 +1200,9 @@ function odb_confirm_delete() {
|
|
1001 |
|
1002 |
|
1003 |
/********************************************************************************************
|
|
|
1004 |
* CHECK IF POST IS EXCLUDED BY A CUSTOM FIELD ('keep_revisions')
|
|
|
1005 |
********************************************************************************************/
|
1006 |
function odb_post_is_excluded($parent_id) {
|
1007 |
$keep_revisions = get_post_meta($parent_id, 'keep_revisions', true);
|
@@ -1010,9 +1211,11 @@ function odb_confirm_delete() {
|
|
1010 |
|
1011 |
|
1012 |
/********************************************************************************************
|
|
|
1013 |
* GET TRASHED POSTS / PAGES AND COMMENTS
|
|
|
1014 |
********************************************************************************************/
|
1015 |
-
function odb_get_trash(
|
1016 |
global $wpdb, $odb_class;
|
1017 |
|
1018 |
$res_arr = array();
|
@@ -1054,39 +1257,40 @@ function odb_confirm_delete() {
|
|
1054 |
|
1055 |
|
1056 |
/********************************************************************************************
|
|
|
1057 |
* DELETE TRASHED POSTS AND PAGES
|
|
|
1058 |
********************************************************************************************/
|
1059 |
-
function odb_delete_trash($results, $scheduler, $
|
1060 |
global $wpdb;
|
1061 |
|
1062 |
-
$nr = 1;
|
1063 |
$total_deleted = count($results);
|
1064 |
-
|
1065 |
-
for($i=0; $i
|
1066 |
-
if(!$scheduler) {
|
1067 |
?>
|
1068 |
<tr>
|
1069 |
-
<td align="right" valign="top"><?php echo $
|
1070 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
1071 |
<td valign="top"><?php echo $results[$i]['post_type']; ?></td>
|
1072 |
<td valign="top"><?php echo $results[$i]['title']; ?></td>
|
1073 |
<td valign="top" nowrap="nowrap"><?php echo $results[$i]['modified']; ?></td>
|
1074 |
</tr>
|
1075 |
<?php
|
1076 |
-
} // if(!$scheduler)
|
1077 |
|
1078 |
if($results[$i]['post_type'] == 'comment') {
|
1079 |
// DELETE META DATA (IF ANY...)
|
1080 |
-
if (
|
1081 |
$sql_delete = sprintf ("
|
1082 |
DELETE FROM %scommentmeta
|
1083 |
WHERE `comment_id` = %d
|
1084 |
", $results[$i]['site'], $results[$i]['id']);
|
1085 |
$wpdb->get_results($sql_delete);
|
1086 |
-
} // if (
|
1087 |
} // if($results[$i]['post_type'] == 'comment')
|
1088 |
-
|
1089 |
-
if (
|
1090 |
// DELETE TRASHED POSTS / PAGES
|
1091 |
$sql_delete = sprintf ("
|
1092 |
DELETE FROM %sposts
|
@@ -1100,25 +1304,25 @@ function odb_confirm_delete() {
|
|
1100 |
WHERE `comment_approved` = 'trash'
|
1101 |
", $results[$i]['site']);
|
1102 |
$wpdb->get_results($sql_delete);
|
1103 |
-
} // if (
|
1104 |
-
|
1105 |
-
$nr++;
|
1106 |
-
} // for($i=0; $i<count($results); $i++)
|
1107 |
|
1108 |
return $total_deleted;
|
1109 |
} // odb_delete_trash()
|
1110 |
|
1111 |
|
1112 |
/********************************************************************************************
|
|
|
1113 |
* GET SPAMMED COMMENTS
|
|
|
1114 |
********************************************************************************************/
|
1115 |
-
function odb_get_spam(
|
1116 |
global $wpdb, $odb_class;
|
1117 |
|
1118 |
$res_arr = array();
|
1119 |
|
1120 |
// LOOP THROUGH SITES
|
1121 |
-
for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++) {
|
1122 |
$prefix = $odb_class->odb_ms_prefixes[$i];
|
1123 |
|
1124 |
$sql = sprintf ("
|
@@ -1137,33 +1341,35 @@ function odb_confirm_delete() {
|
|
1137 |
for($j = 0; $j < count($res); $j++) {
|
1138 |
array_push($res_arr, $res[$j]);
|
1139 |
} // for($j = 0; $j < count($res); $j++)
|
1140 |
-
} // for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
|
1141 |
return $res_arr;
|
1142 |
} // odb_get_spam()
|
1143 |
|
1144 |
|
1145 |
/********************************************************************************************
|
|
|
1146 |
* DELETE SPAMMED ITEMS
|
|
|
1147 |
********************************************************************************************/
|
1148 |
-
function odb_delete_spam($results, $scheduler, $
|
1149 |
global $wpdb;
|
1150 |
-
|
1151 |
-
$nr = 1;
|
1152 |
$total_deleted = count($results);
|
1153 |
-
|
1154 |
-
|
|
|
1155 |
?>
|
1156 |
<tr>
|
1157 |
-
<td align="right" valign="top"><?php echo $
|
1158 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
1159 |
<td valign="top"><?php echo $results[$i]['comment_author']; ?></td>
|
1160 |
<td valign="top"><?php echo $results[$i]['comment_author_email']; ?></td>
|
1161 |
<td valign="top" nowrap="nowrap"><?php echo $results[$i]['comment_date']; ?></td>
|
1162 |
</tr>
|
1163 |
<?php
|
1164 |
-
} // if (!$scheduler)
|
1165 |
|
1166 |
-
if (
|
1167 |
$sql_delete = sprintf ("
|
1168 |
DELETE FROM %scommentmeta
|
1169 |
WHERE `comment_id` = %d
|
@@ -1175,19 +1381,19 @@ function odb_confirm_delete() {
|
|
1175 |
WHERE `comment_approved` = 'spam'
|
1176 |
", $results[$i]['site']);
|
1177 |
$wpdb->get_results($sql_delete);
|
1178 |
-
} // if (
|
1179 |
-
|
1180 |
-
$nr++;
|
1181 |
-
} // for($i=0; $i<count($results); $i++)
|
1182 |
|
1183 |
return $total_deleted;
|
1184 |
} // odb_delete_spam()
|
1185 |
|
1186 |
|
1187 |
/********************************************************************************************
|
|
|
1188 |
* GET UNUSED TAGS
|
|
|
1189 |
********************************************************************************************/
|
1190 |
-
function odb_get_unused_tags(
|
1191 |
global $wpdb, $odb_class;
|
1192 |
|
1193 |
$res_arr = array();
|
@@ -1220,25 +1426,27 @@ function odb_confirm_delete() {
|
|
1220 |
|
1221 |
|
1222 |
/********************************************************************************************
|
|
|
1223 |
* DELETE UNUSED TAGS
|
|
|
1224 |
********************************************************************************************/
|
1225 |
-
function odb_delete_unused_tags($results, $scheduler, $
|
1226 |
global $wpdb, $odb_class;
|
1227 |
|
1228 |
-
$nr = 1;
|
1229 |
$total_deleted = count($results);
|
1230 |
-
|
1231 |
-
|
|
|
1232 |
?>
|
1233 |
<tr>
|
1234 |
-
<td align="right" valign="top"><?php echo $
|
1235 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
1236 |
<td valign="top"><?php echo $results[$i]['name']; ?></td>
|
1237 |
</tr>
|
1238 |
<?php
|
1239 |
-
} // if (!$scheduler)
|
1240 |
|
1241 |
-
if (
|
1242 |
$sql_del = sprintf ("
|
1243 |
DELETE FROM %sterm_taxonomy
|
1244 |
WHERE term_id = %d
|
@@ -1250,17 +1458,17 @@ function odb_confirm_delete() {
|
|
1250 |
WHERE term_id = %d
|
1251 |
", $results[$i]['site'], $results[$i]['term_id']);
|
1252 |
$wpdb->get_results($sql_del);
|
1253 |
-
} // if (
|
1254 |
-
|
1255 |
-
$nr++;
|
1256 |
-
} // for($i=0; $i<count($results); $i++)
|
1257 |
|
1258 |
return $total_deleted;
|
1259 |
} // odb_delete_unused_tags()
|
1260 |
|
1261 |
|
1262 |
/********************************************************************************************
|
|
|
1263 |
* IS THE UNUSED TAG USED IN ONE OR MORE SCHEDULED POSTS?
|
|
|
1264 |
********************************************************************************************/
|
1265 |
function odb_delete_tags_is_scheduled($term_id, $odb_prefix) {
|
1266 |
global $wpdb;
|
@@ -1278,93 +1486,139 @@ function odb_confirm_delete() {
|
|
1278 |
|
1279 |
return false;
|
1280 |
} // odb_delete_tags_is_scheduled()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1281 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1282 |
/********************************************************************************************
|
|
|
1283 |
* DELETE TRANSIENTS (v4.7.3)
|
|
|
1284 |
********************************************************************************************/
|
1285 |
-
function odb_delete_transients($scheduler, $
|
1286 |
global $wpdb, $odb_class;
|
1287 |
-
|
1288 |
-
$total_deleted = 0;
|
1289 |
-
$nr = 1;
|
1290 |
-
|
1291 |
-
if ($odb_class->odb_rvg_options['clear_transients'] !== 'Y' && $odb_class->odb_rvg_options['clear_transients'] !== 'A') {
|
1292 |
-
// DISABLED
|
1293 |
-
return $total_deleted;
|
1294 |
-
}
|
1295 |
|
1296 |
// ONE MINUTE DELAY
|
1297 |
$delay = time() - 60;
|
1298 |
-
|
|
|
|
|
1299 |
// LOOP THROUGH SITES
|
1300 |
-
for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++) {
|
1301 |
$prefix = $odb_class->odb_ms_prefixes[$i];
|
1302 |
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
)
|
1313 |
-
AND option_value < '" . $delay . "'" . "
|
1314 |
-
ORDER BY `option_name`
|
1315 |
-
";
|
1316 |
-
|
1317 |
-
// DELETE EXPIRED TRANSINTS FOR THIS (MULTI-) SITE
|
1318 |
-
$sqldel = "
|
1319 |
-
DELETE FROM " . $prefix . "options
|
1320 |
-
WHERE (
|
1321 |
-
option_name LIKE '_transient_timeout_%'
|
1322 |
-
OR option_name LIKE '_site_transient_timeout_%'
|
1323 |
-
)
|
1324 |
-
AND option_value < '" . $delay . "'" . "
|
1325 |
-
";
|
1326 |
-
} else if ($odb_class->odb_rvg_options['clear_transients'] == 'A') {
|
1327 |
-
// ALL TRANSIENTS
|
1328 |
-
$sql = "
|
1329 |
-
SELECT '" . $prefix . "' AS site,
|
1330 |
-
`option_name`
|
1331 |
-
FROM " . $prefix . "options
|
1332 |
-
WHERE (
|
1333 |
-
option_name LIKE '_transient_timeout_%'
|
1334 |
-
OR option_name LIKE '_site_transient_timeout_%'
|
1335 |
-
)
|
1336 |
-
ORDER BY `option_name`
|
1337 |
-
";
|
1338 |
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1348 |
|
1349 |
-
$
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
return $res;
|
1355 |
} // odb_delete_transients()
|
1356 |
|
|
|
1357 |
/********************************************************************************************
|
|
|
1358 |
* GET PINGBACKS AND TRACKBACKS
|
|
|
1359 |
********************************************************************************************/
|
1360 |
-
function odb_get_pingbacks(
|
1361 |
|
1362 |
global $wpdb, $odb_class;
|
1363 |
|
1364 |
$res_arr = array();
|
1365 |
|
1366 |
// LOOP THROUGH SITES
|
1367 |
-
for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++) {
|
1368 |
$prefix = $odb_class->odb_ms_prefixes[$i];;
|
1369 |
|
1370 |
$sql = sprintf ("
|
@@ -1385,34 +1639,36 @@ function odb_confirm_delete() {
|
|
1385 |
for($j = 0; $j < count($res); $j++) {
|
1386 |
array_push($res_arr, $res[$j]);
|
1387 |
} // for($j = 0; $j < count($res); $j++)
|
1388 |
-
} // for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
|
1389 |
return $res_arr;
|
1390 |
} // odb_get_pingbacks
|
1391 |
|
1392 |
|
1393 |
/********************************************************************************************
|
|
|
1394 |
* DELETE PINGBACKS AND TRACKBACKS
|
|
|
1395 |
********************************************************************************************/
|
1396 |
-
function odb_delete_pingbacks($results, $scheduler, $
|
1397 |
global $wpdb, $odb_class;
|
1398 |
|
1399 |
-
$nr = 1;
|
1400 |
$total_deleted = count($results);
|
1401 |
-
|
1402 |
-
|
|
|
1403 |
?>
|
1404 |
<tr>
|
1405 |
-
<td align="right" valign="top"><?php echo $
|
1406 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
1407 |
<td valign="top"><?php echo $results[$i]['comment_type']?></td>
|
1408 |
<td valign="top"><?php echo $results[$i]['comment_author']?></td>
|
1409 |
<td valign="top" nowrap="nowrap"><?php echo $results[$i]['comment_date']; ?></td>
|
1410 |
</tr>
|
1411 |
<?php
|
1412 |
-
} // if (!$scheduler)
|
1413 |
|
1414 |
-
if (
|
1415 |
-
for($j=0; $j<count($results); $j++) {
|
1416 |
// DELETE METADATA FOR THIS COMMENT (IF ANY)
|
1417 |
$sql = sprintf ("
|
1418 |
DELETE FROM %scommentmeta
|
@@ -1428,26 +1684,26 @@ function odb_confirm_delete() {
|
|
1428 |
)
|
1429 |
", $results[$j]['site']);
|
1430 |
$wpdb->get_results($sql);
|
1431 |
-
} // for($j=0; $j<count($results); $j++)
|
1432 |
-
} // if (
|
1433 |
-
|
1434 |
-
$nr++;
|
1435 |
-
} // for($i=0; $i<count($results); $i++)
|
1436 |
|
1437 |
return $total_deleted;
|
1438 |
} // odb_delete_pingbacks()
|
1439 |
|
1440 |
|
1441 |
/********************************************************************************************
|
|
|
1442 |
* GET OEMBED CACHE
|
|
|
1443 |
********************************************************************************************/
|
1444 |
-
function odb_get_oembed(
|
1445 |
global $wpdb, $odb_class;
|
1446 |
|
1447 |
$res_arr = array();
|
1448 |
|
1449 |
// LOOP THROUGH SITES
|
1450 |
-
for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++) {
|
1451 |
$prefix = $odb_class->odb_ms_prefixes[$i];
|
1452 |
|
1453 |
$sql = sprintf ("
|
@@ -1465,32 +1721,34 @@ function odb_confirm_delete() {
|
|
1465 |
for($j = 0; $j < count($res); $j++) {
|
1466 |
array_push($res_arr, $res[$j]);
|
1467 |
} // for($j = 0; $j < count($res); $j++)
|
1468 |
-
} // for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
|
1469 |
return $res_arr;
|
1470 |
} // odb_get_oembed()
|
1471 |
|
1472 |
|
1473 |
/********************************************************************************************
|
|
|
1474 |
* CLEAR OEMBED CACHE
|
|
|
1475 |
********************************************************************************************/
|
1476 |
-
function odb_delete_oembed($results, $scheduler, $
|
1477 |
global $wpdb, $odb_class;
|
1478 |
|
1479 |
-
$nr = 1;
|
1480 |
$total_deleted = count($results);
|
1481 |
-
|
1482 |
-
|
|
|
1483 |
?>
|
1484 |
<tr>
|
1485 |
-
<td align="right" valign="top"><?php echo $
|
1486 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
1487 |
<td valign="top"><?php echo $results[$i]['meta_key']?></td>
|
1488 |
<td valign="top"><?php echo $results[$i]['meta_value']?></td>
|
1489 |
</tr>
|
1490 |
<?php
|
1491 |
-
} // if (!$scheduler)
|
1492 |
|
1493 |
-
if (
|
1494 |
// DELETE COMMENTS
|
1495 |
$sql = sprintf ("
|
1496 |
DELETE FROM %spostmeta
|
@@ -1498,25 +1756,25 @@ function odb_confirm_delete() {
|
|
1498 |
", $results[$i]['site']);
|
1499 |
|
1500 |
$wpdb->get_results($sql);
|
1501 |
-
} // if (
|
1502 |
-
|
1503 |
-
$nr++;
|
1504 |
-
} // for($i=0; $i<count($results); $i++)
|
1505 |
|
1506 |
return $total_deleted;
|
1507 |
} // odb_delete_oembed()
|
1508 |
|
1509 |
|
1510 |
/********************************************************************************************
|
|
|
1511 |
* GET ORPHAN POSTMETA AND MEDIA RECORDS
|
|
|
1512 |
********************************************************************************************/
|
1513 |
-
function odb_get_orphans(
|
1514 |
global $wpdb, $odb_class;
|
1515 |
|
1516 |
$res_arr = array();
|
1517 |
|
1518 |
// LOOP THROUGH SITES
|
1519 |
-
for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++) {
|
1520 |
$prefix = $odb_class->odb_ms_prefixes[$i];
|
1521 |
|
1522 |
$sql = sprintf ("
|
@@ -1554,25 +1812,26 @@ function odb_confirm_delete() {
|
|
1554 |
for ($j = 0; $j < count($results); $j++) {
|
1555 |
array_push($res_arr, $results[$j]);
|
1556 |
} // for ($j = 0; $j < count($results); $j++)
|
1557 |
-
} // for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
|
1558 |
return $res_arr;
|
1559 |
} // odb_get_orphans()
|
1560 |
|
1561 |
|
1562 |
/********************************************************************************************
|
|
|
1563 |
* DELETE ORPHAN POSTMETA AND MEDIA RECORDS
|
|
|
1564 |
********************************************************************************************/
|
1565 |
-
function odb_delete_orphans($results, $scheduler, $
|
1566 |
|
1567 |
global $wpdb, $odb_class;
|
1568 |
-
|
1569 |
-
$nr = 1;
|
1570 |
$total_deleted = count($results);
|
1571 |
-
for($i=0; $i<count($results); $i++) {
|
1572 |
-
if (!$scheduler) {
|
1573 |
?>
|
1574 |
<tr>
|
1575 |
-
<td align="right" valign="top"><?php echo $
|
1576 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
1577 |
<td valign="top"><?php echo $results[$i]['type']?></td>
|
1578 |
<td valign="top"><?php echo $results[$i]['ID']?></td>
|
@@ -1582,10 +1841,10 @@ function odb_confirm_delete() {
|
|
1582 |
<td valign="top" nowrap="nowrap"><?php echo $results[$i]['meta_value']; ?></td>
|
1583 |
</tr>
|
1584 |
<?php
|
1585 |
-
} // if (!$scheduler)
|
1586 |
|
1587 |
-
if (
|
1588 |
-
for($j=0; $j<count($results); $j++) {
|
1589 |
// DELETE METADATA FOR THIS COMMENT (IF ANY)
|
1590 |
if ($results[$j]['type'] == 'meta') {
|
1591 |
$sql = sprintf ("
|
@@ -1598,25 +1857,24 @@ function odb_confirm_delete() {
|
|
1598 |
WHERE `ID` = %d
|
1599 |
", $results[$j]['site'], $results[$j]['ID']);
|
1600 |
} // if ($results[$j]['type'] == 'meta')
|
1601 |
-
//echo 'SQL: ' . $sql.'<br>';
|
1602 |
$wpdb->get_results($sql);
|
1603 |
-
}// for($j=0; $j<count($results); $j++)
|
1604 |
-
} // if (
|
1605 |
-
|
1606 |
-
} // for($i=0; $i<count($results); $i++)
|
1607 |
-
|
1608 |
return $total_deleted;
|
1609 |
} // odb_delete_orphans()
|
1610 |
|
1611 |
|
1612 |
/********************************************************************************************
|
|
|
1613 |
* OPTIMIZE DATABASE TABLES
|
|
|
1614 |
********************************************************************************************/
|
1615 |
-
function odb_optimize_tables($scheduler) {
|
1616 |
global $odb_class, $wpdb;
|
1617 |
|
1618 |
$cnt = 0;
|
1619 |
-
for ($i=0; $i<count($odb_class->odb_tables); $i++) {
|
1620 |
if(!isset($odb_class->odb_rvg_excluded_tabs[$odb_class->odb_tables[$i][0]])) {
|
1621 |
# TABLE NOT EXCLUDED
|
1622 |
$cnt++;
|
@@ -1653,8 +1911,7 @@ function odb_confirm_delete() {
|
|
1653 |
} // if (strtolower($table_info[0]->engine) == 'myisam')
|
1654 |
} // if($odb_class->odb_rvg_options["optimize_innodb"] == 'N' && strtolower($table_info[0]->engine) == 'innodb')
|
1655 |
|
1656 |
-
if (!$scheduler)
|
1657 |
-
{ // NOT FROM THE SCEDULER
|
1658 |
?>
|
1659 |
<tr>
|
1660 |
<td align="right" valign="top"><?php echo $cnt?>.</td>
|
@@ -1665,16 +1922,17 @@ function odb_confirm_delete() {
|
|
1665 |
<td align="right" valign="top"><?php echo $odb_class->odb_utilities_obj->odb_format_size($table_info[0]->size) ?></td>
|
1666 |
</tr>
|
1667 |
<?php
|
1668 |
-
} // if (!$scheduler)
|
1669 |
} // if(!$excluded)
|
1670 |
-
} // for ($i=0; $i<count($
|
1671 |
return $cnt;
|
1672 |
-
|
1673 |
} // odb_optimize_tables()
|
1674 |
|
1675 |
|
1676 |
/********************************************************************************************
|
|
|
1677 |
* OPTIMIZE A MyISAM TABLE
|
|
|
1678 |
********************************************************************************************/
|
1679 |
function odb_optimize_myisam($table_name) {
|
1680 |
global $wpdb;
|
@@ -1684,7 +1942,9 @@ function odb_confirm_delete() {
|
|
1684 |
|
1685 |
|
1686 |
/********************************************************************************************
|
|
|
1687 |
* OPTIMIZE AN InnoDB TABLE
|
|
|
1688 |
********************************************************************************************/
|
1689 |
function odb_optimize_innodb($table_name) {
|
1690 |
global $wpdb;
|
9 |
class ODB_Cleaner {
|
10 |
var $start_size;
|
11 |
var $nr_of_optimized_tables;
|
12 |
+
var $grand_total = 0;
|
13 |
|
14 |
|
15 |
/********************************************************************************************
|
16 |
+
*
|
17 |
* CONSTRUCTOR
|
18 |
+
*
|
19 |
********************************************************************************************/
|
20 |
function __construct() {
|
21 |
} // __construct()
|
22 |
|
23 |
|
24 |
/********************************************************************************************
|
25 |
+
*
|
26 |
* RUN CLEANER
|
27 |
+
*
|
28 |
********************************************************************************************/
|
29 |
+
function odb_run_cleaner($scheduler, $action = 'run_detail') {
|
30 |
global $odb_class;
|
31 |
|
32 |
if(!$scheduler) {
|
33 |
+
if ($action == 'analyze_summary' || $action == 'analyze_detail') {
|
34 |
+
if ($action == 'analyze_summary') {
|
35 |
+
$txt = 'Analyzing (summary)';
|
36 |
+
} else if ($action == 'analyze_detail') {
|
37 |
+
$txt = 'Analyzing (detail)';
|
38 |
+
}
|
39 |
echo '
|
40 |
<div id="odb-cleaner" class="odb-padding-left">
|
41 |
<div class="odb-title-bar">
|
42 |
+
<h2>'.__($txt, $odb_class->odb_txt_domain).'</h2>
|
43 |
</div>
|
44 |
<br>
|
45 |
<br>
|
65 |
$odb_class->log_arr["timestamp"] = current_time('YmdHis', 0);
|
66 |
$odb_class->log_arr["after"] = 0;
|
67 |
$odb_class->log_arr["before"] = 0;
|
|
|
68 |
$odb_class->log_arr["pingbacks"] = 0;
|
69 |
$odb_class->log_arr["oembeds"] = 0;
|
70 |
$odb_class->log_arr["orphans"] = 0;
|
74 |
$odb_class->log_arr["tables"] = 0;
|
75 |
$odb_class->log_arr["tags"] = 0;
|
76 |
$odb_class->log_arr["transients"] = 0;
|
77 |
+
$odb_class->log_arr["trash"] = 0;
|
78 |
+
|
79 |
/****************************************************************************************
|
80 |
+
*
|
81 |
* DELETE REVISIONS
|
82 |
+
*
|
83 |
****************************************************************************************/
|
84 |
if($odb_class->odb_rvg_options['delete_older'] == 'Y' || $odb_class->odb_rvg_options['rvg_revisions'] == 'Y') {
|
85 |
+
|
86 |
// FIND REVISIONS
|
87 |
$results_older_than = array();
|
88 |
if($odb_class->odb_rvg_options['delete_older'] == 'Y') {
|
89 |
$results_older_than = $this->odb_get_revisions_older_than();
|
90 |
+
} // if($odb_class->odb_rvg_options['delete_older'] == 'Y')
|
91 |
|
92 |
$results_keep_revisions = array();
|
93 |
if($odb_class->odb_rvg_options['rvg_revisions'] == 'Y') {
|
94 |
$results_keep_revisions = $this->odb_get_revisions_keep_revisions();
|
95 |
+
} if($odb_class->odb_rvg_options['rvg_revisions'] == 'Y')
|
96 |
+
|
97 |
+
if (count($results_older_than) > 0 || count($results_keep_revisions) > 0) {
|
98 |
+
// REVISIONS FOUND
|
99 |
+
$this->grand_total += count($results_older_than) + count($results_keep_revisions);
|
100 |
+
|
101 |
+
if ($action == 'analyze_summary') {
|
102 |
+
?>
|
103 |
+
<div class="odb-found-number">
|
104 |
+
<?php _e('REVISIONS found to delete: ', $odb_class->odb_txt_domain);?>
|
105 |
+
<?php echo (count($results_older_than) + count($results_keep_revisions)) . '<br>';?>
|
106 |
+
</div>
|
107 |
+
<?php
|
108 |
+
} // if ($action == 'analyze_summary')
|
109 |
+
|
110 |
+
if ($action == 'run_summary') {
|
111 |
+
?>
|
112 |
+
<div class="odb-found-number">
|
113 |
+
<?php _e('REVISIONS deleted: ', $odb_class->odb_txt_domain);?>
|
114 |
+
<?php echo (count($results_older_than) + count($results_keep_revisions)) . '<br>';?>
|
115 |
+
</div>
|
116 |
+
<?php
|
117 |
+
} // if ($action == 'run_summary')
|
118 |
+
|
119 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
120 |
+
// 'ANALYZE_DETAIL', 'RUN_SUMMARY' or 'RUN_DETAIL'
|
121 |
+
if ($action == 'analyze_detail') {
|
122 |
+
$msg1 = __('REVISIONS', $odb_class->odb_txt_domain);
|
123 |
+
$msg2 = __('total number of revisions', $odb_class->odb_txt_domain);
|
124 |
} else {
|
125 |
+
// 'RUN_SUMMARY' or 'RUN_DETAIL'
|
126 |
+
if ($action == 'run_detail') {
|
127 |
+
$msg1 = __('DELETED REVISIONS', $odb_class->odb_txt_domain);
|
128 |
+
$msg2 = __('total number of revisions deleted', $odb_class->odb_txt_domain);
|
129 |
+
} // if ($action == 'run_detail')
|
130 |
+
} // if ($action == 'analyze_detail')
|
131 |
?>
|
132 |
<table border="0" cellspacing="8" cellpadding="2" class="odb-result-table">
|
133 |
<tr>
|
134 |
+
<td colspan="4"><div class="odb-found">
|
135 |
+
<?php echo $msg1 ?>
|
136 |
+
</div></td>
|
137 |
</tr>
|
138 |
<tr>
|
139 |
<th align="right" class="odb-border-bottom">#</th>
|
142 |
<th align="left" class="odb-border-bottom"><?php _e('revision date', $odb_class->odb_txt_domain);?></th>
|
143 |
<th align="right" class="odb-border-bottom"><?php echo $msg2?></th>
|
144 |
</tr>
|
145 |
+
<?php
|
146 |
+
} // if ($action == 'analyze_detail' || $action == 'run_detail')
|
147 |
+
|
148 |
+
// LOOP THROUGH THE REVISIONS AND DELETE THEM
|
149 |
+
$total_deleted = $this->odb_delete_revisions($scheduler, $action);
|
150 |
+
|
151 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
152 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
153 |
<tr>
|
154 |
+
<td colspan="5" align="right" class="odb-border-top odb-bold"><?php echo $msg2 ?>: <?php echo $total_deleted?></td>
|
155 |
</tr>
|
156 |
+
</table>
|
157 |
+
<?php
|
158 |
+
} // if ($action == 'analyze_detail' || $action == 'run_detail')
|
159 |
+
|
160 |
+
if (!$scheduler && ($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 (!$scheduler && $action == 'run')
|
164 |
+
} else {
|
165 |
+
// NO REVISIONS FOUND
|
166 |
+
if (!$scheduler) {
|
167 |
+
?>
|
168 |
<div class="odb-not-found">
|
169 |
<?php _e('No REVISIONS found to delete', $odb_class->odb_txt_domain);?>
|
170 |
</div>
|
171 |
+
<?php
|
172 |
+
} // if (!$scheduler)
|
173 |
+
} // if (count($results) > 0)
|
|
|
|
|
|
|
174 |
} // if($odb_class->odb_rvg_options['delete_older'] == 'Y' || $odb_class->odb_rvg_options['rvg_revisions'] == 'Y')
|
175 |
|
176 |
|
177 |
/****************************************************************************************
|
178 |
+
*
|
179 |
* DELETE TRASHED ITEMS
|
180 |
+
*
|
181 |
****************************************************************************************/
|
182 |
+
if ($odb_class->odb_rvg_options['clear_trash'] == 'Y') {
|
183 |
+
$results = $this->odb_get_trash();
|
184 |
+
if (count($results) > 0) {
|
185 |
+
// TRASHED ITEMS FOUNE
|
186 |
+
$this->grand_total += count($results);
|
187 |
+
|
188 |
+
// TRASH FOUND
|
189 |
+
if ($action == 'analyze_summary') {
|
190 |
+
?>
|
191 |
+
<div class="odb-found-number">
|
192 |
+
<?php _e('TRASHED ITEMS found to delete: ', $odb_class->odb_txt_domain);?>
|
193 |
+
<?php echo count($results) . '<br>';?>
|
194 |
+
</div>
|
195 |
+
<?php
|
196 |
+
} // if ($action == 'analyze_summary')
|
197 |
+
|
198 |
+
if ($action == 'run_summary') {
|
199 |
+
?>
|
200 |
+
<div class="odb-found-number">
|
201 |
+
<?php _e('TRASHED ITEMS deleted: ', $odb_class->odb_txt_domain);?>
|
202 |
+
<?php echo count($results) . '<br>';?>
|
203 |
+
</div>
|
204 |
+
<?php
|
205 |
+
} // if ($action == 'run_summary')
|
206 |
+
|
207 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
208 |
+
// 'RUN' or 'ANALYZE_DETAIL
|
209 |
+
if ($action == 'analyze_detail') {
|
210 |
$msg1 = __('TRASHED ITEMS', $odb_class->odb_txt_domain);
|
211 |
$msg2 = __('total number of trashed items', $odb_class->odb_txt_domain);
|
212 |
} else {
|
213 |
+
// ACTION = 'RUN_DETAIL'
|
214 |
$msg1 = __('DELETED TRASHED ITEMS', $odb_class->odb_txt_domain);
|
215 |
+
$msg2 = __('total number of trashed items deleted', $odb_class->odb_txt_domain);
|
216 |
+
} // if ($action == 'analyze_detail')
|
217 |
?>
|
218 |
<table border="0" cellspacing="8" cellpadding="2" class="odb-result-table">
|
219 |
<tr>
|
228 |
<th align="left" class="odb-border-bottom"><?php _e('IP address / title', $odb_class->odb_txt_domain);?></th>
|
229 |
<th align="left" nowrap="nowrap" class="odb-border-bottom"><?php _e('date', $odb_class->odb_txt_domain);?></th>
|
230 |
</tr>
|
231 |
+
<?php
|
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 (!$scheduler && ($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'))
|
240 |
+
|
241 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
242 |
+
?>
|
243 |
+
</table>
|
244 |
+
<?php
|
245 |
+
} // if ($action == 'analyze_detail' || $action == 'run_detail')
|
246 |
} else {
|
247 |
+
// NO TRASH FOUND
|
248 |
+
if (!$scheduler) {
|
249 |
+
?>
|
250 |
<div class="odb-not-found">
|
251 |
<?php _e('No TRASHED ITEMS found to delete', $odb_class->odb_txt_domain);?>
|
252 |
</div>
|
253 |
+
<?php
|
254 |
+
} // if (!$scheduler)
|
255 |
+
} // if (count($results) > 0)
|
|
|
|
|
|
|
256 |
} // if($odb_class->odb_rvg_options['clear_trash'] == 'Y')
|
257 |
+
|
258 |
+
|
259 |
/****************************************************************************************
|
260 |
+
*
|
261 |
* DELETE SPAMMED ITEMS
|
262 |
+
*
|
263 |
****************************************************************************************/
|
264 |
+
if ($odb_class->odb_rvg_options['clear_spam'] == 'Y') {
|
265 |
+
$results = $this->odb_get_spam();
|
266 |
+
|
267 |
+
if (count($results) > 0) {
|
268 |
+
// SPAM FOUND
|
269 |
+
$this->grand_total += count($results);
|
270 |
+
|
271 |
+
if ($action == 'analyze_summary') {
|
272 |
+
?>
|
273 |
+
<div class="odb-found-number">
|
274 |
+
<?php _e('SPAMMED ITEMS found to delete: ', $odb_class->odb_txt_domain);?>
|
275 |
+
<?php echo count($results) . '<br>';?>
|
276 |
+
</div>
|
277 |
+
<?php
|
278 |
+
} // if ($action == 'analyze_summary')
|
279 |
+
|
280 |
+
if ($action == 'run_summary') {
|
281 |
+
?>
|
282 |
+
<div class="odb-found-number">
|
283 |
+
<?php _e('SPAMMED ITEMS deleted: ', $odb_class->odb_txt_domain);?>
|
284 |
+
<?php echo count($results) . '<br>';?>
|
285 |
+
</div>
|
286 |
+
<?php
|
287 |
+
} // if ($action == 'run_summary')
|
288 |
+
|
289 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
290 |
+
if ($action == 'analyze_detail') {
|
291 |
+
$msg1 = __('SPAMMED ITEMS', $odb_class->odb_txt_domain);
|
292 |
+
$msg2 = __('total number of spammed items', $odb_class->odb_txt_domain);
|
293 |
+
} // if ($action == 'analyze_detail')
|
294 |
+
|
295 |
+
if ($action == 'run_detail') {
|
296 |
+
$msg1 = __('DELETED SPAMMED ITEMS', $odb_class->odb_txt_domain);
|
297 |
+
$msg2 = __('total number of spammed items deleted', $odb_class->odb_txt_domain);
|
298 |
+
} // if ($action == 'run_detail')
|
299 |
?>
|
300 |
<table border="0" cellspacing="8" cellpadding="2" class="odb-result-table">
|
301 |
<tr>
|
310 |
<th align="left" class="odb-border-bottom"><?php _e('comment author email', $odb_class->odb_txt_domain);?></th>
|
311 |
<th align="left" nowrap="nowrap" class="odb-border-bottom"><?php _e('comment date', $odb_class->odb_txt_domain);?></th>
|
312 |
</tr>
|
313 |
+
<?php
|
314 |
+
} // if ($action == 'analyze_detail' || $action == 'run_detail')
|
315 |
+
|
316 |
+
// LOOP THROUGH THE SPAMMED ITEMS AND DELETE THEM
|
317 |
+
$total_deleted = $this->odb_delete_spam($results, $scheduler, $action);
|
318 |
|
319 |
+
if (!$scheduler && ($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'))
|
323 |
+
|
324 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
325 |
+
?>
|
326 |
+
</table>
|
327 |
+
<?php
|
328 |
+
} // if ($action == 'analyze_detail' || $action == 'run_detail')
|
329 |
+
} else {
|
330 |
+
// NO SPAM FOUND
|
331 |
if (!$scheduler) {
|
332 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
<div class="odb-not-found">
|
334 |
<?php _e('No SPAMMED ITEMS found to delete', $odb_class->odb_txt_domain);?>
|
335 |
</div>
|
336 |
+
<?php
|
337 |
} // if (!$scheduler)
|
338 |
+
} // if (count($results) > 0)
|
339 |
+
} // if ($odb_class->odb_rvg_options['clear_spam'] == 'Y')
|
340 |
+
|
341 |
|
|
|
|
|
|
|
|
|
|
|
342 |
/****************************************************************************************
|
343 |
+
*
|
344 |
* DELETE UNUSED TAGS
|
345 |
+
*
|
346 |
****************************************************************************************/
|
347 |
+
if ($odb_class->odb_rvg_options['clear_tags'] == 'Y') {
|
348 |
// GET UNUSED TAGS
|
349 |
+
$results = $this->odb_get_unused_tags();
|
|
|
|
|
350 |
|
351 |
+
if (count($results) > 0) {
|
352 |
+
// UNUSED TAGS FOUND
|
353 |
+
$this->grand_total += count($results);
|
354 |
+
|
355 |
+
if ($action == 'analyze_summary' || $action == 'run_summary') {
|
356 |
+
if ($action == 'analyze_summary') {
|
357 |
+
?>
|
358 |
+
<div class="odb-found-number">
|
359 |
+
<?php _e('UNUSED TAGS found to delete: ', $odb_class->odb_txt_domain);?>
|
360 |
+
<?php echo count($results) . '<br>';?>
|
361 |
+
</div>
|
362 |
+
<?php
|
363 |
+
} // if ($action == 'analyze_summary')
|
364 |
+
|
365 |
+
if ($action == 'run_summary') {
|
366 |
+
?>
|
367 |
+
<div class="odb-found-number">
|
368 |
+
<?php _e('UNUSED TAGS deleted: ', $odb_class->odb_txt_domain);?>
|
369 |
+
<?php echo count($results) . '<br>';?>
|
370 |
+
</div>
|
371 |
+
<?php
|
372 |
+
} // if ($action == 'run_summary')
|
373 |
+
} // if ($action == 'analyze_summary' || $action == 'run_summary')
|
374 |
+
|
375 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
376 |
+
if ($action == 'analyze_detail') {
|
377 |
$msg1 = __('UNUSED TAGS', $odb_class->odb_txt_domain);
|
378 |
+
$msg2 = __('total number of unused tags', $odb_class->odb_txt_domain);
|
379 |
} else {
|
380 |
+
// ACTION = 'RUN_detail'
|
381 |
$msg1 = __('DELETED UNUSED TAGS', $odb_class->odb_txt_domain);
|
382 |
+
$msg2 = __('total number of unused tags deleted', $odb_class->odb_txt_domain);
|
383 |
+
} // if ($action == 'analyze_detail')
|
384 |
?>
|
385 |
<table border="0" cellspacing="8" cellpadding="2" class="odb-result-table">
|
386 |
<tr>
|
393 |
<th align="left" class="odb-border-bottom"><?php _e('prefix', $odb_class->odb_txt_domain);?></th>
|
394 |
<th align="left" class="odb-border-bottom"><?php _e('tag', $odb_class->odb_txt_domain);?></th>
|
395 |
</tr>
|
396 |
+
<?php
|
397 |
+
} // if ($action == 'analyze_detail' || $action == 'run_detail')
|
398 |
|
399 |
+
// LOOP THROUGH THE UNUSED TAGS AND DELETE THEM
|
400 |
+
$total_deleted = $this->odb_delete_unused_tags($results, $scheduler, $action);
|
401 |
+
|
402 |
+
if (!$scheduler && ($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'))
|
406 |
|
407 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
408 |
+
?>
|
409 |
+
</table>
|
410 |
+
<?php
|
411 |
+
} // if ($action == 'analyze_detail' || $action == 'run_detail')
|
|
|
|
|
|
|
412 |
} else {
|
413 |
+
// NO UNUSED TAGS FOUND
|
414 |
if (!$scheduler) {
|
415 |
+
?>
|
416 |
<div class="odb-not-found">
|
417 |
+
<?php _e('No UNUSED TAGS found to delete', $odb_class->odb_txt_domain);?>
|
418 |
</div>
|
419 |
+
<?php
|
420 |
} // if (!$scheduler)
|
421 |
+
} // if (count($results) > 0)
|
422 |
+
} // if ($odb_class->odb_rvg_options['clear_tags'] == 'Y')
|
423 |
+
|
|
|
|
|
|
|
424 |
|
425 |
/****************************************************************************************
|
426 |
+
*
|
427 |
+
* DELETE TRANSIENTS
|
428 |
+
*
|
429 |
****************************************************************************************/
|
430 |
+
if ($odb_class->odb_rvg_options['clear_transients'] !== 'N') {
|
431 |
+
|
432 |
+
if ($odb_class->odb_rvg_options['clear_transients'] == 'Y') {
|
433 |
+
$type = 'EXPIRED';
|
434 |
+
$typeLc = 'expired';
|
435 |
+
$option = 'Y';
|
436 |
+
} else {
|
437 |
+
$type = '';
|
438 |
+
$typeLc = '';
|
439 |
+
$option = 'A';
|
440 |
+
}
|
441 |
+
|
442 |
+
$results = $this->odb_get_transients($option);
|
443 |
|
444 |
+
if (count($results) > 0) {
|
445 |
+
// TRANSIENTS FOUND
|
446 |
+
$this->grand_total += count($results);
|
447 |
+
|
448 |
+
if ($action == 'analyze_summary' || $action == 'run_summary') {
|
449 |
+
if ($action == 'analyze_summary') {
|
450 |
+
?>
|
451 |
+
<div class="odb-found-number">
|
452 |
+
<?php _e($type . ' TRANSIENTS found to delete: ', $odb_class->odb_txt_domain);?>
|
453 |
+
<?php echo count($results) . '<br>';?>
|
454 |
+
</div>
|
455 |
+
<?php
|
456 |
+
} // if ($action == 'analyze_summary')
|
457 |
+
|
458 |
+
if ($action == 'run_summary') {
|
459 |
+
?>
|
460 |
+
<div class="odb-found-number">
|
461 |
+
<?php _e($type . ' TRANSIENTS deleted: ', $odb_class->odb_txt_domain);?>
|
462 |
+
<?php echo count($results) . '<br>';?>
|
463 |
+
</div>
|
464 |
+
<?php
|
465 |
+
} // if ($action == 'run_summary')
|
466 |
+
} // if ($action == 'analyze_summary' || $action == 'run_summary')
|
467 |
+
|
468 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
469 |
+
// 'RUN' or 'ANALYZE_DETAIL
|
470 |
+
if ($action == 'analyze_detail') {
|
471 |
+
$msg1 = __($type . ' TRANSIENTS', $odb_class->odb_txt_domain);
|
472 |
+
$msg2 = __('total number of ' . $typeLc . ' transients', $odb_class->odb_txt_domain);
|
473 |
} else {
|
474 |
+
// ACTION = 'RUN_DETAIL'
|
475 |
+
$msg1 = __('DELETED ' . $type . ' TRANSIENTS', $odb_class->odb_txt_domain);
|
476 |
+
$msg2 = __('total number of ' . $typeLc . ' deleted', $odb_class->odb_txt_domain);
|
477 |
+
} // if ($action == 'analyze_detail')
|
478 |
+
?>
|
479 |
+
<table border="0" cellspacing="8" cellpadding="2" class="odb-result-table">
|
480 |
+
<tr>
|
481 |
+
<td colspan="4"><div class="odb-found">
|
482 |
+
<?php echo $msg1 ?>
|
483 |
+
</div></td>
|
484 |
+
</tr>
|
485 |
+
<tr>
|
486 |
+
<th align="right" class="odb-border-bottom">#</th>
|
487 |
+
<th align="left" class="odb-border-bottom"><?php _e('prefix', $odb_class->odb_txt_domain);?></th>
|
488 |
+
<th align="left" class="odb-border-bottom"><?php _e('option name', $odb_class->odb_txt_domain);?></th>
|
489 |
+
</tr>
|
490 |
+
<?php
|
491 |
+
} // if ($action == 'analyze_detail' || $action == 'run_detail')
|
492 |
+
|
493 |
+
// LOOP THROUGH THE TRANSIENTS AND DELETE THEM
|
494 |
+
$total_deleted = $this->odb_delete_transients($results, $scheduler, $action, $option);
|
495 |
+
|
496 |
+
if (!$scheduler && ($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'))
|
500 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
|
|
|
|
|
|
|
|
|
|
501 |
?>
|
502 |
+
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
503 |
<?php
|
504 |
+
} // if ($action == 'analyze_detail' || $action == 'run_detail')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
505 |
} else {
|
506 |
+
// NO TRANSIENTS FOUND
|
507 |
+
if (!$scheduler) {
|
508 |
+
?>
|
509 |
+
<div class="odb-not-found">
|
510 |
+
<?php _e('No TRANSIENTS found to delete', $odb_class->odb_txt_domain);?>
|
511 |
+
</div>
|
512 |
+
<?php
|
513 |
+
} // if (!$scheduler)
|
514 |
+
} // if (count($results) > 0)
|
515 |
+
} // if ($odb_class->odb_rvg_options['clear_transients'] !== 'N')
|
516 |
+
|
517 |
|
518 |
/****************************************************************************************
|
519 |
+
*
|
520 |
* DELETE PINGBACKS AND TRACKBACKS
|
521 |
+
*
|
522 |
+
****************************************************************************************/
|
523 |
+
if ($odb_class->odb_rvg_options['clear_pingbacks'] == 'Y') {
|
524 |
// GET PINGBACKS AND TRACKBACKS
|
525 |
+
$results = $this->odb_get_pingbacks();
|
526 |
+
|
527 |
+
if (count($results) > 0) {
|
528 |
+
// PINGBACKS AND/OR TRACKBACKS FOUND FOUND
|
529 |
+
$this->grand_total += count($results);
|
530 |
+
|
531 |
+
if ($action == 'analyze_summary' || $action == 'run_summary') {
|
532 |
+
if ($action == 'analyze_summary') {
|
533 |
+
?>
|
534 |
+
<div class="odb-found-number">
|
535 |
+
<?php _e('PINGBACKS AND/OR TRACKBACKS found to delete: ', $odb_class->odb_txt_domain);?>
|
536 |
+
<?php echo count($results) . '<br>';?>
|
537 |
+
</div>
|
538 |
+
<?php
|
539 |
+
} // if ($action == 'analyze_summary')
|
540 |
+
|
541 |
+
if ($action == 'run_summary') {
|
542 |
+
?>
|
543 |
+
<div class="odb-found-number">
|
544 |
+
<?php _e('PINGBACKS AND/OR TRACKBACKS deleted: ', $odb_class->odb_txt_domain);?>
|
545 |
+
<?php echo count($results) . '<br>';?>
|
546 |
+
</div>
|
547 |
+
<?php
|
548 |
+
} // if ($action == 'run_summary')
|
549 |
+
} // if ($action == 'analyze_summary' || $action == 'run_summary')
|
550 |
+
|
551 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
552 |
+
if ($action == 'analyze_detail') {
|
553 |
$msg1 = __('PINGBACKS AND TRACKBACKS', $odb_class->odb_txt_domain);
|
554 |
$msg2 = __('total number of pingbacks and trackbacks', $odb_class->odb_txt_domain);
|
555 |
} else {
|
556 |
+
// ACTION = 'RUN'
|
557 |
$msg1 = __('DELETED PINGBACKS AND TRACKBACKS', $odb_class->odb_txt_domain);
|
558 |
$msg2 = __('total number of pingbacks and trackbacks deleted', $odb_class->odb_txt_domain);
|
559 |
+
} // if ($action == 'analyze_detail')
|
560 |
?>
|
561 |
<table border="0" cellspacing="8" cellpadding="2" class="odb-result-table">
|
562 |
<tr>
|
571 |
<th align="left" class="odb-border-bottom"><?php _e('comment_author', $odb_class->odb_txt_domain);?></th>
|
572 |
<th align="left" nowrap="nowrap" class="odb-border-bottom"><?php _e('date', $odb_class->odb_txt_domain);?></th>
|
573 |
</tr>
|
574 |
+
<?php
|
575 |
+
} // if ($action == 'analyze_detail' || $action == 'run_detail')
|
|
|
|
|
|
|
576 |
|
577 |
+
// LOOP THROUGH THE PINGBACKS AND TRACKBACKS AND DELETE THEM
|
578 |
+
$total_deleted = $this->odb_delete_pingbacks($results, $scheduler, $action);
|
579 |
+
if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_summary' || $action == 'run_detail')) {
|
580 |
+
// NUMBER OF DELETED PINGBACKS AND TRACKBACKS FOR LOG FILE
|
581 |
+
$odb_class->log_arr["pingbacks"] = $total_deleted;
|
582 |
+
} // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail'))
|
583 |
+
|
584 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
585 |
+
?>
|
586 |
+
</table>
|
587 |
+
<?php
|
588 |
+
} // if ($action == 'analyze_detail' || $action == 'run_detail')
|
589 |
+
|
590 |
+
if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail')) {
|
591 |
+
// NUMBER OF DELETED PINGBACKS AND TRACKBACKS FOR LOG FILE
|
592 |
+
$odb_class->log_arr["pingbacks"] = $total_deleted;
|
593 |
+
} // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail'))
|
594 |
} else {
|
595 |
+
// NO PINGBACKS NOR TRACKBACKS FOUND
|
596 |
+
if (!$scheduler) {
|
597 |
+
?>
|
598 |
<div class="odb-not-found">
|
599 |
<?php _e('No PINGBACKS nor TRACKBACKS found to delete', $odb_class->odb_txt_domain);?>
|
600 |
</div>
|
601 |
+
<?php
|
602 |
+
} // if (!$scheduler)
|
603 |
+
} // if (count($results) > 0)
|
604 |
+
} // if ($odb_class->odb_rvg_options['clear_pingbacks'] == 'Y')
|
|
|
|
|
|
|
605 |
|
606 |
|
607 |
/****************************************************************************************
|
608 |
+
*
|
609 |
* DELETE OEMBED CACHE
|
610 |
+
*
|
611 |
+
****************************************************************************************/
|
612 |
+
if ($odb_class->odb_rvg_options['clear_oembed'] == 'Y') {
|
613 |
|
614 |
// GET OEMBED CACHE
|
615 |
+
$results = $this->odb_get_oembed();
|
616 |
+
|
617 |
+
if (count($results) > 0) {
|
618 |
+
// OEMBED CACHE FOUND
|
619 |
+
$this->grand_total += count($results);
|
620 |
+
|
621 |
+
if ($action == 'analyze_summary' || $action == 'run_summary') {
|
622 |
+
if ($action == 'analyze_summary') {
|
623 |
+
?>
|
624 |
+
<div class="odb-found-number">
|
625 |
+
<?php _e('OEMBED CACHE ITEMS found to delete: ', $odb_class->odb_txt_domain);?>
|
626 |
+
<?php echo count($results) . '<br>';?>
|
627 |
+
</div>
|
628 |
+
<?php
|
629 |
+
} // if ($action == 'analyze_summary')
|
630 |
+
|
631 |
+
if ($action == 'run_summary') {
|
632 |
+
?>
|
633 |
+
<div class="odb-found-number">
|
634 |
+
<?php _e('OEMBED CACHE ITEMS deleted: ', $odb_class->odb_txt_domain);?>
|
635 |
+
<?php echo count($results) . '<br>';?>
|
636 |
+
</div>
|
637 |
+
<?php
|
638 |
+
} // if ($action == 'run_summary')
|
639 |
+
} // if ($action == 'analyze_summary' || $action == 'run_summary')
|
640 |
+
|
641 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
642 |
+
if ($action == 'analyze_detail') {
|
643 |
+
$msg1 = __('OEMBED CACHE items', $odb_class->odb_txt_domain);
|
644 |
+
$msg2 = __('total number of oembed cache items', $odb_class->odb_txt_domain);
|
645 |
} else {
|
646 |
+
// ACTION = 'RUN'
|
647 |
+
$msg1 = __('DELETED OEMBED CACHE ITEMS', $odb_class->odb_txt_domain);
|
648 |
+
$msg2 = __('total number of oembed cache items deleted', $odb_class->odb_txt_domain);
|
649 |
+
} // if ($action == 'analyze_detail')
|
650 |
?>
|
651 |
<table border="0" cellspacing="8" cellpadding="2" class="odb-result-table">
|
652 |
<tr>
|
660 |
<th align="left" class="odb-border-bottom"><?php _e('meta key', $odb_class->odb_txt_domain);?></th>
|
661 |
<th align="left" class="odb-border-bottom"><?php _e('meta value', $odb_class->odb_txt_domain);?></th>
|
662 |
</tr>
|
663 |
+
<?php
|
664 |
+
} // if ($action == 'analyze_detail' || $action == 'run_detail')
|
665 |
+
|
666 |
+
// LOOP THROUGH THE ORPHANS THEM
|
667 |
+
$total_deleted = $this->odb_delete_oembed($results, $scheduler, $action);
|
668 |
|
669 |
+
if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_summary' || $action == 'run_detail')) {
|
670 |
+
// NUMBER OF OEMBED CACHE ITEMS FOR LOG FILE
|
671 |
+
$odb_class->log_arr["oembeds"] = $total_deleted;
|
672 |
+
} // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail')
|
673 |
+
|
674 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
675 |
+
?>
|
676 |
+
</table>
|
677 |
+
<?php
|
678 |
+
} // if ($action == 'analyze_detail' || $action == 'run_detail')
|
679 |
} else {
|
680 |
+
// NO OEMBED CACHE ITEMS FOUND
|
681 |
+
if (!$scheduler) {
|
682 |
+
?>
|
683 |
<div class="odb-not-found">
|
684 |
+
<?php _e('No OEMBED CACHE ITEMS found to delete', $odb_class->odb_txt_domain);?>
|
685 |
</div>
|
686 |
+
<?php
|
687 |
+
} // if (!$scheduler)
|
688 |
+
} // if (count($results) > 0)
|
689 |
+
} // if ($odb_class->odb_rvg_options['clear_oembed'] == 'Y')
|
690 |
+
|
|
|
|
|
691 |
|
|
|
692 |
/****************************************************************************************
|
693 |
+
*
|
694 |
* DELETE ORPHANS
|
695 |
+
*
|
696 |
****************************************************************************************/
|
697 |
if($odb_class->odb_rvg_options['clear_orphans'] == 'Y') {
|
698 |
+
|
699 |
+
$results = $this->odb_get_orphans($scheduler);
|
|
|
|
|
|
|
700 |
|
701 |
+
if (count($results) > 0) {
|
702 |
+
// ORPHANS FOUND
|
703 |
+
$this->grand_total += count($results);
|
704 |
+
|
705 |
+
if ($action == 'analyze_summary' || $action == 'run_summary') {
|
706 |
+
if ($action == 'analyze_summary') {
|
707 |
+
?>
|
708 |
+
<div class="odb-found-number">
|
709 |
+
<?php _e('ORPHANS found to delete: ', $odb_class->odb_txt_domain);?>
|
710 |
+
<?php echo count($results) . '<br>';?>
|
711 |
+
</div>
|
712 |
+
<?php
|
713 |
+
} // if ($action == 'analyze_summary')
|
714 |
+
|
715 |
+
if ($action == 'run_summary') {
|
716 |
+
?>
|
717 |
+
<div class="odb-found-number">
|
718 |
+
<?php _e('ORPHANS deleted: ', $odb_class->odb_txt_domain);?>
|
719 |
+
<?php echo count($results) . '<br>';?>
|
720 |
+
</div>
|
721 |
+
<?php
|
722 |
+
} // if ($action == 'run_summary')
|
723 |
+
} // if ($action == 'analyze_summary' || $action == 'run_summary')
|
724 |
+
|
725 |
+
if ($action == 'analyze_detail' || $action == 'run_detail') {
|
726 |
+
|
727 |
+
if ($action == 'analyze_detail') {
|
728 |
+
$msg1 = __('ORPHANS', $odb_class->odb_txt_domain);
|
729 |
$msg2 = __('total number of orphans', $odb_class->odb_txt_domain);
|
730 |
} else {
|
731 |
+
// ACTION = 'RUN_DETAIL'
|
732 |
+
$msg1 = __('DELETED ORPHANS', $odb_class->odb_txt_domain);
|
733 |
+
$msg2 = __('total number of orphans deleted', $odb_class->odb_txt_domain);
|
734 |
+
} // if ($action == 'analyze_detail')
|
735 |
+
?>
|
736 |
+
<table border="0" cellspacing="8" cellpadding="2" class="odb-result-table">
|
737 |
+
<tr>
|
738 |
+
<td colspan="4"><div class="odb-found">
|
739 |
+
<?php echo $msg1 ?>
|
740 |
+
</div></td>
|
741 |
+
</tr>
|
742 |
+
<tr>
|
743 |
+
<th align="right" class="odb-border-bottom">#</th>
|
744 |
+
<th align="left" class="odb-border-bottom"><?php _e('prefix', $odb_class->odb_txt_domain);?></th>
|
745 |
+
<th align="left" class="odb-border-bottom"><?php _e('type', $odb_class->odb_txt_domain);?></th>
|
746 |
+
<th align="left" class="odb-border-bottom"><?php _e('id', $odb_class->odb_txt_domain);?></th>
|
747 |
+
<th align="left" class="odb-border-bottom"><?php _e('title', $odb_class->odb_txt_domain);?></th>
|
748 |
+
<th align="left" nowrap="nowrap" class="odb-border-bottom"><?php _e('modified', $odb_class->odb_txt_domain);?></th>
|
749 |
+
<th align="left" class="odb-border-bottom"><?php _e('meta key', $odb_class->odb_txt_domain);?></th>
|
750 |
+
<th align="left" class="odb-border-bottom"><?php _e('meta value', $odb_class->odb_txt_domain);?></th>
|
751 |
+
</tr>
|
752 |
+
<?php
|
753 |
+
} // if ($action == 'analyze_detail' || $action == 'run_detail')
|
754 |
+
|
755 |
+
// LOOP THROUGH THE ORPHANS AND DELETE THEM
|
756 |
+
$total_deleted = $this->odb_delete_orphans($results, $scheduler, $action);
|
757 |
+
if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_summary' || $action == 'run_detail')) {
|
758 |
+
// NUMBER OF ORPHANS FOR LOG FILE
|
759 |
+
$odb_class->log_arr["orphans"] = $total_deleted;
|
760 |
+
} // if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail')
|
761 |
+
?>
|
762 |
+
</table>
|
763 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
764 |
} else {
|
765 |
+
// NO ORPHANS FOUND
|
766 |
if (!$scheduler) {
|
767 |
+
?>
|
768 |
+
<div class="odb-not-found">
|
769 |
+
<?php _e('No ORPHANS found to delete', $odb_class->odb_txt_domain);?>
|
770 |
+
</div>
|
771 |
+
<?php
|
772 |
} // if (!$scheduler)
|
773 |
+
} // if (count($results) > 0)
|
774 |
+
} // if($odb_class->odb_rvg_options['clear_orphans'] == 'Y')
|
775 |
+
|
776 |
+
?>
|
777 |
+
<div class="odb-found-number">
|
778 |
+
<?php _e('TOTAL NUMBER OF ITEMS: ', $odb_class->odb_txt_domain);?>
|
779 |
+
<?php echo '<span class="odb-blue">' . $this->grand_total . '</span><br>';?>
|
780 |
+
</div>
|
781 |
+
<?php
|
|
|
782 |
} // odb_run_cleaner()
|
783 |
|
784 |
|
785 |
/********************************************************************************************
|
786 |
+
*
|
787 |
* RUN OPTIMIZER
|
788 |
+
*
|
789 |
********************************************************************************************/
|
790 |
+
function odb_run_optimizer($scheduler, $action) {
|
791 |
global $odb_class;
|
792 |
|
793 |
+
if(!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')) {
|
794 |
?>
|
795 |
<div class="odb-optimizing-table" class="odb-padding-left">
|
796 |
<div class="odb-title-bar">
|
808 |
<th class="odb-border-bottom" align="right"><?php _e('table size', $odb_class->odb_txt_domain);?></th>
|
809 |
</tr>
|
810 |
<?php
|
811 |
+
} // if(!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail'))
|
812 |
|
813 |
# OPTIMIZE THE DATABASE TABLES
|
814 |
+
$this->nr_of_optimized_tables = $this->odb_optimize_tables($scheduler, $action);
|
815 |
|
816 |
+
if(!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')) {
|
817 |
?>
|
818 |
</table>
|
819 |
</div><!-- /odb-optimizing-table -->
|
820 |
<?php
|
821 |
+
} // if(!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail'))
|
822 |
} // odb_run_optimizer()
|
823 |
|
824 |
|
825 |
/********************************************************************************************
|
826 |
+
*
|
827 |
* CALCULATE AND DISPLAY SAVINGS
|
828 |
+
*
|
829 |
********************************************************************************************/
|
830 |
+
function odb_savings($scheduler, $action) {
|
831 |
global $odb_class;
|
832 |
global $odb_logger_obj;
|
833 |
|
841 |
// TOTAL SAVING
|
842 |
$odb_class->log_arr["savings"] = $odb_class->odb_utilities_obj->odb_format_size(($this->start_size - $end_size),3);
|
843 |
|
844 |
+
if ($action == 'run_summary' || $action == 'run_detail') {
|
845 |
+
// WRITE RESULTS TO THE DATABASE - v4.6
|
846 |
+
$odb_class->odb_logger_obj->odb_add_log($odb_class->log_arr);
|
847 |
+
}
|
848 |
+
|
849 |
$total_savings = $odb_class->odb_rvg_options['total_savings'];
|
850 |
$total_savings += ($this->start_size - $end_size);
|
851 |
$odb_class->odb_rvg_options['total_savings'] = $total_savings;
|
889 |
|
890 |
|
891 |
/********************************************************************************************
|
892 |
+
*
|
893 |
* SHOW LOADING TIME
|
894 |
+
*
|
895 |
********************************************************************************************/
|
896 |
function odb_done($analyze = false) {
|
897 |
global $odb_class;
|
950 |
|
951 |
|
952 |
/********************************************************************************************
|
953 |
+
*
|
954 |
* GET REVISIONS (OLDER THAN x DAYS)
|
955 |
+
*
|
956 |
********************************************************************************************/
|
957 |
function odb_get_revisions_older_than() {
|
958 |
global $odb_class, $wpdb;
|
1022 |
|
1023 |
|
1024 |
/********************************************************************************************
|
1025 |
+
*
|
1026 |
* GET REVISIONS (KEEP MAX NUMBER OF REVISIONS)
|
1027 |
+
*
|
1028 |
********************************************************************************************/
|
1029 |
function odb_get_revisions_keep_revisions() {
|
1030 |
global $odb_class, $wpdb;
|
1066 |
|
1067 |
$sql = sprintf ("
|
1068 |
SELECT '%s' AS site,
|
1069 |
+
p1.`ID`,
|
1070 |
+
p1.`post_parent`,
|
1071 |
+
p1.`post_title`,
|
1072 |
+
p1.`post_modified`,
|
1073 |
+
COUNT(*) cnt
|
1074 |
FROM %sposts p1, %sposts p2
|
1075 |
WHERE p1.`post_type` = 'revision'
|
1076 |
AND p1.`post_parent` = p2.ID
|
1102 |
} // odb_get_revisions_keep_revisions()
|
1103 |
|
1104 |
|
1105 |
+
/********************************************************************************************^
|
1106 |
+
*
|
1107 |
* DELETE THE REVISIONS
|
1108 |
+
*
|
1109 |
********************************************************************************************/
|
1110 |
+
function odb_delete_revisions($scheduler, $action = 'run_detail') {
|
1111 |
global $odb_class, $wpdb;
|
1112 |
|
1113 |
$total_deleted = 0;
|
|
|
1114 |
|
1115 |
if($odb_class->odb_rvg_options['delete_older'] == 'Y') {
|
1116 |
// DELETE REVISIONS OLDER THAN x DAYS
|
1118 |
$older_than = $odb_class->odb_rvg_options['older_than'];
|
1119 |
$total_deleted += count($results);
|
1120 |
|
1121 |
+
for($i = 0; $i < count($results); $i++) {
|
1122 |
+
if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')) {
|
1123 |
?>
|
1124 |
<tr>
|
1125 |
+
<td align="right" valign="top"><?php echo ($i + 1)?>.</td>
|
1126 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
1127 |
<td valign="top" class="odb-bold"><?php echo $results[$i]['post_title']?></td>
|
1128 |
<td valign="top" class="odb-bold"><?php echo $results[$i]['post_modified']?></td><?php
|
1129 |
+
} // if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail'))
|
1130 |
|
1131 |
+
if ($action == 'run_summary' || $action == 'run_detail') {
|
1132 |
$sql_delete = sprintf ("
|
1133 |
DELETE FROM %sposts
|
1134 |
WHERE `ID` = %d
|
1135 |
", $results[$i]['site'], $results[$i]['ID']);
|
1136 |
|
1137 |
$wpdb->get_results($sql_delete);
|
1138 |
+
} // if ($action == 'run')
|
1139 |
|
1140 |
+
if(!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')) {
|
|
|
1141 |
?>
|
1142 |
<td align="right" valign="top" class="odb-bold">1</td>
|
1143 |
</tr>
|
1144 |
<?php
|
1145 |
+
} // if(!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')
|
1146 |
} // for($i=0; $i<count($results); $i++)
|
1147 |
} // if($odb_class->odb_rvg_options['delete_older'] == 'Y')
|
1148 |
|
1149 |
if($odb_class->odb_rvg_options['rvg_revisions'] == 'Y') {
|
1150 |
+
// KEEP MAX NUMBER OF REVISIONS
|
1151 |
$results = $this->odb_get_revisions_keep_revisions();
|
1152 |
$max_revisions = $odb_class->odb_rvg_options['nr_of_revisions'];
|
1153 |
|
1154 |
+
for($i = 0; $i < count($results); $i++) {
|
1155 |
$nr_to_delete = $results[$i]['cnt'] - $max_revisions;
|
1156 |
$total_deleted += $nr_to_delete;
|
1157 |
|
1158 |
+
if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')) {
|
1159 |
?>
|
1160 |
<tr>
|
1161 |
+
<td align="right" valign="top"><?php echo ($i + 1)?>.</td>
|
1162 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
1163 |
<td valign="top" class="odb-bold"><?php echo $results[$i]['post_title']?></td>
|
1164 |
+
<td valign="top" class="odb-bold"><?php echo $results[$i]['post_modified']?></td><?php
|
1165 |
+
} // if (!$scheduler && $action == 'analyze_detail' || $action == 'run_detail'))
|
1166 |
|
1167 |
$sql_get_posts = sprintf( "
|
1168 |
SELECT `ID`, `post_modified`
|
1174 |
|
1175 |
$results_get_posts = $wpdb->get_results($sql_get_posts);
|
1176 |
|
1177 |
+
for($j = 0; $j < $nr_to_delete; $j++) {
|
1178 |
+
// if(!$scheduler) echo $results_get_posts[$j]->post_modified.'<br>';
|
1179 |
+
if ($action == 'run_summary' || $action == 'run_detail') {
|
1180 |
$sql_delete = sprintf ("
|
1181 |
DELETE FROM %sposts
|
1182 |
WHERE `ID` = %d
|
1183 |
", $results[$i]['site'], $results_get_posts[$j]->ID);
|
1184 |
|
1185 |
$wpdb->get_results($sql_delete);
|
1186 |
+
} // if ($action == 'run')
|
1187 |
+
} // for($j = 0; $j < $nr_to_delete; $j++)
|
1188 |
|
1189 |
+
if(!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')) {
|
|
|
1190 |
?></td>
|
1191 |
<td align="right" valign="top" class="odb-bold"><?php echo $nr_to_delete?> <?php _e('of', $odb_class->odb_txt_domain)?> <?php echo $results[$i]['cnt'];?></td>
|
1192 |
</tr>
|
1193 |
<?php
|
1194 |
+
} // if(!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail'))
|
1195 |
+
} // for($i = 0; $i < count($results); $i++)
|
1196 |
} // if($odb_class->odb_rvg_options['rvg_revisions'] == 'Y')
|
1197 |
|
1198 |
return $total_deleted;
|
1200 |
|
1201 |
|
1202 |
/********************************************************************************************
|
1203 |
+
*
|
1204 |
* CHECK IF POST IS EXCLUDED BY A CUSTOM FIELD ('keep_revisions')
|
1205 |
+
*
|
1206 |
********************************************************************************************/
|
1207 |
function odb_post_is_excluded($parent_id) {
|
1208 |
$keep_revisions = get_post_meta($parent_id, 'keep_revisions', true);
|
1211 |
|
1212 |
|
1213 |
/********************************************************************************************
|
1214 |
+
*
|
1215 |
* GET TRASHED POSTS / PAGES AND COMMENTS
|
1216 |
+
*
|
1217 |
********************************************************************************************/
|
1218 |
+
function odb_get_trash() {
|
1219 |
global $wpdb, $odb_class;
|
1220 |
|
1221 |
$res_arr = array();
|
1257 |
|
1258 |
|
1259 |
/********************************************************************************************
|
1260 |
+
*
|
1261 |
* DELETE TRASHED POSTS AND PAGES
|
1262 |
+
*
|
1263 |
********************************************************************************************/
|
1264 |
+
function odb_delete_trash($results, $scheduler, $action) {
|
1265 |
global $wpdb;
|
1266 |
|
|
|
1267 |
$total_deleted = count($results);
|
1268 |
+
|
1269 |
+
for ($i = 0; $i < $total_deleted; $i++) {
|
1270 |
+
if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')) {
|
1271 |
?>
|
1272 |
<tr>
|
1273 |
+
<td align="right" valign="top"><?php echo ($i + 1); ?></td>
|
1274 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
1275 |
<td valign="top"><?php echo $results[$i]['post_type']; ?></td>
|
1276 |
<td valign="top"><?php echo $results[$i]['title']; ?></td>
|
1277 |
<td valign="top" nowrap="nowrap"><?php echo $results[$i]['modified']; ?></td>
|
1278 |
</tr>
|
1279 |
<?php
|
1280 |
+
} // if (!$scheduler && ($action == 'analyze_detail' || $action = 'run_detail'))
|
1281 |
|
1282 |
if($results[$i]['post_type'] == 'comment') {
|
1283 |
// DELETE META DATA (IF ANY...)
|
1284 |
+
if ($action == 'run_summary' || $action == 'run_detail') {
|
1285 |
$sql_delete = sprintf ("
|
1286 |
DELETE FROM %scommentmeta
|
1287 |
WHERE `comment_id` = %d
|
1288 |
", $results[$i]['site'], $results[$i]['id']);
|
1289 |
$wpdb->get_results($sql_delete);
|
1290 |
+
} // if ($action == 'run_summary' || $action == 'run_detail')
|
1291 |
} // if($results[$i]['post_type'] == 'comment')
|
1292 |
+
|
1293 |
+
if ($action == 'run_summary' || $action == 'run_detail') {
|
1294 |
// DELETE TRASHED POSTS / PAGES
|
1295 |
$sql_delete = sprintf ("
|
1296 |
DELETE FROM %sposts
|
1304 |
WHERE `comment_approved` = 'trash'
|
1305 |
", $results[$i]['site']);
|
1306 |
$wpdb->get_results($sql_delete);
|
1307 |
+
} // if ($action == 'run_summary' || $action == 'run_detail')
|
1308 |
+
} // for ($i = 0; $i < $total_deleted; $i++)
|
|
|
|
|
1309 |
|
1310 |
return $total_deleted;
|
1311 |
} // odb_delete_trash()
|
1312 |
|
1313 |
|
1314 |
/********************************************************************************************
|
1315 |
+
*
|
1316 |
* GET SPAMMED COMMENTS
|
1317 |
+
*
|
1318 |
********************************************************************************************/
|
1319 |
+
function odb_get_spam() {
|
1320 |
global $wpdb, $odb_class;
|
1321 |
|
1322 |
$res_arr = array();
|
1323 |
|
1324 |
// LOOP THROUGH SITES
|
1325 |
+
for ($i = 0; $i < count($odb_class->odb_ms_prefixes); $i++) {
|
1326 |
$prefix = $odb_class->odb_ms_prefixes[$i];
|
1327 |
|
1328 |
$sql = sprintf ("
|
1341 |
for($j = 0; $j < count($res); $j++) {
|
1342 |
array_push($res_arr, $res[$j]);
|
1343 |
} // for($j = 0; $j < count($res); $j++)
|
1344 |
+
} // for ($i = 0; $i < count($odb_class->odb_ms_prefixes); $i++)
|
1345 |
return $res_arr;
|
1346 |
} // odb_get_spam()
|
1347 |
|
1348 |
|
1349 |
/********************************************************************************************
|
1350 |
+
*
|
1351 |
* DELETE SPAMMED ITEMS
|
1352 |
+
*
|
1353 |
********************************************************************************************/
|
1354 |
+
function odb_delete_spam($results, $scheduler, $action = 'run') {
|
1355 |
global $wpdb;
|
1356 |
+
|
|
|
1357 |
$total_deleted = count($results);
|
1358 |
+
|
1359 |
+
for ($i = 0; $i < count($results); $i++) {
|
1360 |
+
if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')) {
|
1361 |
?>
|
1362 |
<tr>
|
1363 |
+
<td align="right" valign="top"><?php echo ($i + 1); ?></td>
|
1364 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
1365 |
<td valign="top"><?php echo $results[$i]['comment_author']; ?></td>
|
1366 |
<td valign="top"><?php echo $results[$i]['comment_author_email']; ?></td>
|
1367 |
<td valign="top" nowrap="nowrap"><?php echo $results[$i]['comment_date']; ?></td>
|
1368 |
</tr>
|
1369 |
<?php
|
1370 |
+
} // if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail'))
|
1371 |
|
1372 |
+
if ($action == 'run_summary' || $action == 'run_detail') {
|
1373 |
$sql_delete = sprintf ("
|
1374 |
DELETE FROM %scommentmeta
|
1375 |
WHERE `comment_id` = %d
|
1381 |
WHERE `comment_approved` = 'spam'
|
1382 |
", $results[$i]['site']);
|
1383 |
$wpdb->get_results($sql_delete);
|
1384 |
+
} // if ($action == 'run_summary' || $action == 'run_detail')
|
1385 |
+
} // for ($i = 0; $i < count($results); $i++)
|
|
|
|
|
1386 |
|
1387 |
return $total_deleted;
|
1388 |
} // odb_delete_spam()
|
1389 |
|
1390 |
|
1391 |
/********************************************************************************************
|
1392 |
+
*
|
1393 |
* GET UNUSED TAGS
|
1394 |
+
*
|
1395 |
********************************************************************************************/
|
1396 |
+
function odb_get_unused_tags() {
|
1397 |
global $wpdb, $odb_class;
|
1398 |
|
1399 |
$res_arr = array();
|
1426 |
|
1427 |
|
1428 |
/********************************************************************************************
|
1429 |
+
*
|
1430 |
* DELETE UNUSED TAGS
|
1431 |
+
*
|
1432 |
********************************************************************************************/
|
1433 |
+
function odb_delete_unused_tags($results, $scheduler, $action = 'run') {
|
1434 |
global $wpdb, $odb_class;
|
1435 |
|
|
|
1436 |
$total_deleted = count($results);
|
1437 |
+
|
1438 |
+
for ($i = 0; $i < $total_deleted; $i++) {
|
1439 |
+
if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')) {
|
1440 |
?>
|
1441 |
<tr>
|
1442 |
+
<td align="right" valign="top"><?php echo ($i + 1); ?></td>
|
1443 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
1444 |
<td valign="top"><?php echo $results[$i]['name']; ?></td>
|
1445 |
</tr>
|
1446 |
<?php
|
1447 |
+
} // if (!$scheduler && ($action = 'analyze_detail' || $action == 'run_detail'))
|
1448 |
|
1449 |
+
if ($action == 'run_summary' || $action == 'run_detail') {
|
1450 |
$sql_del = sprintf ("
|
1451 |
DELETE FROM %sterm_taxonomy
|
1452 |
WHERE term_id = %d
|
1458 |
WHERE term_id = %d
|
1459 |
", $results[$i]['site'], $results[$i]['term_id']);
|
1460 |
$wpdb->get_results($sql_del);
|
1461 |
+
} // if ($action == 'run_summary' || $action == 'run_detail')
|
1462 |
+
} // for ($i = 0; $i < $total_deleted; $i++)
|
|
|
|
|
1463 |
|
1464 |
return $total_deleted;
|
1465 |
} // odb_delete_unused_tags()
|
1466 |
|
1467 |
|
1468 |
/********************************************************************************************
|
1469 |
+
*
|
1470 |
* IS THE UNUSED TAG USED IN ONE OR MORE SCHEDULED POSTS?
|
1471 |
+
*
|
1472 |
********************************************************************************************/
|
1473 |
function odb_delete_tags_is_scheduled($term_id, $odb_prefix) {
|
1474 |
global $wpdb;
|
1486 |
|
1487 |
return false;
|
1488 |
} // odb_delete_tags_is_scheduled()
|
1489 |
+
|
1490 |
+
|
1491 |
+
/********************************************************************************************
|
1492 |
+
*
|
1493 |
+
* GET TRANSIENTS
|
1494 |
+
*
|
1495 |
+
********************************************************************************************/
|
1496 |
+
function odb_get_transients($option = "Y") {
|
1497 |
+
// $option == "A": delete all transients
|
1498 |
+
// %option == "Y": only delete EXPIRED transients
|
1499 |
+
|
1500 |
+
global $wpdb, $odb_class;
|
1501 |
+
|
1502 |
+
$res_arr = array();
|
1503 |
+
|
1504 |
+
// ONE MINUTE DELAY
|
1505 |
+
$delay = time() - 60;
|
1506 |
+
|
1507 |
+
// LOOP THROUGH SITES
|
1508 |
+
for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++) {
|
1509 |
+
$prefix = $odb_class->odb_ms_prefixes[$i];
|
1510 |
+
|
1511 |
+
if ($option == 'Y') {
|
1512 |
+
// EXPIRED ONLY
|
1513 |
+
$sql = sprintf ("
|
1514 |
+
SELECT '%s' AS site,
|
1515 |
+
`option_name`
|
1516 |
+
FROM `%soptions`
|
1517 |
+
WHERE (
|
1518 |
+
option_name LIKE '_transient_timeout_%%'
|
1519 |
+
OR option_name LIKE '_site_transient_timeout_%%'
|
1520 |
+
)
|
1521 |
+
AND option_value < '%d'
|
1522 |
+
ORDER BY `option_name`
|
1523 |
+
", $prefix, $prefix, $delay);
|
1524 |
+
} else {
|
1525 |
+
// ALL
|
1526 |
+
$sql = sprintf ("
|
1527 |
+
SELECT '%s' AS site,
|
1528 |
+
`option_name`
|
1529 |
+
FROM `%soptions`
|
1530 |
+
WHERE (
|
1531 |
+
option_name LIKE '_transient_timeout_%%'
|
1532 |
+
OR option_name LIKE '_site_transient_timeout_%%'
|
1533 |
+
)
|
1534 |
+
ORDER BY `option_name`
|
1535 |
+
", $prefix, $prefix);
|
1536 |
+
}
|
1537 |
+
|
1538 |
+
$res = $wpdb->get_results($sql, ARRAY_A);
|
1539 |
|
1540 |
+
for($j = 0; $j < count($res); $j++) {
|
1541 |
+
array_push($res_arr, $res[$j]);
|
1542 |
+
} // for($j = 0; $j < count($res); $j++)
|
1543 |
+
} // for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
|
1544 |
+
return $res_arr;
|
1545 |
+
} // function odb_get_transients()
|
1546 |
+
|
1547 |
+
|
1548 |
/********************************************************************************************
|
1549 |
+
*
|
1550 |
* DELETE TRANSIENTS (v4.7.3)
|
1551 |
+
*
|
1552 |
********************************************************************************************/
|
1553 |
+
function odb_delete_transients($results, $scheduler, $action = 'run', $option = 'Y') {
|
1554 |
global $wpdb, $odb_class;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1555 |
|
1556 |
// ONE MINUTE DELAY
|
1557 |
$delay = time() - 60;
|
1558 |
+
|
1559 |
+
$total_deleted = count($results);
|
1560 |
+
|
1561 |
// LOOP THROUGH SITES
|
1562 |
+
for($i = 0; $i < count($odb_class->odb_ms_prefixes); $i++) {
|
1563 |
$prefix = $odb_class->odb_ms_prefixes[$i];
|
1564 |
|
1565 |
+
for ($j = 0; $j < count($results); $j++) {
|
1566 |
+
if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')) {
|
1567 |
+
?>
|
1568 |
+
<tr>
|
1569 |
+
<td align="right" valign="top"><?php echo ($j + 1); ?></td>
|
1570 |
+
<td align="left" valign="top"><?php echo $results[$j]['site']?></td>
|
1571 |
+
<td valign="top"><?php echo $results[$j]['option_name']; ?></td>
|
1572 |
+
</tr>
|
1573 |
+
<?php
|
1574 |
+
} // if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail'))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1575 |
|
1576 |
+
if ($action == 'run_summary' || $action == 'run_detail') {
|
1577 |
+
if ($option == 'Y') {
|
1578 |
+
// EXPIRED
|
1579 |
+
$sqldel = sprintf ("
|
1580 |
+
DELETE
|
1581 |
+
FROM `%soptions`
|
1582 |
+
WHERE (
|
1583 |
+
option_name LIKE '_transient_timeout_%%'
|
1584 |
+
OR option_name LIKE '_site_transient_timeout_%%'
|
1585 |
+
)
|
1586 |
+
AND option_value < '%d'
|
1587 |
+
", $prefix, $delay);
|
1588 |
+
} else {
|
1589 |
+
// ALL
|
1590 |
+
$sqldel = sprintf ("
|
1591 |
+
DELETE
|
1592 |
+
FROM `%soptions`
|
1593 |
+
WHERE (
|
1594 |
+
option_name LIKE '_transient_timeout_%%'
|
1595 |
+
OR option_name LIKE '_site_transient_timeout_%%'
|
1596 |
+
)
|
1597 |
+
", $prefix);
|
1598 |
+
} // if ($option == 'Y')
|
1599 |
+
$resdel = $wpdb->get_results($sqldel, ARRAY_A);
|
1600 |
+
} // if ($action == 'run_summary' || $action == 'run_detail'))
|
1601 |
|
1602 |
+
} // for($i = 0; $i < count($odb_class->odb_ms_prefixes); $i++)
|
1603 |
+
} // for($i = 0; $i < count($odb_class->odb_ms_prefixes); $i++)
|
1604 |
+
|
1605 |
+
return $total_deleted;
|
|
|
|
|
1606 |
} // odb_delete_transients()
|
1607 |
|
1608 |
+
|
1609 |
/********************************************************************************************
|
1610 |
+
*
|
1611 |
* GET PINGBACKS AND TRACKBACKS
|
1612 |
+
*
|
1613 |
********************************************************************************************/
|
1614 |
+
function odb_get_pingbacks() {
|
1615 |
|
1616 |
global $wpdb, $odb_class;
|
1617 |
|
1618 |
$res_arr = array();
|
1619 |
|
1620 |
// LOOP THROUGH SITES
|
1621 |
+
for($i = 0; $i < count($odb_class->odb_ms_prefixes); $i++) {
|
1622 |
$prefix = $odb_class->odb_ms_prefixes[$i];;
|
1623 |
|
1624 |
$sql = sprintf ("
|
1639 |
for($j = 0; $j < count($res); $j++) {
|
1640 |
array_push($res_arr, $res[$j]);
|
1641 |
} // for($j = 0; $j < count($res); $j++)
|
1642 |
+
} // for($i = 0; $i < count($odb_class->odb_ms_prefixes); $i++)
|
1643 |
return $res_arr;
|
1644 |
} // odb_get_pingbacks
|
1645 |
|
1646 |
|
1647 |
/********************************************************************************************
|
1648 |
+
*
|
1649 |
* DELETE PINGBACKS AND TRACKBACKS
|
1650 |
+
*
|
1651 |
********************************************************************************************/
|
1652 |
+
function odb_delete_pingbacks ($results, $scheduler, $action = 'run') {
|
1653 |
global $wpdb, $odb_class;
|
1654 |
|
|
|
1655 |
$total_deleted = count($results);
|
1656 |
+
|
1657 |
+
for ($i = 0; $i < count($results); $i++) {
|
1658 |
+
if (!$scheduler && ($action == 'analyze_detail' | $action == 'run_detail')) {
|
1659 |
?>
|
1660 |
<tr>
|
1661 |
+
<td align="right" valign="top"><?php echo ($i + 1); ?></td>
|
1662 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
1663 |
<td valign="top"><?php echo $results[$i]['comment_type']?></td>
|
1664 |
<td valign="top"><?php echo $results[$i]['comment_author']?></td>
|
1665 |
<td valign="top" nowrap="nowrap"><?php echo $results[$i]['comment_date']; ?></td>
|
1666 |
</tr>
|
1667 |
<?php
|
1668 |
+
} // if (!$scheduler && ($action == 'analyze_detail' | $action == 'run_detail'))
|
1669 |
|
1670 |
+
if ($action == 'run_summary' || $action == 'run_detail') {
|
1671 |
+
for($j = 0; $j < count($results); $j++) {
|
1672 |
// DELETE METADATA FOR THIS COMMENT (IF ANY)
|
1673 |
$sql = sprintf ("
|
1674 |
DELETE FROM %scommentmeta
|
1684 |
)
|
1685 |
", $results[$j]['site']);
|
1686 |
$wpdb->get_results($sql);
|
1687 |
+
} // for($j = 0; $j < count($results); $j++)
|
1688 |
+
} // if ($action == 'run_summary' || $action == 'run_detail')
|
1689 |
+
} // for ($i = 0; $i < count($results); $i++)
|
|
|
|
|
1690 |
|
1691 |
return $total_deleted;
|
1692 |
} // odb_delete_pingbacks()
|
1693 |
|
1694 |
|
1695 |
/********************************************************************************************
|
1696 |
+
*
|
1697 |
* GET OEMBED CACHE
|
1698 |
+
*
|
1699 |
********************************************************************************************/
|
1700 |
+
function odb_get_oembed() {
|
1701 |
global $wpdb, $odb_class;
|
1702 |
|
1703 |
$res_arr = array();
|
1704 |
|
1705 |
// LOOP THROUGH SITES
|
1706 |
+
for($i = 0; $i < count($odb_class->odb_ms_prefixes); $i++) {
|
1707 |
$prefix = $odb_class->odb_ms_prefixes[$i];
|
1708 |
|
1709 |
$sql = sprintf ("
|
1721 |
for($j = 0; $j < count($res); $j++) {
|
1722 |
array_push($res_arr, $res[$j]);
|
1723 |
} // for($j = 0; $j < count($res); $j++)
|
1724 |
+
} // for($i = 0; $i < count($odb_class->odb_ms_prefixes); $i++)
|
1725 |
return $res_arr;
|
1726 |
} // odb_get_oembed()
|
1727 |
|
1728 |
|
1729 |
/********************************************************************************************
|
1730 |
+
*
|
1731 |
* CLEAR OEMBED CACHE
|
1732 |
+
*
|
1733 |
********************************************************************************************/
|
1734 |
+
function odb_delete_oembed($results, $scheduler, $action = 'run') {
|
1735 |
global $wpdb, $odb_class;
|
1736 |
|
|
|
1737 |
$total_deleted = count($results);
|
1738 |
+
|
1739 |
+
for($i = 0; $i < $total_deleted; $i++) {
|
1740 |
+
if (!$scheduler && ($action == 'analyze_detail' | $action == 'run_detail')) {
|
1741 |
?>
|
1742 |
<tr>
|
1743 |
+
<td align="right" valign="top"><?php echo ($i + 1); ?></td>
|
1744 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
1745 |
<td valign="top"><?php echo $results[$i]['meta_key']?></td>
|
1746 |
<td valign="top"><?php echo $results[$i]['meta_value']?></td>
|
1747 |
</tr>
|
1748 |
<?php
|
1749 |
+
} // if (!$scheduler && ($action == 'analyze_detail' | $action == 'run_detail'))
|
1750 |
|
1751 |
+
if ($action == 'run_summary' || $action == 'run_detail') {
|
1752 |
// DELETE COMMENTS
|
1753 |
$sql = sprintf ("
|
1754 |
DELETE FROM %spostmeta
|
1756 |
", $results[$i]['site']);
|
1757 |
|
1758 |
$wpdb->get_results($sql);
|
1759 |
+
} // if ($action == 'run_summary' || $action == 'run_detail')
|
1760 |
+
} // for($i = 0; $i < $total_deleted; $i++)
|
|
|
|
|
1761 |
|
1762 |
return $total_deleted;
|
1763 |
} // odb_delete_oembed()
|
1764 |
|
1765 |
|
1766 |
/********************************************************************************************
|
1767 |
+
*
|
1768 |
* GET ORPHAN POSTMETA AND MEDIA RECORDS
|
1769 |
+
*
|
1770 |
********************************************************************************************/
|
1771 |
+
function odb_get_orphans() {
|
1772 |
global $wpdb, $odb_class;
|
1773 |
|
1774 |
$res_arr = array();
|
1775 |
|
1776 |
// LOOP THROUGH SITES
|
1777 |
+
for($i = 0; $i < count($odb_class->odb_ms_prefixes); $i++) {
|
1778 |
$prefix = $odb_class->odb_ms_prefixes[$i];
|
1779 |
|
1780 |
$sql = sprintf ("
|
1812 |
for ($j = 0; $j < count($results); $j++) {
|
1813 |
array_push($res_arr, $results[$j]);
|
1814 |
} // for ($j = 0; $j < count($results); $j++)
|
1815 |
+
} // for($i = 0; $i < count($odb_class->odb_ms_prefixes); $i++)
|
1816 |
return $res_arr;
|
1817 |
} // odb_get_orphans()
|
1818 |
|
1819 |
|
1820 |
/********************************************************************************************
|
1821 |
+
*
|
1822 |
* DELETE ORPHAN POSTMETA AND MEDIA RECORDS
|
1823 |
+
*
|
1824 |
********************************************************************************************/
|
1825 |
+
function odb_delete_orphans($results, $scheduler, $action = 'run_detail') {
|
1826 |
|
1827 |
global $wpdb, $odb_class;
|
1828 |
+
|
|
|
1829 |
$total_deleted = count($results);
|
1830 |
+
for($i = 0; $i < count($results); $i++) {
|
1831 |
+
if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')) {
|
1832 |
?>
|
1833 |
<tr>
|
1834 |
+
<td align="right" valign="top"><?php echo ($i + 1); ?></td>
|
1835 |
<td align="left" valign="top"><?php echo $results[$i]['site']?></td>
|
1836 |
<td valign="top"><?php echo $results[$i]['type']?></td>
|
1837 |
<td valign="top"><?php echo $results[$i]['ID']?></td>
|
1841 |
<td valign="top" nowrap="nowrap"><?php echo $results[$i]['meta_value']; ?></td>
|
1842 |
</tr>
|
1843 |
<?php
|
1844 |
+
} // if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail'))
|
1845 |
|
1846 |
+
if ($action == 'run_summary' || $action == 'run_detail') {
|
1847 |
+
for($j = 0; $j < count($results); $j++) {
|
1848 |
// DELETE METADATA FOR THIS COMMENT (IF ANY)
|
1849 |
if ($results[$j]['type'] == 'meta') {
|
1850 |
$sql = sprintf ("
|
1857 |
WHERE `ID` = %d
|
1858 |
", $results[$j]['site'], $results[$j]['ID']);
|
1859 |
} // if ($results[$j]['type'] == 'meta')
|
|
|
1860 |
$wpdb->get_results($sql);
|
1861 |
+
} // for($j = 0; $j < count($results); $j++)
|
1862 |
+
} // if ($action == 'run_summary' || $action == 'run_detail')
|
1863 |
+
} // for($i = 0; $i < count($results); $i++)
|
|
|
|
|
1864 |
return $total_deleted;
|
1865 |
} // odb_delete_orphans()
|
1866 |
|
1867 |
|
1868 |
/********************************************************************************************
|
1869 |
+
*
|
1870 |
* OPTIMIZE DATABASE TABLES
|
1871 |
+
*
|
1872 |
********************************************************************************************/
|
1873 |
+
function odb_optimize_tables($scheduler, $action) {
|
1874 |
global $odb_class, $wpdb;
|
1875 |
|
1876 |
$cnt = 0;
|
1877 |
+
for ($i = 0; $i < count($odb_class->odb_tables); $i++) {
|
1878 |
if(!isset($odb_class->odb_rvg_excluded_tabs[$odb_class->odb_tables[$i][0]])) {
|
1879 |
# TABLE NOT EXCLUDED
|
1880 |
$cnt++;
|
1911 |
} // if (strtolower($table_info[0]->engine) == 'myisam')
|
1912 |
} // if($odb_class->odb_rvg_options["optimize_innodb"] == 'N' && strtolower($table_info[0]->engine) == 'innodb')
|
1913 |
|
1914 |
+
if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail')) {
|
|
|
1915 |
?>
|
1916 |
<tr>
|
1917 |
<td align="right" valign="top"><?php echo $cnt?>.</td>
|
1922 |
<td align="right" valign="top"><?php echo $odb_class->odb_utilities_obj->odb_format_size($table_info[0]->size) ?></td>
|
1923 |
</tr>
|
1924 |
<?php
|
1925 |
+
} // if (!$scheduler && ($action == 'analyze_detail' || $action == 'run_detail'))
|
1926 |
} // if(!$excluded)
|
1927 |
+
} // for ($i = 0; $i < count($odb_class->odb_tables); $i++)
|
1928 |
return $cnt;
|
|
|
1929 |
} // odb_optimize_tables()
|
1930 |
|
1931 |
|
1932 |
/********************************************************************************************
|
1933 |
+
*
|
1934 |
* OPTIMIZE A MyISAM TABLE
|
1935 |
+
*
|
1936 |
********************************************************************************************/
|
1937 |
function odb_optimize_myisam($table_name) {
|
1938 |
global $wpdb;
|
1942 |
|
1943 |
|
1944 |
/********************************************************************************************
|
1945 |
+
*
|
1946 |
* OPTIMIZE AN InnoDB TABLE
|
1947 |
+
*
|
1948 |
********************************************************************************************/
|
1949 |
function odb_optimize_innodb($table_name) {
|
1950 |
global $wpdb;
|
classes/odb-displayer.php
CHANGED
@@ -219,11 +219,16 @@ function odb_confirm_delete() {
|
|
219 |
';
|
220 |
} // if($odb_class->odb_logger_obj->odb_log_count() > 0)
|
221 |
|
|
|
222 |
echo '
|
223 |
|
224 |
-
<input class="button-primary button-large" type="button" name="
|
225 |
-
|
226 |
-
<input class="button-primary button-large" type="button" name="
|
|
|
|
|
|
|
|
|
227 |
';
|
228 |
} // if($odb_class->odb_logger_obj->odb_log_count() > 0)
|
229 |
|
219 |
';
|
220 |
} // if($odb_class->odb_logger_obj->odb_log_count() > 0)
|
221 |
|
222 |
+
// v4.8.0
|
223 |
echo '
|
224 |
|
225 |
+
<input class="button-primary button-large" type="button" name="analyze_summary" value="'.__('Analyze (summary)', $odb_class->odb_txt_domain).'" onclick="self.location=\'tools.php?page=rvg-optimize-database&action=analyze_summary\'" class="odb-bold">
|
226 |
+
|
227 |
+
<input class="button-primary button-large" type="button" name="analyze_detail" value="'.__('Analyze (detail)', $odb_class->odb_txt_domain).'" onclick="self.location=\'tools.php?page=rvg-optimize-database&action=analyze_detail\'" class="odb-bold">
|
228 |
+
|
229 |
+
<input class="button-primary button-large" type="button" name="run_summary" value="'.__('Optimize (summary)', $odb_class->odb_txt_domain).'" onclick="self.location=\'tools.php?page=rvg-optimize-database&action=run_summary\'" class="odb-bold">
|
230 |
+
|
231 |
+
<input class="button-primary button-large" type="button" name="run_detail" value="'.__('Optimize (detail)', $odb_class->odb_txt_domain).'" onclick="self.location=\'tools.php?page=rvg-optimize-database&action=run_detail\'" class="odb-bold">
|
232 |
';
|
233 |
} // if($odb_class->odb_logger_obj->odb_log_count() > 0)
|
234 |
|
classes/odb-logger.php
CHANGED
@@ -171,7 +171,9 @@ function odb_confirm_delete() {
|
|
171 |
|
172 |
<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'" />
|
173 |
|
174 |
-
<input class="button-primary button-large" type="button" name="
|
|
|
|
|
175 |
<?php
|
176 |
} // odb_view_log()
|
177 |
|
171 |
|
172 |
<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'" />
|
173 |
|
174 |
+
<input class="button-primary button-large" type="button" name="optimize_summary" value="<?php _e('Optimize (summary)', $odb_class->odb_txt_domain)?>" onclick="self.location='tools.php?page=rvg-optimize-database&action=run_summary'" class="odb-bold" />
|
175 |
+
|
176 |
+
<input class="button-primary button-large" type="button" name="optimize_detail" value="<?php _e('Optimize (detail)', $odb_class->odb_txt_domain)?>" onclick="self.location='tools.php?page=rvg-optimize-database&action=run_summary'" class="odb-bold" />
|
177 |
<?php
|
178 |
} // odb_view_log()
|
179 |
|
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:
|
6 |
-
"PO-Revision-Date:
|
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.2\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"
|
@@ -19,359 +19,395 @@ msgstr ""
|
|
19 |
"X-Textdomain-Support: yes\n"
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
|
22 |
-
#: classes/odb-cleaner.php:
|
23 |
-
msgid "Analyzing Database"
|
24 |
-
msgstr "Analiseer Database"
|
25 |
-
|
26 |
-
#: classes/odb-cleaner.php:41
|
27 |
msgid "Cleaning Database"
|
28 |
msgstr "Opschonen Database"
|
29 |
|
30 |
-
#: classes/odb-cleaner.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
msgid "REVISIONS"
|
32 |
msgstr "REVISIES"
|
33 |
|
34 |
-
#: classes/odb-cleaner.php:
|
35 |
-
msgid "revisions"
|
36 |
-
msgstr "revisies"
|
37 |
|
38 |
-
#: classes/odb-cleaner.php:
|
39 |
msgid "DELETED REVISIONS"
|
40 |
msgstr "VERWIJDERDE REVISIES"
|
41 |
|
42 |
-
#: classes/odb-cleaner.php:
|
43 |
-
msgid "revisions deleted"
|
44 |
-
msgstr "revisies
|
45 |
|
46 |
-
#: classes/odb-cleaner.php:
|
47 |
-
#: classes/odb-cleaner.php:
|
48 |
-
#: classes/odb-cleaner.php:
|
49 |
-
#: classes/odb-cleaner.php:
|
50 |
msgid "prefix"
|
51 |
msgstr "prefix"
|
52 |
|
53 |
-
#: classes/odb-cleaner.php:
|
54 |
msgid "post / page"
|
55 |
msgstr "bericht / pagina"
|
56 |
|
57 |
-
#: classes/odb-cleaner.php:
|
58 |
msgid "revision date"
|
59 |
msgstr "revisiedatum"
|
60 |
|
61 |
-
#: classes/odb-cleaner.php:
|
62 |
-
msgid "total number of revisions"
|
63 |
-
msgstr "totaal aantal revisies"
|
64 |
-
|
65 |
-
#: classes/odb-cleaner.php:118
|
66 |
-
msgid "total number of revisions deleted"
|
67 |
-
msgstr "totaal aantal verwijderde revisies"
|
68 |
-
|
69 |
-
#: classes/odb-cleaner.php:131
|
70 |
msgid "No REVISIONS found to delete"
|
71 |
msgstr "Geen REVISIES gevonden om te verwijderen"
|
72 |
|
73 |
-
#: classes/odb-cleaner.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
msgid "TRASHED ITEMS"
|
75 |
msgstr "TRASHED ITEMS"
|
76 |
|
77 |
-
#: classes/odb-cleaner.php:
|
78 |
msgid "total number of trashed items"
|
79 |
msgstr "totaal aantal trashed items"
|
80 |
|
81 |
-
#: classes/odb-cleaner.php:
|
82 |
msgid "DELETED TRASHED ITEMS"
|
83 |
msgstr "VERWIJDERDE TRASHED ITEMS"
|
84 |
|
85 |
-
#: classes/odb-cleaner.php:
|
86 |
msgid "total number of trashed items deleted"
|
87 |
msgstr "totaal aantal verwijderede trashed items"
|
88 |
|
89 |
-
#: classes/odb-cleaner.php:
|
90 |
-
#: classes/odb-cleaner.php:
|
91 |
msgid "type"
|
92 |
msgstr "type"
|
93 |
|
94 |
-
#: classes/odb-cleaner.php:
|
95 |
msgid "IP address / title"
|
96 |
msgstr "IP adres / titel"
|
97 |
|
98 |
-
#: classes/odb-cleaner.php:
|
99 |
-
#: classes/odb-logger.php:114 classes/odb-logger.php:
|
100 |
msgid "date"
|
101 |
msgstr "datum"
|
102 |
|
103 |
-
#: classes/odb-cleaner.php:
|
104 |
msgid "No TRASHED ITEMS found to delete"
|
105 |
msgstr "Geen PRULLENBAK ITEMS gevonden om te verwijderen"
|
106 |
|
107 |
-
#: classes/odb-cleaner.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
msgid "SPAMMED ITEMS"
|
109 |
msgstr "SPAMMEND ITEMS"
|
110 |
|
111 |
-
#: classes/odb-cleaner.php:
|
112 |
msgid "total number of spammed items"
|
113 |
msgstr "totaal aantal spammed items"
|
114 |
|
115 |
-
#: classes/odb-cleaner.php:
|
116 |
msgid "DELETED SPAMMED ITEMS"
|
117 |
msgstr "VERWIJDERDE SPAMMEND ITEMS"
|
118 |
|
119 |
-
#: classes/odb-cleaner.php:
|
120 |
msgid "total number of spammed items deleted"
|
121 |
msgstr "totaal aantal verwijderde spammed items"
|
122 |
|
123 |
-
#: classes/odb-cleaner.php:
|
124 |
msgid "comment author"
|
125 |
msgstr "plaatser van de reactie"
|
126 |
|
127 |
-
#: classes/odb-cleaner.php:
|
128 |
msgid "comment author email"
|
129 |
msgstr "email van de plaatser van de reactie"
|
130 |
|
131 |
-
#: classes/odb-cleaner.php:
|
132 |
msgid "comment date"
|
133 |
msgstr "datum van de reactie"
|
134 |
|
135 |
-
#: classes/odb-cleaner.php:
|
136 |
msgid "No SPAMMED ITEMS found to delete"
|
137 |
msgstr "Geen SPAM gevonden om te verwijderen"
|
138 |
|
139 |
-
#: classes/odb-cleaner.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
msgid "UNUSED TAGS"
|
141 |
msgstr "ONGEBRUIKTE TAGS"
|
142 |
|
143 |
-
#: classes/odb-cleaner.php:
|
144 |
msgid "total number of unused tags"
|
145 |
msgstr "totaal aantal trashed items"
|
146 |
|
147 |
-
#: classes/odb-cleaner.php:
|
148 |
msgid "DELETED UNUSED TAGS"
|
149 |
msgstr "VERWIJDERDE ONGEBRUIKTE TAGS"
|
150 |
|
151 |
-
#: classes/odb-cleaner.php:
|
152 |
msgid "total number of unused tags deleted"
|
153 |
msgstr "totaal aantal verwijderede trashed items"
|
154 |
|
155 |
-
#: classes/odb-cleaner.php:
|
156 |
msgid "tag"
|
157 |
msgstr "tag"
|
158 |
|
159 |
-
#: classes/odb-cleaner.php:
|
160 |
-
msgid "No UNUSED
|
161 |
msgstr "Geen ONGEBRUIKTE TAGS gevonden om te verwijderen"
|
162 |
|
163 |
-
#: classes/odb-cleaner.php:
|
164 |
-
msgid "
|
165 |
-
msgstr "VERLOPEN TRANSIËNTS"
|
166 |
-
|
167 |
-
#: classes/odb-cleaner.php:339
|
168 |
-
msgid "total number of expired transients"
|
169 |
-
msgstr "totaal aantal verlopen transients"
|
170 |
|
171 |
-
#: classes/odb-cleaner.php:
|
172 |
-
msgid "
|
173 |
-
msgstr "
|
174 |
|
175 |
-
#: classes/odb-cleaner.php:
|
176 |
-
msgid "
|
177 |
-
msgstr "totaal aantal verwijderde revisies"
|
178 |
-
|
179 |
-
#: classes/odb-cleaner.php:346
|
180 |
-
msgid "TRANSIENTS"
|
181 |
msgstr "TRANSIENTS"
|
182 |
|
183 |
-
#: classes/odb-cleaner.php:
|
184 |
-
msgid "total number of
|
185 |
-
msgstr "totaal aantal
|
186 |
|
187 |
-
#: classes/odb-cleaner.php:
|
188 |
-
msgid "
|
189 |
-
msgstr "VERWIJDERDE
|
190 |
|
191 |
-
#: classes/odb-cleaner.php:
|
192 |
msgid "option name"
|
193 |
msgstr "optienaam"
|
194 |
|
195 |
-
#: classes/odb-cleaner.php:
|
196 |
-
msgid "No EXPIRED TRANSIENTS found to delete"
|
197 |
-
msgstr "Geen VERLOPEN TRANSIËNTS gevonden om te verwijderen"
|
198 |
-
|
199 |
-
#: classes/odb-cleaner.php:387
|
200 |
msgid "No TRANSIENTS found to delete"
|
201 |
msgstr "Geen VERLOPEN TRANSIËNTS gevonden om te verwijderen"
|
202 |
|
203 |
-
#: classes/odb-cleaner.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
msgid "PINGBACKS AND TRACKBACKS"
|
205 |
msgstr "PINGBACKS EN TRACKBACKS"
|
206 |
|
207 |
-
#: classes/odb-cleaner.php:
|
208 |
msgid "total number of pingbacks and trackbacks"
|
209 |
msgstr "total aantal pingbacks en trackbacks"
|
210 |
|
211 |
-
#: classes/odb-cleaner.php:
|
212 |
msgid "DELETED PINGBACKS AND TRACKBACKS"
|
213 |
msgstr "VERWIJDERDE PINGBACKS EN TRACKBACKS"
|
214 |
|
215 |
-
#: classes/odb-cleaner.php:
|
216 |
msgid "total number of pingbacks and trackbacks deleted"
|
217 |
msgstr "totaal aantal verwijderede trashed items"
|
218 |
|
219 |
-
#: classes/odb-cleaner.php:
|
220 |
msgid "comment_author"
|
221 |
msgstr "plaatser van de reactie"
|
222 |
|
223 |
-
#: classes/odb-cleaner.php:
|
224 |
msgid "No PINGBACKS nor TRACKBACKS found to delete"
|
225 |
msgstr "Geen PINGBACKS en TRACKBACKS gevonden om te verwijderen"
|
226 |
|
227 |
-
#: classes/odb-cleaner.php:
|
228 |
-
msgid "OEMBED CACHE"
|
229 |
-
msgstr "OEMBED CACHE"
|
230 |
|
231 |
-
#: classes/odb-cleaner.php:
|
232 |
-
msgid "
|
233 |
-
msgstr "
|
234 |
|
235 |
-
#: classes/odb-cleaner.php:
|
236 |
-
msgid "
|
237 |
-
msgstr "
|
238 |
|
239 |
-
#: classes/odb-cleaner.php:
|
240 |
-
msgid "total number of
|
241 |
-
msgstr "totaal aantal
|
242 |
|
243 |
-
#: classes/odb-cleaner.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
msgid "meta key"
|
245 |
msgstr "meta sleutel"
|
246 |
|
247 |
-
#: classes/odb-cleaner.php:
|
248 |
msgid "meta value"
|
249 |
msgstr "meta waarde"
|
250 |
|
251 |
-
#: classes/odb-cleaner.php:
|
252 |
-
msgid "No
|
253 |
-
msgstr "Geen
|
|
|
|
|
|
|
|
|
254 |
|
255 |
-
#: classes/odb-cleaner.php:
|
256 |
-
msgid "
|
|
|
|
|
|
|
|
|
257 |
msgstr "POSTMETA WEZEN"
|
258 |
|
259 |
-
#: classes/odb-cleaner.php:
|
260 |
msgid "total number of orphans"
|
261 |
msgstr "totaal aantal wezen"
|
262 |
|
263 |
-
#: classes/odb-cleaner.php:
|
264 |
-
msgid "DELETED
|
265 |
msgstr "VERWIJDERDE POSTMETA WEZEN"
|
266 |
|
267 |
-
#: classes/odb-cleaner.php:
|
|
|
|
|
|
|
|
|
268 |
msgid "id"
|
269 |
msgstr "id"
|
270 |
|
271 |
-
#: classes/odb-cleaner.php:
|
272 |
msgid "title"
|
273 |
msgstr "titel"
|
274 |
|
275 |
-
#: classes/odb-cleaner.php:
|
276 |
msgid "modified"
|
277 |
msgstr "gewijzigd"
|
278 |
|
279 |
-
#: classes/odb-cleaner.php:
|
280 |
-
msgid "No
|
281 |
msgstr "Geen POSTMETA WEZEN gevonden om te verwijderen"
|
282 |
|
283 |
-
#: classes/odb-cleaner.php:
|
|
|
|
|
|
|
|
|
284 |
msgid "Optimizing Database Tables"
|
285 |
msgstr "Optimaliseren van Databasetabellen"
|
286 |
|
287 |
-
#: classes/odb-cleaner.php:
|
288 |
msgid "table name"
|
289 |
msgstr "tabelnaam"
|
290 |
|
291 |
-
#: classes/odb-cleaner.php:
|
292 |
msgid "optimization result"
|
293 |
msgstr "resultaat optimalisatie"
|
294 |
|
295 |
-
#: classes/odb-cleaner.php:
|
296 |
msgid "engine"
|
297 |
msgstr "engine"
|
298 |
|
299 |
-
#: classes/odb-cleaner.php:
|
300 |
msgid "table rows"
|
301 |
msgstr "tabelrijen"
|
302 |
|
303 |
-
#: classes/odb-cleaner.php:
|
304 |
msgid "table size"
|
305 |
msgstr "tabelgrootte"
|
306 |
|
307 |
-
#: classes/odb-cleaner.php:
|
308 |
msgid "Savings"
|
309 |
msgstr "Besparingen"
|
310 |
|
311 |
-
#: classes/odb-cleaner.php:
|
312 |
msgid "size of the database"
|
313 |
msgstr "grootte van de database"
|
314 |
|
315 |
-
#: classes/odb-cleaner.php:
|
316 |
msgid "BEFORE optimization"
|
317 |
msgstr "VOOR de optimalisatie"
|
318 |
|
319 |
-
#: classes/odb-cleaner.php:
|
320 |
msgid "AFTER optimization"
|
321 |
msgstr "NA de optimalisatie"
|
322 |
|
323 |
-
#: classes/odb-cleaner.php:
|
324 |
msgid "SAVINGS THIS TIME"
|
325 |
msgstr "DIT KEER BESPAARD"
|
326 |
|
327 |
-
#: classes/odb-cleaner.php:
|
328 |
msgid "TOTAL SAVINGS SINCE THE FIRST RUN"
|
329 |
msgstr "TOTALE BESPARING SINDS DE EERSTE UITVOERING"
|
330 |
|
331 |
-
#: classes/odb-cleaner.php:
|
332 |
msgid "DONE!"
|
333 |
msgstr "KLAAR!"
|
334 |
|
335 |
-
#: classes/odb-cleaner.php:
|
336 |
-
msgid "
|
337 |
-
msgstr "
|
338 |
|
339 |
-
#: classes/odb-cleaner.php:
|
340 |
-
#: classes/odb-displayer.php:
|
341 |
msgid "seconds"
|
342 |
msgstr "seconden"
|
343 |
|
344 |
-
#: classes/odb-cleaner.php:
|
345 |
-
msgid "Optimization took"
|
346 |
-
msgstr "Optimalizatie duurde"
|
347 |
-
|
348 |
-
#: classes/odb-cleaner.php:738 classes/odb-displayer.php:196
|
349 |
#: classes/odb-logger.php:157
|
350 |
msgid "Clear the log?"
|
351 |
msgstr "Logs wissen?"
|
352 |
|
353 |
-
#: classes/odb-cleaner.php:
|
354 |
msgid "View Log"
|
355 |
msgstr "Bekijk Logs"
|
356 |
|
357 |
-
#: classes/odb-cleaner.php:
|
358 |
#: classes/odb-logger.php:170
|
359 |
msgid "Clear Log"
|
360 |
msgstr "Wis Logs"
|
361 |
|
362 |
-
#: classes/odb-cleaner.php:
|
363 |
msgid "of"
|
364 |
msgstr "van"
|
365 |
|
366 |
-
#: classes/odb-cleaner.php:
|
367 |
msgid "InnoDB table: skipped..."
|
368 |
msgstr "InnoDB tabel overgeslagen..."
|
369 |
|
370 |
-
#: classes/odb-cleaner.php:
|
371 |
msgid "<span class=\"odb-optimized\">TABLE OPTIMIZED</span>"
|
372 |
msgstr "<span class=\"odb-optimized\">TABEL GEOPTIMALISEERD</span>"
|
373 |
|
374 |
-
#: classes/odb-cleaner.php:
|
375 |
msgid "Table is already up to date"
|
376 |
msgstr "Tabel is al optimaal"
|
377 |
|
@@ -553,15 +589,25 @@ msgstr "en"
|
|
553 |
msgid "Change Settings"
|
554 |
msgstr "Wijzig instellingen"
|
555 |
|
|
|
|
|
|
|
|
|
556 |
# @ rvg-optimize-database
|
557 |
-
#: classes/odb-displayer.php:
|
558 |
-
msgid "Analyze
|
559 |
-
msgstr "
|
560 |
|
561 |
-
#: classes/odb-displayer.php:
|
562 |
-
#: rvg-optimize-database.php:
|
563 |
-
msgid "
|
564 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
|
566 |
#: classes/odb-logger.php:102
|
567 |
msgid "Logs"
|
@@ -612,7 +658,7 @@ msgstr "database<br>grootte<br>VOOR"
|
|
612 |
msgid "database<br>size<br>AFTER"
|
613 |
msgstr "database<br>grootte<br>NA"
|
614 |
|
615 |
-
#: classes/odb-logger.php:126 classes/odb-logger.php:
|
616 |
msgid "SAVINGS"
|
617 |
msgstr "BESPARINGEN"
|
618 |
|
@@ -620,44 +666,44 @@ msgstr "BESPARINGEN"
|
|
620 |
msgid "Export to CSV"
|
621 |
msgstr "Exporteer naar CSV"
|
622 |
|
623 |
-
#: classes/odb-logger.php:
|
624 |
msgid "deleted revisions"
|
625 |
msgstr "verw. revisies"
|
626 |
|
627 |
-
#: classes/odb-logger.php:
|
628 |
msgid "deleted trash"
|
629 |
msgstr "verw. prullenbak items"
|
630 |
|
631 |
-
#: classes/odb-logger.php:
|
632 |
msgid "deleted spam"
|
633 |
msgstr "verw. spam items"
|
634 |
|
635 |
-
#: classes/odb-logger.php:
|
636 |
msgid "deleted tags"
|
637 |
msgstr "verw. tags"
|
638 |
|
639 |
-
#: classes/odb-logger.php:
|
640 |
msgid "deleted transients"
|
641 |
msgstr "Verwijderde transiënts"
|
642 |
|
643 |
-
#: classes/odb-logger.php:
|
644 |
msgid "deleted pingbacks"
|
645 |
msgstr "verwijderde pingbacks"
|
646 |
|
647 |
-
#: classes/odb-logger.php:
|
648 |
msgid "deleted orphans"
|
649 |
msgstr "verw. wezen"
|
650 |
|
651 |
# @ rvg-optimize-database
|
652 |
-
#: classes/odb-logger.php:
|
653 |
msgid "nr of optimized tables"
|
654 |
msgstr "aantal geoptimaliseerde tabellen"
|
655 |
|
656 |
-
#: classes/odb-logger.php:
|
657 |
msgid "database size BEFORE"
|
658 |
msgstr "database grootte VOOR"
|
659 |
|
660 |
-
#: classes/odb-logger.php:
|
661 |
msgid "database size AFTER"
|
662 |
msgstr "database grootte NA"
|
663 |
|
@@ -703,7 +749,7 @@ msgstr "Je moet het <Maximaal aantal revisies> invullen"
|
|
703 |
msgid "<Maximum number of revisions> should be a number"
|
704 |
msgstr "<Maximaal aantal revisies> moet een getal zijn"
|
705 |
|
706 |
-
#: includes/settings-page.php:231 rvg-optimize-database.php:
|
707 |
msgid "Settings"
|
708 |
msgstr "Instellingen"
|
709 |
|
@@ -803,34 +849,74 @@ msgid "check all NON-WordPress tables"
|
|
803 |
msgstr "vink alle NIET-WordPress tabellen aan"
|
804 |
|
805 |
# @ rvg-optimize-database
|
806 |
-
#: rvg-optimize-database.php:
|
807 |
-
#: rvg-optimize-database.php:
|
808 |
-
#: rvg-optimize-database.php:
|
809 |
-
#: rvg-optimize-database.php:
|
810 |
msgid "Optimize Database"
|
811 |
msgstr "Optimaliseer Database"
|
812 |
|
813 |
# @ optimize_db
|
814 |
-
#: rvg-optimize-database.php:
|
815 |
msgid "Optimize DB (1 click)"
|
816 |
msgstr "Optimaliseer DB (1 klik)"
|
817 |
|
818 |
-
#: rvg-optimize-database.php:
|
819 |
msgid "Optimize Database after Deleting Revisions LOGS HAVE BEEN CLEARED"
|
820 |
msgstr "Optimize Database after Deleting Revisions LOGS ZIJN VERWIJDERD"
|
821 |
|
822 |
-
#: rvg-optimize-database.php:
|
823 |
-
msgid "CLICK
|
824 |
-
msgstr "
|
|
|
825 |
|
826 |
-
#: rvg-optimize-database.php:
|
827 |
msgid "Cancel"
|
828 |
msgstr "Annuleer"
|
829 |
|
830 |
-
#: rvg-optimize-database.php:
|
831 |
msgid "Analysis Done!"
|
832 |
msgstr "Analyze Gereed!"
|
833 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
834 |
#~ msgid "NUMBER OF oEmbed RECORDS"
|
835 |
#~ msgstr "AANTAL oEmbed RECORDS"
|
836 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Optimize Database after Deleting Revisions v4.3\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2019-05-26 13:42+0200\n"
|
6 |
+
"PO-Revision-Date: 2019-05-26 13:57+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.2.3\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"
|
19 |
"X-Textdomain-Support: yes\n"
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
|
22 |
+
#: classes/odb-cleaner.php:51
|
|
|
|
|
|
|
|
|
23 |
msgid "Cleaning Database"
|
24 |
msgstr "Opschonen Database"
|
25 |
|
26 |
+
#: classes/odb-cleaner.php:104
|
27 |
+
msgid "REVISIONS found to delete: "
|
28 |
+
msgstr "Geen REVISIES gevonden om te verwijderen"
|
29 |
+
|
30 |
+
#: classes/odb-cleaner.php:113
|
31 |
+
msgid "REVISIONS deleted: "
|
32 |
+
msgstr "verwijderde REVISIES:"
|
33 |
+
|
34 |
+
#: classes/odb-cleaner.php:122
|
35 |
msgid "REVISIONS"
|
36 |
msgstr "REVISIES"
|
37 |
|
38 |
+
#: classes/odb-cleaner.php:123
|
39 |
+
msgid "total number of revisions"
|
40 |
+
msgstr "totaal aantal revisies"
|
41 |
|
42 |
+
#: classes/odb-cleaner.php:127
|
43 |
msgid "DELETED REVISIONS"
|
44 |
msgstr "VERWIJDERDE REVISIES"
|
45 |
|
46 |
+
#: classes/odb-cleaner.php:128
|
47 |
+
msgid "total number of revisions deleted"
|
48 |
+
msgstr "totaal aantal verwijderde revisies"
|
49 |
|
50 |
+
#: classes/odb-cleaner.php:140 classes/odb-cleaner.php:226
|
51 |
+
#: classes/odb-cleaner.php:308 classes/odb-cleaner.php:393
|
52 |
+
#: classes/odb-cleaner.php:487 classes/odb-cleaner.php:569
|
53 |
+
#: classes/odb-cleaner.php:659 classes/odb-cleaner.php:744
|
54 |
msgid "prefix"
|
55 |
msgstr "prefix"
|
56 |
|
57 |
+
#: classes/odb-cleaner.php:141
|
58 |
msgid "post / page"
|
59 |
msgstr "bericht / pagina"
|
60 |
|
61 |
+
#: classes/odb-cleaner.php:142
|
62 |
msgid "revision date"
|
63 |
msgstr "revisiedatum"
|
64 |
|
65 |
+
#: classes/odb-cleaner.php:169
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
msgid "No REVISIONS found to delete"
|
67 |
msgstr "Geen REVISIES gevonden om te verwijderen"
|
68 |
|
69 |
+
#: classes/odb-cleaner.php:192
|
70 |
+
msgid "TRASHED ITEMS found to delete: "
|
71 |
+
msgstr "PRULLENBAK ITEMS gevonden om te verwijderen:"
|
72 |
+
|
73 |
+
#: classes/odb-cleaner.php:201
|
74 |
+
msgid "TRASHED ITEMS deleted: "
|
75 |
+
msgstr "Verwijderde PRULLENBAK ITEMS:"
|
76 |
+
|
77 |
+
#: classes/odb-cleaner.php:210
|
78 |
msgid "TRASHED ITEMS"
|
79 |
msgstr "TRASHED ITEMS"
|
80 |
|
81 |
+
#: classes/odb-cleaner.php:211
|
82 |
msgid "total number of trashed items"
|
83 |
msgstr "totaal aantal trashed items"
|
84 |
|
85 |
+
#: classes/odb-cleaner.php:214
|
86 |
msgid "DELETED TRASHED ITEMS"
|
87 |
msgstr "VERWIJDERDE TRASHED ITEMS"
|
88 |
|
89 |
+
#: classes/odb-cleaner.php:215
|
90 |
msgid "total number of trashed items deleted"
|
91 |
msgstr "totaal aantal verwijderede trashed items"
|
92 |
|
93 |
+
#: classes/odb-cleaner.php:227 classes/odb-cleaner.php:570
|
94 |
+
#: classes/odb-cleaner.php:745
|
95 |
msgid "type"
|
96 |
msgstr "type"
|
97 |
|
98 |
+
#: classes/odb-cleaner.php:228
|
99 |
msgid "IP address / title"
|
100 |
msgstr "IP adres / titel"
|
101 |
|
102 |
+
#: classes/odb-cleaner.php:229 classes/odb-cleaner.php:572
|
103 |
+
#: classes/odb-logger.php:114 classes/odb-logger.php:244
|
104 |
msgid "date"
|
105 |
msgstr "datum"
|
106 |
|
107 |
+
#: classes/odb-cleaner.php:251
|
108 |
msgid "No TRASHED ITEMS found to delete"
|
109 |
msgstr "Geen PRULLENBAK ITEMS gevonden om te verwijderen"
|
110 |
|
111 |
+
#: classes/odb-cleaner.php:274
|
112 |
+
msgid "SPAMMED ITEMS found to delete: "
|
113 |
+
msgstr "SPAM gevonden om te verwijderen:"
|
114 |
+
|
115 |
+
#: classes/odb-cleaner.php:283
|
116 |
+
msgid "SPAMMED ITEMS deleted: "
|
117 |
+
msgstr "Verwijderde SPAM:"
|
118 |
+
|
119 |
+
#: classes/odb-cleaner.php:291
|
120 |
msgid "SPAMMED ITEMS"
|
121 |
msgstr "SPAMMEND ITEMS"
|
122 |
|
123 |
+
#: classes/odb-cleaner.php:292
|
124 |
msgid "total number of spammed items"
|
125 |
msgstr "totaal aantal spammed items"
|
126 |
|
127 |
+
#: classes/odb-cleaner.php:296
|
128 |
msgid "DELETED SPAMMED ITEMS"
|
129 |
msgstr "VERWIJDERDE SPAMMEND ITEMS"
|
130 |
|
131 |
+
#: classes/odb-cleaner.php:297
|
132 |
msgid "total number of spammed items deleted"
|
133 |
msgstr "totaal aantal verwijderde spammed items"
|
134 |
|
135 |
+
#: classes/odb-cleaner.php:309
|
136 |
msgid "comment author"
|
137 |
msgstr "plaatser van de reactie"
|
138 |
|
139 |
+
#: classes/odb-cleaner.php:310
|
140 |
msgid "comment author email"
|
141 |
msgstr "email van de plaatser van de reactie"
|
142 |
|
143 |
+
#: classes/odb-cleaner.php:311
|
144 |
msgid "comment date"
|
145 |
msgstr "datum van de reactie"
|
146 |
|
147 |
+
#: classes/odb-cleaner.php:334
|
148 |
msgid "No SPAMMED ITEMS found to delete"
|
149 |
msgstr "Geen SPAM gevonden om te verwijderen"
|
150 |
|
151 |
+
#: classes/odb-cleaner.php:359
|
152 |
+
msgid "UNUSED TAGS found to delete: "
|
153 |
+
msgstr "ONGEBRUIKTE TAGS gevonden om te verwijderen:"
|
154 |
+
|
155 |
+
#: classes/odb-cleaner.php:368
|
156 |
+
msgid "UNUSED TAGS deleted: "
|
157 |
+
msgstr "Verwijderde ONGEBRUIKTE TAGS:"
|
158 |
+
|
159 |
+
#: classes/odb-cleaner.php:377
|
160 |
msgid "UNUSED TAGS"
|
161 |
msgstr "ONGEBRUIKTE TAGS"
|
162 |
|
163 |
+
#: classes/odb-cleaner.php:378
|
164 |
msgid "total number of unused tags"
|
165 |
msgstr "totaal aantal trashed items"
|
166 |
|
167 |
+
#: classes/odb-cleaner.php:381
|
168 |
msgid "DELETED UNUSED TAGS"
|
169 |
msgstr "VERWIJDERDE ONGEBRUIKTE TAGS"
|
170 |
|
171 |
+
#: classes/odb-cleaner.php:382
|
172 |
msgid "total number of unused tags deleted"
|
173 |
msgstr "totaal aantal verwijderede trashed items"
|
174 |
|
175 |
+
#: classes/odb-cleaner.php:394
|
176 |
msgid "tag"
|
177 |
msgstr "tag"
|
178 |
|
179 |
+
#: classes/odb-cleaner.php:417
|
180 |
+
msgid "No UNUSED TAGS found to delete"
|
181 |
msgstr "Geen ONGEBRUIKTE TAGS gevonden om te verwijderen"
|
182 |
|
183 |
+
#: classes/odb-cleaner.php:452
|
184 |
+
msgid " TRANSIENTS found to delete: "
|
185 |
+
msgstr "VERLOPEN TRANSIËNTS gevonden om te verwijderen:"
|
|
|
|
|
|
|
|
|
186 |
|
187 |
+
#: classes/odb-cleaner.php:461
|
188 |
+
msgid " TRANSIENTS deleted: "
|
189 |
+
msgstr "Verwijderde VERLOPEN TRANSIËNTS:"
|
190 |
|
191 |
+
#: classes/odb-cleaner.php:471
|
192 |
+
msgid " TRANSIENTS"
|
|
|
|
|
|
|
|
|
193 |
msgstr "TRANSIENTS"
|
194 |
|
195 |
+
#: classes/odb-cleaner.php:472 classes/odb-cleaner.php:476
|
196 |
+
msgid "total number of "
|
197 |
+
msgstr "totaal aantal"
|
198 |
|
199 |
+
#: classes/odb-cleaner.php:475
|
200 |
+
msgid "DELETED "
|
201 |
+
msgstr "VERWIJDERDE OEMBEDS"
|
202 |
|
203 |
+
#: classes/odb-cleaner.php:488
|
204 |
msgid "option name"
|
205 |
msgstr "optienaam"
|
206 |
|
207 |
+
#: classes/odb-cleaner.php:510
|
|
|
|
|
|
|
|
|
208 |
msgid "No TRANSIENTS found to delete"
|
209 |
msgstr "Geen VERLOPEN TRANSIËNTS gevonden om te verwijderen"
|
210 |
|
211 |
+
#: classes/odb-cleaner.php:535
|
212 |
+
msgid "PINGBACKS AND/OR TRACKBACKS found to delete: "
|
213 |
+
msgstr "PINGBACKS en TRACKBACKS gevonden om te verwijderen:"
|
214 |
+
|
215 |
+
#: classes/odb-cleaner.php:544
|
216 |
+
msgid "PINGBACKS AND/OR TRACKBACKS deleted: "
|
217 |
+
msgstr "Verwijderde PINGBACKS EN TRACKBACKS:"
|
218 |
+
|
219 |
+
#: classes/odb-cleaner.php:553
|
220 |
msgid "PINGBACKS AND TRACKBACKS"
|
221 |
msgstr "PINGBACKS EN TRACKBACKS"
|
222 |
|
223 |
+
#: classes/odb-cleaner.php:554
|
224 |
msgid "total number of pingbacks and trackbacks"
|
225 |
msgstr "total aantal pingbacks en trackbacks"
|
226 |
|
227 |
+
#: classes/odb-cleaner.php:557
|
228 |
msgid "DELETED PINGBACKS AND TRACKBACKS"
|
229 |
msgstr "VERWIJDERDE PINGBACKS EN TRACKBACKS"
|
230 |
|
231 |
+
#: classes/odb-cleaner.php:558
|
232 |
msgid "total number of pingbacks and trackbacks deleted"
|
233 |
msgstr "totaal aantal verwijderede trashed items"
|
234 |
|
235 |
+
#: classes/odb-cleaner.php:571
|
236 |
msgid "comment_author"
|
237 |
msgstr "plaatser van de reactie"
|
238 |
|
239 |
+
#: classes/odb-cleaner.php:599
|
240 |
msgid "No PINGBACKS nor TRACKBACKS found to delete"
|
241 |
msgstr "Geen PINGBACKS en TRACKBACKS gevonden om te verwijderen"
|
242 |
|
243 |
+
#: classes/odb-cleaner.php:625
|
244 |
+
msgid "OEMBED CACHE ITEMS found to delete: "
|
245 |
+
msgstr "OEMBED CACHE ITEMS gevonden om te verwijderen:"
|
246 |
|
247 |
+
#: classes/odb-cleaner.php:634
|
248 |
+
msgid "OEMBED CACHE ITEMS deleted: "
|
249 |
+
msgstr "Verwijderde OEMBED CACHE ITEMS:"
|
250 |
|
251 |
+
#: classes/odb-cleaner.php:643
|
252 |
+
msgid "OEMBED CACHE items"
|
253 |
+
msgstr "OEMBED CACHE items"
|
254 |
|
255 |
+
#: classes/odb-cleaner.php:644
|
256 |
+
msgid "total number of oembed cache items"
|
257 |
+
msgstr "totaal aantal oembed cache items"
|
258 |
|
259 |
+
#: classes/odb-cleaner.php:647
|
260 |
+
msgid "DELETED OEMBED CACHE ITEMS"
|
261 |
+
msgstr "VERWIJDERDE OEMBED CACHE ITEMS"
|
262 |
+
|
263 |
+
#: classes/odb-cleaner.php:648
|
264 |
+
msgid "total number of oembed cache items deleted"
|
265 |
+
msgstr "totaal aantal verwijderede oembed cache items"
|
266 |
+
|
267 |
+
#: classes/odb-cleaner.php:660 classes/odb-cleaner.php:749
|
268 |
msgid "meta key"
|
269 |
msgstr "meta sleutel"
|
270 |
|
271 |
+
#: classes/odb-cleaner.php:661 classes/odb-cleaner.php:750
|
272 |
msgid "meta value"
|
273 |
msgstr "meta waarde"
|
274 |
|
275 |
+
#: classes/odb-cleaner.php:684
|
276 |
+
msgid "No OEMBED CACHE ITEMS found to delete"
|
277 |
+
msgstr "Geen OEMBED CACHE ITEMS gevonden om te verwijderen"
|
278 |
+
|
279 |
+
#: classes/odb-cleaner.php:709
|
280 |
+
msgid "ORPHANS found to delete: "
|
281 |
+
msgstr "POSTMETA WEZEN gevonden om te verwijderen:"
|
282 |
|
283 |
+
#: classes/odb-cleaner.php:718
|
284 |
+
msgid "ORPHANS deleted: "
|
285 |
+
msgstr "Verwijderde WEZEN:"
|
286 |
+
|
287 |
+
#: classes/odb-cleaner.php:728
|
288 |
+
msgid "ORPHANS"
|
289 |
msgstr "POSTMETA WEZEN"
|
290 |
|
291 |
+
#: classes/odb-cleaner.php:729
|
292 |
msgid "total number of orphans"
|
293 |
msgstr "totaal aantal wezen"
|
294 |
|
295 |
+
#: classes/odb-cleaner.php:732
|
296 |
+
msgid "DELETED ORPHANS"
|
297 |
msgstr "VERWIJDERDE POSTMETA WEZEN"
|
298 |
|
299 |
+
#: classes/odb-cleaner.php:733
|
300 |
+
msgid "total number of orphans deleted"
|
301 |
+
msgstr "totaal aantal verwijderde wezen"
|
302 |
+
|
303 |
+
#: classes/odb-cleaner.php:746 classes/odb-logger.php:243
|
304 |
msgid "id"
|
305 |
msgstr "id"
|
306 |
|
307 |
+
#: classes/odb-cleaner.php:747
|
308 |
msgid "title"
|
309 |
msgstr "titel"
|
310 |
|
311 |
+
#: classes/odb-cleaner.php:748
|
312 |
msgid "modified"
|
313 |
msgstr "gewijzigd"
|
314 |
|
315 |
+
#: classes/odb-cleaner.php:769
|
316 |
+
msgid "No ORPHANS found to delete"
|
317 |
msgstr "Geen POSTMETA WEZEN gevonden om te verwijderen"
|
318 |
|
319 |
+
#: classes/odb-cleaner.php:778
|
320 |
+
msgid "TOTAL NUMBER OF ITEMS: "
|
321 |
+
msgstr "TOTAAL ANTAL ITEMS:"
|
322 |
+
|
323 |
+
#: classes/odb-cleaner.php:797
|
324 |
msgid "Optimizing Database Tables"
|
325 |
msgstr "Optimaliseren van Databasetabellen"
|
326 |
|
327 |
+
#: classes/odb-cleaner.php:804
|
328 |
msgid "table name"
|
329 |
msgstr "tabelnaam"
|
330 |
|
331 |
+
#: classes/odb-cleaner.php:805
|
332 |
msgid "optimization result"
|
333 |
msgstr "resultaat optimalisatie"
|
334 |
|
335 |
+
#: classes/odb-cleaner.php:806
|
336 |
msgid "engine"
|
337 |
msgstr "engine"
|
338 |
|
339 |
+
#: classes/odb-cleaner.php:807
|
340 |
msgid "table rows"
|
341 |
msgstr "tabelrijen"
|
342 |
|
343 |
+
#: classes/odb-cleaner.php:808
|
344 |
msgid "table size"
|
345 |
msgstr "tabelgrootte"
|
346 |
|
347 |
+
#: classes/odb-cleaner.php:859
|
348 |
msgid "Savings"
|
349 |
msgstr "Besparingen"
|
350 |
|
351 |
+
#: classes/odb-cleaner.php:866
|
352 |
msgid "size of the database"
|
353 |
msgstr "grootte van de database"
|
354 |
|
355 |
+
#: classes/odb-cleaner.php:869
|
356 |
msgid "BEFORE optimization"
|
357 |
msgstr "VOOR de optimalisatie"
|
358 |
|
359 |
+
#: classes/odb-cleaner.php:873
|
360 |
msgid "AFTER optimization"
|
361 |
msgstr "NA de optimalisatie"
|
362 |
|
363 |
+
#: classes/odb-cleaner.php:877
|
364 |
msgid "SAVINGS THIS TIME"
|
365 |
msgstr "DIT KEER BESPAARD"
|
366 |
|
367 |
+
#: classes/odb-cleaner.php:881
|
368 |
msgid "TOTAL SAVINGS SINCE THE FIRST RUN"
|
369 |
msgstr "TOTALE BESPARING SINDS DE EERSTE UITVOERING"
|
370 |
|
371 |
+
#: classes/odb-cleaner.php:909
|
372 |
msgid "DONE!"
|
373 |
msgstr "KLAAR!"
|
374 |
|
375 |
+
#: classes/odb-cleaner.php:917
|
376 |
+
msgid "Optimization took"
|
377 |
+
msgstr "Optimalizatie duurde"
|
378 |
|
379 |
+
#: classes/odb-cleaner.php:917 classes/odb-displayer.php:139
|
380 |
+
#: classes/odb-displayer.php:174
|
381 |
msgid "seconds"
|
382 |
msgstr "seconden"
|
383 |
|
384 |
+
#: classes/odb-cleaner.php:931 classes/odb-displayer.php:196
|
|
|
|
|
|
|
|
|
385 |
#: classes/odb-logger.php:157
|
386 |
msgid "Clear the log?"
|
387 |
msgstr "Logs wissen?"
|
388 |
|
389 |
+
#: classes/odb-cleaner.php:941 classes/odb-displayer.php:215
|
390 |
msgid "View Log"
|
391 |
msgstr "Bekijk Logs"
|
392 |
|
393 |
+
#: classes/odb-cleaner.php:943 classes/odb-displayer.php:217
|
394 |
#: classes/odb-logger.php:170
|
395 |
msgid "Clear Log"
|
396 |
msgstr "Wis Logs"
|
397 |
|
398 |
+
#: classes/odb-cleaner.php:1191
|
399 |
msgid "of"
|
400 |
msgstr "van"
|
401 |
|
402 |
+
#: classes/odb-cleaner.php:1892
|
403 |
msgid "InnoDB table: skipped..."
|
404 |
msgstr "InnoDB tabel overgeslagen..."
|
405 |
|
406 |
+
#: classes/odb-cleaner.php:1899 classes/odb-cleaner.php:1909
|
407 |
msgid "<span class=\"odb-optimized\">TABLE OPTIMIZED</span>"
|
408 |
msgstr "<span class=\"odb-optimized\">TABEL GEOPTIMALISEERD</span>"
|
409 |
|
410 |
+
#: classes/odb-cleaner.php:1901 classes/odb-cleaner.php:1907
|
411 |
msgid "Table is already up to date"
|
412 |
msgstr "Tabel is al optimaal"
|
413 |
|
589 |
msgid "Change Settings"
|
590 |
msgstr "Wijzig instellingen"
|
591 |
|
592 |
+
#: classes/odb-displayer.php:225
|
593 |
+
msgid "Analyze (summary)"
|
594 |
+
msgstr "Analiseer (samenvatting)"
|
595 |
+
|
596 |
# @ rvg-optimize-database
|
597 |
+
#: classes/odb-displayer.php:227
|
598 |
+
msgid "Analyze (detail)"
|
599 |
+
msgstr "Analyze (detail)"
|
600 |
|
601 |
+
#: classes/odb-displayer.php:229 classes/odb-logger.php:174
|
602 |
+
#: rvg-optimize-database.php:723
|
603 |
+
msgid "Optimize (summary)"
|
604 |
+
msgstr "Optimaliseer (samenvatting)"
|
605 |
+
|
606 |
+
# @ rvg-optimize-database
|
607 |
+
#: classes/odb-displayer.php:231 classes/odb-logger.php:176
|
608 |
+
#: rvg-optimize-database.php:724
|
609 |
+
msgid "Optimize (detail)"
|
610 |
+
msgstr "Optimaliseer (detail)"
|
611 |
|
612 |
#: classes/odb-logger.php:102
|
613 |
msgid "Logs"
|
658 |
msgid "database<br>size<br>AFTER"
|
659 |
msgstr "database<br>grootte<br>NA"
|
660 |
|
661 |
+
#: classes/odb-logger.php:126 classes/odb-logger.php:255
|
662 |
msgid "SAVINGS"
|
663 |
msgstr "BESPARINGEN"
|
664 |
|
666 |
msgid "Export to CSV"
|
667 |
msgstr "Exporteer naar CSV"
|
668 |
|
669 |
+
#: classes/odb-logger.php:245
|
670 |
msgid "deleted revisions"
|
671 |
msgstr "verw. revisies"
|
672 |
|
673 |
+
#: classes/odb-logger.php:246
|
674 |
msgid "deleted trash"
|
675 |
msgstr "verw. prullenbak items"
|
676 |
|
677 |
+
#: classes/odb-logger.php:247
|
678 |
msgid "deleted spam"
|
679 |
msgstr "verw. spam items"
|
680 |
|
681 |
+
#: classes/odb-logger.php:248
|
682 |
msgid "deleted tags"
|
683 |
msgstr "verw. tags"
|
684 |
|
685 |
+
#: classes/odb-logger.php:249
|
686 |
msgid "deleted transients"
|
687 |
msgstr "Verwijderde transiënts"
|
688 |
|
689 |
+
#: classes/odb-logger.php:250
|
690 |
msgid "deleted pingbacks"
|
691 |
msgstr "verwijderde pingbacks"
|
692 |
|
693 |
+
#: classes/odb-logger.php:251
|
694 |
msgid "deleted orphans"
|
695 |
msgstr "verw. wezen"
|
696 |
|
697 |
# @ rvg-optimize-database
|
698 |
+
#: classes/odb-logger.php:252
|
699 |
msgid "nr of optimized tables"
|
700 |
msgstr "aantal geoptimaliseerde tabellen"
|
701 |
|
702 |
+
#: classes/odb-logger.php:253
|
703 |
msgid "database size BEFORE"
|
704 |
msgstr "database grootte VOOR"
|
705 |
|
706 |
+
#: classes/odb-logger.php:254
|
707 |
msgid "database size AFTER"
|
708 |
msgstr "database grootte NA"
|
709 |
|
749 |
msgid "<Maximum number of revisions> should be a number"
|
750 |
msgstr "<Maximaal aantal revisies> moet een getal zijn"
|
751 |
|
752 |
+
#: includes/settings-page.php:231 rvg-optimize-database.php:485
|
753 |
msgid "Settings"
|
754 |
msgstr "Instellingen"
|
755 |
|
849 |
msgstr "vink alle NIET-WordPress tabellen aan"
|
850 |
|
851 |
# @ rvg-optimize-database
|
852 |
+
#: rvg-optimize-database.php:453 rvg-optimize-database.php:454
|
853 |
+
#: rvg-optimize-database.php:470 rvg-optimize-database.php:471
|
854 |
+
#: rvg-optimize-database.php:517 rvg-optimize-database.php:518
|
855 |
+
#: rvg-optimize-database.php:537 rvg-optimize-database.php:538
|
856 |
msgid "Optimize Database"
|
857 |
msgstr "Optimaliseer Database"
|
858 |
|
859 |
# @ optimize_db
|
860 |
+
#: rvg-optimize-database.php:504
|
861 |
msgid "Optimize DB (1 click)"
|
862 |
msgstr "Optimaliseer DB (1 klik)"
|
863 |
|
864 |
+
#: rvg-optimize-database.php:672
|
865 |
msgid "Optimize Database after Deleting Revisions LOGS HAVE BEEN CLEARED"
|
866 |
msgstr "Optimize Database after Deleting Revisions LOGS ZIJN VERWIJDERD"
|
867 |
|
868 |
+
#: rvg-optimize-database.php:721
|
869 |
+
msgid "CLICK ONE OF THE 'OPTIMIZE' BUTTONS TO ACTUALLY DELETE THE FOUND ITEMS"
|
870 |
+
msgstr ""
|
871 |
+
"KLIK EEN VAN DE 'OPTIMALISEER' BUTTONS OM DE GEVONDEN ITEMS TE VERWIJDEREN"
|
872 |
|
873 |
+
#: rvg-optimize-database.php:722
|
874 |
msgid "Cancel"
|
875 |
msgstr "Annuleer"
|
876 |
|
877 |
+
#: rvg-optimize-database.php:727
|
878 |
msgid "Analysis Done!"
|
879 |
msgstr "Analyze Gereed!"
|
880 |
|
881 |
+
#~ msgid "Analyzing Database"
|
882 |
+
#~ msgstr "Analiseer Database"
|
883 |
+
|
884 |
+
#~ msgid "revisions"
|
885 |
+
#~ msgstr "revisies"
|
886 |
+
|
887 |
+
#~ msgid "revisions deleted"
|
888 |
+
#~ msgstr "revisies verwijderd"
|
889 |
+
|
890 |
+
#~ msgid "EXPIRED TRANSIENTS"
|
891 |
+
#~ msgstr "VERLOPEN TRANSIËNTS"
|
892 |
+
|
893 |
+
#~ msgid "total number of expired transients"
|
894 |
+
#~ msgstr "totaal aantal verlopen transients"
|
895 |
+
|
896 |
+
#~ msgid "EXPIRED TRANSIENTS DELETED"
|
897 |
+
#~ msgstr "VERWIJDERDE VERLOPEN TRANSIËNTS"
|
898 |
+
|
899 |
+
#~ msgid "total number of expired transients deleted"
|
900 |
+
#~ msgstr "totaal aantal verwijderde revisies"
|
901 |
+
|
902 |
+
#~ msgid "total number of transients"
|
903 |
+
#~ msgstr "totaal aantal trashed items"
|
904 |
+
|
905 |
+
#~ msgid "TRANSIENTS DELETED"
|
906 |
+
#~ msgstr "VERWIJDERDE VERLOPEN TRANSIËNTS"
|
907 |
+
|
908 |
+
#~ msgid "No EXPIRED TRANSIENTS found to delete"
|
909 |
+
#~ msgstr "Geen VERLOPEN TRANSIËNTS gevonden om te verwijderen"
|
910 |
+
|
911 |
+
#~ msgid "total number of oEmbeds deleted"
|
912 |
+
#~ msgstr "totaal aantal verwijderde oEmbeds"
|
913 |
+
|
914 |
+
#~ msgid "Analysis took"
|
915 |
+
#~ msgstr "Analyze duurde"
|
916 |
+
|
917 |
+
#~ msgid "Start Optimization"
|
918 |
+
#~ msgstr "Start Optimalisatie"
|
919 |
+
|
920 |
#~ msgid "NUMBER OF oEmbed RECORDS"
|
921 |
#~ msgstr "AANTAL oEmbed RECORDS"
|
922 |
|
readme.txt
CHANGED
@@ -9,9 +9,9 @@ Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
|
|
9 |
Contributors: cageehv
|
10 |
Requires at least: 2.8
|
11 |
Requires PHP: 5.0
|
12 |
-
Tested up to: 5.
|
13 |
-
Stable tag: 4.
|
14 |
-
Version: 4.
|
15 |
License: GPLv2 or later
|
16 |
|
17 |
== Description ==
|
@@ -40,15 +40,15 @@ You can find the settings page in the WP Admin Panel » Optimize Database -
|
|
40 |
= Excluding specific posts/pages from deleting revisions =
|
41 |
If you want to keep revisions for a specific post/page (no matter what the other settings are), create a custom field named 'keep_revisions' for that post/page and give it the value 'Y'<br>
|
42 |
|
43 |
-
=
|
44 |
-
Before running the Optimization, you can run the Database Analyzer first<br>
|
45 |
-
Go to: Dashboard > Tools > Optimize Database<br>
|
46 |
-
Click the 'Analyze Database' button<br>
|
47 |
-
|
48 |
-
= Starting the Optimization =
|
49 |
You can start the Optimization in the WP Admin Panel » Optimize Database.<br>
|
50 |
Note: if you use the Scheduler the Optimization will run automatically!<br>
|
51 |
-
Note: you also can click the 'Optimize DB (1 click)' link in the admin bar (if enabled)
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
= Multisite Support =
|
54 |
* Install the plugin as Network Administrator (Network Admin » Plugins)
|
@@ -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.7.4 [01/05/2019] =
|
115 |
* CHANGE: 'set_time_limit' warning suppressed
|
116 |
* CHANGE: Some lay-out fixes
|
9 |
Contributors: cageehv
|
10 |
Requires at least: 2.8
|
11 |
Requires PHP: 5.0
|
12 |
+
Tested up to: 5.2.1
|
13 |
+
Stable tag: 4.8.0
|
14 |
+
Version: 4.8.0
|
15 |
License: GPLv2 or later
|
16 |
|
17 |
== Description ==
|
40 |
= Excluding specific posts/pages from deleting revisions =
|
41 |
If you want to keep revisions for a specific post/page (no matter what the other settings are), create a custom field named 'keep_revisions' for that post/page and give it the value 'Y'<br>
|
42 |
|
43 |
+
= Starting the Analysis / Optimization =
|
|
|
|
|
|
|
|
|
|
|
44 |
You can start the Optimization in the WP Admin Panel » Optimize Database.<br>
|
45 |
Note: if you use the Scheduler the Optimization will run automatically!<br>
|
46 |
+
Note: you also can click the 'Optimize DB (1 click)' link in the admin bar (if enabled)<br>
|
47 |
+
You can click one of the following buttons:<br>
|
48 |
+
'Analyze (summary): analyzes the database and gives the count of what will be cleaned<br>
|
49 |
+
'Analyze (detail): analyzes the database and gives a detailed report of what will be deleted<br>
|
50 |
+
'Optimize (summary): actually deletes the items and gives the count of what has been deleted<br>
|
51 |
+
'Optimize (detail): actually deletes the items and gives a detailed report of what has been deleted<br>
|
52 |
|
53 |
= Multisite Support =
|
54 |
* Install the plugin as Network Administrator (Network Admin » Plugins)
|
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.0 [05/26/2019] =
|
115 |
+
* NEW: New analyze / optimize options (summary or detail)
|
116 |
+
|
117 |
= 4.7.4 [01/05/2019] =
|
118 |
* CHANGE: 'set_time_limit' warning suppressed
|
119 |
* CHANGE: Some lay-out fixes
|
rvg-optimize-database.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* @package Optimize Database after Deleting Revisions
|
4 |
-
* @version 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.
|
14 |
*/
|
15 |
|
16 |
/********************************************************************************************
|
@@ -28,8 +28,8 @@ $odb_class = new OptimizeDatabase();
|
|
28 |
|
29 |
class OptimizeDatabase {
|
30 |
// VERSION
|
31 |
-
var $odb_version = '4.
|
32 |
-
var $odb_release_date = '
|
33 |
|
34 |
// PLUGIN OPTIONS
|
35 |
var $odb_rvg_options = array();
|
@@ -77,9 +77,10 @@ class OptimizeDatabase {
|
|
77 |
// PAGE TIMER
|
78 |
var $odb_start_time;
|
79 |
|
80 |
-
|
81 |
/*******************************************************************************
|
|
|
82 |
* CONSTRUCTOR
|
|
|
83 |
*******************************************************************************/
|
84 |
function __construct() {
|
85 |
// INITIALIZE PLUGIN
|
@@ -148,17 +149,19 @@ class OptimizeDatabase {
|
|
148 |
$this_page = '';
|
149 |
if(isset($_GET['page'])) $this_page = $_GET['page'];
|
150 |
// v4.0.3
|
151 |
-
if($this->odb_is_relevant_page())
|
152 |
-
|
153 |
wp_enqueue_style('odb-style'.$this->odb_version);
|
154 |
-
}
|
155 |
|
156 |
if(defined('RUN_OPTIMIZE_DATABASE') && RUN_OPTIMIZE_DATABASE == 1) $this->odb_start(true);
|
157 |
} // odb_init()
|
158 |
|
159 |
|
160 |
/*******************************************************************************
|
|
|
161 |
* LOAD AND INITIALIZE CLASSES
|
|
|
162 |
*******************************************************************************/
|
163 |
function odb_classes() {
|
164 |
// LOAD CLASSES
|
@@ -180,7 +183,9 @@ class OptimizeDatabase {
|
|
180 |
|
181 |
|
182 |
/*******************************************************************************
|
|
|
183 |
* INITIALIZE URLS AND DIRECTORIES
|
|
|
184 |
*******************************************************************************/
|
185 |
function odb_urls_dirs() {
|
186 |
$this->odb_plugin_url = plugins_url( '/', __FILE__ );
|
@@ -190,7 +195,9 @@ class OptimizeDatabase {
|
|
190 |
|
191 |
|
192 |
/*******************************************************************************
|
|
|
193 |
* LOAD OPTIONS
|
|
|
194 |
*******************************************************************************/
|
195 |
function odb_load_options() {
|
196 |
// GET OPTIONS
|
@@ -277,7 +284,9 @@ class OptimizeDatabase {
|
|
277 |
|
278 |
|
279 |
/*******************************************************************************
|
|
|
280 |
* COPY AND DELETE OPTIONS FROM PREVIOUS VERSIONS (BEFORE 4.0)
|
|
|
281 |
*******************************************************************************/
|
282 |
function odb_convert_options() {
|
283 |
global $wpdb;
|
@@ -367,7 +376,7 @@ class OptimizeDatabase {
|
|
367 |
$this->odb_multisite_obj->odb_ms_delete_option('rvg_odb_schedulehour');
|
368 |
|
369 |
// COPY EXCLUDED TABLES
|
370 |
-
for($i=0; $i<count($this->odb_ms_prefixes); $i++) {
|
371 |
$sql = "
|
372 |
SELECT `option_name`
|
373 |
FROM ".$this->odb_ms_prefixes[$i]."options
|
@@ -381,7 +390,7 @@ class OptimizeDatabase {
|
|
381 |
$this->odb_rvg_excluded_tabs[$option_name_new] = 'Y';
|
382 |
$this->odb_multisite_obj->odb_ms_delete_option($option_name);
|
383 |
} // for($j=0; $j<count($res); $j++)
|
384 |
-
} // for($i=0; $i<count($this->odb_ms_prefixes); $i++)
|
385 |
|
386 |
// UPDATE EXCLUDED TABLES
|
387 |
$this->odb_multisite_obj->odb_ms_update_option('odb_rvg_excluded_tabs', $this->odb_rvg_excluded_tabs);
|
@@ -389,7 +398,9 @@ class OptimizeDatabase {
|
|
389 |
|
390 |
|
391 |
/*******************************************************************************
|
|
|
392 |
* INITIALIZE WORDPRESS HOOKS
|
|
|
393 |
*******************************************************************************/
|
394 |
function odb_init_hooks() {
|
395 |
global $blog_id;
|
@@ -432,7 +443,9 @@ class OptimizeDatabase {
|
|
432 |
|
433 |
|
434 |
/*******************************************************************************
|
|
|
435 |
* ADD ENTRY TO THE ADMIN TOOLS MENU
|
|
|
436 |
*******************************************************************************/
|
437 |
function odb_admin_tools() {
|
438 |
if (function_exists('add_management_page')) {
|
@@ -447,7 +460,9 @@ class OptimizeDatabase {
|
|
447 |
|
448 |
|
449 |
/*******************************************************************************
|
|
|
450 |
* ADD ENTRY TO THE ADMIN SETTINGS MENU
|
|
|
451 |
*******************************************************************************/
|
452 |
function odb_admin_settings() {
|
453 |
if (function_exists('add_options_page'))
|
@@ -462,7 +477,9 @@ class OptimizeDatabase {
|
|
462 |
|
463 |
|
464 |
/*******************************************************************************
|
|
|
465 |
* ADD 'SETTINGS' LINK TO THE MAIN PLUGIN PAGE
|
|
|
466 |
*******************************************************************************/
|
467 |
function odb_settings_link($links) {
|
468 |
array_unshift($links, '<a href="options-general.php?page=odb_settings_page">'.__('Settings', $this->odb_txt_domain).'</a>');
|
@@ -471,7 +488,9 @@ class OptimizeDatabase {
|
|
471 |
|
472 |
|
473 |
/********************************************************************************************
|
|
|
474 |
* ADD THE '1 CLICK OPTIMIZE DATABASE' ITEM TO THE ADMIN BAR (IF ACTIVATED)
|
|
|
475 |
********************************************************************************************/
|
476 |
function odb_admin_bar() {
|
477 |
global $wp_admin_bar;
|
@@ -483,12 +502,14 @@ class OptimizeDatabase {
|
|
483 |
array(
|
484 |
'id' => 'optimize',
|
485 |
'title' => __('Optimize DB (1 click)', $this->odb_txt_domain),
|
486 |
-
'href' => $siteurl.'wp-admin/tools.php?page=rvg-optimize-database&action=
|
487 |
} // odb_admin_bar()
|
488 |
|
489 |
|
490 |
/********************************************************************************************
|
|
|
491 |
* 'ICON MODE': ADD A LINK TO THE ADMIN MENU
|
|
|
492 |
********************************************************************************************/
|
493 |
function odb_admin_icon() {
|
494 |
if (function_exists('add_menu_page')) {
|
@@ -505,7 +526,9 @@ class OptimizeDatabase {
|
|
505 |
|
506 |
|
507 |
/********************************************************************************************
|
|
|
508 |
* 'ICON MODE': REGISTER OPTION PAGE BUT HIDE IT FROM THE ADMIN MENU
|
|
|
509 |
********************************************************************************************/
|
510 |
function odb_register_options() {
|
511 |
if (function_exists('add_submenu_page')) {
|
@@ -517,12 +540,14 @@ class OptimizeDatabase {
|
|
517 |
'rvg_odb_admin', // menu slug
|
518 |
array(&$this, 'odb_settings_page') // function
|
519 |
);
|
520 |
-
}
|
521 |
} // odb_register_options()
|
522 |
|
523 |
|
524 |
/*******************************************************************************
|
|
|
525 |
* LOAD TEXT DOMAIN
|
|
|
526 |
*******************************************************************************/
|
527 |
function odb_i18n() {
|
528 |
load_plugin_textdomain(
|
@@ -534,8 +559,10 @@ class OptimizeDatabase {
|
|
534 |
|
535 |
|
536 |
/*******************************************************************************
|
|
|
537 |
* ARE WE ON A, FOR THIS PLUGIN, RELEVANT PAGE?
|
538 |
* Since v4.0.3
|
|
|
539 |
*******************************************************************************/
|
540 |
function odb_is_relevant_page() {
|
541 |
$this_page = '';
|
@@ -545,7 +572,9 @@ class OptimizeDatabase {
|
|
545 |
|
546 |
|
547 |
/*******************************************************************************
|
|
|
548 |
* PLUGIN DE-ACTIVATION
|
|
|
549 |
*******************************************************************************/
|
550 |
public static function odb_deactivation_handler() {
|
551 |
// STOP SCHEDULER
|
@@ -554,7 +583,9 @@ class OptimizeDatabase {
|
|
554 |
|
555 |
|
556 |
/*******************************************************************************
|
|
|
557 |
* PLUGIN UN-INSTALLATION
|
|
|
558 |
*******************************************************************************/
|
559 |
function odb_uninstallation_handler() {
|
560 |
// STOP SCHEDULER
|
@@ -574,7 +605,9 @@ class OptimizeDatabase {
|
|
574 |
|
575 |
|
576 |
/*******************************************************************************
|
|
|
577 |
* LOAD SETTINGS (OPTIONS) PAGE
|
|
|
578 |
*******************************************************************************/
|
579 |
function odb_settings_page() {
|
580 |
global $wpdb, $odb_rvg_excluded_tabs, $odb_ms_prefixes;
|
@@ -584,7 +617,9 @@ class OptimizeDatabase {
|
|
584 |
|
585 |
|
586 |
/*******************************************************************************
|
|
|
587 |
* START CLEANING / OPTIMIZATION (INITIATED BY THE USER, NOT FROM WP-CRON)
|
|
|
588 |
*******************************************************************************/
|
589 |
function odb_start_manually() {
|
590 |
$this->odb_start(false);
|
@@ -592,7 +627,9 @@ class OptimizeDatabase {
|
|
592 |
|
593 |
|
594 |
/*******************************************************************************
|
|
|
595 |
* START CLEANING / OPTIMIZATION (FROM WP-CRON)
|
|
|
596 |
*******************************************************************************/
|
597 |
function odb_start_scheduler() {
|
598 |
$this->odb_start(true);
|
@@ -600,7 +637,9 @@ class OptimizeDatabase {
|
|
600 |
|
601 |
|
602 |
/*******************************************************************************
|
|
|
603 |
* MAIN METHOD FOR CLEANING / OPTIMIZING
|
|
|
604 |
*******************************************************************************/
|
605 |
function odb_start($scheduler) {
|
606 |
global $wpdb;
|
@@ -646,13 +685,17 @@ class OptimizeDatabase {
|
|
646 |
$this->odb_displayer_obj->display_current_settings();
|
647 |
} // if(!$scheduler)
|
648 |
|
649 |
-
if ($action != '
|
|
|
|
|
|
|
|
|
650 |
/****************************************************************************************
|
651 |
* START SCREEN (SHOW SETTINGS + BUTTONS)
|
652 |
****************************************************************************************/
|
653 |
$this->odb_displayer_obj->display_start_buttons($action);
|
654 |
} else {
|
655 |
-
$analyze = ($action == '
|
656 |
/****************************************************************************************
|
657 |
* RUN CLEANING AND OPTIMIZATION
|
658 |
****************************************************************************************/
|
@@ -661,22 +704,24 @@ class OptimizeDatabase {
|
|
661 |
// REGISTER THE LAST RUN
|
662 |
$this->odb_rvg_options['last_run'] = current_time('M j, Y @ H:i', 0);
|
663 |
// DELETE REDUNDANT DATA
|
664 |
-
$this->odb_cleaner_obj->odb_run_cleaner($scheduler, $
|
665 |
|
666 |
-
if (!$
|
667 |
// OPTIMIZE DATABASE TABLES
|
668 |
-
$this->odb_cleaner_obj->odb_run_optimizer($scheduler);
|
669 |
// SHOW RESULTS
|
670 |
-
$this->odb_cleaner_obj->odb_savings($scheduler);
|
671 |
-
}
|
|
|
672 |
// SHOW 'DONE' PARAGRAPH
|
673 |
if (!$scheduler && !$analyze)
|
674 |
$this->odb_cleaner_obj->odb_done($analyze);
|
675 |
|
676 |
-
if ($analyze) {
|
677 |
-
$msg1 = __("CLICK
|
678 |
$btn1 = __('Cancel', $this->odb_txt_domain);
|
679 |
-
$btn2 = __('
|
|
|
680 |
?>
|
681 |
<div class="odb-title-bar">
|
682 |
<h2><?php _e('Analysis Done!', $this->odb_txt_domain)?></h2>
|
@@ -688,18 +733,24 @@ class OptimizeDatabase {
|
|
688 |
<br>
|
689 |
<input class="button odb-normal" type="button" name="cancel" value="<?php echo $btn1?>" onclick="self.location='tools.php?page=rvg-optimize-database'">
|
690 |
|
691 |
-
<input class="button-primary button-large" type="button" name="
|
|
|
|
|
|
|
692 |
</p>
|
693 |
</div><!-- /odb-start-buttons -->
|
694 |
-
<?php
|
695 |
} // if ($analyze)
|
696 |
|
697 |
$this->odb_rvg_options['last_run_seconds'] = $this->odb_last_run_seconds;
|
698 |
|
699 |
$this->odb_multisite_obj->odb_ms_update_option('odb_rvg_options', $this->odb_rvg_options);
|
700 |
-
} // if($action != '
|
701 |
-
|
702 |
-
|
|
|
|
|
|
|
703 |
} // odb_start()
|
704 |
} // OptimizeDatabase
|
705 |
?>
|
1 |
<?php
|
2 |
/**
|
3 |
* @package Optimize Database after Deleting Revisions
|
4 |
+
* @version 4.8.0
|
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.0
|
14 |
*/
|
15 |
|
16 |
/********************************************************************************************
|
28 |
|
29 |
class OptimizeDatabase {
|
30 |
// VERSION
|
31 |
+
var $odb_version = '4.8.0';
|
32 |
+
var $odb_release_date = '05/26/2019';
|
33 |
|
34 |
// PLUGIN OPTIONS
|
35 |
var $odb_rvg_options = array();
|
77 |
// PAGE TIMER
|
78 |
var $odb_start_time;
|
79 |
|
|
|
80 |
/*******************************************************************************
|
81 |
+
*
|
82 |
* CONSTRUCTOR
|
83 |
+
*
|
84 |
*******************************************************************************/
|
85 |
function __construct() {
|
86 |
// INITIALIZE PLUGIN
|
149 |
$this_page = '';
|
150 |
if(isset($_GET['page'])) $this_page = $_GET['page'];
|
151 |
// v4.0.3
|
152 |
+
if($this->odb_is_relevant_page()) {
|
153 |
+
wp_register_style('odb-style'.$this->odb_version, plugins_url('css/style'.$this->odb_minify.'.css', __FILE__));
|
154 |
wp_enqueue_style('odb-style'.$this->odb_version);
|
155 |
+
} // if($this->odb_is_relevant_page())
|
156 |
|
157 |
if(defined('RUN_OPTIMIZE_DATABASE') && RUN_OPTIMIZE_DATABASE == 1) $this->odb_start(true);
|
158 |
} // odb_init()
|
159 |
|
160 |
|
161 |
/*******************************************************************************
|
162 |
+
*
|
163 |
* LOAD AND INITIALIZE CLASSES
|
164 |
+
*
|
165 |
*******************************************************************************/
|
166 |
function odb_classes() {
|
167 |
// LOAD CLASSES
|
183 |
|
184 |
|
185 |
/*******************************************************************************
|
186 |
+
*
|
187 |
* INITIALIZE URLS AND DIRECTORIES
|
188 |
+
*
|
189 |
*******************************************************************************/
|
190 |
function odb_urls_dirs() {
|
191 |
$this->odb_plugin_url = plugins_url( '/', __FILE__ );
|
195 |
|
196 |
|
197 |
/*******************************************************************************
|
198 |
+
*
|
199 |
* LOAD OPTIONS
|
200 |
+
*
|
201 |
*******************************************************************************/
|
202 |
function odb_load_options() {
|
203 |
// GET OPTIONS
|
284 |
|
285 |
|
286 |
/*******************************************************************************
|
287 |
+
*
|
288 |
* COPY AND DELETE OPTIONS FROM PREVIOUS VERSIONS (BEFORE 4.0)
|
289 |
+
*
|
290 |
*******************************************************************************/
|
291 |
function odb_convert_options() {
|
292 |
global $wpdb;
|
376 |
$this->odb_multisite_obj->odb_ms_delete_option('rvg_odb_schedulehour');
|
377 |
|
378 |
// COPY EXCLUDED TABLES
|
379 |
+
for($i = 0; $i < count($this->odb_ms_prefixes); $i++) {
|
380 |
$sql = "
|
381 |
SELECT `option_name`
|
382 |
FROM ".$this->odb_ms_prefixes[$i]."options
|
390 |
$this->odb_rvg_excluded_tabs[$option_name_new] = 'Y';
|
391 |
$this->odb_multisite_obj->odb_ms_delete_option($option_name);
|
392 |
} // for($j=0; $j<count($res); $j++)
|
393 |
+
} // for($i = 0; $i < count($this->odb_ms_prefixes); $i++)
|
394 |
|
395 |
// UPDATE EXCLUDED TABLES
|
396 |
$this->odb_multisite_obj->odb_ms_update_option('odb_rvg_excluded_tabs', $this->odb_rvg_excluded_tabs);
|
398 |
|
399 |
|
400 |
/*******************************************************************************
|
401 |
+
*
|
402 |
* INITIALIZE WORDPRESS HOOKS
|
403 |
+
*
|
404 |
*******************************************************************************/
|
405 |
function odb_init_hooks() {
|
406 |
global $blog_id;
|
443 |
|
444 |
|
445 |
/*******************************************************************************
|
446 |
+
*
|
447 |
* ADD ENTRY TO THE ADMIN TOOLS MENU
|
448 |
+
*
|
449 |
*******************************************************************************/
|
450 |
function odb_admin_tools() {
|
451 |
if (function_exists('add_management_page')) {
|
460 |
|
461 |
|
462 |
/*******************************************************************************
|
463 |
+
*
|
464 |
* ADD ENTRY TO THE ADMIN SETTINGS MENU
|
465 |
+
*
|
466 |
*******************************************************************************/
|
467 |
function odb_admin_settings() {
|
468 |
if (function_exists('add_options_page'))
|
477 |
|
478 |
|
479 |
/*******************************************************************************
|
480 |
+
*
|
481 |
* ADD 'SETTINGS' LINK TO THE MAIN PLUGIN PAGE
|
482 |
+
*
|
483 |
*******************************************************************************/
|
484 |
function odb_settings_link($links) {
|
485 |
array_unshift($links, '<a href="options-general.php?page=odb_settings_page">'.__('Settings', $this->odb_txt_domain).'</a>');
|
488 |
|
489 |
|
490 |
/********************************************************************************************
|
491 |
+
*
|
492 |
* ADD THE '1 CLICK OPTIMIZE DATABASE' ITEM TO THE ADMIN BAR (IF ACTIVATED)
|
493 |
+
*
|
494 |
********************************************************************************************/
|
495 |
function odb_admin_bar() {
|
496 |
global $wp_admin_bar;
|
502 |
array(
|
503 |
'id' => 'optimize',
|
504 |
'title' => __('Optimize DB (1 click)', $this->odb_txt_domain),
|
505 |
+
'href' => $siteurl.'wp-admin/tools.php?page=rvg-optimize-database&action=run_detail' ));
|
506 |
} // odb_admin_bar()
|
507 |
|
508 |
|
509 |
/********************************************************************************************
|
510 |
+
*
|
511 |
* 'ICON MODE': ADD A LINK TO THE ADMIN MENU
|
512 |
+
*
|
513 |
********************************************************************************************/
|
514 |
function odb_admin_icon() {
|
515 |
if (function_exists('add_menu_page')) {
|
526 |
|
527 |
|
528 |
/********************************************************************************************
|
529 |
+
*
|
530 |
* 'ICON MODE': REGISTER OPTION PAGE BUT HIDE IT FROM THE ADMIN MENU
|
531 |
+
*
|
532 |
********************************************************************************************/
|
533 |
function odb_register_options() {
|
534 |
if (function_exists('add_submenu_page')) {
|
540 |
'rvg_odb_admin', // menu slug
|
541 |
array(&$this, 'odb_settings_page') // function
|
542 |
);
|
543 |
+
} // if (function_exists('add_submenu_page'))
|
544 |
} // odb_register_options()
|
545 |
|
546 |
|
547 |
/*******************************************************************************
|
548 |
+
*
|
549 |
* LOAD TEXT DOMAIN
|
550 |
+
*
|
551 |
*******************************************************************************/
|
552 |
function odb_i18n() {
|
553 |
load_plugin_textdomain(
|
559 |
|
560 |
|
561 |
/*******************************************************************************
|
562 |
+
*
|
563 |
* ARE WE ON A, FOR THIS PLUGIN, RELEVANT PAGE?
|
564 |
* Since v4.0.3
|
565 |
+
*
|
566 |
*******************************************************************************/
|
567 |
function odb_is_relevant_page() {
|
568 |
$this_page = '';
|
572 |
|
573 |
|
574 |
/*******************************************************************************
|
575 |
+
*
|
576 |
* PLUGIN DE-ACTIVATION
|
577 |
+
*
|
578 |
*******************************************************************************/
|
579 |
public static function odb_deactivation_handler() {
|
580 |
// STOP SCHEDULER
|
583 |
|
584 |
|
585 |
/*******************************************************************************
|
586 |
+
*
|
587 |
* PLUGIN UN-INSTALLATION
|
588 |
+
*
|
589 |
*******************************************************************************/
|
590 |
function odb_uninstallation_handler() {
|
591 |
// STOP SCHEDULER
|
605 |
|
606 |
|
607 |
/*******************************************************************************
|
608 |
+
*
|
609 |
* LOAD SETTINGS (OPTIONS) PAGE
|
610 |
+
*
|
611 |
*******************************************************************************/
|
612 |
function odb_settings_page() {
|
613 |
global $wpdb, $odb_rvg_excluded_tabs, $odb_ms_prefixes;
|
617 |
|
618 |
|
619 |
/*******************************************************************************
|
620 |
+
*
|
621 |
* START CLEANING / OPTIMIZATION (INITIATED BY THE USER, NOT FROM WP-CRON)
|
622 |
+
*
|
623 |
*******************************************************************************/
|
624 |
function odb_start_manually() {
|
625 |
$this->odb_start(false);
|
627 |
|
628 |
|
629 |
/*******************************************************************************
|
630 |
+
*
|
631 |
* START CLEANING / OPTIMIZATION (FROM WP-CRON)
|
632 |
+
*
|
633 |
*******************************************************************************/
|
634 |
function odb_start_scheduler() {
|
635 |
$this->odb_start(true);
|
637 |
|
638 |
|
639 |
/*******************************************************************************
|
640 |
+
*
|
641 |
* MAIN METHOD FOR CLEANING / OPTIMIZING
|
642 |
+
*
|
643 |
*******************************************************************************/
|
644 |
function odb_start($scheduler) {
|
645 |
global $wpdb;
|
685 |
$this->odb_displayer_obj->display_current_settings();
|
686 |
} // if(!$scheduler)
|
687 |
|
688 |
+
if ($action != 'analyze_summary' &&
|
689 |
+
$action != 'analyze_detail' &&
|
690 |
+
$action != 'run_summary' &&
|
691 |
+
$action != 'run_detail' &&
|
692 |
+
!$scheduler) {
|
693 |
/****************************************************************************************
|
694 |
* START SCREEN (SHOW SETTINGS + BUTTONS)
|
695 |
****************************************************************************************/
|
696 |
$this->odb_displayer_obj->display_start_buttons($action);
|
697 |
} else {
|
698 |
+
$analyze = ($action == 'analyze_summary' || $action == 'analyze_detail');
|
699 |
/****************************************************************************************
|
700 |
* RUN CLEANING AND OPTIMIZATION
|
701 |
****************************************************************************************/
|
704 |
// REGISTER THE LAST RUN
|
705 |
$this->odb_rvg_options['last_run'] = current_time('M j, Y @ H:i', 0);
|
706 |
// DELETE REDUNDANT DATA
|
707 |
+
$this->odb_cleaner_obj->odb_run_cleaner($scheduler, $action);
|
708 |
|
709 |
+
if (!$scheduler && ($action == 'run_summary' || $action == 'run_detail')) {
|
710 |
// OPTIMIZE DATABASE TABLES
|
711 |
+
$this->odb_cleaner_obj->odb_run_optimizer($scheduler, $action);
|
712 |
// SHOW RESULTS
|
713 |
+
$this->odb_cleaner_obj->odb_savings($scheduler, $action);
|
714 |
+
} // if (!$analyze)
|
715 |
+
|
716 |
// SHOW 'DONE' PARAGRAPH
|
717 |
if (!$scheduler && !$analyze)
|
718 |
$this->odb_cleaner_obj->odb_done($analyze);
|
719 |
|
720 |
+
if ($analyze && $this->odb_cleaner_obj->grand_total > 0) {
|
721 |
+
$msg1 = __("CLICK ONE OF THE 'OPTIMIZE' BUTTONS TO ACTUALLY DELETE THE FOUND ITEMS", $this->odb_txt_domain);
|
722 |
$btn1 = __('Cancel', $this->odb_txt_domain);
|
723 |
+
$btn2 = __('Optimize (summary)', $this->odb_txt_domain);
|
724 |
+
$btn3 = __('Optimize (detail)', $this->odb_txt_domain);
|
725 |
?>
|
726 |
<div class="odb-title-bar">
|
727 |
<h2><?php _e('Analysis Done!', $this->odb_txt_domain)?></h2>
|
733 |
<br>
|
734 |
<input class="button odb-normal" type="button" name="cancel" value="<?php echo $btn1?>" onclick="self.location='tools.php?page=rvg-optimize-database'">
|
735 |
|
736 |
+
<input class="button-primary button-large" type="button" name="optimize_summary" value="<?php echo $btn2?>" onclick="self.location='tools.php?page=rvg-optimize-database&action=run_summary'" class="odb-bold">
|
737 |
+
|
738 |
+
<input class="button-primary button-large" type="button" name="optimize_detail" value="<?php echo $btn3?>" onclick="self.location='tools.php?page=rvg-optimize-database&action=run_detail'" class="odb-bold">
|
739 |
+
|
740 |
</p>
|
741 |
</div><!-- /odb-start-buttons -->
|
742 |
+
<?php
|
743 |
} // if ($analyze)
|
744 |
|
745 |
$this->odb_rvg_options['last_run_seconds'] = $this->odb_last_run_seconds;
|
746 |
|
747 |
$this->odb_multisite_obj->odb_ms_update_option('odb_rvg_options', $this->odb_rvg_options);
|
748 |
+
} // if ($action != 'analyze_summary' && ...
|
749 |
+
|
750 |
+
if(!defined('RUN_OPTIMIZE_DATABASE')) {
|
751 |
+
// v4.8.0: DONE: HIDE RUNNING INDICATOR
|
752 |
+
echo "<script>jQuery('#odb-running').hide();</script>";
|
753 |
+
} // if(!defined('RUN_OPTIMIZE_DATABASE'))
|
754 |
} // odb_start()
|
755 |
} // OptimizeDatabase
|
756 |
?>
|