Code Duplication    Length = 6-8 lines in 2 locations

modules/mongodb/mongodb_module.php 2 locations

@@ 384-389 (lines=6) @@
381
 */
382
function mongodb_default_write_options($safe = TRUE) {
383
  if ($safe) {
384
    if (version_compare(phpversion('mongo'), '1.5.0') == -1) {
385
      return array('safe' => TRUE);
386
    }
387
    else {
388
      return variable_get('mongodb_write_safe_options', array('w' => 1));
389
    }
390
  }
391
  else {
392
    if (version_compare(phpversion('mongo'), '1.3.0') == -1) {
@@ 391-398 (lines=8) @@
388
      return variable_get('mongodb_write_safe_options', array('w' => 1));
389
    }
390
  }
391
  else {
392
    if (version_compare(phpversion('mongo'), '1.3.0') == -1) {
393
      return array();
394
    }
395
    else {
396
      return variable_get('mongodb_write_nonsafe_options', array('w' => 0));
397
    }
398
  }
399
}
400