Skip to content

Instantly share code, notes, and snippets.

@pifantastic
Created August 22, 2011 21:08
Show Gist options
  • Save pifantastic/1163579 to your computer and use it in GitHub Desktop.
Save pifantastic/1163579 to your computer and use it in GitHub Desktop.
=== modified file 'drupal/includes/theme.inc'
--- drupal/includes/theme.inc 2011-05-26 02:58:29 +0000
+++ drupal/includes/theme.inc 2011-08-22 21:07:48 +0000
@@ -253,7 +253,10 @@
* to add more theme hooks.
*/
function drupal_rebuild_theme_registry() {
- cache_clear_all('theme_registry', 'cache', TRUE);
+ if (lock_acquire(__FUNCTION__)) {
+ cache_clear_all('theme_registry', 'cache', TRUE);
+ lock_release(__FUNCTION__);
+ }
}
/**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment