• Resolved planettao

    (@planettao)


    After install WP-DBManager my network users are seeing messages about backup folders not being writable at the top of all DashBoard pages. Obviously, I don’t want users backing up my database. I don’t want those messages displayed.

    Is there some way to turn off the messages?

    https://wordpress.org/plugins/wp-dbmanager/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Lester Chan

    (@gamerz)

    Thread Starter planettao

    (@planettao)

    For some reason the option to suppress Admin Notices wasn’t working. Based on the code below I was able to stop them from printing. I traced the messages to wp-dbmanager.php, line 153. My change and the original below.

    Modified check which appears to work:

    if( isset( $backup_options[‘hide_admin_notices’] ) || intval( $backup_options[‘hide_admin_notices’] ) === 1 )

    Original:

    if( ! isset( $backup_options[‘hide_admin_notices’] ) || intval( $backup_options[‘hide_admin_notices’] ) === 0 )

    Plugin Author Lester Chan

    (@gamerz)

    For a moment I thought that is a bug in the code but when I tried a brand new install of WP with DBManager 2.75. I am able to surpress the warning just fine.

    Thread Starter planettao

    (@planettao)

    I suspect there’s a difference in compiler precedence at play. I changed the statement again. I added additional parenthesis so that the result of both logical statements is negated, not just the result of isset. This change worked on my system and has the benefit that it doesn’t actually change your code so much as instruct the compiler on precedence.

    My change:

    if( ! (isset( $backup_options[‘hide_admin_notices’] ) || intval( $backup_options[‘hide_admin_notices’] ) === 0 ))

    Original:

    if( ! isset( $backup_options[‘hide_admin_notices’] ) || intval( $backup_options[‘hide_admin_notices’] ) === 0 )

    I’m running Windows Server 2012 R2 with IIS 8.5. I used the Microsoft Web Platform Installer 5.0 to install WordPress 4.1.1. The Installer installs PHP 5.4.24 by default.

    So that’s my environment. Sorry – I’m from that dang Windows world.

    I appreciate that you looked at my post. Hopefully, I’ve given something back.

    Plugin Author Lester Chan

    (@gamerz)

    Thanks for sharing nevertheless @planettao. I also appreciate your detailed reply which is rare here!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Dashboard for users shows information on Backups’ is closed to new replies.