tiki-plugins.php 1.3 KB
Newer Older
1
<?php
2
// (c) Copyright 2002-2011 by authors of the Tiki Wiki CMS Groupware Project
changi67's avatar
changi67 committed
3
// 
4 5
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
6
// $Id$
changi67's avatar
changi67 committed
7

8 9 10
require_once 'tiki-setup.php';
$access->check_feature('wiki_validate_plugin');
$access->check_permission('tiki_p_plugin_approve');
11 12
$smarty->assign('headtitle', tra('Plugin Approval'));

13 14
$parserlib = TikiLib::lib('parser');

15
if (isset($_POST['submit_mult']) && ($_POST['submit_mult'] == 'clear') && is_array($_POST['clear'])) {
sylvieg's avatar
sylvieg committed
16
	foreach($_POST['clear'] as $fp) {
17
		$parserlib->plugin_clear_fingerprint($fp);
sylvieg's avatar
sylvieg committed
18
	}
19
}
20

21
if (isset($_POST['submit_mult']) && ($_POST['submit_mult'] == 'approve') && is_array($_POST['clear'])) {
22
	foreach($_POST['clear'] as $fp) {
23
		$parserlib->approve_selected_pending_plugings($fp);
24 25 26
	}
}

27
if (isset($_REQUEST['approveone'])) {
28
	$parserlib->approve_selected_pending_plugings($_REQUEST['approveone']);
29 30 31
}

if (isset($_REQUEST['clearone'])) {
32
	$parserlib->plugin_clear_fingerprint($_REQUEST['clearone']);
33 34 35 36 37 38
}





39
if (isset($_POST['approveall'])) {
40
	$parserlib->approve_all_pending_plugins();
41
}
42

43
$smarty->assign('plugin_list', $parserlib->list_plugins_pending_approval());
changi67's avatar
changi67 committed
44
$smarty->assign('mid', 'tiki-plugins.tpl');
45
$smarty->display("tiki.tpl");