Пример #1
0
    /**
     * delete the module
     *
     * @author  Francesc Bassas i Bullich
     * @return  bool true if successful, false otherwise
     */
    public function uninstall() {
        // Delete all module variables
        $this->delVar('SiriusXtecMailer');

        EventUtil::unregisterPersistentModuleHandler('SiriusXtecMailer');

        // Deletion successful
        return true;
    }
Пример #2
0
    /**
     * delete the comments module
     *
     */
    public function uninstall() {
        // drop tables
        $tables = array('IWstats', 'IWstats_summary');
        
        foreach ($tables as $table) {
            if (!DBUtil::dropTable($table)) {
                return false;
            }
        }

        // delete config variables
        $this->delVars();

        // delete the system init hook
        EventUtil::unregisterPersistentModuleHandler('IWstats', 'core.postinit', array('IWstats_Listeners', 'coreinit'));

        // Deletion successful
        return true;
    }
Пример #3
0
 /**
 * Remove SiriusXtecAuth module and all associative information.
 */
 public function uninstall()
 {
     $this->delVars;
     EventUtil::unregisterPersistentModuleHandler('SiriusXtecAuth');
     return true;
 }
Пример #4
0
 public function uninstall()
 {
     // drop table
     if (!DBUtil::dropTable('scribite')) {
         return false;
     }
     // Delete any module variables
     $this->delVars();
     EventUtil::unregisterPersistentModuleHandler('Scribite', 'core.postinit', array('Scribite_Listeners', 'coreinit'));
     // Deletion successful
     return true;
 }
Пример #5
0
 /**
  * Delete module
  *
  * @return  boolean    true/false
  */
 public function uninstall()
 {
     $table_prefix = ModUtil::getVar('ZphpBB2', 'table_prefix', 'phpbb_');
     $tablenames = ZphpBB2_Util::getTableNames();
     $connection = Doctrine_Manager::getInstance()->getCurrentConnection();
     // str_replace is because _ is wildcard character, as %
     $stmt = $connection->prepare("SHOW TABLES LIKE '" . str_replace('_', '\\_', $table_prefix) . "%'");
     try {
         $stmt->execute();
     } catch (Exception $e) {
         return LogUtil::registerError(__('Error: ') . $e->getMessage());
     }
     $items = $stmt->fetchAll(Doctrine_Core::FETCH_NUM);
     foreach ($items as $item) {
         $table_stem = ZphpBB2_Util::getTableStem($item[0], $table_prefix);
         if (in_array($table_stem, $tablenames)) {
             $stmt = $connection->prepare("DROP TABLE `" . $item[0] . "`");
             try {
                 $stmt->execute();
             } catch (Exception $e) {
                 return LogUtil::registerError(__('Error: ') . $e->getMessage());
             }
         }
     }
     // Unregister event handlers
     EventUtil::unregisterPersistentModuleHandler('ZphpBB2', 'user.account.create', array('ZphpBB2_Listener_UsersSynch', 'createAccountListener'));
     EventUtil::unregisterPersistentModuleHandler('ZphpBB2', 'user.account.update', array('ZphpBB2_Listener_UsersSynch', 'updateAccountListener'));
     EventUtil::unregisterPersistentModuleHandler('ZphpBB2', 'user.account.delete', array('ZphpBB2_Listener_UsersSynch', 'deleteAccountListener'));
     return true;
 }
Пример #6
0
 /**
  * delete the EZComments module from an old version
  *
  * This function deletes the module to be used. It deletes tables,
  * registers hooks,...
  *
  * @return boolean true on success, false otherwise.
  */
 public function uninstall()
 {
     if (!ModUtil::unregisterHook('item', 'display', 'GUI', 'EZComments', 'user', 'view')) {
         return LogUtil::registerError($this->__('Error deleting hook.'));
     }
     if (!ModUtil::unregisterHook('item', 'delete', 'API', 'EZComments', 'admin', 'deletebyitem')) {
         return LogUtil::registerError($this->__('Error deleting hook.'));
     }
     if (!ModUtil::unregisterHook('module', 'remove', 'API', 'EZComments', 'admin', 'deletemodule')) {
         return LogUtil::registerError($this->__('Error deleting hook.'));
     }
     // drop main table
     if (!DBUtil::dropTable('EZComments')) {
         return false;
     }
     // delete all module vars for the ezcomments module
     $this->delVars();
     HookUtil::unregisterProviderBundles($this->version->getHookProviderBundles());
     HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles());
     EventUtil::unregisterPersistentModuleHandler('EZComments', 'installer.module.uninstalled', array('EZComments_EventHandlers', 'moduleDelete'));
     EventUtil::unregisterPersistentModuleHandler('EZComments', 'installer.subscriberarea.uninstalled', array('EZComments_EventHandlers', 'hookAreaDelete'));
     // Deletion successful
     return true;
 }