Code Duplication    Length = 6-8 lines in 2 locations

modules/mongodb/mongodb_module.php 2 locations

@@ 104-109 (lines=6) @@
101
 */
102
function mongodb_default_write_options($safe = TRUE) {
103
  if ($safe) {
104
    if (version_compare(phpversion('mongo'), '1.5.0') == -1) {
105
      return array('safe' => TRUE);
106
    }
107
    else {
108
      return variable_get('mongodb_write_safe_options', array('w' => 1));
109
    }
110
  }
111
  else {
112
    if (version_compare(phpversion('mongo'), '1.3.0') == -1) {
@@ 111-118 (lines=8) @@
108
      return variable_get('mongodb_write_safe_options', array('w' => 1));
109
    }
110
  }
111
  else {
112
    if (version_compare(phpversion('mongo'), '1.3.0') == -1) {
113
      return array();
114
    }
115
    else {
116
      return variable_get('mongodb_write_nonsafe_options', array('w' => 0));
117
    }
118
  }
119
}
120