Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Kurt Payne

    (@kurtpayne)

    Hey,

    Really appreciate the input. Great patch, too. I made two tiny additions to the upgrade routine and the readme file and have the results on the git mirror:

    https://github.com/kurtpayne/wordpress-upload-scanner-plugin

    Can you give this a whirl on your site and make sure it works as you expect?

    Thank you!

    Thread Starter Jonathan Daggerhart

    (@daggerhart)

    Sure, I can test it. It might take me a few days, but I’ll let you know what I find out.

    Thread Starter Jonathan Daggerhart

    (@daggerhart)

    Just tested the github copy and it lost my settings on upgrade. I could be wrong, but I don’t think you need to delete the old options for multisite on upgrade. As I understand the X_site_option() functions, they fallback to the x_option() functions if !is_multisite(). Check out line 913 here: http://core.trac.wordpress.org/browser/tags/3.6/wp-includes/option.php#L885

    Maybe I’m assuming too much, but I think you are safe to just always use the x_site_option() functions because they are “multisite smart”.

    Thoughts?

    Plugin Author Kurt Payne

    (@kurtpayne)

    Hey,

    You’re absolutely right. I was trying to get the upgrade routine to work here:

    https://github.com/kurtpayne/wordpress-upload-scanner-plugin/blob/master/upload-scanner/class-upload-scanner-plugin.php#L119-L143

    This way, users upgrading from 1.2 or lower, would have their single site “options” migrated to multisite “site_options” automatically. Looks like I didn’t quite get it right.

    Does this make sense?

    Thread Starter Jonathan Daggerhart

    (@daggerhart)

    I get what you were going for, but don’t have enough multisite experience yet to know if it’s necessary.

    To accomplish that I think you’d need to store the existing options in a variable, then delete the old options before updating the new ones.

    Example for single option:

    $var1 = get_option('upload-scanner_use_clamav', false);

    if (is_multisite()){
    delete_option('upload-scanner_use_clamav');
    }

    update_site_option('upload-scanner_use_clamav', $var1);

    That should avoid losing any data.

    Plugin Author Kurt Payne

    (@kurtpayne)

    Does the new upgrade routine work for you?

    I’ve been running Upload Scanner v1.2 on a Multisite Network instance for a few months now.

    I’d be happy to install v1.3 on my instance if you’d like some help testing but it would probably be best if you tell me exactly what to look for.

    Plugin Author Kurt Payne

    (@kurtpayne)

    Hi nopivnick,

    If you can test 1.3, that’d be great. Just upload it and make sure it doesn’t lose your settings. Then make sure that the settings are global (network-wide, not per site). That’s it.

    fyi, I don’t have an FTP server running on my box which means I can’t run any so-called “automatic updates” via web browser.

    my update process from Upload Scanner v1.2 → v1.3 would be as follows:

    1. network deactivate v1.2 of upload-scanner
    2. delete the plugin directory in /wp-content/plugins from the command line
    3. unzip the GitHub files
    4. restart php5-fpm
    5. network activate v1.3 of upload-scanner

    then I’d look for retained settings and test that the plugin was scanning uploads on child sites, not just the main (aka parent, default) site.

    does that satisfy your testing parameters or should I wait until I’ve finished configuring Automatic Updates via SSH to test the upgrade to version 1.3?

    Plugin Author Kurt Payne

    (@kurtpayne)

    That should work.

    You could also unzip in place. This plugin’s activate routine doesn’t do anything except check for prerequisites. The upgrade check on hit to admin_init.

    okay.

    1.) I can confirm that post-update v1.2 → v1.3 RC all my settings under

    Network Admin » Settings » Upload Scanner

    were retained with one minor catch: plugin log content no longer appears in

    Network Admin » Settings » View Log button » Upload Scan Log pane

    2.) I can also confirm that my Upload Scanner settings continue to apply to child sites that existed prior to the update, as well as new child sites created after the update.

    hope that helps.

    Plugin Author Kurt Payne

    (@kurtpayne)

    Hi nopivnick,

    Can you confirm your log path is correct, it exists, and the file is readable by your php user?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Multisite support’ is closed to new replies.