Subject: Handle postinstall

Posted on: 06/12/11 03:59am
By: ::Ben

Before autoinstall plugins handled postinstall functions by calling a plugin_postinstall function
PHP Formatted Code
// give the plugin a chance to perform any post-install operations
    if (function_exists ('plugin_postinstall')) {
        if (!plugin_postinstall ()) {
            $uninstall_plugin ();

            return false;
        }
    }



What is the best way to do it now?

Ben

Re: Handle postinstall

Posted on: 06/12/11 04:03am
By: Dirk

The postinstall function is still supported. Are you saying it doesn't work?

bye, Dirk

Re: Handle postinstall

Posted on: 06/12/11 07:00am
By: ::Ben

As I do not found any function calling to plugin_postinstall in the system folder, I assume that authors of plugins must include the call somewhere.

The question is where?

Ben

Re: Handle postinstall

Posted on: 06/12/11 07:08am
By: Dirk

It's called either from the install script or from admin/plugins.php - so that's why you won't find it in systems Smile

Both the bundled Links and XMLSitemap plugins have a postinstall function in their autoinstall.php that you can refer to for examples.

bye, Dirk

Re: Handle postinstall

Posted on: 06/12/11 10:14am
By: ::Ben

Mr. Green I forgot to look at the right folder.

Thanks,

Ben

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=93714