3 * FusionForge Documentation Manager
5 * Copyright 2010-2011, Franck Villaume - Capgemini
6 * Copyright 2013-2015, Franck Villaume - TrivialDev
7 * http://fusionforge.org
9 * This file is part of FusionForge. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 /* please do not add require here : use www/docman/index.php to add require */
26 /* global variables used */
27 global $g; // Group object
28 global $group_id; // id of group
29 global $childgroup_id; // id of child group if any
34 $redirecturl = DOCMAN_BASEURL.$group_id;
36 // plugin projects-hierarchy handler
38 $redirecturl .= '&childgroup_id='.$childgroup_id;
39 $g = group_get_object($childgroup_id);
42 if (!forge_check_perm('docman', $g->getID(), 'submit')) {
43 $warning_msg = _('Document Manager Action Denied.');
44 session_redirect($redirecturl);
47 $dm = new DocumentManager($g);
48 if (!$dm->cleanTrash()) {
49 $error_msg = _('Unable to clean trash');
50 session_redirect($redirecturl);
53 $feedback = _('Emptied Trash successfully.');
54 session_redirect($redirecturl);