Projet

Général

Profil

Révision 01dfd3b5

Ajouté par Assos Assos il y a plus de 3 ans

Udpate to 7.77

Voir les différences:

drupal7/includes/database/mysql/query.inc
48 48
    // Default fields are always placed first for consistency.
49 49
    $insert_fields = array_merge($this->defaultFields, $this->insertFields);
50 50

  
51
    if (method_exists($this->connection, 'escapeFields')) {
52
      $insert_fields = $this->connection->escapeFields($insert_fields);
53
    }
54

  
51 55
    // If we're selecting from a SelectQuery, finish building the query and
52 56
    // pass it back, as any remaining options are irrelevant.
53 57
    if (!empty($this->fromQuery)) {
......
89 93

  
90 94
class TruncateQuery_mysql extends TruncateQuery { }
91 95

  
96
class UpdateQuery_mysql extends UpdateQuery {
97
  public function __toString() {
98
    if (method_exists($this->connection, 'escapeField')) {
99
      $escapedFields = array();
100
      foreach ($this->fields as $field => $data) {
101
        $field = $this->connection->escapeField($field);
102
        $escapedFields[$field] = $data;
103
      }
104
      $this->fields = $escapedFields;
105
    }
106
    return parent::__toString();
107
  }
108
}
109

  
92 110
/**
93 111
 * @} End of "addtogroup database".
94 112
 */

Formats disponibles : Unified diff