• Resolved Steve Miller

    (@undebtedly)


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.

    Thread Starter Steve Miller

    (@undebtedly)

    Oh, right. <facepalm> Duh. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP-DB-Backup] Can't exclude both spam and post revisions’ is closed to new replies.