function plugin_purgelogs_uninstall() { include GLPI_ROOT . "/plugins/purgelogs/inc/config.class.php"; include GLPI_ROOT . "/plugins/purgelogs/inc/purge.class.php"; PluginPurgelogsConfig::uninstall(); PluginPurgelogsPurge::uninstall(); return true; }
static function cronPurgeLogs($task) { $config = new PluginPurgelogsConfig(); $config->getFromDB(1); $logs_before = self::getLogsCount(); if ($logs_before) { self::purgeSoftware($config); self::purgeInfocom($config); self::purgeUserInfos($config); self::purgeWebserviceslogs($config); self::purgeOcsInfos($config); self::purgeDevices($config); self::purgeRelations($config); self::purgeItems($config); self::purgeOthers($config); self::purgeGenericobject($config); $logs_after = self::getLogsCount(); $task->addVolume($logs_before - $logs_after); } else { $task->addVolume(0); } return true; }
it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. purgelogs plugin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GLPI; along with purgelogs. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- @package purgelogs @author the purgelogs plugin team @copyright Copyright (c) 2010-2011 purgelogs plugin team @license GPLv2+ http://www.gnu.org/licenses/gpl.txt @link https://forge.indepnet.net/projects/purgelogs @link http://www.glpi-project.org/ @since 2009 ---------------------------------------------------------------------- */ include "../../../inc/includes.php"; Session::checkRight("config", UPDATE); $config = new PluginPurgelogsConfig(); if (isset($_POST["update"])) { $config->update($_POST); Html::back(); } Html::header(__("Purge history", "purgelogs"), $_SERVER['PHP_SELF'], "plugins", "config"); $config->showForm(); Html::footer();