function pl_dms_admin_actions()
{
    $response = array();
    $postdata = $_POST;
    $response['post'] = $_POST;
    $lessflush = isset($postdata['flag']) ? $postdata['flag'] : false;
    $field = $postdata['setting'];
    $value = $postdata['value'];
    pl_setting_update($field, $value);
    echo json_encode(pl_arrays_to_objects($response));
    if ($lessflush) {
        global $dms_cache;
        $dms_cache->purge_all();
    }
    die;
}
Esempio n. 2
0
function pl_dms_admin_actions()
{
    $response = array();
    $postdata = $_POST;
    $response['post'] = $_POST;
    $lessflush = isset($postdata['flag']) ? $postdata['flag'] : false;
    $field = $postdata['setting'];
    $value = $postdata['value'];
    if ('custom_less' == $field || 'custom_scripts' == $field) {
        while (strchr($value, '\\')) {
            $value = stripslashes($value);
        }
    }
    pl_setting_update($field, $value);
    $response['value'] = $value;
    $response['field'] = $field;
    echo json_encode(pl_arrays_to_objects($response));
    if ($lessflush) {
        global $dms_cache;
        $dms_cache->purge_all();
    }
    die;
}