You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.0 KiB
31 lines
1.0 KiB
<?php
|
|
/* For licensing terms, see /license.txt */
|
|
/**
|
|
* Responses to AJAX calls
|
|
*/
|
|
|
|
require_once '../global.inc.php';
|
|
|
|
api_protect_admin_script();
|
|
|
|
$action = isset($_REQUEST['a']) ? $_REQUEST['a'] : null;
|
|
|
|
switch ($action) {
|
|
case 'update_changeable_setting':
|
|
$url_id = api_get_current_access_url_id();
|
|
|
|
if (api_is_global_platform_admin() && $url_id == 1) {
|
|
if (isset($_GET['id']) && !empty($_GET['id'])) {
|
|
$params = array('variable = ? ' => array($_GET['id']));
|
|
$data = api_get_settings_params($params);
|
|
if (!empty($data)) {
|
|
foreach ($data as $item) {
|
|
$params = array('id' =>$item['id'], 'access_url_changeable' => $_GET['changeable']);
|
|
api_set_setting_simple($params);
|
|
}
|
|
}
|
|
echo '1';
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
|