Пример #1
0
function com_uninstall()
{
    $lang = JFactory::getLanguage();
    $lang->load('com_installer');
    DMInstallHelper::removeFiles();
    DMInstallHelper::deleteFromDb();
    // if there's no more data, we remove the tables
    if (DMInstallHelper::cntDbRecords() == 0) {
        DMInstallHelper::removeTables();
    }
    // delete the data folder if it's empty
    if (DMInstallHelper::cntFiles() == 0) {
        DMInstallHelper::removeDmdocuments();
    }
}
function com_uninstall()
{
    global $_DOCMAN;
    // remove modules
    if (defined('_DM_J15')) {
        DMInstallHelper::moduleFilesJ15('delete');
    } else {
        DMInstallHelper::moduleFiles('delete');
    }
    DMInstallHelper::pluginFiles('delete');
    DMInstallHelper::pluginDb('delete');
    // if there's no more data, we remove the tables
    if (DMInstallHelper::cntDbRecords() == 0) {
        DMInstallHelper::removeTables();
    }
    // delete the data folder if it's empty
    if (DMInstallHelper::cntFiles() == 0) {
        DMInstallHelper::removeDmdocuments();
    }
}