   function clone(array $override_input = [], bool $history = true) {
      global $DB, $CFG_GLPI;

      if ($DB->isSlave()) {
         return false;
      }
      $new_item = new static();
      $input = $this->fields;
      foreach ($override_input as $key => $value) {
         $input[$key] = $value;
      }
      $input = $new_item->prepareInputForClone($input);
      if (isset($input['id'])) {
         $input['_oldID'] =  $input['id'];
         unset($input['id']);
      }
      unset($input['date_creation']);
      unset($input['date_mod']);

      if (isset($input['template_name'])) {
         unset($input['template_name']);
      }
      if (isset($input['is_template'])) {
         unset($input['is_template']);
      }

      $input['clone'] = true;
      $newID = $new_item->add($input, [], $history);
      // If the item needs post clone (recursive cloning for example)
      $new_item->post_clone($this, $history);
      return $newID;
   }
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.