[resolved] Can't exclude both spam and post revisions (3 posts)

  1. Steve Miller
    Posted 5 years ago #

    I'm looking through the code of wp-db-backup.php. As far as I can tell, the following code won't allow the user to exclude both spam comments and post revisions, even if he's checked both boxes in the interface:

    if ( is_array($excs['spam'] ) && in_array($table, $excs['spam']) ) {
    $where = ' WHERE comment_approved != "spam"';
    } elseif ( is_array($excs['revisions'] ) && in_array($table, $excs['revisions']) ) {
    $where = ' WHERE post_type != "revision"';

    One WHERE clause or the other will be executed in the generated SQL string, but not both.

  2. Austin Matzko
    Plugin Author

    Posted 5 years ago #

    No, spam is in the comments table and revisions are in the posts table, so there is no situation in which both WHERE clauses would apply to the same table.

  3. Steve Miller
    Posted 5 years ago #

    Oh, right. <facepalm> Duh. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-DB-Backup
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic