Example #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();
    }
}