Optimize Database after Deleting Revisions - Version 4.1

Version Description

[01/14/2016] = * NEW: New option: delete revisions older than... * NEW: Persian translation (fa_IR) added * CHANGE: For muliti-site installations you only can use the plugin on the Main site, but all other sites will be cleaned too. * CHANGE: Some minor updates / changes

Download this release

Release Info

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

Code changes from version 4.0.3 to 4.1

classes/odb-cleaner.php CHANGED
@@ -531,28 +531,55 @@ class ODB_Cleaner
531
 
532
  $res_arr = array();
533
 
534
- $max_revisions = $odb_class->odb_rvg_options['nr_of_revisions'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
535
 
536
- $index = 0;
537
- for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
538
- { $sql = "
539
- SELECT `post_parent`, `post_title`, COUNT(*) cnt
540
- FROM ".$odb_class->odb_ms_prefixes[$i]."posts
541
- WHERE `post_type` = 'revision'
542
- GROUP BY `post_parent`
543
- HAVING COUNT(*) > ".$max_revisions."
544
- ORDER BY UCASE(`post_title`)
545
- ";
546
- $res = $wpdb->get_results($sql, ARRAY_A);
547
-
548
- for($j=0; $j<count($res); $j++)
549
- { if(isset($res[$j]))
550
- { $res_arr[$index] = $res[$j];
551
- $res_arr[$index]['site'] = $odb_class->odb_ms_prefixes[$i];
552
- $index++;
 
 
 
 
 
 
 
 
 
 
 
 
 
553
  }
554
  }
555
- }
556
 
557
  return $res_arr;
558
 
@@ -565,57 +592,93 @@ class ODB_Cleaner
565
  function odb_delete_revisions($results, $scheduler)
566
  {
567
  global $odb_class, $wpdb;
568
-
569
- $max_revisions = $odb_class->odb_rvg_options['nr_of_revisions'];
570
-
571
- $nr = 1;
572
  $total_deleted = 0;
 
 
 
 
 
 
573
 
574
- for($i=0; $i<count($results); $i++)
575
- { $nr_to_delete = $results[$i]['cnt'] - $max_revisions;
576
- $total_deleted += $nr_to_delete;
 
 
 
 
 
 
 
 
 
 
577
 
578
- if (!$scheduler)
579
- {
580
- ?>
581
- <tr>
582
- <td align="right" valign="top"><?php echo $nr?>.</td>
583
- <td align="left" valign="top"><?php echo $results[$i]['site']?></td>
584
- <td valign="top" class="odb-bold"><?php echo $results[$i]['post_title']?></td>
585
- <td valign="top"><?php
586
- } // if (!$scheduler)
587
-
588
- $sql_get_posts = "
589
- SELECT `ID`, `post_modified`
590
- FROM ".$results[$i]['site']."posts
591
- WHERE `post_parent`=".$results[$i]['post_parent']."
592
- AND `post_type`='revision'
593
- ORDER BY `post_modified` ASC
594
- ";
595
-
596
- $results_get_posts = $wpdb->get_results($sql_get_posts);
597
-
598
- for($j=0; $j<$nr_to_delete; $j++)
599
- {
600
- if(!$scheduler) echo $results_get_posts[$j]->post_modified.'<br />';
601
 
602
- $sql_delete = "
603
- DELETE FROM ".$results[$i]['site']."posts
604
- WHERE `ID` = ".$results_get_posts[$j]->ID."
605
- ";
606
- $wpdb->get_results($sql_delete);
 
 
 
 
 
 
607
 
608
- } // for($j=0; $j<$nr_to_delete; $j++)
 
 
 
 
 
 
 
 
 
 
 
 
 
609
 
610
- $nr++;
611
- if(!$scheduler)
612
  {
613
- ?></td>
614
- <td align="right" valign="top" class="odb-bold"><?php echo $nr_to_delete?></td>
615
- </tr>
616
- <?php
617
- } // if(!$scheduler)
618
- } // for($i=0; $i<count($results); $i++)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
619
 
620
  return $total_deleted;
621
  } // odb_delete_revisions()
@@ -634,16 +697,16 @@ class ODB_Cleaner
634
  // LOOP TROUGH SITES
635
  for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
636
  {
637
- $sql = "
638
  SELECT `ID` AS id, 'post' AS post_type, `post_title` AS title, `post_modified` AS modified
639
- FROM ".$odb_class->odb_ms_prefixes[$i]."posts
640
  WHERE `post_status` = 'trash'
641
  UNION ALL
642
  SELECT `comment_ID` AS id, 'comment' AS post_type, `comment_author_IP` AS title, `comment_date` AS modified
643
- FROM ".$odb_class->odb_ms_prefixes[$i]."comments
644
  WHERE `comment_approved` = 'trash'
645
  ORDER BY post_type, UCASE(title)
646
- ";
647
  $res = $wpdb->get_results($sql, ARRAY_A);
648
 
649
  if($res != null)
@@ -683,25 +746,25 @@ class ODB_Cleaner
683
 
684
  if($results[$i]['post_type'] == 'comment')
685
  { // DELETE META DATA (IF ANY...)
686
- $sql_delete = "
687
- DELETE FROM ".$results[$i]['site']."commentmeta
688
- WHERE `comment_id` = ".$results[$i]['id']."
689
- ";
690
  $wpdb->get_results($sql_delete);
691
  }
692
 
693
  // DELETE TRASHED POSTS / PAGES
694
- $sql_delete = "
695
- DELETE FROM ".$results[$i]['site']."posts
696
  WHERE `post_status` = 'trash'
697
- ";
698
  $wpdb->get_results($sql_delete);
699
 
700
  // DELETE TRASHED COMMENTS
701
- $sql_delete = "
702
- DELETE FROM ".$results[$i]['site']."comments
703
  WHERE `comment_approved` = 'trash'
704
- ";
705
  $wpdb->get_results($sql_delete);
706
 
707
  $nr++;
@@ -724,12 +787,12 @@ class ODB_Cleaner
724
  // LOOP THROUGH SITES
725
  for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
726
  {
727
- $sql = "
728
  SELECT `comment_ID`, `comment_author`, `comment_author_email`, `comment_date`
729
- FROM ".$odb_class->odb_ms_prefixes[$i]."comments
730
  WHERE `comment_approved` = 'spam'
731
  ORDER BY UCASE(`comment_author`)
732
- ";
733
  $res = $wpdb->get_results($sql, ARRAY_A);
734
 
735
  if($res != null)
@@ -767,16 +830,16 @@ class ODB_Cleaner
767
  <?php
768
  } // if (!$scheduler)
769
 
770
- $sql_delete = "
771
- DELETE FROM ".$results[$i]['site']."commentmeta
772
- WHERE `comment_id` = ".$results[$i]['comment_ID']."
773
- ";
774
  $wpdb->get_results($sql_delete);
775
 
776
- $sql_delete = "
777
- DELETE FROM ".$results[$i]['site']."comments
778
  WHERE `comment_approved` = 'spam'
779
- ";
780
  $wpdb->get_results($sql_delete);
781
 
782
  $nr++;
@@ -799,16 +862,16 @@ class ODB_Cleaner
799
  // LOOP THROUGH THE NETWORK
800
  for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
801
  {
802
- $sql = "
803
  SELECT a.term_id AS term_id, a.name AS name
804
- FROM `".$odb_class->odb_ms_prefixes[$i]."terms` a, `".$odb_class->odb_ms_prefixes[$i]."term_taxonomy` b
805
  WHERE a.term_id = b.term_id
806
  AND b.taxonomy = 'post_tag'
807
  AND b.term_taxonomy_id NOT IN (
808
  SELECT term_taxonomy_id
809
- FROM ".$odb_class->odb_ms_prefixes[$i]."term_relationships
810
  )
811
- ";
812
 
813
  $res = $wpdb->get_results($sql);
814
  for($j=0; $j<count($res); $j++)
@@ -816,20 +879,20 @@ class ODB_Cleaner
816
  { // TAG NOT USED IN SCHEDULED POSTS: CAN BE DELETED
817
  $total_deleted++;
818
 
819
- $sql_del = "
820
- DELETE FROM ".$odb_class->odb_ms_prefixes[$i]."term_taxonomy
821
- WHERE term_id = ".$res[$j]->term_id."
822
- ";
823
  $wpdb->get_results($sql_del);
824
 
825
- $sql_del = "
826
- DELETE FROM ".$odb_class->odb_ms_prefixes[$i]."terms
827
- WHERE term_id = ".$res[$j]->term_id."
828
- ";
829
  $wpdb->get_results($sql_del);
830
  }
831
  } // for($j=0; $j<count($res); $j++)
832
- } // for($i=0; $i<count($odb_class->odb_ms_blogids); $i++)
833
 
834
  return $total_deleted;
835
  } // odb_delete_tags()
@@ -842,12 +905,12 @@ class ODB_Cleaner
842
  {
843
  global $wpdb;
844
 
845
- $sql_get_posts = "
846
  SELECT p.post_status
847
- FROM ".$odb_prefix."term_relationships t, ".$odb_prefix."posts p
848
- WHERE t.term_taxonomy_id = '".$term_id."'
849
  AND t.object_id = p.ID
850
- ";
851
 
852
  $results_get_posts = $wpdb->get_results($sql_get_posts);
853
  for($i=0; $i<count($results_get_posts); $i++)
@@ -880,7 +943,7 @@ class ODB_Cleaner
880
  option_name LIKE '_transient_timeout_%'
881
  OR option_name LIKE '_site_transient_timeout_%'
882
  )
883
- AND option_value < '$delay'
884
  ";
885
 
886
  $results = $wpdb->get_results($sql);
@@ -920,35 +983,35 @@ class ODB_Cleaner
920
  // LOOP THROUGH THE NETWORK
921
  for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
922
  {
923
- $sql = "
924
  SELECT `comment_ID`
925
- FROM ".$odb_class->odb_ms_prefixes[$i]."comments
926
  WHERE (
927
  `comment_type` = 'pingback'
928
  OR `comment_type` = 'trackback'
929
  )
930
- ";
931
 
932
  $results = $wpdb->get_results($sql);
933
  $total_deleted = count($results);
934
 
935
  for($j=0; $j<count($results); $j++)
936
  { // DELETE METADATA FOR THIS COMMENT (IF ANY)
937
- $sql_delete_meta = "
938
- DELETE FROM ".$odb_class->odb_ms_prefixes[$i]."commentmeta
939
- WHERE `comment_id` = ".$results[$j]->comment_ID."
940
- ";
941
  $wpdb->get_results($sql_delete_meta);
942
  }
943
 
944
  // DELETE COMMENTS
945
- $sql_delete_comments = "
946
- DELETE FROM ".$odb_class->odb_ms_prefixes[$i]."comments
947
  WHERE (
948
  `comment_type` = 'pingback'
949
  OR `comment_type` = 'trackback'
950
  )
951
- ";
952
  $wpdb->get_results($sql_delete_comments);
953
  } // for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
954
 
@@ -970,45 +1033,45 @@ class ODB_Cleaner
970
  for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
971
  {
972
  // DELETE POST ORPHANS (AUTO DRAFTS)
973
- $sql_delete = "
974
  SELECT COUNT(*) cnt
975
- FROM ".$odb_class->odb_ms_prefixes[$i]."posts
976
- WHERE ID NOT IN (SELECT post_id FROM ".$odb_class->odb_ms_prefixes[$i]."postmeta)
977
  AND post_status = 'auto-draft'
978
- ";
979
 
980
  $results = $wpdb->get_results($sql_delete);
981
 
982
  $post_orphans = $results[0]->cnt;
983
 
984
  if($post_orphans > 0)
985
- { $sql_delete = "
986
- DELETE FROM ".$odb_class->odb_ms_prefixes[$i]."posts
987
- WHERE ID NOT IN (SELECT post_id FROM ".$odb_class->odb_ms_prefixes[$i]."postmeta)
988
  AND post_status = 'auto-draft'
989
- ";
990
  $wpdb->get_results($sql_delete);
991
  }
992
 
993
  // DELETE POSTMETA ORPHANS
994
- $sql_delete = "
995
  SELECT COUNT(*) cnt
996
- FROM ".$odb_class->odb_ms_prefixes[$i]."postmeta
997
- WHERE post_id NOT IN (SELECT ID FROM ".$odb_class->odb_ms_prefixes[$i]."posts)
998
- ";
999
 
1000
  $results = $wpdb->get_results($sql_delete);
1001
 
1002
  $meta_orphans = $results[0]->cnt;
1003
 
1004
  if($meta_orphans > 0)
1005
- { $sql_delete = "
1006
- DELETE FROM ".$odb_class->odb_ms_prefixes[$i]."postmeta
1007
- WHERE post_id NOT IN (SELECT ID FROM ".$odb_class->odb_ms_prefixes[$i]."posts)
1008
- ";
1009
  $wpdb->get_results($sql_delete);
1010
  }
1011
- }
1012
 
1013
  return ($meta_orphans + $post_orphans);
1014
  } // odb_delete_orphans()
@@ -1028,12 +1091,12 @@ class ODB_Cleaner
1028
  { # TABLE NOT EXCLUDED
1029
  $cnt++;
1030
 
1031
- $sql = "
1032
  SELECT engine, (data_length + index_length) AS size, table_rows
1033
  FROM information_schema.TABLES
1034
- WHERE table_schema = '".DB_NAME."'
1035
- AND table_name = '".$odb_class->odb_tables[$i][0]."'
1036
- ";
1037
  $table_info = $wpdb->get_results($sql);
1038
 
1039
  if($odb_class->odb_rvg_options["optimize_innodb"] == 'N' && strtolower($table_info[0]->engine) == 'innodb')
@@ -1044,10 +1107,9 @@ class ODB_Cleaner
1044
  { $query = "OPTIMIZE TABLE ".$odb_class->odb_tables[$i][0];
1045
  $result = $wpdb->get_results($query);
1046
  $msg = $result[0]->Msg_text;
1047
- $msg = str_replace('OK', __('<span class="odb-optimized">TABLE OPTIMIZED</span>', 'rvg-optimize-database'), $msg);
1048
- $msg = str_replace('Table is already up to date', __('Table is already up to date', 'rvg-optimize-database'), $msg);
1049
- $msg = str_replace('Table does not support optimize, doing recreate + analyze instead', __('<span class="odb-optimized">TABLE OPTIMIZED</span>', 'rvg-optimize-database'), $msg);
1050
-
1051
  }
1052
 
1053
  if (!$scheduler)
531
 
532
  $res_arr = array();
533
 
534
+ if($odb_class->odb_rvg_options['revision_mode'] == 1)
535
+ { // MAX NUMBER OF REVISIONS TO KEEP
536
+ $max_revisions = $odb_class->odb_rvg_options['nr_of_revisions'];
537
+
538
+ $index = 0;
539
+ for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
540
+ { $sql = sprintf ("
541
+ SELECT `post_parent`, `post_title`, COUNT(*) cnt
542
+ FROM %sposts
543
+ WHERE `post_type` = 'revision'
544
+ GROUP BY `post_parent`
545
+ HAVING COUNT(*) > %d
546
+ ORDER BY UCASE(`post_title`)
547
+ ", $odb_class->odb_ms_prefixes[$i], $max_revisions);
548
+ $res = $wpdb->get_results($sql, ARRAY_A);
549
 
550
+ for($j=0; $j<count($res); $j++)
551
+ { if(isset($res[$j]))
552
+ { $res_arr[$index] = $res[$j];
553
+ $res_arr[$index]['site'] = $odb_class->odb_ms_prefixes[$i];
554
+ $index++;
555
+ }
556
+ } // for($j=0; $j<count($res); $j++)
557
+ } // for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
558
+ }
559
+ else
560
+ { // DELETE REVISIONS OLDER THAN x DAYS
561
+ $older_than = $odb_class->odb_rvg_options['older_than'];
562
+
563
+ $index = 0;
564
+ for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
565
+ { $sql = sprintf("
566
+ SELECT `ID`, `post_parent`, `post_title`, `post_modified`
567
+ FROM %sposts
568
+ WHERE `post_type` = 'revision'
569
+ AND `post_modified` < date_sub(now(), INTERVAL %d DAY)
570
+ ORDER BY UCASE(`post_title`)
571
+ ", $odb_class->odb_ms_prefixes[$i], $older_than);
572
+ $res = $wpdb->get_results($sql, ARRAY_A);
573
+
574
+ for($j=0; $j<count($res); $j++)
575
+ { if(isset($res[$j]))
576
+ { $res_arr[$index] = $res[$j];
577
+ $res_arr[$index]['site'] = $odb_class->odb_ms_prefixes[$i];
578
+ $index++;
579
+ }
580
  }
581
  }
582
+ } // if($odb_class->odb_rvg_options['revision_mode'] == 1)
583
 
584
  return $res_arr;
585
 
592
  function odb_delete_revisions($results, $scheduler)
593
  {
594
  global $odb_class, $wpdb;
595
+
 
 
 
596
  $total_deleted = 0;
597
+ $nr = 1;
598
+
599
+ if($odb_class->odb_rvg_options['revision_mode'] == 1)
600
+ {
601
+ // KEEP A MAX NUMBER OF REVISIONS
602
+ $max_revisions = $odb_class->odb_rvg_options['nr_of_revisions'];
603
 
604
+ for($i=0; $i<count($results); $i++)
605
+ { $nr_to_delete = $results[$i]['cnt'] - $max_revisions;
606
+ $total_deleted += $nr_to_delete;
607
+
608
+ if (!$scheduler)
609
+ {
610
+ ?>
611
+ <tr>
612
+ <td align="right" valign="top"><?php echo $nr?>.</td>
613
+ <td align="left" valign="top"><?php echo $results[$i]['site']?></td>
614
+ <td valign="top" class="odb-bold"><?php echo $results[$i]['post_title']?></td>
615
+ <td valign="top"><?php
616
+ } // if (!$scheduler)
617
 
618
+ $sql_get_posts = sprintf( "
619
+ SELECT `ID`, `post_modified`
620
+ FROM %sposts
621
+ WHERE `post_parent`=%d
622
+ AND `post_type`='revision'
623
+ ORDER BY `post_modified` ASC
624
+ ", $results[$i]['site'], $results[$i]['post_parent']);
625
+ $results_get_posts = $wpdb->get_results($sql_get_posts);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
626
 
627
+ for($j=0; $j<$nr_to_delete; $j++)
628
+ {
629
+ if(!$scheduler) echo $results_get_posts[$j]->post_modified.'<br />';
630
+
631
+ $sql_delete = sprintf ("
632
+ DELETE FROM %sposts
633
+ WHERE `ID` = %d
634
+ ", $results[$i]['site'], $results_get_posts[$j]->ID);
635
+ $wpdb->get_results($sql_delete);
636
+
637
+ } // for($j=0; $j<$nr_to_delete; $j++)
638
 
639
+ $nr++;
640
+ if(!$scheduler)
641
+ {
642
+ ?></td>
643
+ <td align="right" valign="top" class="odb-bold"><?php echo $nr_to_delete?></td>
644
+ </tr>
645
+ <?php
646
+ } // if(!$scheduler)
647
+ } // for($i=0; $i<count($results); $i++)
648
+ }
649
+ else
650
+ { // DELETE REVISIONS OLDER THAN x DAYS
651
+ $older_than = $odb_class->odb_rvg_options['older_than'];
652
+ $total_deleted = count($results);
653
 
654
+ for($i=0; $i<count($results); $i++)
 
655
  {
656
+ if (!$scheduler)
657
+ {
658
+ ?>
659
+ <tr>
660
+ <td align="right" valign="top"><?php echo $nr?> <?php echo $results[$i]['ID']?>.</td>
661
+ <td align="left" valign="top"><?php echo $results[$i]['site']?></td>
662
+ <td valign="top" class="odb-bold"><?php echo $results[$i]['post_title']?></td>
663
+ <td valign="top" valign="top"><?php echo $results[$i]['post_modified']?></td><?php
664
+ } // if (!$scheduler)
665
+
666
+ $sql_delete = sprintf ("
667
+ DELETE FROM %sposts
668
+ WHERE `ID` = %d
669
+ ", $results[$i]['site'], $results[$i]['ID']);
670
+ $wpdb->get_results($sql_delete);
671
+
672
+ $nr++;
673
+ if(!$scheduler)
674
+ {
675
+ ?>
676
+ <td align="right" valign="top" class="odb-bold">1</td>
677
+ </tr>
678
+ <?php
679
+ } // if(!$scheduler)
680
+ } // for($i=0; $i<count($results); $i++)
681
+ } // if($odb_class->odb_rvg_options['revision_mode'] == 1)
682
 
683
  return $total_deleted;
684
  } // odb_delete_revisions()
697
  // LOOP TROUGH SITES
698
  for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
699
  {
700
+ $sql = sprintf ("
701
  SELECT `ID` AS id, 'post' AS post_type, `post_title` AS title, `post_modified` AS modified
702
+ FROM %sposts
703
  WHERE `post_status` = 'trash'
704
  UNION ALL
705
  SELECT `comment_ID` AS id, 'comment' AS post_type, `comment_author_IP` AS title, `comment_date` AS modified
706
+ FROM %scomments
707
  WHERE `comment_approved` = 'trash'
708
  ORDER BY post_type, UCASE(title)
709
+ ", $odb_class->odb_ms_prefixes[$i], $odb_class->odb_ms_prefixes[$i]);
710
  $res = $wpdb->get_results($sql, ARRAY_A);
711
 
712
  if($res != null)
746
 
747
  if($results[$i]['post_type'] == 'comment')
748
  { // DELETE META DATA (IF ANY...)
749
+ $sql_delete = sprintf ("
750
+ DELETE FROM %scommentmeta
751
+ WHERE `comment_id` = %d
752
+ ", $results[$i]['site'], $results[$i]['id']);
753
  $wpdb->get_results($sql_delete);
754
  }
755
 
756
  // DELETE TRASHED POSTS / PAGES
757
+ $sql_delete = sprintf ("
758
+ DELETE FROM %sposts
759
  WHERE `post_status` = 'trash'
760
+ ", $results[$i]['site']);
761
  $wpdb->get_results($sql_delete);
762
 
763
  // DELETE TRASHED COMMENTS
764
+ $sql_delete = sprintf ("
765
+ DELETE FROM %scomments
766
  WHERE `comment_approved` = 'trash'
767
+ ", $results[$i]['site']);
768
  $wpdb->get_results($sql_delete);
769
 
770
  $nr++;
787
  // LOOP THROUGH SITES
788
  for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
789
  {
790
+ $sql = sprintf ("
791
  SELECT `comment_ID`, `comment_author`, `comment_author_email`, `comment_date`
792
+ FROM %scomments
793
  WHERE `comment_approved` = 'spam'
794
  ORDER BY UCASE(`comment_author`)
795
+ ", $odb_class->odb_ms_prefixes[$i]);
796
  $res = $wpdb->get_results($sql, ARRAY_A);
797
 
798
  if($res != null)
830
  <?php
831
  } // if (!$scheduler)
832
 
833
+ $sql_delete = sprintf ("
834
+ DELETE FROM %scommentmeta
835
+ WHERE `comment_id` = %d
836
+ ", $results[$i]['site'], $results[$i]['comment_ID']);
837
  $wpdb->get_results($sql_delete);
838
 
839
+ $sql_delete = sprintf ("
840
+ DELETE FROM %scomments
841
  WHERE `comment_approved` = 'spam'
842
+ ", $results[$i]['site']);
843
  $wpdb->get_results($sql_delete);
844
 
845
  $nr++;
862
  // LOOP THROUGH THE NETWORK
863
  for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
864
  {
865
+ $sql = sprintf ("
866
  SELECT a.term_id AS term_id, a.name AS name
867
+ FROM `%sterms` a, `%sterm_taxonomy` b
868
  WHERE a.term_id = b.term_id
869
  AND b.taxonomy = 'post_tag'
870
  AND b.term_taxonomy_id NOT IN (
871
  SELECT term_taxonomy_id
872
+ FROM %sterm_relationships
873
  )
874
+ ", $odb_class->odb_ms_prefixes[$i], $odb_class->odb_ms_prefixes[$i], $odb_class->odb_ms_prefixes[$i]);
875
 
876
  $res = $wpdb->get_results($sql);
877
  for($j=0; $j<count($res); $j++)
879
  { // TAG NOT USED IN SCHEDULED POSTS: CAN BE DELETED
880
  $total_deleted++;
881
 
882
+ $sql_del = sprintf ("
883
+ DELETE FROM %sterm_taxonomy
884
+ WHERE term_id = %d
885
+ ", $odb_class->odb_ms_prefixes[$i], $res[$j]->term_id);
886
  $wpdb->get_results($sql_del);
887
 
888
+ $sql_del = sprintf ("
889
+ DELETE FROM %sterms
890
+ WHERE term_id = %d
891
+ ", $odb_class->odb_ms_prefixes[$i], $res[$j]->term_id);
892
  $wpdb->get_results($sql_del);
893
  }
894
  } // for($j=0; $j<count($res); $j++)
895
+ } // for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
896
 
897
  return $total_deleted;
898
  } // odb_delete_tags()
905
  {
906
  global $wpdb;
907
 
908
+ $sql_get_posts = sprintf ("
909
  SELECT p.post_status
910
+ FROM %sterm_relationships t, %sposts p
911
+ WHERE t.term_taxonomy_id = '%s'
912
  AND t.object_id = p.ID
913
+ ", $odb_prefix, $odb_prefix, $term_id);
914
 
915
  $results_get_posts = $wpdb->get_results($sql_get_posts);
916
  for($i=0; $i<count($results_get_posts); $i++)
943
  option_name LIKE '_transient_timeout_%'
944
  OR option_name LIKE '_site_transient_timeout_%'
945
  )
946
+ AND option_value < '".$delay."'
947
  ";
948
 
949
  $results = $wpdb->get_results($sql);
983
  // LOOP THROUGH THE NETWORK
984
  for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
985
  {
986
+ $sql = sprintf ("
987
  SELECT `comment_ID`
988
+ FROM %scomments
989
  WHERE (
990
  `comment_type` = 'pingback'
991
  OR `comment_type` = 'trackback'
992
  )
993
+ ", $odb_class->odb_ms_prefixes[$i]);
994
 
995
  $results = $wpdb->get_results($sql);
996
  $total_deleted = count($results);
997
 
998
  for($j=0; $j<count($results); $j++)
999
  { // DELETE METADATA FOR THIS COMMENT (IF ANY)
1000
+ $sql_delete_meta = sprintf ("
1001
+ DELETE FROM %scommentmeta
1002
+ WHERE `comment_id` = %d
1003
+ ", $odb_class->odb_ms_prefixes[$i], $results[$j]->comment_ID);
1004
  $wpdb->get_results($sql_delete_meta);
1005
  }
1006
 
1007
  // DELETE COMMENTS
1008
+ $sql_delete_comments = sprintf ("
1009
+ DELETE FROM %scomments
1010
  WHERE (
1011
  `comment_type` = 'pingback'
1012
  OR `comment_type` = 'trackback'
1013
  )
1014
+ ", $odb_class->odb_ms_prefixes[$i]);
1015
  $wpdb->get_results($sql_delete_comments);
1016
  } // for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
1017
 
1033
  for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
1034
  {
1035
  // DELETE POST ORPHANS (AUTO DRAFTS)
1036
+ $sql_delete = sprintf ("
1037
  SELECT COUNT(*) cnt
1038
+ FROM %sposts
1039
+ WHERE ID NOT IN (SELECT post_id FROM %spostmeta)
1040
  AND post_status = 'auto-draft'
1041
+ ", $odb_class->odb_ms_prefixes[$i], $odb_class->odb_ms_prefixes[$i]);
1042
 
1043
  $results = $wpdb->get_results($sql_delete);
1044
 
1045
  $post_orphans = $results[0]->cnt;
1046
 
1047
  if($post_orphans > 0)
1048
+ { $sql_delete = sprintf ("
1049
+ DELETE FROM %sposts
1050
+ WHERE ID NOT IN (SELECT post_id FROM %spostmeta)
1051
  AND post_status = 'auto-draft'
1052
+ ", $odb_class->odb_ms_prefixes[$i], $odb_class->odb_ms_prefixes[$i]);
1053
  $wpdb->get_results($sql_delete);
1054
  }
1055
 
1056
  // DELETE POSTMETA ORPHANS
1057
+ $sql_delete = sprintf ("
1058
  SELECT COUNT(*) cnt
1059
+ FROM %spostmeta
1060
+ WHERE post_id NOT IN (SELECT ID FROM %sposts)
1061
+ ", $odb_class->odb_ms_prefixes[$i], $odb_class->odb_ms_prefixes[$i]);
1062
 
1063
  $results = $wpdb->get_results($sql_delete);
1064
 
1065
  $meta_orphans = $results[0]->cnt;
1066
 
1067
  if($meta_orphans > 0)
1068
+ { $sql_delete = sprintf ("
1069
+ DELETE FROM %spostmeta
1070
+ WHERE post_id NOT IN (SELECT ID FROM %sposts)
1071
+ ", $odb_class->odb_ms_prefixes[$i], $odb_class->odb_ms_prefixes[$i]);
1072
  $wpdb->get_results($sql_delete);
1073
  }
1074
+ } // for($i=0; $i<count($odb_class->odb_ms_prefixes); $i++)
1075
 
1076
  return ($meta_orphans + $post_orphans);
1077
  } // odb_delete_orphans()
1091
  { # TABLE NOT EXCLUDED
1092
  $cnt++;
1093
 
1094
+ $sql = sprintf ("
1095
  SELECT engine, (data_length + index_length) AS size, table_rows
1096
  FROM information_schema.TABLES
1097
+ WHERE table_schema = '%s'
1098
+ AND table_name = '%s'
1099
+ ", DB_NAME, $odb_class->odb_tables[$i][0]);
1100
  $table_info = $wpdb->get_results($sql);
1101
 
1102
  if($odb_class->odb_rvg_options["optimize_innodb"] == 'N' && strtolower($table_info[0]->engine) == 'innodb')
1107
  { $query = "OPTIMIZE TABLE ".$odb_class->odb_tables[$i][0];
1108
  $result = $wpdb->get_results($query);
1109
  $msg = $result[0]->Msg_text;
1110
+ $msg = str_replace('OK', __('<span class="odb-optimized">TABLE OPTIMIZED</span>', 'rvg-optimize-database'), $msg);
1111
+ $msg = str_replace('Table is already up to date', __('Table is already up to date', 'rvg-optimize-database'), $msg);
1112
+ $msg = str_replace('Table does not support optimize, doing recreate + analyze instead', __('<span class="odb-optimized">TABLE OPTIMIZED</span>', 'rvg-optimize-database'), $msg);
 
1113
  }
1114
 
1115
  if (!$scheduler)
classes/odb-displayer.php CHANGED
@@ -55,7 +55,16 @@ class ODB_Displayer
55
  <h2>'.__('Current settings',$odb_class->odb_txt_domain).'</h2>
56
  </div>
57
  <br><br>
58
- <span class="odb-bold">'.__('Maximum number of - most recent - revisions to keep per post / page', $odb_class->odb_txt_domain).':</span> <span class="odb-bold odb-blue">'.$odb_class->odb_rvg_options['nr_of_revisions'].'</span><br />
 
 
 
 
 
 
 
 
 
59
  <span class="odb-bold">'.__('Delete trashed items', $odb_class->odb_txt_domain).':</span> <span class="odb-bold odb-blue">'.$trash.'</span><br />
60
  <span class="odb-bold">'.__('Delete spammed items', $odb_class->odb_txt_domain).':</span> <span class="odb-bold odb-blue">'.$spam.'</span><br />
61
  <span class="odb-bold">'.__('Delete unused tags', $odb_class->odb_txt_domain).':</span> <span class="odb-bold odb-blue">'.$tag.'</span><br />
@@ -116,7 +125,7 @@ class ODB_Displayer
116
  /********************************************************************************************
117
  * DISPLAY THE START BUTTONS
118
  ********************************************************************************************/
119
- function display_start_buttons()
120
  {
121
  global $odb_class;
122
 
@@ -135,10 +144,15 @@ class ODB_Displayer
135
  <input class="button odb-normal" type="button" name="delete_log" value="'.__('Delete Log File', $odb_class->odb_txt_domain).'" onclick="self.location=\'tools.php?page=rvg-optimize-database&action=delete_log\'">
136
  ';
137
  } // if(file_exists($this->odb_plugin_path.'logs/rvg-optimize-db-log.html'))
 
 
 
 
 
 
 
138
 
139
- echo '
140
- &nbsp;
141
- <input class="button-primary button-large" type="button" name="start_optimization" value="'.__('Start Optimization', $odb_class->odb_txt_domain).'" onclick="self.location=\'tools.php?page=rvg-optimize-database&action=run\'" class="odb-bold" />
142
  </p>
143
  </div><!-- /odb-start-buttons -->
144
  ';
55
  <h2>'.__('Current settings',$odb_class->odb_txt_domain).'</h2>
56
  </div>
57
  <br><br>
58
+ ';
59
+
60
+ if($odb_class->odb_rvg_options['revision_mode'] == 1)
61
+ { echo '<span class="odb-bold">'.__('Maximum number of - most recent - revisions to keep per post / page', $odb_class->odb_txt_domain).':</span> <span class="odb-bold odb-blue">'.$odb_class->odb_rvg_options['nr_of_revisions'].'</span><br />';
62
+ }
63
+ else
64
+ { echo '<span class="odb-bold">'.__('Delete revisions older than', $odb_class->odb_txt_domain).':</span> <span class="odb-bold odb-blue">'.$odb_class->odb_rvg_options['older_than'].' '.__("days", $odb_class->odb_txt_domain).'</span><br />';
65
+ }
66
+
67
+ echo '
68
  <span class="odb-bold">'.__('Delete trashed items', $odb_class->odb_txt_domain).':</span> <span class="odb-bold odb-blue">'.$trash.'</span><br />
69
  <span class="odb-bold">'.__('Delete spammed items', $odb_class->odb_txt_domain).':</span> <span class="odb-bold odb-blue">'.$spam.'</span><br />
70
  <span class="odb-bold">'.__('Delete unused tags', $odb_class->odb_txt_domain).':</span> <span class="odb-bold odb-blue">'.$tag.'</span><br />
125
  /********************************************************************************************
126
  * DISPLAY THE START BUTTONS
127
  ********************************************************************************************/
128
+ function display_start_buttons($action)
129
  {
130
  global $odb_class;
131
 
144
  <input class="button odb-normal" type="button" name="delete_log" value="'.__('Delete Log File', $odb_class->odb_txt_domain).'" onclick="self.location=\'tools.php?page=rvg-optimize-database&action=delete_log\'">
145
  ';
146
  } // if(file_exists($this->odb_plugin_path.'logs/rvg-optimize-db-log.html'))
147
+
148
+ if($action != 'run')
149
+ { // NOT RUNNING: SHOW START BUTTON
150
+ echo '
151
+ &nbsp;<input class="button-primary button-large" type="button" name="start_optimization" value="'.__('Start Optimization', $odb_class->odb_txt_domain).'" onclick="self.location=\'tools.php?page=rvg-optimize-database&action=run\'" class="odb-bold" />
152
+ ';
153
+ }
154
 
155
+ echo '
 
 
156
  </p>
157
  </div><!-- /odb-start-buttons -->
158
  ';
classes/odb-multisite.php CHANGED
@@ -23,16 +23,15 @@ class ODB_MultiSite
23
  {
24
  global $wpdb, $odb_class;
25
 
 
 
26
  $odb_class->odb_ms_prefixes [0] = $wpdb->base_prefix;
27
- $odb_class->odb_ms_blogids [0] = 1;
28
  if (function_exists('is_multisite') && is_multisite())
29
- { $odb_class->odb_blogids = $wpdb->get_col("SELECT blog_id FROM ".$wpdb->base_prefix."blogs");
30
  // FOR INSTANCE: mywp_2_, mywp_3_ etc.
31
- for($i=1; $i<count($odb_class->odb_blogids); $i++)
32
- { $odb_class->odb_ms_prefixes [$i] = $wpdb->base_prefix.$odb_class->odb_blogids[$i].'_';
33
- $odb_class->odb_ms_blogids [$i] = $odb_class->odb_blogids[$i];
34
- }
35
- } // if (function_exists('is_multisite') && is_multisite())
36
  } // odb_ms_network_info()
37
 
38
 
@@ -63,10 +62,10 @@ class ODB_MultiSite
63
  if(is_multisite() &&
64
  function_exists('is_plugin_active_for_network') &&
65
  is_plugin_active_for_network($odb_class->odb_main_file))
66
- return update_site_option( $option, $value);
67
  else
68
- return update_option( $option, $value);
69
- } // odb_ms_update_option()
70
 
71
 
72
  /********************************************************************************************
23
  {
24
  global $wpdb, $odb_class;
25
 
26
+ $blogids = array();
27
+
28
  $odb_class->odb_ms_prefixes [0] = $wpdb->base_prefix;
 
29
  if (function_exists('is_multisite') && is_multisite())
30
+ { $blogids = $wpdb->get_col("SELECT blog_id FROM ".$wpdb->base_prefix."blogs");
31
  // FOR INSTANCE: mywp_2_, mywp_3_ etc.
32
+ for($i=1; $i<count($blogids); $i++)
33
+ $odb_class->odb_ms_prefixes [$i] = $wpdb->base_prefix.$blogids[$i].'_';
34
+ }
 
 
35
  } // odb_ms_network_info()
36
 
37
 
62
  if(is_multisite() &&
63
  function_exists('is_plugin_active_for_network') &&
64
  is_plugin_active_for_network($odb_class->odb_main_file))
65
+ return update_site_option($option, $value);
66
  else
67
+ return update_option($option, $value);
68
+ } // odb_ms_update_option()
69
 
70
 
71
  /********************************************************************************************
classes/odb-utilities.php CHANGED
@@ -21,12 +21,9 @@ class ODB_Utilities
21
  ********************************************************************************************/
22
  function odb_format_size($size, $precision=1)
23
  {
24
- if($size>1024*1024)
25
- $table_size = (round($size/(1024*1024),$precision)).' MB';
26
- else
27
- $table_size = (round($size/1024,$precision)).' KB';
28
-
29
- return $table_size;
30
  } // odb_format_size()
31
 
32
 
@@ -37,12 +34,12 @@ class ODB_Utilities
37
  {
38
  global $wpdb;
39
 
40
- $sql = "
41
  SELECT SUM(data_length + index_length) AS size
42
  FROM information_schema.TABLES
43
- WHERE table_schema = '".DB_NAME."'
44
  GROUP BY table_schema
45
- ";
46
 
47
  $res = $wpdb->get_results($sql);
48
 
@@ -57,15 +54,14 @@ class ODB_Utilities
57
  {
58
  global $wpdb;
59
 
60
- $sql = "
61
  SHOW FULL TABLES
62
- FROM `".DB_NAME."`
63
  WHERE table_type = 'BASE TABLE'
64
- ";
65
 
66
  // GET THE DATABASE BASE TABLES
67
- // $odb_class->odb_tables = $wpdb->get_results($sql, ARRAY_N);
68
- // var_dump($wpdb->get_results($sql, ARRAY_N));
69
  return $wpdb->get_results($sql, ARRAY_N);
70
  } // odb_get_tables()
 
71
  } // ODB_Utilities
21
  ********************************************************************************************/
22
  function odb_format_size($size, $precision=1)
23
  {
24
+ if($size > 1024*1024) return (round($size/(1024*1024),$precision)).' MB';
25
+
26
+ return (round($size/1024,$precision)).' KB';
 
 
 
27
  } // odb_format_size()
28
 
29
 
34
  {
35
  global $wpdb;
36
 
37
+ $sql = sprintf("
38
  SELECT SUM(data_length + index_length) AS size
39
  FROM information_schema.TABLES
40
+ WHERE table_schema = '%s'
41
  GROUP BY table_schema
42
+ ", DB_NAME);
43
 
44
  $res = $wpdb->get_results($sql);
45
 
54
  {
55
  global $wpdb;
56
 
57
+ $sql = sprintf("
58
  SHOW FULL TABLES
59
+ FROM `%s`
60
  WHERE table_type = 'BASE TABLE'
61
+ ", DB_NAME);
62
 
63
  // GET THE DATABASE BASE TABLES
 
 
64
  return $wpdb->get_results($sql, ARRAY_N);
65
  } // odb_get_tables()
66
+
67
  } // ODB_Utilities
includes/settings-page.php CHANGED
@@ -17,27 +17,37 @@ if (isset($_POST['info_update']))
17
  $current_date = substr($current_datetime, 0, 8);
18
  $current_hour = substr($current_datetime, 8, 2);
19
 
20
- if(isset($_POST['rvg_odb_number']))
21
- { if(!$_POST['rvg_odb_number']) $this->odb_rvg_options['nr_of_revisions'] = '0';
22
- else $this->odb_rvg_options['nr_of_revisions'] = trim($_POST['rvg_odb_number']);
 
 
 
 
 
 
 
 
 
 
23
  }
24
 
25
- if(isset($_POST['rvg_clear_trash'])) $this->odb_rvg_options['clear_trash'] = $_POST['rvg_clear_trash'];
26
  else $this->odb_rvg_options['clear_trash'] = 'N';
27
 
28
- if(isset($_POST['rvg_clear_spam'])) $this->odb_rvg_options['clear_spam'] = $_POST['rvg_clear_spam'];
29
  else $this->odb_rvg_options['clear_spam'] = 'N';
30
 
31
- if(isset($_POST['rvg_clear_tags'])) $this->odb_rvg_options['clear_tags'] = $_POST['rvg_clear_tags'];
32
  else $this->odb_rvg_options['clear_tags'] = 'N';
33
 
34
- if(isset($_POST['rvg_clear_transients'])) $this->odb_rvg_options['clear_transients'] = $_POST['rvg_clear_transients'];
35
  else $this->odb_rvg_options['clear_transients'] = 'N';
36
 
37
- if(isset($_POST['rvg_clear_pingbacks'])) $this->odb_rvg_options['clear_pingbacks'] = $_POST['rvg_clear_pingbacks'];
38
  else $this->odb_rvg_options['clear_pingbacks'] = 'N';
39
 
40
- if(isset($_POST['rvg_odb_logging_on'])) $this->odb_rvg_options['logging_on'] = $_POST['rvg_odb_logging_on'];
41
  else $this->odb_rvg_options['logging_on'] = 'N';
42
 
43
  if(isset($_POST['rvg_odb_schedule']))
@@ -45,15 +55,17 @@ if (isset($_POST['info_update']))
45
  $type_old = $this->odb_rvg_options['schedule_type'];
46
  $hour_old = $this->odb_rvg_options['schedule_hour'];
47
 
48
- if($_POST['rvg_odb_schedule'] == '' || ($_POST['rvg_odb_schedule'] != 'daily' && $_POST['rvg_odb_schedule'] != 'weekly' ))
 
 
49
  $_POST['rvg_odb_schedulehour'] = '';
50
 
51
  $hour = '';
52
- if(isset($_POST['rvg_odb_schedulehour'])) $hour = $_POST['rvg_odb_schedulehour'];
53
 
54
- if($type_old != $_POST['rvg_odb_schedule'] || $hour_old != $hour)
55
  { // SCHEDULE CHANGED
56
- $this->odb_rvg_options['schedule_type'] = $_POST['rvg_odb_schedule'];
57
  $this->odb_rvg_options['schedule_hour'] = $hour;
58
  if($this->odb_rvg_options['schedule_type'] == '')
59
  // UN-SCHEDULED
@@ -64,16 +76,18 @@ if (isset($_POST['info_update']))
64
  }
65
  } // if(isset($_POST['rvg_odb_schedule']))
66
 
67
- if(isset($_POST['rvg_odb_adminbar'])) $this->odb_rvg_options['adminbar'] = $_POST['rvg_odb_adminbar'];
68
  else $this->odb_rvg_options['adminbar'] = 'N';
69
 
70
- if(isset($_POST['rvg_odb_adminmenu'])) $this->odb_rvg_options['adminmenu'] = $_POST['rvg_odb_adminmenu'];
71
  else $this->odb_rvg_options['adminmenu'] = 'N';
72
 
73
- if(isset($_POST['rvg_odb_optimize_innodb'])) $this->odb_rvg_options['optimize_innodb'] = $_POST['rvg_odb_optimize_innodb'];
74
  else $this->odb_rvg_options['optimize_innodb'] = 'N';
75
 
76
  $this->odb_multisite_obj->odb_ms_update_option('odb_rvg_options', $this->odb_rvg_options);
 
 
77
 
78
  // UPDATE EXCLUDED TABLES
79
  // EMPTY ARRAY
@@ -95,16 +109,67 @@ if (isset($_POST['info_update']))
95
  } // if (isset($_POST['info_update']))
96
  ?>
97
  <script type="text/javascript">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  function schedule_changed()
99
  { if(jQuery("#rvg_odb_schedule").val() == "daily" || jQuery("#rvg_odb_schedule").val() == "weekly")
100
  jQuery("#schedulehour").show();
101
  else
102
  jQuery("#schedulehour").hide();
103
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  </script>
105
  <?php
 
106
  // CHECKBOXES
107
  $c = ' checked';
 
 
 
108
  $cb_trash = ($this->odb_rvg_options['clear_trash'] == "Y") ? $c : '';
109
  $cb_spam = ($this->odb_rvg_options['clear_spam'] == "Y") ? $c : '';
110
  $cb_tags = ($this->odb_rvg_options['clear_tags'] == "Y") ? $c : '';
@@ -122,7 +187,7 @@ $this->odb_displayer_obj->display_header();
122
  echo '
123
  <div class="odb-padding-left">
124
  <div id="odb-options-form">
125
- <form name="options" method="post" action="">
126
  '.wp_nonce_field('odb_action','odb_nonce').'
127
  <div id="odb-options-wrap">
128
  <div id="odb-options-settings">
@@ -130,14 +195,48 @@ echo '
130
  <h2>'.__('Settings',$this->odb_txt_domain).'</h2>
131
  </div>
132
  <table border="0" cellspacing="2" cellpadding="5" class="editform" align="center">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  <tr>
134
  <td width="50%" align="right" valign="top"><span class="odb-bold">
135
- '.__('Maximum number of - most recent - revisions<br>to keep per post / page',$this->odb_txt_domain).'
136
  </span></td>
137
- <td width="50%" valign="top"><input type="text" size="2" name="rvg_odb_number" id="rvg_odb_number" value="'.$this->odb_rvg_options['nr_of_revisions'] .'" class="odb-bold odb-blue">
138
- &nbsp;
139
- '.__('(\'0\' means: delete <u>ALL</u> revisions)',$this->odb_txt_domain).'
140
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  <tr>
142
  <td width="50%" align="right" valign="top"><span class="odb-bold">
143
  '. __('Delete trashed items',$this->odb_txt_domain).'
@@ -203,7 +302,8 @@ echo '
203
  </select>
204
  <script type="text/javascript">
205
  jQuery("#rvg_odb_schedule").val("'.$this->odb_rvg_options['schedule_type'].'");
206
- </script>
 
207
  </tr>
208
  <tr id="schedulehour">
209
  <td width="50%" align="right"><span class="odb-bold">
@@ -226,7 +326,6 @@ echo '
226
  jQuery("#rvg_odb_schedulehour").val("'.$this->odb_rvg_options['schedule_hour'].'");
227
  </script>
228
  </span>
229
- </div>
230
  </td>
231
  </tr>
232
  <script type="text/javascript">schedule_changed();</script>
@@ -284,7 +383,7 @@ echo '
284
  </div><!-- /odb-options-tables-wrapper -->
285
  <div id="odb-options-buttons" align="center">
286
  <p>
287
- <input class="button-primary button-large" type="submit" name="info_update" value="'.__('Save Settings',$this->odb_txt_domain).'" class="odb-bold">
288
  &nbsp;
289
  <input class="button odb-normal" type="button" name="optimizer" value="'.__('Go To Optimizer',$this->odb_txt_domain).'" onclick="self.location=\'tools.php?page=rvg-optimize-database\'">
290
  </p>
17
  $current_date = substr($current_datetime, 0, 8);
18
  $current_hour = substr($current_datetime, 8, 2);
19
 
20
+ // var_dump($_POST);
21
+
22
+ $this->odb_rvg_options['revision_mode'] = sanitize_text_field($_POST['rvg_odb_revision_mode']);
23
+
24
+ if($this->odb_rvg_options['revision_mode'] == 1)
25
+ { // NUMBER OF POSTS TO KEEP
26
+ $this->odb_rvg_options['nr_of_revisions'] = sanitize_text_field($_POST['rvg_odb_number']);
27
+ $this->odb_rvg_options['older_than'] = '';
28
+ }
29
+ else
30
+ { // OLDER THAN x DAYS
31
+ $this->odb_rvg_options['nr_of_revisions'] = '';
32
+ $this->odb_rvg_options['older_than'] = sanitize_text_field($_POST['rvg_odb_older_than']);
33
  }
34
 
35
+ if(isset($_POST['rvg_clear_trash'])) $this->odb_rvg_options['clear_trash'] = sanitize_text_field($_POST['rvg_clear_trash']);
36
  else $this->odb_rvg_options['clear_trash'] = 'N';
37
 
38
+ if(isset($_POST['rvg_clear_spam'])) $this->odb_rvg_options['clear_spam'] = sanitize_text_field($_POST['rvg_clear_spam']);
39
  else $this->odb_rvg_options['clear_spam'] = 'N';
40
 
41
+ if(isset($_POST['rvg_clear_tags'])) $this->odb_rvg_options['clear_tags'] = sanitize_text_field($_POST['rvg_clear_tags']);
42
  else $this->odb_rvg_options['clear_tags'] = 'N';
43
 
44
+ if(isset($_POST['rvg_clear_transients'])) $this->odb_rvg_options['clear_transients'] = sanitize_text_field($_POST['rvg_clear_transients']);
45
  else $this->odb_rvg_options['clear_transients'] = 'N';
46
 
47
+ if(isset($_POST['rvg_clear_pingbacks'])) $this->odb_rvg_options['clear_pingbacks'] = sanitize_text_field($_POST['rvg_clear_pingbacks']);
48
  else $this->odb_rvg_options['clear_pingbacks'] = 'N';
49
 
50
+ if(isset($_POST['rvg_odb_logging_on'])) $this->odb_rvg_options['logging_on'] = sanitize_text_field($_POST['rvg_odb_logging_on']);
51
  else $this->odb_rvg_options['logging_on'] = 'N';
52
 
53
  if(isset($_POST['rvg_odb_schedule']))
55
  $type_old = $this->odb_rvg_options['schedule_type'];
56
  $hour_old = $this->odb_rvg_options['schedule_hour'];
57
 
58
+ if(sanitize_text_field($_POST['rvg_odb_schedule'] == '')
59
+ || (sanitize_text_field($_POST['rvg_odb_schedule']) != 'daily'
60
+ && sanitize_text_field($_POST['rvg_odb_schedule']) != 'weekly' ))
61
  $_POST['rvg_odb_schedulehour'] = '';
62
 
63
  $hour = '';
64
+ if(isset($_POST['rvg_odb_schedulehour'])) $hour = sanitize_text_field($_POST['rvg_odb_schedulehour']);
65
 
66
+ if($type_old != sanitize_text_field($_POST['rvg_odb_schedule']) || $hour_old != $hour)
67
  { // SCHEDULE CHANGED
68
+ $this->odb_rvg_options['schedule_type'] = sanitize_text_field($_POST['rvg_odb_schedule']);
69
  $this->odb_rvg_options['schedule_hour'] = $hour;
70
  if($this->odb_rvg_options['schedule_type'] == '')
71
  // UN-SCHEDULED
76
  }
77
  } // if(isset($_POST['rvg_odb_schedule']))
78
 
79
+ if(isset($_POST['rvg_odb_adminbar'])) $this->odb_rvg_options['adminbar'] = sanitize_text_field($_POST['rvg_odb_adminbar']);
80
  else $this->odb_rvg_options['adminbar'] = 'N';
81
 
82
+ if(isset($_POST['rvg_odb_adminmenu'])) $this->odb_rvg_options['adminmenu'] = sanitize_text_field($_POST['rvg_odb_adminmenu']);
83
  else $this->odb_rvg_options['adminmenu'] = 'N';
84
 
85
+ if(isset($_POST['rvg_odb_optimize_innodb'])) $this->odb_rvg_options['optimize_innodb'] = sanitize_text_field($_POST['rvg_odb_optimize_innodb']);
86
  else $this->odb_rvg_options['optimize_innodb'] = 'N';
87
 
88
  $this->odb_multisite_obj->odb_ms_update_option('odb_rvg_options', $this->odb_rvg_options);
89
+
90
+ // var_dump($this->odb_rvg_options);
91
 
92
  // UPDATE EXCLUDED TABLES
93
  // EMPTY ARRAY
109
  } // if (isset($_POST['info_update']))
110
  ?>
111
  <script type="text/javascript">
112
+ function rvg_odb_revision_mode_changed()
113
+ { var mode = jQuery('input[name=rvg_odb_revision_mode]:checked').val();
114
+ if(mode == 1)
115
+ { // NUMBER OF REVISIONS SELECTED
116
+ jQuery("#rvg_odb_older_than").val("");
117
+ jQuery("#rvg_odb_older_than").prop('disabled', true);
118
+ jQuery("#rvg_odb_number").prop('disabled', false);
119
+ }
120
+ else
121
+ { // NUMBER OF DAYS SELECTED
122
+ jQuery("#rvg_odb_number").val("");
123
+ jQuery("#rvg_odb_number").prop('disabled', true);
124
+ jQuery("#rvg_odb_older_than").prop('disabled', false);
125
+ }
126
+ }
127
  function schedule_changed()
128
  { if(jQuery("#rvg_odb_schedule").val() == "daily" || jQuery("#rvg_odb_schedule").val() == "weekly")
129
  jQuery("#schedulehour").show();
130
  else
131
  jQuery("#schedulehour").hide();
132
  }
133
+ function rvg_odb_check_form()
134
+ {
135
+ var mode = jQuery('input[name=rvg_odb_revision_mode]:checked').val();
136
+ if(mode == 1)
137
+ { // NUMBER OF REVISIONS SELECTED
138
+ if(jQuery("#rvg_odb_number").val() == '')
139
+ { jQuery("#rvg_odb_number").focus();
140
+ alert('<?php _e("You have to enter the maximum number of revisions", $this->odb_txt_domain)?>');
141
+ return false;
142
+ }
143
+ if(!jQuery.isNumeric(jQuery("#rvg_odb_number").val()))
144
+ { jQuery("#rvg_odb_number").focus();
145
+ alert('<?php _e("Maximum number of revisions should be a number", $this->odb_txt_domain)?>');
146
+ return false;
147
+ }
148
+ }
149
+ else
150
+ { // NUMBER OF DAYS SELECTED
151
+ if(jQuery("#rvg_odb_older_than").val() == '')
152
+ { jQuery("#rvg_odb_older_than").focus();
153
+ alert('<?php _e("You have to enter: ",$this->odb_txt_domain)?> <'+'<?php _e("Delete revisions older than",$this->odb_txt_domain)?>'+'>');
154
+ return false;
155
+ }
156
+ if(!jQuery.isNumeric(jQuery("#rvg_odb_older_than").val()))
157
+ { jQuery("#rvg_odb_older_than").focus();
158
+ alert('<?php _e("<Delete revisions older than> should be a number", $this->odb_txt_domain)?>');
159
+ return false;
160
+ }
161
+ }
162
+
163
+ return true;
164
+ }
165
  </script>
166
  <?php
167
+ if(!isset($this->odb_rvg_options['revision_mode'])) $this->odb_rvg_options['revision_mode'] = "1";
168
  // CHECKBOXES
169
  $c = ' checked';
170
+ $d = ' disabled';
171
+ $cb_disabled1 = ($this->odb_rvg_options['revision_mode'] == "2") ? $d : '';
172
+ $cb_disabled2 = ($this->odb_rvg_options['revision_mode'] == "1") ? $d : '';
173
  $cb_trash = ($this->odb_rvg_options['clear_trash'] == "Y") ? $c : '';
174
  $cb_spam = ($this->odb_rvg_options['clear_spam'] == "Y") ? $c : '';
175
  $cb_tags = ($this->odb_rvg_options['clear_tags'] == "Y") ? $c : '';
187
  echo '
188
  <div class="odb-padding-left">
189
  <div id="odb-options-form">
190
+ <form name="options" method="post" action="" onsubmit="return rvg_odb_check_form();">
191
  '.wp_nonce_field('odb_action','odb_nonce').'
192
  <div id="odb-options-wrap">
193
  <div id="odb-options-settings">
195
  <h2>'.__('Settings',$this->odb_txt_domain).'</h2>
196
  </div>
197
  <table border="0" cellspacing="2" cellpadding="5" class="editform" align="center">
198
+ <tr>
199
+ <td width="50%" align="right" valign="top"><span class="odb-bold">'.__('Maximum number of - most recent - revisions<br>to keep per post / page',$this->odb_txt_domain).'</span></td>
200
+ <td width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="3">
201
+ <tr>
202
+ <td><span class="odb-bold">
203
+ <input name="rvg_odb_revision_mode" type="radio" id="rvg_odb_revision_mode1" value="1" onchange="rvg_odb_revision_mode_changed();">
204
+ </span></td>
205
+ <td><input type="text" size="2" name="rvg_odb_number" id="rvg_odb_number" value="'.$this->odb_rvg_options['nr_of_revisions'].'" class="odb-bold odb-blue"'.$cb_disabled1.'>
206
+ &nbsp; <em>'.__('(\'0\' means: delete <u>ALL</u> revisions)',$this->odb_txt_domain).'</em></td>
207
+ </tr>
208
+ </table></td>
209
+ </tr>
210
+ ';
211
+ if($this->odb_rvg_options['revision_mode'] == 1) echo '<script type="text/javascript">jQuery("#rvg_odb_revision_mode1").prop("checked", true)</script>';
212
+ echo '
213
  <tr>
214
  <td width="50%" align="right" valign="top"><span class="odb-bold">
215
+ --- '. __('OR',$this->odb_txt_domain).' ---
216
  </span></td>
217
+ <td width="50%" valign="top">&nbsp;</td>
 
 
218
  </tr>
219
+ <tr>
220
+ <td width="50%" align="right"><span class="odb-bold">'. __('Delete revisions older than',$this->odb_txt_domain).'</span></td>
221
+ <td width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="3">
222
+ <tr>
223
+ <td><span class="odb-bold">
224
+ <input type="radio" name="rvg_odb_revision_mode" id="rvg_odb_revision_mode2" value="2" onchange="rvg_odb_revision_mode_changed();"></span></td>
225
+ <td><input type="text" size="2" name="rvg_odb_older_than" id="rvg_odb_older_than" value="'.$this->odb_rvg_options['older_than'].'" class="odb-bold odb-blue"'.$cb_disabled2.'>&nbsp;&nbsp;'.__("days", $this->odb_txt_domain).'
226
+ <script type="text/javascript">
227
+ ';
228
+ if($this->odb_rvg_options['revision_mode'] == 2) echo 'jQuery("#rvg_odb_revision_mode2").prop("checked", true)';
229
+ echo '
230
+ jQuery("#rvg_odb_older_than").val("'.$this->odb_rvg_options['older_than'].'");
231
+ </script>
232
+ </td>
233
+ </tr>
234
+ </table></td>
235
+ </tr>
236
+ <tr>
237
+ <td width="50%" align="right" valign="top" class="odb-bold">&nbsp;</td>
238
+ <td width="50%" valign="top">&nbsp;</td>
239
+ </tr>
240
  <tr>
241
  <td width="50%" align="right" valign="top"><span class="odb-bold">
242
  '. __('Delete trashed items',$this->odb_txt_domain).'
302
  </select>
303
  <script type="text/javascript">
304
  jQuery("#rvg_odb_schedule").val("'.$this->odb_rvg_options['schedule_type'].'");
305
+ </script>
306
+ </td>
307
  </tr>
308
  <tr id="schedulehour">
309
  <td width="50%" align="right"><span class="odb-bold">
326
  jQuery("#rvg_odb_schedulehour").val("'.$this->odb_rvg_options['schedule_hour'].'");
327
  </script>
328
  </span>
 
329
  </td>
330
  </tr>
331
  <script type="text/javascript">schedule_changed();</script>
383
  </div><!-- /odb-options-tables-wrapper -->
384
  <div id="odb-options-buttons" align="center">
385
  <p>
386
+ <input class="button-primary button-large odb-bold" type="submit" name="info_update" value="'.__('Save Settings',$this->odb_txt_domain).'">
387
  &nbsp;
388
  <input class="button odb-normal" type="button" name="optimizer" value="'.__('Go To Optimizer',$this->odb_txt_domain).'" onclick="self.location=\'tools.php?page=rvg-optimize-database\'">
389
  </p>
language/rvg-optimize-database-fa_IR.mo ADDED
Binary file
language/rvg-optimize-database-fa_IR.po ADDED
@@ -0,0 +1,545 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Optimize Database after Deleting Revisions\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-11-20 17:03+0100\n"
6
+ "PO-Revision-Date: 2016-01-04 15:14+0100\n"
7
+ "Language-Team: Milad Mordi <nedawebco@gmail.com>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "Plural-Forms: nplurals=1; plural=0;\n"
12
+ "X-Poedit-SourceCharset: UTF-8\n"
13
+ "X-Poedit-Basepath: C:/My Dropbox/WordPress/wp-plugins/rvg-optimize-db\n"
14
+ "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
15
+ "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;"
16
+ "__ngettext_noop:1,2;_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;"
17
+ "_nx_js:1,2,3c;esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;"
18
+ "esc_attr_x:1,2c;esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;"
19
+ "transChoice:1,2\n"
20
+ "X-Loco-Target-Locale: de_DE\n"
21
+ "X-Generator: Poedit 1.7.4\n"
22
+ "Last-Translator: Rolf van Gelder <info@cagewebdev.com>\n"
23
+ "Language: fa\n"
24
+ "X-Poedit-SearchPath-0: .\n"
25
+
26
+ #: classes/odb-cleaner.php:35
27
+ msgid "Cleaning Database"
28
+ msgstr "درحال پاکسازی دیتابیس"
29
+
30
+ #: classes/odb-cleaner.php:78
31
+ msgid "DELETED REVISIONS"
32
+ msgstr "رونوشت های حذف شده"
33
+
34
+ #: classes/odb-cleaner.php:83 classes/odb-cleaner.php:142
35
+ #: classes/odb-cleaner.php:203
36
+ msgid "prefix"
37
+ msgstr "پیشوند"
38
+
39
+ #: classes/odb-cleaner.php:84
40
+ msgid "post / page"
41
+ msgstr "پست / صفحه"
42
+
43
+ #: classes/odb-cleaner.php:85
44
+ msgid "revision date"
45
+ msgstr "تاریخ رونوشت"
46
+
47
+ #: classes/odb-cleaner.php:86
48
+ msgid "revisions deleted"
49
+ msgstr "رونوشت ها حذف شدند"
50
+
51
+ #: classes/odb-cleaner.php:98
52
+ msgid "total number of revisions deleted"
53
+ msgstr "مجموع رونوشت های حذف شده"
54
+
55
+ #: classes/odb-cleaner.php:110
56
+ msgid "No REVISIONS found to delete"
57
+ msgstr "هیچ رونوشتی برای حذف یافت نشد"
58
+
59
+ #: classes/odb-cleaner.php:137
60
+ msgid "DELETED TRASHED ITEMS"
61
+ msgstr "موارد موجود در زباله دان حذف شد"
62
+
63
+ #: classes/odb-cleaner.php:143
64
+ msgid "type"
65
+ msgstr "نوع"
66
+
67
+ #: classes/odb-cleaner.php:144
68
+ msgid "IP address / title"
69
+ msgstr "آدرس آیپی / عنوان"
70
+
71
+ #: classes/odb-cleaner.php:145
72
+ msgid "date"
73
+ msgstr "تاریخ"
74
+
75
+ #: classes/odb-cleaner.php:157
76
+ msgid "total number of trashed items deleted"
77
+ msgstr "مجموع موارد منتقل شده به زباله دان"
78
+
79
+ #: classes/odb-cleaner.php:170
80
+ msgid "No TRASHED ITEMS found to delete"
81
+ msgstr "هیچ موردی در زباله دان یافت نشد"
82
+
83
+ #: classes/odb-cleaner.php:198
84
+ msgid "DELETEED SPAMMED ITEMS"
85
+ msgstr "موارد اسپم شده حذف شدند"
86
+
87
+ #: classes/odb-cleaner.php:204
88
+ msgid "comment author"
89
+ msgstr "نویسنده نظر"
90
+
91
+ #: classes/odb-cleaner.php:205
92
+ msgid "comment author email"
93
+ msgstr "ایمیل نویسنده"
94
+
95
+ #: classes/odb-cleaner.php:206
96
+ msgid "comment date"
97
+ msgstr "تاریخ نظر"
98
+
99
+ #: classes/odb-cleaner.php:218
100
+ msgid "total number of spammed items deleted"
101
+ msgstr "مجموع تعداد موارد اسپم شده"
102
+
103
+ #: classes/odb-cleaner.php:231
104
+ msgid "No SPAMMED ITEMS found to delete"
105
+ msgstr "هیچ موردی اسپمی یافت نشد"
106
+
107
+ #: classes/odb-cleaner.php:256
108
+ msgid "NUMBER OF UNUSED TAGS DELETED"
109
+ msgstr "تگ های استفاده نشده حذف شده"
110
+
111
+ #: classes/odb-cleaner.php:266
112
+ msgid "No UNUSED TAGS found to delete"
113
+ msgstr "هیچ تگ استفاده نشده ای برای حذف وجود ندارد"
114
+
115
+ #: classes/odb-cleaner.php:290
116
+ msgid "NUMBER OF EXPIRED TRANSIENTS DELETED"
117
+ msgstr "تعداد رکورد های گذرای منقضی شده حذف شده"
118
+
119
+ #: classes/odb-cleaner.php:300
120
+ msgid "No EXPIRED TRANSIENTS found to delete"
121
+ msgstr "هیچ رکورد گذرای منقضی یافت نشد"
122
+
123
+ #: classes/odb-cleaner.php:324
124
+ msgid "NUMBER OF PINGBACKS AND TRACKBACKS DELETED"
125
+ msgstr "تعداد پینگ های حذف شده"
126
+
127
+ #: classes/odb-cleaner.php:334
128
+ msgid "No PINGBACKS nor TRACKBACKS found to delete"
129
+ msgstr "هیچ پینگی برای حذف یافت نشد"
130
+
131
+ #: classes/odb-cleaner.php:355
132
+ msgid "NUMBER OF POSTMETA ORPHANS DELETED"
133
+ msgstr "تعداد متاهای خالی حذف شده"
134
+
135
+ #: classes/odb-cleaner.php:365
136
+ msgid "No POSTMETA ORPHANS found to delete"
137
+ msgstr "هیچ متای خالی برای حذف یافت نشد"
138
+
139
+ #: classes/odb-cleaner.php:393
140
+ msgid "Optimizing Database Tables"
141
+ msgstr "درحال بهینه سازی جداول دیتابیس"
142
+
143
+ #: classes/odb-cleaner.php:400
144
+ msgid "table name"
145
+ msgstr "نام جدول"
146
+
147
+ #: classes/odb-cleaner.php:401
148
+ msgid "optimization result"
149
+ msgstr "نتیجه بهینه سازی"
150
+
151
+ #: classes/odb-cleaner.php:402
152
+ msgid "engine"
153
+ msgstr "موتور"
154
+
155
+ #: classes/odb-cleaner.php:403
156
+ msgid "table rows"
157
+ msgstr "ردیف های جدول"
158
+
159
+ #: classes/odb-cleaner.php:404
160
+ msgid "table size"
161
+ msgstr "سایز جدول"
162
+
163
+ #: classes/odb-cleaner.php:452
164
+ msgid "Savings"
165
+ msgstr "ذخیره ها"
166
+
167
+ #: classes/odb-cleaner.php:459
168
+ msgid "size of the database"
169
+ msgstr "سایز دیتابیس"
170
+
171
+ #: classes/odb-cleaner.php:462
172
+ msgid "BEFORE optimization"
173
+ msgstr "قبل از بهینه سازی"
174
+
175
+ #: classes/odb-cleaner.php:466
176
+ msgid "AFTER optimization"
177
+ msgstr "بعد از بهینه سازی"
178
+
179
+ #: classes/odb-cleaner.php:470
180
+ msgid "SAVINGS THIS TIME"
181
+ msgstr "صرفه جویی فعلی"
182
+
183
+ #: classes/odb-cleaner.php:474
184
+ msgid "TOTAL SAVINGS SINCE THE FIRST RUN"
185
+ msgstr "صرفه جویی از اولین اجرا"
186
+
187
+ #: classes/odb-cleaner.php:501
188
+ msgid "DONE!"
189
+ msgstr "انجام شد!"
190
+
191
+ #: classes/odb-cleaner.php:506
192
+ msgid "Optimization took"
193
+ msgstr "زمان بهینه سازی"
194
+
195
+ #: classes/odb-cleaner.php:506
196
+ msgid "seconds"
197
+ msgstr "صانیه"
198
+
199
+ #: classes/odb-cleaner.php:514 classes/odb-displayer.php:131
200
+ msgid "View Log File"
201
+ msgstr "مشاهده فایل log"
202
+
203
+ #: classes/odb-cleaner.php:516 classes/odb-displayer.php:133
204
+ msgid "Delete Log File"
205
+ msgstr "حذف فایل log"
206
+
207
+ #: classes/odb-cleaner.php:1043
208
+ msgid "InnoDB table: skipped..."
209
+ msgstr "جدول InnoDB صرف نظر شد"
210
+
211
+ #: classes/odb-cleaner.php:1049
212
+ msgid "<span class=\"odb-optimized\">TABLE OPTIMIZED</span>"
213
+ msgstr "<span class=\"odb-optimized\">جدول بهینه سازی شد</span>"
214
+
215
+ #: classes/odb-cleaner.php:1050
216
+ msgid "Table is already up to date"
217
+ msgstr "جدول بروز است"
218
+
219
+ #: classes/odb-displayer.php:28
220
+ msgid "YES"
221
+ msgstr "بله"
222
+
223
+ #: classes/odb-displayer.php:29
224
+ msgid "NO"
225
+ msgstr "خیر"
226
+
227
+ #: classes/odb-displayer.php:40
228
+ msgid "EVERY FIVE MINUTES"
229
+ msgstr "هر 5 دقیقه یکبار"
230
+
231
+ #: classes/odb-displayer.php:42
232
+ msgid "ONCE HOURLY"
233
+ msgstr "هر ساعت یکبار"
234
+
235
+ #: classes/odb-displayer.php:44
236
+ msgid "TWICE DAILY"
237
+ msgstr "هر روز 2 بار"
238
+
239
+ #: classes/odb-displayer.php:46
240
+ msgid "ONCE DAILY"
241
+ msgstr "هر روز یکبار"
242
+
243
+ #: classes/odb-displayer.php:48
244
+ msgid "ONCE WEEKLY"
245
+ msgstr "هر هفته یکبار"
246
+
247
+ #: classes/odb-displayer.php:49 includes/settings-page.php:174
248
+ msgid "NOT SCHEDULED"
249
+ msgstr "زمانبندی نشده"
250
+
251
+ #: classes/odb-displayer.php:54
252
+ msgid "Current settings"
253
+ msgstr "تنظیمات فعلی"
254
+
255
+ #: classes/odb-displayer.php:57
256
+ msgid "Maximum number of - most recent - revisions to keep per post / page"
257
+ msgstr "حداکثر تعداد رونوشت های اخیر برای ذخیره سازی در هر پست / صفحه"
258
+
259
+ #: classes/odb-displayer.php:58 includes/settings-page.php:133
260
+ msgid "Delete trashed items"
261
+ msgstr "حذف موارد زباله دان"
262
+
263
+ #: classes/odb-displayer.php:59 includes/settings-page.php:139
264
+ msgid "Delete spammed items"
265
+ msgstr "حذف اسپم ها"
266
+
267
+ #: classes/odb-displayer.php:60 includes/settings-page.php:145
268
+ msgid "Delete unused tags"
269
+ msgstr "حذف تگ های بی استفاده"
270
+
271
+ #: classes/odb-displayer.php:61 includes/settings-page.php:151
272
+ msgid "Delete expired transients"
273
+ msgstr "حذف تنظیمات گذرا"
274
+
275
+ #: classes/odb-displayer.php:62 includes/settings-page.php:157
276
+ msgid "Delete pingbacks and trackbacks"
277
+ msgstr "حذف پینگ ها و ترک بکها"
278
+
279
+ #: classes/odb-displayer.php:63 includes/settings-page.php:163
280
+ msgid "Keep a log"
281
+ msgstr "ذخیره گزارش"
282
+
283
+ #: classes/odb-displayer.php:64
284
+ msgid "Last run"
285
+ msgstr "آخرین اجرا"
286
+
287
+ #: classes/odb-displayer.php:64 classes/odb-displayer.php:73
288
+ #: includes/settings-page.php:208
289
+ msgid "hrs"
290
+ msgstr "ساعت"
291
+
292
+ #: classes/odb-displayer.php:65
293
+ msgid "Number of excluded tables"
294
+ msgstr "جداول مستثنی شده"
295
+
296
+ #: classes/odb-displayer.php:66 includes/settings-page.php:170
297
+ msgid "Scheduler"
298
+ msgstr "زمان بند"
299
+
300
+ #: classes/odb-displayer.php:73
301
+ msgid "Next scheduled run"
302
+ msgstr "اجرای زمان بندی شده بعدی"
303
+
304
+ #: classes/odb-displayer.php:73
305
+ msgid "current server time"
306
+ msgstr "زمان فعلی سرور"
307
+
308
+ #: classes/odb-displayer.php:78
309
+ msgid "Total savings since the first run"
310
+ msgstr "مجموعه صرفه جویی ها از اولین اجرا"
311
+
312
+ #: classes/odb-displayer.php:95
313
+ msgid "Optimize Database after Deleting Revisions"
314
+ msgstr "بعد از حذف رونوشت ها دیتابیس را بهینه سازی کن"
315
+
316
+ #: classes/odb-displayer.php:98
317
+ msgid ""
318
+ "A popular 'one-click' plugin to clean and optimize your WordPress database."
319
+ msgstr "افزونه ای محبوب برای پاک و بهینه کردن دیتابیس وردپرس"
320
+
321
+ #: classes/odb-displayer.php:101
322
+ msgid "Plugin version"
323
+ msgstr "نسخه افزونه"
324
+
325
+ #: classes/odb-displayer.php:102
326
+ msgid "Plugin page"
327
+ msgstr "نام افزونه"
328
+
329
+ #: classes/odb-displayer.php:103
330
+ msgid "Download page"
331
+ msgstr "صفحه دانلود"
332
+
333
+ #: classes/odb-displayer.php:104
334
+ msgid "Author"
335
+ msgstr "سازنده"
336
+
337
+ #: classes/odb-displayer.php:105
338
+ msgid "Company"
339
+ msgstr "شرکت"
340
+
341
+ #: classes/odb-displayer.php:106
342
+ msgid "Donation page"
343
+ msgstr "صفحه حمایت مالی"
344
+
345
+ #: classes/odb-displayer.php:124
346
+ msgid "Change Settings"
347
+ msgstr "تغییر تنظیمات"
348
+
349
+ #: classes/odb-displayer.php:139
350
+ msgid "Start Optimization"
351
+ msgstr "شروع بهینه سازی"
352
+
353
+ #: classes/odb-logger.php:55
354
+ msgid "A WordPress Plugin by"
355
+ msgstr "افزونه ای از"
356
+
357
+ #: classes/odb-logger.php:55
358
+ msgid "The Netherlands"
359
+ msgstr "هلند"
360
+
361
+ #: classes/odb-logger.php:59
362
+ msgid "time"
363
+ msgstr "تاریخ"
364
+
365
+ #: classes/odb-logger.php:60
366
+ msgid "deleted<br />revisions"
367
+ msgstr "رونوشتهای<br />حذف شده"
368
+
369
+ #: classes/odb-logger.php:61
370
+ msgid "deleted<br />trash"
371
+ msgstr "زباله های<br />حذف شده"
372
+
373
+ #: classes/odb-logger.php:62
374
+ msgid "deleted<br />spam"
375
+ msgstr "اسپمهای<br />حذف شده"
376
+
377
+ #: classes/odb-logger.php:63
378
+ msgid "deleted<br />tags"
379
+ msgstr "تگهای <br />حذف شده"
380
+
381
+ #: classes/odb-logger.php:64
382
+ msgid "deleted<br />transients"
383
+ msgstr "تنظیمات گذرای <br />حذف شده"
384
+
385
+ #: classes/odb-logger.php:65
386
+ msgid "deleted<br />pingbacks<br />trackbacks"
387
+ msgstr "پینگهای <br /> حذف شده"
388
+
389
+ #: classes/odb-logger.php:66
390
+ msgid "deleted<br />orphans"
391
+ msgstr "Orphan های حذف شده"
392
+
393
+ #: classes/odb-logger.php:67
394
+ msgid "nr of optimized tables"
395
+ msgstr "تعداد جداول بهینه شده"
396
+
397
+ #: classes/odb-logger.php:68
398
+ msgid "database size BEFORE"
399
+ msgstr "سایز دیتابیس قبل از"
400
+
401
+ #: classes/odb-logger.php:69
402
+ msgid "database size AFTER"
403
+ msgstr "سایز دیتابیس بعد از"
404
+
405
+ #: classes/odb-logger.php:70
406
+ msgid "SAVINGS"
407
+ msgstr "صرفه جویی ها"
408
+
409
+ #: classes/odb-scheduler.php:34
410
+ msgid "Once Weekly"
411
+ msgstr "یکبار در هفته"
412
+
413
+ #: classes/odb-scheduler.php:39
414
+ msgid "Every Five Minutes"
415
+ msgstr "هر 5 دقیقه"
416
+
417
+ #: includes/settings-page.php:82
418
+ msgid "Optimize Database after Deleting Revisions SETTINGS UPDATED"
419
+ msgstr "بعد از ذخیره تظیمات حذف رونوشت ها ، دیتابیس را بهینه سازی کن "
420
+
421
+ #: includes/settings-page.php:84
422
+ msgid ""
423
+ "Click <a href=\"tools.php?page=rvg-optimize-database\" class=\"odb-bold"
424
+ "\">HERE</a> to run the optimization"
425
+ msgstr ""
426
+ "برای اجرای بهینه سازی <a href=\"tools.php?page=rvg-optimize-database\" "
427
+ "class=\"odb-bold\">اینجا</a> کلیک کنید"
428
+
429
+ #: includes/settings-page.php:120 rvg-optimize-db.php:257
430
+ msgid "Settings"
431
+ msgstr "تنظیمات"
432
+
433
+ #: includes/settings-page.php:125
434
+ msgid "Maximum number of - most recent - revisions<br>to keep per post / page"
435
+ msgstr "حداکثر تعداد ذخیره رونوشت های اخیر <br> به ازای هر پست / صفحه"
436
+
437
+ #: includes/settings-page.php:129
438
+ msgid "('0' means: delete <u>ALL</u> revisions)"
439
+ msgstr "0 به معنای حذف تمامی رونوشت هاست"
440
+
441
+ #: includes/settings-page.php:184
442
+ msgid "run optimization HOURLY"
443
+ msgstr "اجرای ساعتی بهینه سازی"
444
+
445
+ #: includes/settings-page.php:187
446
+ msgid "run optimization TWICE A DAY"
447
+ msgstr "اجرای دوبار در روز بهینه سازی"
448
+
449
+ #: includes/settings-page.php:190
450
+ msgid "run optimization DAILY"
451
+ msgstr "اجرای روزانه بهینه سازی"
452
+
453
+ #: includes/settings-page.php:193
454
+ msgid "run optimization WEEKLY"
455
+ msgstr "اجرای هفتگی بهینه سازی"
456
+
457
+ #: includes/settings-page.php:200
458
+ msgid "Time"
459
+ msgstr "زمان"
460
+
461
+ #: includes/settings-page.php:223
462
+ msgid "Show '1-click' link in Admin Bar"
463
+ msgstr "حالت \"یک کلیک\" را در منو مدیریت نمایش بده"
464
+
465
+ #: includes/settings-page.php:226 includes/settings-page.php:233
466
+ msgid "(change will be visible after loading the next page)"
467
+ msgstr "( تغییرات بعد از بارگذاری صفحه بعد قابل مشاهده خواهد بود )"
468
+
469
+ #: includes/settings-page.php:230
470
+ msgid "Show an icon in the Admin Menu"
471
+ msgstr "در منو مدیریت یک آیکون نمایش بده"
472
+
473
+ #: includes/settings-page.php:239
474
+ msgid ""
475
+ "EXCLUDE DATABASE TABLES FROM OPTIMIZATION: <span class=\"odb-underline-red"
476
+ "\">CHECKED</span> TABLES <span class=\"odb-underline-red\">WON'T</span> BE "
477
+ "OPTIMIZED!</span>"
478
+ msgstr ""
479
+ "EXCLUDE DATABASE TABLES FROM OPTIMIZATION: <span class=\"odb-underline-red"
480
+ "\">CHECKED</span> TABLES <span class=\"odb-underline-red\">WON'T</span> BE "
481
+ "OPTIMIZED!</span>"
482
+
483
+ #: includes/settings-page.php:245
484
+ msgid "check all tables"
485
+ msgstr "بررسی تمامی جداول"
486
+
487
+ #: includes/settings-page.php:247
488
+ msgid "uncheck all tables"
489
+ msgstr "حذف تیک جداول"
490
+
491
+ #: includes/settings-page.php:249
492
+ msgid "check all NON-WordPress tables"
493
+ msgstr "بررسی تمامی جداول غیروردپرسی"
494
+
495
+ #: includes/settings-page.php:276
496
+ msgid "Save Settings"
497
+ msgstr "ذخیره تنظیمات"
498
+
499
+ #: includes/settings-page.php:278
500
+ msgid "Go To Optimizer"
501
+ msgstr "برو به بهینه ساز"
502
+
503
+ #: rvg-optimize-db.php:229 rvg-optimize-db.php:230 rvg-optimize-db.php:244
504
+ #: rvg-optimize-db.php:245 rvg-optimize-db.php:286 rvg-optimize-db.php:287
505
+ #: rvg-optimize-db.php:305 rvg-optimize-db.php:306
506
+ msgid "Optimize Database"
507
+ msgstr "بهینه سازی دیتابیس"
508
+
509
+ #: rvg-optimize-db.php:273
510
+ msgid "Optimize DB (1 click)"
511
+ msgstr "بهینه سازی دیتابیس ( 1 کلیک )"
512
+
513
+ #: rvg-optimize-db.php:451
514
+ msgid "Optimize Database after Deleting Revisions LOG FILE HAS BEEN DELETED"
515
+ msgstr ""
516
+
517
+ msgid ""
518
+ "Click <a href=\"tools.php?page=rvg-optimize-db.php\" class=\"odb-bold"
519
+ "\">HERE</a> to run the optimization"
520
+ msgstr ""
521
+ "<a href=\"tools.php?page=rvg-optimize-db.php\" class=\"odb-bold\">HIER</a> "
522
+ "klicken, um die Optimierung zu starten"
523
+
524
+ msgid "is an one-click plugin to clean and optimize your WordPress database"
525
+ msgstr ""
526
+ "ist ein 1-Klick Plugin zum Bereinigen und Optimieren der WordPress Datenbank"
527
+
528
+ msgid ""
529
+ "Maximum number of - most recent - revisions<br />to keep per post / page"
530
+ msgstr "Maximal gespeicherte Anzahl<br />Revisionen pro Beitrag / Seite"
531
+
532
+ msgid "Optimize your WordPress Database"
533
+ msgstr "WordPress Datenbank optimieren"
534
+
535
+ msgid "Plugin version:"
536
+ msgstr "Plugin Version:"
537
+
538
+ msgid "Author:"
539
+ msgstr "Autor:"
540
+
541
+ msgid "Plugin URL:"
542
+ msgstr "Plugin URL:"
543
+
544
+ msgid "Download URL:"
545
+ msgstr "Download URL:"
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 v2.8.3\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-12-17 19:02+0100\n"
6
- "PO-Revision-Date: 2015-12-17 19:02+0100\n"
7
  "Last-Translator: Rolf van Gelder <info@cagewebdev.com>\n"
8
  "Language-Team: CAGE <info@cagewebdev.com>\n"
9
  "Language: nl_NL\n"
@@ -15,8 +15,7 @@ msgstr ""
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"
18
- "X-Poedit-Basepath: C:\\My Dropbox\\cagewebdev\\wp-content\\plugins\\rvg-"
19
- "optimize-database\\\n"
20
  "X-Textdomain-Support: yes\n"
21
  "X-Poedit-SearchPath-0: .\n"
22
 
@@ -193,23 +192,23 @@ msgstr "Optimalizatie duurde"
193
  msgid "seconds"
194
  msgstr "seconden"
195
 
196
- #: classes/odb-cleaner.php:514 classes/odb-displayer.php:133
197
  msgid "View Log File"
198
  msgstr "Bekijk Logbestand"
199
 
200
- #: classes/odb-cleaner.php:516 classes/odb-displayer.php:135
201
  msgid "Delete Log File"
202
  msgstr "Verwijder Logbestand"
203
 
204
- #: classes/odb-cleaner.php:1041
205
  msgid "InnoDB table: skipped..."
206
  msgstr "InnoDB tabel overgeslagen..."
207
 
208
- #: classes/odb-cleaner.php:1047 classes/odb-cleaner.php:1049
209
  msgid "<span class=\"odb-optimized\">TABLE OPTIMIZED</span>"
210
  msgstr "<span class=\"odb-optimized\">TABEL GEOPTIMALISEERD</span>"
211
 
212
- #: classes/odb-cleaner.php:1048
213
  msgid "Table is already up to date"
214
  msgstr "Tabel is al optimaal"
215
 
@@ -241,7 +240,7 @@ msgstr "DAGELIJKS"
241
  msgid "ONCE WEEKLY"
242
  msgstr "WEKELIJKS"
243
 
244
- #: classes/odb-displayer.php:50 includes/settings-page.php:189
245
  msgid "NOT SCHEDULED"
246
  msgstr "NIET GEPLAND"
247
 
@@ -249,109 +248,118 @@ msgstr "NIET GEPLAND"
249
  msgid "Current settings"
250
  msgstr "Huidige instellingen"
251
 
252
- #: classes/odb-displayer.php:58
253
  msgid "Maximum number of - most recent - revisions to keep per post / page"
254
  msgstr ""
255
  "Maximaal aantal (meest recente) revisies die bewaard worden per bericht / "
256
  "pagina"
257
 
258
- #: classes/odb-displayer.php:59 includes/settings-page.php:143
 
 
 
 
 
 
 
 
 
259
  msgid "Delete trashed items"
260
  msgstr "Verwijder trashed items"
261
 
262
- #: classes/odb-displayer.php:60 includes/settings-page.php:149
263
  msgid "Delete spammed items"
264
  msgstr "Verwijder spammed items"
265
 
266
- #: classes/odb-displayer.php:61 includes/settings-page.php:155
267
  msgid "Delete unused tags"
268
  msgstr "Verwijder ongebruikte tags"
269
 
270
- #: classes/odb-displayer.php:62 includes/settings-page.php:161
271
  msgid "Delete expired transients"
272
  msgstr "Verwijder verlopen transiënts"
273
 
274
- #: classes/odb-displayer.php:63 includes/settings-page.php:167
275
  msgid "Delete pingbacks and trackbacks"
276
  msgstr "Verwijder pingback en trackbacks"
277
 
278
- #: classes/odb-displayer.php:64 includes/settings-page.php:179
279
  msgid "Keep a log"
280
  msgstr "Gebruik een logbestand"
281
 
282
- #: classes/odb-displayer.php:65
283
  msgid "Optimize InnoDB tables"
284
  msgstr "Optimaliseer InnoDB tabellen"
285
 
286
- #: classes/odb-displayer.php:66
287
  msgid "Last run"
288
  msgstr "Laatste uitvoering"
289
 
290
- #: classes/odb-displayer.php:66 classes/odb-displayer.php:75
291
- #: includes/settings-page.php:219
292
  msgid "hrs"
293
  msgstr "uur"
294
 
295
- #: classes/odb-displayer.php:67
296
  msgid "Number of excluded tables"
297
  msgstr "Aantal uitgesloten tabellen"
298
 
299
- #: classes/odb-displayer.php:68 includes/settings-page.php:185
300
  msgid "Scheduler"
301
  msgstr "Planner"
302
 
303
- #: classes/odb-displayer.php:75
304
  msgid "Next scheduled run"
305
  msgstr "Volgende geplande uitvoering"
306
 
307
- #: classes/odb-displayer.php:75
308
  msgid "current server time"
309
  msgstr "huidige systeemtijd"
310
 
311
- #: classes/odb-displayer.php:80
312
  msgid "Total savings since the first run"
313
  msgstr "Totale besparing sinds de eerste uitvoering"
314
 
315
- #: classes/odb-displayer.php:97
316
  msgid "Optimize Database after Deleting Revisions"
317
  msgstr "Optimize Database after Deleting Revisions"
318
 
319
- #: classes/odb-displayer.php:100
320
  msgid ""
321
  "A popular 'one-click' plugin to clean and optimize your WordPress database."
322
  msgstr ""
323
  "Een populaire 'one-click' plugin om de WordPress database op te schonen en "
324
  "te optimaliseren."
325
 
326
- #: classes/odb-displayer.php:103
327
  msgid "Plugin version"
328
  msgstr "Plugin versie"
329
 
330
- #: classes/odb-displayer.php:104
331
  msgid "Plugin page"
332
  msgstr "Pluginpagina"
333
 
334
- #: classes/odb-displayer.php:105
335
  msgid "Download page"
336
  msgstr "Downloadpagina"
337
 
338
- #: classes/odb-displayer.php:106
339
  msgid "Author"
340
  msgstr "Auteur"
341
 
342
- #: classes/odb-displayer.php:107
343
  msgid "Company"
344
  msgstr "Bedrijf"
345
 
346
- #: classes/odb-displayer.php:108
347
  msgid "Donation page"
348
  msgstr "Donatiepagina"
349
 
350
- #: classes/odb-displayer.php:126
351
  msgid "Change Settings"
352
  msgstr "Wijzig instellingen"
353
 
354
- #: classes/odb-displayer.php:141
355
  msgid "Start Optimization"
356
  msgstr "Start Optimalisatie"
357
 
@@ -413,19 +421,19 @@ msgid "SAVINGS"
413
  msgstr "BESPARINGEN"
414
 
415
  # @ default
416
- #: classes/odb-scheduler.php:38
417
  msgid "Once Weekly"
418
  msgstr "Eenmaal per week"
419
 
420
- #: classes/odb-scheduler.php:43
421
  msgid "Every Five Minutes"
422
  msgstr "Iedere vijf minuten"
423
 
424
- #: includes/settings-page.php:91
425
  msgid "Optimize Database after Deleting Revisions SETTINGS UPDATED"
426
  msgstr "Optimize Database after Deleting Revisions INSTELLINGEN AANGEPAST"
427
 
428
- #: includes/settings-page.php:93
429
  msgid ""
430
  "Click <a href=\"tools.php?page=rvg-optimize-database\" class=\"odb-bold"
431
  "\">HERE</a> to run the optimization"
@@ -433,56 +441,76 @@ msgstr ""
433
  "Klik <a href=\"tools.php?page=rvg-optimize-database\" class=\"odb-bold"
434
  "\">HIER</a> om de optimalisatie te starten"
435
 
436
- #: includes/settings-page.php:130 rvg-optimize-database.php:379
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
437
  msgid "Settings"
438
  msgstr "Instellingen"
439
 
440
- #: includes/settings-page.php:135
441
  msgid "Maximum number of - most recent - revisions<br>to keep per post / page"
442
  msgstr ""
443
  "Maximaal aantal - meest recente - revisies<br>om te bewaren per post/pagina"
444
 
445
- #: includes/settings-page.php:139
446
  msgid "('0' means: delete <u>ALL</u> revisions)"
447
  msgstr "('0' betekent: verwijder <u>ALLE</u> revisies)"
448
 
449
- #: includes/settings-page.php:173
 
 
 
 
450
  msgid "Optimize InnoDB tables too"
451
  msgstr "Optimiliseer ook InnoDB tabellen"
452
 
453
- #: includes/settings-page.php:192
454
  msgid "run optimization HOURLY"
455
  msgstr "voer de optimalisatie ELK UUR uit"
456
 
457
- #: includes/settings-page.php:195
458
  msgid "run optimization TWICE A DAY"
459
  msgstr "voer de optimalisatie TWEE KEER PER DAG uit"
460
 
461
- #: includes/settings-page.php:198
462
  msgid "run optimization DAILY"
463
  msgstr "voer de optimalisatie DAGELIJKS uit"
464
 
465
- #: includes/settings-page.php:201
466
  msgid "run optimization WEEKLY"
467
  msgstr "voer de optimalisatie WEKELIJKS uit"
468
 
469
- #: includes/settings-page.php:210
470
  msgid "Time"
471
  msgstr "Tijd"
472
 
473
- #: includes/settings-page.php:235
474
  msgid "Show '1-click' link in Admin Bar"
475
  msgstr "Toon de '1-klik' link in de Admin Balk"
476
 
477
- #: includes/settings-page.php:241
478
  msgid "Show an icon in the Admin Menu"
479
  msgstr "Toon een icon in het Admin Menu"
480
 
481
- #: includes/settings-page.php:246
482
  msgid "change will be visible after loading the next page"
483
  msgstr "wijziging wordt pas zichtbaar na het laden van de volgende pagina"
484
 
485
- #: includes/settings-page.php:250
486
  msgid ""
487
  "EXCLUDE DATABASE TABLES FROM OPTIMIZATION:<br><span class=\"odb-underline-red"
488
  "\">CHECKED</span> TABLES <span class=\"odb-underline-red\">WON'T</span> BE "
@@ -492,23 +520,23 @@ msgstr ""
492
  "underline-red\">AANGEVINKTE</span> TABELLEN ZULLEN <span class=\"odb-"
493
  "underline-red\">NIET</span> GEOPTIMALISEERD WORDEN!</span>"
494
 
495
- #: includes/settings-page.php:256
496
  msgid "check all tables"
497
  msgstr "vink alle tabellen aan"
498
 
499
- #: includes/settings-page.php:258
500
  msgid "uncheck all tables"
501
  msgstr "vink alle tabellen uit"
502
 
503
- #: includes/settings-page.php:260
504
  msgid "check all NON-WordPress tables"
505
  msgstr "vink alle NIET-WordPress tabellen aan"
506
 
507
- #: includes/settings-page.php:287
508
  msgid "Save Settings"
509
  msgstr "Bewaar instellingen"
510
 
511
- #: includes/settings-page.php:289
512
  msgid "Go To Optimizer"
513
  msgstr "Ga naar Optimalisatie"
514
 
2
  msgstr ""
3
  "Project-Id-Version: Optimize Database after Deleting Revisions v2.8.3\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2016-01-12 10:06+0100\n"
6
+ "PO-Revision-Date: 2016-01-12 10:06+0100\n"
7
  "Last-Translator: Rolf van Gelder <info@cagewebdev.com>\n"
8
  "Language-Team: CAGE <info@cagewebdev.com>\n"
9
  "Language: nl_NL\n"
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"
18
+ "X-Poedit-Basepath: ./..\n"
 
19
  "X-Textdomain-Support: yes\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
 
192
  msgid "seconds"
193
  msgstr "seconden"
194
 
195
+ #: classes/odb-cleaner.php:514 classes/odb-displayer.php:142
196
  msgid "View Log File"
197
  msgstr "Bekijk Logbestand"
198
 
199
+ #: classes/odb-cleaner.php:516 classes/odb-displayer.php:144
200
  msgid "Delete Log File"
201
  msgstr "Verwijder Logbestand"
202
 
203
+ #: classes/odb-cleaner.php:1105
204
  msgid "InnoDB table: skipped..."
205
  msgstr "InnoDB tabel overgeslagen..."
206
 
207
+ #: classes/odb-cleaner.php:1111 classes/odb-cleaner.php:1113
208
  msgid "<span class=\"odb-optimized\">TABLE OPTIMIZED</span>"
209
  msgstr "<span class=\"odb-optimized\">TABEL GEOPTIMALISEERD</span>"
210
 
211
+ #: classes/odb-cleaner.php:1112
212
  msgid "Table is already up to date"
213
  msgstr "Tabel is al optimaal"
214
 
240
  msgid "ONCE WEEKLY"
241
  msgstr "WEKELIJKS"
242
 
243
+ #: classes/odb-displayer.php:50 includes/settings-page.php:285
244
  msgid "NOT SCHEDULED"
245
  msgstr "NIET GEPLAND"
246
 
248
  msgid "Current settings"
249
  msgstr "Huidige instellingen"
250
 
251
+ #: classes/odb-displayer.php:61
252
  msgid "Maximum number of - most recent - revisions to keep per post / page"
253
  msgstr ""
254
  "Maximaal aantal (meest recente) revisies die bewaard worden per bericht / "
255
  "pagina"
256
 
257
+ #: classes/odb-displayer.php:64 includes/settings-page.php:150
258
+ #: includes/settings-page.php:217
259
+ msgid "Delete revisions older than"
260
+ msgstr "Verwijder revisies ouder dan"
261
+
262
+ #: classes/odb-displayer.php:64 includes/settings-page.php:222
263
+ msgid "days"
264
+ msgstr "dagen"
265
+
266
+ #: classes/odb-displayer.php:68 includes/settings-page.php:239
267
  msgid "Delete trashed items"
268
  msgstr "Verwijder trashed items"
269
 
270
+ #: classes/odb-displayer.php:69 includes/settings-page.php:245
271
  msgid "Delete spammed items"
272
  msgstr "Verwijder spammed items"
273
 
274
+ #: classes/odb-displayer.php:70 includes/settings-page.php:251
275
  msgid "Delete unused tags"
276
  msgstr "Verwijder ongebruikte tags"
277
 
278
+ #: classes/odb-displayer.php:71 includes/settings-page.php:257
279
  msgid "Delete expired transients"
280
  msgstr "Verwijder verlopen transiënts"
281
 
282
+ #: classes/odb-displayer.php:72 includes/settings-page.php:263
283
  msgid "Delete pingbacks and trackbacks"
284
  msgstr "Verwijder pingback en trackbacks"
285
 
286
+ #: classes/odb-displayer.php:73 includes/settings-page.php:275
287
  msgid "Keep a log"
288
  msgstr "Gebruik een logbestand"
289
 
290
+ #: classes/odb-displayer.php:74
291
  msgid "Optimize InnoDB tables"
292
  msgstr "Optimaliseer InnoDB tabellen"
293
 
294
+ #: classes/odb-displayer.php:75
295
  msgid "Last run"
296
  msgstr "Laatste uitvoering"
297
 
298
+ #: classes/odb-displayer.php:75 classes/odb-displayer.php:84
299
+ #: includes/settings-page.php:316
300
  msgid "hrs"
301
  msgstr "uur"
302
 
303
+ #: classes/odb-displayer.php:76
304
  msgid "Number of excluded tables"
305
  msgstr "Aantal uitgesloten tabellen"
306
 
307
+ #: classes/odb-displayer.php:77 includes/settings-page.php:281
308
  msgid "Scheduler"
309
  msgstr "Planner"
310
 
311
+ #: classes/odb-displayer.php:84
312
  msgid "Next scheduled run"
313
  msgstr "Volgende geplande uitvoering"
314
 
315
+ #: classes/odb-displayer.php:84
316
  msgid "current server time"
317
  msgstr "huidige systeemtijd"
318
 
319
+ #: classes/odb-displayer.php:89
320
  msgid "Total savings since the first run"
321
  msgstr "Totale besparing sinds de eerste uitvoering"
322
 
323
+ #: classes/odb-displayer.php:106
324
  msgid "Optimize Database after Deleting Revisions"
325
  msgstr "Optimize Database after Deleting Revisions"
326
 
327
+ #: classes/odb-displayer.php:109
328
  msgid ""
329
  "A popular 'one-click' plugin to clean and optimize your WordPress database."
330
  msgstr ""
331
  "Een populaire 'one-click' plugin om de WordPress database op te schonen en "
332
  "te optimaliseren."
333
 
334
+ #: classes/odb-displayer.php:112
335
  msgid "Plugin version"
336
  msgstr "Plugin versie"
337
 
338
+ #: classes/odb-displayer.php:113
339
  msgid "Plugin page"
340
  msgstr "Pluginpagina"
341
 
342
+ #: classes/odb-displayer.php:114
343
  msgid "Download page"
344
  msgstr "Downloadpagina"
345
 
346
+ #: classes/odb-displayer.php:115
347
  msgid "Author"
348
  msgstr "Auteur"
349
 
350
+ #: classes/odb-displayer.php:116
351
  msgid "Company"
352
  msgstr "Bedrijf"
353
 
354
+ #: classes/odb-displayer.php:117
355
  msgid "Donation page"
356
  msgstr "Donatiepagina"
357
 
358
+ #: classes/odb-displayer.php:135
359
  msgid "Change Settings"
360
  msgstr "Wijzig instellingen"
361
 
362
+ #: classes/odb-displayer.php:150
363
  msgid "Start Optimization"
364
  msgstr "Start Optimalisatie"
365
 
421
  msgstr "BESPARINGEN"
422
 
423
  # @ default
424
+ #: classes/odb-scheduler.php:39
425
  msgid "Once Weekly"
426
  msgstr "Eenmaal per week"
427
 
428
+ #: classes/odb-scheduler.php:44
429
  msgid "Every Five Minutes"
430
  msgstr "Iedere vijf minuten"
431
 
432
+ #: includes/settings-page.php:102
433
  msgid "Optimize Database after Deleting Revisions SETTINGS UPDATED"
434
  msgstr "Optimize Database after Deleting Revisions INSTELLINGEN AANGEPAST"
435
 
436
+ #: includes/settings-page.php:104
437
  msgid ""
438
  "Click <a href=\"tools.php?page=rvg-optimize-database\" class=\"odb-bold"
439
  "\">HERE</a> to run the optimization"
441
  "Klik <a href=\"tools.php?page=rvg-optimize-database\" class=\"odb-bold"
442
  "\">HIER</a> om de optimalisatie te starten"
443
 
444
+ #: includes/settings-page.php:137
445
+ msgid "You have to enter the maximum number of revisions"
446
+ msgstr "Je moet een maximaal aantal revisies invullen"
447
+
448
+ #: includes/settings-page.php:142
449
+ msgid "Maximum number of revisions should be a number"
450
+ msgstr "Maximaal aantal revisies moet een getal zijn"
451
+
452
+ #: includes/settings-page.php:150
453
+ msgid "You have to enter: "
454
+ msgstr "Je moet invullen:"
455
+
456
+ #: includes/settings-page.php:155
457
+ msgid "<Delete revisions older than> should be a number"
458
+ msgstr "<Verwijder revisites ouder dan> moet een getal zijn"
459
+
460
+ #: includes/settings-page.php:192 rvg-optimize-database.php:379
461
  msgid "Settings"
462
  msgstr "Instellingen"
463
 
464
+ #: includes/settings-page.php:196
465
  msgid "Maximum number of - most recent - revisions<br>to keep per post / page"
466
  msgstr ""
467
  "Maximaal aantal - meest recente - revisies<br>om te bewaren per post/pagina"
468
 
469
+ #: includes/settings-page.php:203
470
  msgid "('0' means: delete <u>ALL</u> revisions)"
471
  msgstr "('0' betekent: verwijder <u>ALLE</u> revisies)"
472
 
473
+ #: includes/settings-page.php:212
474
+ msgid "OR"
475
+ msgstr "OF"
476
+
477
+ #: includes/settings-page.php:269
478
  msgid "Optimize InnoDB tables too"
479
  msgstr "Optimiliseer ook InnoDB tabellen"
480
 
481
+ #: includes/settings-page.php:288
482
  msgid "run optimization HOURLY"
483
  msgstr "voer de optimalisatie ELK UUR uit"
484
 
485
+ #: includes/settings-page.php:291
486
  msgid "run optimization TWICE A DAY"
487
  msgstr "voer de optimalisatie TWEE KEER PER DAG uit"
488
 
489
+ #: includes/settings-page.php:294
490
  msgid "run optimization DAILY"
491
  msgstr "voer de optimalisatie DAGELIJKS uit"
492
 
493
+ #: includes/settings-page.php:297
494
  msgid "run optimization WEEKLY"
495
  msgstr "voer de optimalisatie WEKELIJKS uit"
496
 
497
+ #: includes/settings-page.php:307
498
  msgid "Time"
499
  msgstr "Tijd"
500
 
501
+ #: includes/settings-page.php:331
502
  msgid "Show '1-click' link in Admin Bar"
503
  msgstr "Toon de '1-klik' link in de Admin Balk"
504
 
505
+ #: includes/settings-page.php:337
506
  msgid "Show an icon in the Admin Menu"
507
  msgstr "Toon een icon in het Admin Menu"
508
 
509
+ #: includes/settings-page.php:342
510
  msgid "change will be visible after loading the next page"
511
  msgstr "wijziging wordt pas zichtbaar na het laden van de volgende pagina"
512
 
513
+ #: includes/settings-page.php:346
514
  msgid ""
515
  "EXCLUDE DATABASE TABLES FROM OPTIMIZATION:<br><span class=\"odb-underline-red"
516
  "\">CHECKED</span> TABLES <span class=\"odb-underline-red\">WON'T</span> BE "
520
  "underline-red\">AANGEVINKTE</span> TABELLEN ZULLEN <span class=\"odb-"
521
  "underline-red\">NIET</span> GEOPTIMALISEERD WORDEN!</span>"
522
 
523
+ #: includes/settings-page.php:352
524
  msgid "check all tables"
525
  msgstr "vink alle tabellen aan"
526
 
527
+ #: includes/settings-page.php:354
528
  msgid "uncheck all tables"
529
  msgstr "vink alle tabellen uit"
530
 
531
+ #: includes/settings-page.php:356
532
  msgid "check all NON-WordPress tables"
533
  msgstr "vink alle NIET-WordPress tabellen aan"
534
 
535
+ #: includes/settings-page.php:383
536
  msgid "Save Settings"
537
  msgstr "Bewaar instellingen"
538
 
539
+ #: includes/settings-page.php:385
540
  msgid "Go To Optimizer"
541
  msgstr "Ga naar Optimalisatie"
542
 
readme.txt CHANGED
@@ -7,9 +7,9 @@ Tags: database, delete, revisions, optimize, post, posts, page, pages, clean, cl
7
  Author URI: http://cagewebdev.com
8
  Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
9
  Requires at least: 2.8
10
- Tested up to: 4.4
11
- Stable tag: 4.0.3
12
- Version: 4.0.3
13
  License: GPLv2 or later
14
 
15
  == Description ==
@@ -42,8 +42,7 @@ Note: you also can click the 'Optimize DB (1 click)' link in the admin bar (if e
42
  = Multisite Support =
43
  * Install the plugin as Network Administrator (Network Admin &raquo; Plugins)
44
  * 'Network Activate' the plugin
45
- * The settings are the same for ALL sites in the network, so if you change a setting for one site, it will be used for all other sites.
46
- * If you run the plugin from any of the sites, it will cleanup ALL the sites in the network!
47
 
48
  = Supported languages =
49
  * Danish [da_DK] - translated by Alexander Leo-Hansen - http://alexanderleohansen.dk
@@ -51,6 +50,7 @@ Note: you also can click the 'Optimize DB (1 click)' link in the admin bar (if e
51
  * English [en_US] - translated by Rolf van Gelder, CAGE Web Design - http://cagewebdev.com
52
  * German [de_DE] - translated by the.mnbvcx
53
  * Italian [it_IT] - translated by Fabio Marzocca
 
54
  * Russian [ru_RU] - translated by Vadim Sokhin, PluginZone - http://pluginzone.ru
55
  * Serbian [sr_RS] - translated by Ogi Djuraskovic, FirstSiteGuide - http://firstsiteguide.com
56
  * Swedish [sv_SE] - translated by P.E.
@@ -86,6 +86,12 @@ http://cagewebdev.com/index.php/wordpress-plugins/
86
  * If you run the plugin from any of the sites, it will cleanup ALL the sites in the network!
87
 
88
  == Changelog ==
 
 
 
 
 
 
89
  = 4.0.3 [12/17/2015] =
90
  * BUG FIX: Bug fix for Cron Schedules
91
  * BUG FIX: Un-installation generated an error
7
  Author URI: http://cagewebdev.com
8
  Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands
9
  Requires at least: 2.8
10
+ Tested up to: 4.4.1
11
+ Stable tag: 4.1
12
+ Version: 4.1
13
  License: GPLv2 or later
14
 
15
  == Description ==
42
  = Multisite Support =
43
  * Install the plugin as Network Administrator (Network Admin &raquo; Plugins)
44
  * 'Network Activate' the plugin
45
+ * You only can configure and run the plugin on the main network site, but it will optimize ALL the sub-sites too!
 
46
 
47
  = Supported languages =
48
  * Danish [da_DK] - translated by Alexander Leo-Hansen - http://alexanderleohansen.dk
50
  * English [en_US] - translated by Rolf van Gelder, CAGE Web Design - http://cagewebdev.com
51
  * German [de_DE] - translated by the.mnbvcx
52
  * Italian [it_IT] - translated by Fabio Marzocca
53
+ * Persian [fa_IR] - translated by Milad Mordi, http://seodaramal.ir
54
  * Russian [ru_RU] - translated by Vadim Sokhin, PluginZone - http://pluginzone.ru
55
  * Serbian [sr_RS] - translated by Ogi Djuraskovic, FirstSiteGuide - http://firstsiteguide.com
56
  * Swedish [sv_SE] - translated by P.E.
86
  * If you run the plugin from any of the sites, it will cleanup ALL the sites in the network!
87
 
88
  == Changelog ==
89
+ = 4.1 [01/14/2016] =
90
+ * NEW: New option: delete revisions older than...
91
+ * NEW: Persian translation (fa_IR) added
92
+ * CHANGE: For muliti-site installations you only can use the plugin on the Main site, but all other sites will be cleaned too.
93
+ * CHANGE: Some minor updates / changes
94
+
95
  = 4.0.3 [12/17/2015] =
96
  * BUG FIX: Bug fix for Cron Schedules
97
  * BUG FIX: Un-installation generated an error
rvg-optimize-database.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * @package Optimize Database after Deleting Revisions
4
- * @version 4.0.3
5
  */
6
  /*
7
  Plugin Name: Optimize Database after Deleting Revisions
@@ -9,7 +9,7 @@ Plugin URI: http://cagewebdev.com/index.php/optimize-database-after-deleting-rev
9
  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
- Version: 4.0.3
13
  */
14
 
15
  /********************************************************************************************
@@ -24,8 +24,8 @@ $odb_class = new OptimizeDatabase();
24
  class OptimizeDatabase
25
  {
26
  // VERSION
27
- var $odb_version = '4.0.3';
28
- var $odb_release_date = '12/17/2015';
29
 
30
  // PLUGIN OPTIONS
31
  var $odb_rvg_options = array();
@@ -35,7 +35,6 @@ class OptimizeDatabase
35
 
36
  // MULTISITE STRUCTURE
37
  var $odb_ms_prefixes = array();
38
- var $odb_ms_blogids = array();
39
 
40
  // DATABASE TABLES
41
  var $odb_tables = array();
@@ -56,7 +55,6 @@ class OptimizeDatabase
56
  // LOGGING
57
  var $odb_logfile_url;
58
  var $odb_logfile_path;
59
- var $odb_log_arr = array();
60
 
61
  // OBJECTS
62
  var $odb_cleaner_obj;
@@ -188,8 +186,14 @@ class OptimizeDatabase
188
  $this->odb_rvg_options['logging_on'] = 'N';
189
  if(!isset($this->odb_rvg_options['nr_of_revisions']))
190
  $this->odb_rvg_options['nr_of_revisions'] = (int)0;
 
 
 
191
  if(!isset($this->odb_rvg_options['optimize_innodb']))
192
- $this->odb_rvg_options['optimize_innodb'] = 'N';
 
 
 
193
  if(!isset($this->odb_rvg_options['schedule_type']))
194
  $this->odb_rvg_options['schedule_type'] = '';
195
  if(!isset($this->odb_rvg_options['schedule_hour']))
@@ -314,6 +318,8 @@ class OptimizeDatabase
314
  *******************************************************************************/
315
  function odb_init_hooks()
316
  {
 
 
317
  // ON DE-ACTIVATION
318
  register_deactivation_hook(__FILE__, array('OptimizeDatabase', 'odb_deactivation_handler'));
319
 
@@ -321,8 +327,18 @@ class OptimizeDatabase
321
  register_uninstall_hook(__FILE__, array('OptimizeDatabase', 'odb_uninstallation_handler'));
322
 
323
  // ADD ENTRY TO ADMIN TOOLS MENU
324
- add_action('admin_menu', array(&$this, 'odb_admin_tools'));
325
- add_action('admin_menu', array(&$this, 'odb_admin_settings'));
 
 
 
 
 
 
 
 
 
 
326
 
327
  // ICON MODE: ADD ICON TO ADMIN MENU
328
  if ($this->odb_rvg_options['adminmenu'] == "Y")
@@ -542,12 +558,14 @@ class OptimizeDatabase
542
  { /****************************************************************************************
543
  * START SCREEN (SHOW SETTINGS + BUTTONS)
544
  ****************************************************************************************/
545
- $this->odb_displayer_obj->display_start_buttons();
546
  }
547
  else
548
  { /****************************************************************************************
549
  * RUN CLEANING AND OPTIMIZATION
550
  ****************************************************************************************/
 
 
551
  // REGISTER THE LAST RUN
552
  $this->odb_rvg_options['last_run'] = Date('M j, Y @ H:i');
553
  $this->odb_multisite_obj->odb_ms_update_option('odb_rvg_options', $this->odb_rvg_options);
1
  <?php
2
  /**
3
  * @package Optimize Database after Deleting Revisions
4
+ * @version 4.1
5
  */
6
  /*
7
  Plugin Name: Optimize Database after Deleting Revisions
9
  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
+ Version: 4.1
13
  */
14
 
15
  /********************************************************************************************
24
  class OptimizeDatabase
25
  {
26
  // VERSION
27
+ var $odb_version = '4.1';
28
+ var $odb_release_date = '01/14/2016';
29
 
30
  // PLUGIN OPTIONS
31
  var $odb_rvg_options = array();
35
 
36
  // MULTISITE STRUCTURE
37
  var $odb_ms_prefixes = array();
 
38
 
39
  // DATABASE TABLES
40
  var $odb_tables = array();
55
  // LOGGING
56
  var $odb_logfile_url;
57
  var $odb_logfile_path;
 
58
 
59
  // OBJECTS
60
  var $odb_cleaner_obj;
186
  $this->odb_rvg_options['logging_on'] = 'N';
187
  if(!isset($this->odb_rvg_options['nr_of_revisions']))
188
  $this->odb_rvg_options['nr_of_revisions'] = (int)0;
189
+ // v4.1
190
+ if(!isset($this->odb_rvg_options['older_than']))
191
+ $this->odb_rvg_options['older_than'] = '';
192
  if(!isset($this->odb_rvg_options['optimize_innodb']))
193
+ $this->odb_rvg_options['optimize_innodb'] = 'N';
194
+ // v4.1
195
+ if(!isset($this->odb_rvg_options['revision_mode']))
196
+ $this->odb_rvg_options['revision_mode'] = 1;
197
  if(!isset($this->odb_rvg_options['schedule_type']))
198
  $this->odb_rvg_options['schedule_type'] = '';
199
  if(!isset($this->odb_rvg_options['schedule_hour']))
318
  *******************************************************************************/
319
  function odb_init_hooks()
320
  {
321
+ global $blog_id;
322
+
323
  // ON DE-ACTIVATION
324
  register_deactivation_hook(__FILE__, array('OptimizeDatabase', 'odb_deactivation_handler'));
325
 
327
  register_uninstall_hook(__FILE__, array('OptimizeDatabase', 'odb_uninstallation_handler'));
328
 
329
  // ADD ENTRY TO ADMIN TOOLS MENU
330
+ if (is_multisite())
331
+ { if ($blog_id == 1)
332
+ { // v4.1: PLUGIN ONLY CAN BE USED ON THE MAIN SITE (NOT ON THE SUB SITES)
333
+ add_action('admin_menu', array(&$this, 'odb_admin_tools'));
334
+ add_action('admin_menu', array(&$this, 'odb_admin_settings'));
335
+ }
336
+ }
337
+ else
338
+ {
339
+ add_action('admin_menu', array(&$this, 'odb_admin_tools'));
340
+ add_action('admin_menu', array(&$this, 'odb_admin_settings'));
341
+ }
342
 
343
  // ICON MODE: ADD ICON TO ADMIN MENU
344
  if ($this->odb_rvg_options['adminmenu'] == "Y")
558
  { /****************************************************************************************
559
  * START SCREEN (SHOW SETTINGS + BUTTONS)
560
  ****************************************************************************************/
561
+ $this->odb_displayer_obj->display_start_buttons($action);
562
  }
563
  else
564
  { /****************************************************************************************
565
  * RUN CLEANING AND OPTIMIZATION
566
  ****************************************************************************************/
567
+ $this->odb_displayer_obj->display_start_buttons($action);
568
+
569
  // REGISTER THE LAST RUN
570
  $this->odb_rvg_options['last_run'] = Date('M j, Y @ H:i');
571
  $this->odb_multisite_obj->odb_ms_update_option('odb_rvg_options', $this->odb_rvg_options);