function plugin_news_uninstall()
{
    if (!PluginNewsAlert::dropTable() || !PluginNewsProfile::dropTable()) {
        Session::addMessageAfterRedirect('Uninstallation failed');
        return false;
    }
    PluginNewsProfile::uninstallProfile();
    return true;
}
<?php

/*
 *
 -------------------------------------------------------------------------
 Plugin GLPI News
 Copyright (C) 2015 by teclib.
 http://www.teclib.com
 -------------------------------------------------------------------------
 LICENSE
 This file is part of Plugin GLPI News.
 Plugin GLPI News is free software; you can redistribute it and/or modify
 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.
 Plugin GLPI News 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 Plugin GLPI News. If not, see <http://www.gnu.org/licenses/>.
 --------------------------------------------------------------------------
*/
include GLPI_ROOT . "../../../inc/includes.php";
Session::checkRight('profile', UPDATE);
$profile = new PluginNewsProfile();
$profile->update($_POST);
PluginNewsProfile::changeProfile();
Html::back();