|
Revision 4835, 1.3 KB
(checked in by patdenice, 3 years ago)
|
|
Force the ajax response charset to UTF-8.
Add some missing traductions.
|
| Line | |
|---|
| 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 | |
|---|
| 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); |
|---|
| 16 | |
|---|
| 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); |
|---|
| 32 | |
|---|
| 33 | $query = ' |
|---|
| 34 | UPDATE '.CONFIG_TABLE.' |
|---|
| 35 | SET value = "'.addslashes(serialize($ignore)).'" |
|---|
| 36 | WHERE param = "autoupdate_ignore_list" |
|---|
| 37 | ;'; |
|---|
| 38 | pwg_query($query); |
|---|
| 39 | |
|---|
| 40 | unset($_SESSION['plugins_need_update']); |
|---|
| 41 | echo 'ok'; |
|---|
| 42 | } |
|---|
| 43 | else |
|---|
| 44 | { |
|---|
| 45 | load_language('plugin.lang', dirname(__FILE__).'/'); |
|---|
| 46 | header('Content-Type: text/html; charset=UTF-8'); |
|---|
| 47 | |
|---|
| 48 | include(dirname(__FILE__).'/class.inc.php'); |
|---|
| 49 | $autoupdate = new autoupdate(); |
|---|
| 50 | |
|---|
| 51 | echo $autoupdate->check_version(); |
|---|
| 52 | } |
|---|
| 53 | |
|---|
| 54 | ?> |
|---|