Révision 147616a8
Ajouté par Assos Assos il y a plus de 6 ans
drupal7/sites/all/modules/piwik/piwik.module | ||
---|---|---|
188 | 188 |
$set_document_title = '"404/URL = " + encodeURIComponent(document.location.pathname+document.location.search) + "/From = " + encodeURIComponent(document.referrer)'; |
189 | 189 |
} |
190 | 190 |
|
191 |
// #2693595: User has entered an invalid login and clicked on forgot |
|
192 |
// password link. This link contains the username or email address and may |
|
193 |
// get send to Google if we do not override it. Override only if 'name' |
|
194 |
// query param exists. Last custom url condition, this need to win. |
|
195 |
// |
|
196 |
// URLs to protect are: |
|
197 |
// - user/password?name=username |
|
198 |
// - user/password?name=foo@example.com |
|
199 |
if (arg(0) == 'user' && arg(1) == 'password' && array_key_exists('name', drupal_get_query_parameters())) { |
|
200 |
$set_custom_url = drupal_json_encode(url('user/password')); |
|
201 |
} |
|
202 |
|
|
191 | 203 |
// Add custom variables. |
192 | 204 |
$piwik_custom_vars = variable_get('piwik_custom_var', array()); |
193 | 205 |
$custom_variable = ''; |
... | ... | |
486 | 498 |
if ($data_hash_local != $data_hash_remote && file_prepare_directory($path)) { |
487 | 499 |
// Save updated tracking code file to disk. |
488 | 500 |
file_unmanaged_save_data($result->data, $file_destination, FILE_EXISTS_REPLACE); |
501 |
// Based on Drupal Core drupal_build_css_cache(). |
|
502 |
if (variable_get('css_gzip_compression', TRUE) && variable_get('clean_url', 0) && extension_loaded('zlib')) { |
|
503 |
file_unmanaged_save_data(gzencode($result->data, 9, FORCE_GZIP), $file_destination . '.gz', FILE_EXISTS_REPLACE); |
|
504 |
} |
|
489 | 505 |
watchdog('piwik', 'Locally cached tracking code file has been updated.', array(), WATCHDOG_INFO); |
490 | 506 |
|
491 | 507 |
// Change query-strings on css/js files to enforce reload for all users. |
... | ... | |
498 | 514 |
// There is no need to flush JS here as core refreshes JS caches |
499 | 515 |
// automatically, if new files are added. |
500 | 516 |
file_unmanaged_save_data($result->data, $file_destination, FILE_EXISTS_REPLACE); |
517 |
if (variable_get('css_gzip_compression', TRUE) && variable_get('clean_url', 0) && extension_loaded('zlib')) { |
|
518 |
file_unmanaged_save_data(gzencode($result->data, 9, FORCE_GZIP), $file_destination . '.gz', FILE_EXISTS_REPLACE); |
|
519 |
} |
|
501 | 520 |
watchdog('piwik', 'Locally cached tracking code file has been saved.', array(), WATCHDOG_INFO); |
502 | 521 |
|
503 | 522 |
// Return the local JS file path. |
Formats disponibles : Unified diff
Weekly update of contrib modules