Code Duplication    Length = 6-8 lines in 2 locations

modules/mongodb/mongodb_module.php 2 locations

@@ 376-381 (lines=6) @@
373
 */
374
function mongodb_default_write_options($safe = TRUE) {
375
  if ($safe) {
376
    if (version_compare(phpversion('mongo'), '1.5.0') == -1) {
377
      return array('safe' => TRUE);
378
    }
379
    else {
380
      return variable_get('mongodb_write_safe_options', array('w' => 1));
381
    }
382
  }
383
  else {
384
    if (version_compare(phpversion('mongo'), '1.3.0') == -1) {
@@ 383-390 (lines=8) @@
380
      return variable_get('mongodb_write_safe_options', array('w' => 1));
381
    }
382
  }
383
  else {
384
    if (version_compare(phpversion('mongo'), '1.3.0') == -1) {
385
      return array();
386
    }
387
    else {
388
      return variable_get('mongodb_write_nonsafe_options', array('w' => 0));
389
    }
390
  }
391
}
392