registry team mailing list archive
-
registry team
-
Mailing list archive
-
Message #26943
[Merge] lp:~catch-drupal/pressflow/path_slow_query into lp:pressflow
Nathaniel Catchpole has proposed merging lp:~catch-drupal/pressflow/path_slow_query into lp:pressflow.
Requested reviews:
Pressflow Administrators (pressflow)
Backporting selective full rebuilding of the path alias whitelist from Drupal 7.
--
https://code.launchpad.net/~catch-drupal/pressflow/path_slow_query/+merge/40306
Your team Registry Administrators is subscribed to branch lp:pressflow.
=== modified file 'includes/common.inc'
--- includes/common.inc 2010-08-11 21:05:18 +0000
+++ includes/common.inc 2010-11-08 07:44:45 +0000
@@ -128,8 +128,13 @@
/**
* Reset the static variable which holds the aliases mapped for this request.
*/
-function drupal_clear_path_cache() {
+function drupal_clear_path_cache($path = NULL) {
drupal_lookup_path('wipe');
+ $modules = module_implements('lookup_path');
+ if (!empty($modules)) {
+ $module = $modules[0];
+ module_invoke($module, 'path_alias_whitelist_rebuild', $path);
+ }
}
/*
=== modified file 'modules/path/path.module'
--- modules/path/path.module 2008-12-11 04:56:37 +0000
+++ modules/path/path.module 2010-11-08 07:44:45 +0000
@@ -121,7 +121,7 @@
db_query("DELETE FROM {url_alias} WHERE src = '%s'", $path);
}
}
- drupal_clear_path_cache();
+ drupal_clear_path_cache($path);
}
=== modified file 'modules/path_alias_cache/path_alias_cache.module'
--- modules/path_alias_cache/path_alias_cache.module 2010-10-22 15:37:23 +0000
+++ modules/path_alias_cache/path_alias_cache.module 2010-11-08 07:44:45 +0000
@@ -39,7 +39,6 @@
if ($action == 'wipe') {
$cache = array();
- $cache['whitelist'] = path_alias_cache_path_alias_whitelist_rebuild();
}
elseif ($cache['whitelist'] && $path != '') {
if ($action == 'alias') {