[4699] | 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 | |
---|
| 8 | check_status(ACCESS_ADMINISTRATOR); |
---|
| 9 | |
---|
[4711] | 10 | if (isset($_POST['autoupdate_ignore']) |
---|
| 11 | and is_array($_POST['autoupdate_ignore']) |
---|
| 12 | and count($_POST['autoupdate_ignore']) == 2) |
---|
| 13 | { |
---|
| 14 | $ignore = unserialize($conf['autoupdate_ignore_list']); |
---|
| 15 | $ignore = array_flip($ignore); |
---|
[4699] | 16 | |
---|
[4711] | 17 | if ($_POST['autoupdate_ignore'][1] == "false" and isset($ignore[$_POST['autoupdate_ignore'][0]])) |
---|
| 18 | { |
---|
| 19 | unset($ignore[$_POST['autoupdate_ignore'][0]]); |
---|
| 20 | $ignore = array_flip($ignore); |
---|
| 21 | } |
---|
| 22 | elseif ($_POST['autoupdate_ignore'][1] == "true" and !isset($ignore[$_POST['autoupdate_ignore'][0]])) |
---|
| 23 | { |
---|
| 24 | $ignore = array_flip($ignore); |
---|
| 25 | array_push($ignore, $_POST['autoupdate_ignore'][0]); |
---|
| 26 | } |
---|
| 27 | else |
---|
| 28 | { |
---|
| 29 | die; |
---|
| 30 | } |
---|
| 31 | sort($ignore); |
---|
[4699] | 32 | |
---|
[4711] | 33 | $query = ' |
---|
| 34 | UPDATE '.CONFIG_TABLE.' |
---|
| 35 | SET value = "'.addslashes(serialize($ignore)).'" |
---|
| 36 | WHERE param = "autoupdate_ignore_list" |
---|
| 37 | ;'; |
---|
| 38 | pwg_query($query); |
---|
[4699] | 39 | |
---|
[4712] | 40 | unset($_SESSION['plugins_need_update']); |
---|
[4711] | 41 | echo 'ok'; |
---|
| 42 | } |
---|
| 43 | else |
---|
| 44 | { |
---|
| 45 | load_language('plugin.lang', dirname(__FILE__).'/'); |
---|
[4835] | 46 | header('Content-Type: text/html; charset=UTF-8'); |
---|
[4711] | 47 | |
---|
| 48 | include(dirname(__FILE__).'/class.inc.php'); |
---|
| 49 | $autoupdate = new autoupdate(); |
---|
| 50 | |
---|
| 51 | echo $autoupdate->check_version(); |
---|
| 52 | } |
---|
| 53 | |
---|
[4699] | 54 | ?> |
---|