Code Duplication    Length = 5-6 lines in 2 locations

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

@@ 4944-4948 (lines=5) @@
4941
 */
4942
function api_set_setting_option($params) {
4943
    $table = Database::get_main_table(TABLE_MAIN_SETTINGS_OPTIONS);
4944
    if (empty($params['id'])) {
4945
        Database::insert($table, $params);
4946
    } else {
4947
        Database::update($table, $params, array('id = ? '=> $params['id']));
4948
    }
4949
}
4950
4951
/**
@@ 4958-4963 (lines=6) @@
4955
    $table = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
4956
    $url_id = api_get_current_access_url_id();
4957
4958
    if (empty($params['id'])) {
4959
        $params['access_url'] = $url_id;
4960
        Database::insert($table, $params);
4961
    } else {
4962
        Database::update($table, $params, array('id = ? '=> array($params['id'])));
4963
    }
4964
}
4965
4966
/**