Révision 30d5b9c5
Ajouté par Mathieu Schiano Di Schiabica il y a environ 8 ans
drupal7/modules/dblog/dblog.module | ||
---|---|---|
144 | 144 |
* Note: Some values may be truncated to meet database column size restrictions. |
145 | 145 |
*/ |
146 | 146 |
function dblog_watchdog(array $log_entry) { |
147 |
if (!function_exists('drupal_substr')) { |
|
148 |
require_once DRUPAL_ROOT . '/includes/unicode.inc'; |
|
149 |
} |
|
147 | 150 |
Database::getConnection('default', 'default')->insert('watchdog') |
148 | 151 |
->fields(array( |
149 | 152 |
'uid' => $log_entry['uid'], |
150 |
'type' => substr($log_entry['type'], 0, 64), |
|
153 |
'type' => drupal_substr($log_entry['type'], 0, 64),
|
|
151 | 154 |
'message' => $log_entry['message'], |
152 | 155 |
'variables' => serialize($log_entry['variables']), |
153 | 156 |
'severity' => $log_entry['severity'], |
154 |
'link' => substr($log_entry['link'], 0, 255), |
|
157 |
'link' => drupal_substr($log_entry['link'], 0, 255),
|
|
155 | 158 |
'location' => $log_entry['request_uri'], |
156 | 159 |
'referer' => $log_entry['referer'], |
157 |
'hostname' => substr($log_entry['ip'], 0, 128), |
|
160 |
'hostname' => drupal_substr($log_entry['ip'], 0, 128),
|
|
158 | 161 |
'timestamp' => $log_entry['timestamp'], |
159 | 162 |
)) |
160 | 163 |
->execute(); |
Formats disponibles : Unified diff
Update to 7.42