[9707] | 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'; |
---|
[9710] | 17 | exit; |
---|
[9707] | 18 | } |
---|
| 19 | |
---|
| 20 | if (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 | |
---|
| 29 | if (isset($ignore[$_POST['id']])) |
---|
| 30 | { |
---|
| 31 | unset($ignore[$_POST['id']]); |
---|
| 32 | $ignore = array_flip($ignore); |
---|
| 33 | } |
---|
| 34 | else |
---|
| 35 | { |
---|
| 36 | $ignore = array_flip($ignore); |
---|
| 37 | array_push($ignore, $_POST['id']); |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | sort($ignore); |
---|
| 41 | $conf['AU_ignore'][$_POST['type']] = $ignore; |
---|
| 42 | conf_update_param('autoupdate_ignore_list', pwg_db_real_escape_string(serialize($conf['AU_ignore']))); |
---|
| 43 | unset($_SESSION['extensions_need_update']); |
---|
| 44 | echo 'ok'; |
---|
| 45 | |
---|
| 46 | ?> |
---|