• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Ways to leave addon data while addon uninstall

xf_phantom

Well-known member
#1
What would be the best way to do to implement a OPTIONAL feature, to NOT delete the custom addon data (tables)


PHP:
  protected function _postDelete()
   {
     if ($this->get('uninstall_callback_class') && $this->get('uninstall_callback_method'))
     {
       call_user_func(
         array($this->get('uninstall_callback_class'), $this->get('uninstall_callback_method')),
         $this->getMergedData()
       );
     }

     $addOnModel = $this->_getAddOnModel();
     $addOnModel->deleteAddOnMasterData($this->get('addon_id'));

     $addOnModel->rebuildAddOnCaches();
     $addOnModel->rebuildActiveAddOnCache();
   }
because the addon datawriter calls the uninstall callback BEFORE the addon data get deleted i was thinking about a on/off acp option for this.

Anybody using this already, or an similar way?