Code Duplication    Length = 5-6 lines in 2 locations

main/inc/lib/api.lib.php 2 locations

@@ 4928-4932 (lines=5) @@
4925
 */
4926
function api_set_setting_option($params) {
4927
    $table = Database::get_main_table(TABLE_MAIN_SETTINGS_OPTIONS);
4928
    if (empty($params['id'])) {
4929
        Database::insert($table, $params);
4930
    } else {
4931
        Database::update($table, $params, array('id = ? '=> $params['id']));
4932
    }
4933
}
4934
4935
/**
@@ 4942-4947 (lines=6) @@
4939
    $table = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
4940
    $url_id = api_get_current_access_url_id();
4941
4942
    if (empty($params['id'])) {
4943
        $params['access_url'] = $url_id;
4944
        Database::insert($table, $params);
4945
    } else {
4946
        Database::update($table, $params, array('id = ? '=> array($params['id'])));
4947
    }
4948
}
4949
4950
/**