Project

General

Profile

Revision b0dc3a2e

Added by Julien Enselme over 7 years ago

Update to Drupal 7.52

View differences:

drupal7/includes/theme.inc
1248 1248
function drupal_find_theme_functions($cache, $prefixes) {
1249 1249
  $implementations = array();
1250 1250
  $functions = get_defined_functions();
1251
  $theme_functions = preg_grep('/^(' . implode(')|(', $prefixes) . ')_/', $functions['user']);
1251 1252

  
1252 1253
  foreach ($cache as $hook => $info) {
1253 1254
    foreach ($prefixes as $prefix) {
......
1264 1265
      // intermediary suggestion.
1265 1266
      $pattern = isset($info['pattern']) ? $info['pattern'] : ($hook . '__');
1266 1267
      if (!isset($info['base hook']) && !empty($pattern)) {
1267
        $matches = preg_grep('/^' . $prefix . '_' . $pattern . '/', $functions['user']);
1268
        $matches = preg_grep('/^' . $prefix . '_' . $pattern . '/', $theme_functions);
1268 1269
        if ($matches) {
1269 1270
          foreach ($matches as $match) {
1270 1271
            $new_hook = substr($match, strlen($prefix) + 1);
......
2638 2639
  // Move some variables to the top level for themer convenience and template cleanliness.
2639 2640
  $variables['show_messages'] = $variables['page']['#show_messages'];
2640 2641

  
2641
  foreach (system_region_list($GLOBALS['theme']) as $region_key => $region_name) {
2642
  foreach (system_region_list($GLOBALS['theme'], REGIONS_ALL, FALSE) as $region_key) {
2642 2643
    if (!isset($variables['page'][$region_key])) {
2643 2644
      $variables['page'][$region_key] = array();
2644 2645
    }

Also available in: Unified diff