1 | <?php |
---|
2 | |
---|
3 | define('PHPWG_ROOT_PATH','../../../'); |
---|
4 | define('IN_ADMIN', true); |
---|
5 | include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); |
---|
6 | include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); |
---|
7 | include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php'); |
---|
8 | |
---|
9 | check_status(ACCESS_ADMINISTRATOR); |
---|
10 | |
---|
11 | if (isset($_POST['reset'])) |
---|
12 | { |
---|
13 | $conf['AU_ignore'] = array('plugins'=>array(),'themes'=>array(),'languages'=>array()); |
---|
14 | conf_update_param('autoupdate_ignore_list', pwg_db_real_escape_string(serialize($conf['AU_ignore']))); |
---|
15 | unset($_SESSION['extensions_need_update']); |
---|
16 | echo 'ok'; |
---|
17 | } |
---|
18 | |
---|
19 | if (empty($_POST['id']) or empty($_POST['type'])) |
---|
20 | { |
---|
21 | die; |
---|
22 | } |
---|
23 | |
---|
24 | // Add or remove plugin from ignore list |
---|
25 | $ignore = $conf['AU_ignore'][$_POST['type']]; |
---|
26 | $ignore = array_flip($ignore); |
---|
27 | |
---|
28 | if (isset($ignore[$_POST['id']])) |
---|
29 | { |
---|
30 | unset($ignore[$_POST['id']]); |
---|
31 | $ignore = array_flip($ignore); |
---|
32 | } |
---|
33 | else |
---|
34 | { |
---|
35 | $ignore = array_flip($ignore); |
---|
36 | array_push($ignore, $_POST['id']); |
---|
37 | } |
---|
38 | |
---|
39 | sort($ignore); |
---|
40 | $conf['AU_ignore'][$_POST['type']] = $ignore; |
---|
41 | conf_update_param('autoupdate_ignore_list', pwg_db_real_escape_string(serialize($conf['AU_ignore']))); |
---|
42 | unset($_SESSION['extensions_need_update']); |
---|
43 | echo 'ok'; |
---|
44 | |
---|
45 | ?> |
---|