Code Duplication    Length = 5-6 lines in 2 locations

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

@@ 4899-4903 (lines=5) @@
4896
 */
4897
function api_set_setting_option($params) {
4898
    $table = Database::get_main_table(TABLE_MAIN_SETTINGS_OPTIONS);
4899
    if (empty($params['id'])) {
4900
        Database::insert($table, $params);
4901
    } else {
4902
        Database::update($table, $params, array('id = ? '=> $params['id']));
4903
    }
4904
}
4905
4906
/**
@@ 4913-4918 (lines=6) @@
4910
    $table = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
4911
    $url_id = api_get_current_access_url_id();
4912
4913
    if (empty($params['id'])) {
4914
        $params['access_url'] = $url_id;
4915
        Database::insert($table, $params);
4916
    } else {
4917
        Database::update($table, $params, array('id = ? '=> array($params['id'])));
4918
    }
4919
}
4920
4921
/**