This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
MatritumCantat_Web/www/administrator/components/com_docman/uninstall.docman.php
2012-09-18 20:02:43 +00:00

36 lines
1.0 KiB
PHP

<?php
/**
* DOCman 1.4.x - Joomla! Document Manager
* @version $Id: uninstall.docman.php 766 2009-01-08 11:41:35Z mathias $
* @package DOCman_1.4
* @copyright (C) 2003-2009 Joomlatools
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.joomlatools.eu/ Official website
**/
defined('_VALID_MOS') or die('Restricted access');
require_once( dirname(__FILE__).DIRECTORY_SEPARATOR.'install.docman.helper.php');
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();
}
}