Ways to leave addon data while addon uninstall

xf_phantom

Well-known member
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?
 
Back
Top Bottom