Révision b4adf10d
Ajouté par Assos Assos il y a plus de 9 ans
drupal7/includes/tablesort.inc | ||
---|---|---|
46 | 46 |
// Based on code from db_escape_table(), but this can also contain a dot. |
47 | 47 |
$field = preg_replace('/[^A-Za-z0-9_.]+/', '', $ts['sql']); |
48 | 48 |
|
49 |
// Sort order can only be ASC or DESC. |
|
50 |
$sort = drupal_strtoupper($ts['sort']); |
|
51 |
$sort = in_array($sort, array('ASC', 'DESC')) ? $sort : ''; |
|
52 |
$this->orderBy($field, $sort); |
|
49 |
// orderBy() will ensure that only ASC/DESC values are accepted, so we |
|
50 |
// don't need to sanitize that here. |
|
51 |
$this->orderBy($field, $ts['sort']); |
|
53 | 52 |
} |
54 | 53 |
return $this; |
55 | 54 |
} |
Formats disponibles : Unified diff
Udpate to 7.33