source: extensions/autoupdate/trunk/ajax/ignore_list.php @ 9710

Last change on this file since 9710 was 9710, checked in by patdenice, 13 years ago

New languages keys.

File size: 1.2 KB
Line 
1<?php
2
3define('PHPWG_ROOT_PATH','../../../');
4define('IN_ADMIN', true);
5include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
6include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
7include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php');
8
9check_status(ACCESS_ADMINISTRATOR);
10
11if (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  exit;
18}
19
20if (empty($_POST['id']) or empty($_POST['type']))
21{
22  die;
23}
24
25// Add or remove plugin from ignore list
26$ignore = $conf['AU_ignore'][$_POST['type']];
27$ignore = array_flip($ignore);
28
29if (isset($ignore[$_POST['id']]))
30{
31  unset($ignore[$_POST['id']]);
32  $ignore = array_flip($ignore);
33}
34else
35{
36  $ignore = array_flip($ignore);
37  array_push($ignore, $_POST['id']);
38}
39
40sort($ignore);
41$conf['AU_ignore'][$_POST['type']] = $ignore;
42conf_update_param('autoupdate_ignore_list', pwg_db_real_escape_string(serialize($conf['AU_ignore'])));
43unset($_SESSION['extensions_need_update']);
44echo 'ok';
45
46?>
Note: See TracBrowser for help on using the repository browser.