Index: CHANGELOG.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/CHANGELOG.txt,v retrieving revision 1.1.2.4 diff -u -p -r1.1.2.4 CHANGELOG.txt --- CHANGELOG.txt 28 Sep 2007 16:34:58 -0000 1.1.2.4 +++ CHANGELOG.txt 28 Sep 2007 23:52:15 -0000 @@ -6,6 +6,7 @@ Admin Menu x.x-x.x, xxxx-xx-xx Admin Menu 5.x-1.x, xxxx-xx-xx ------------------------------ +Fixed path_to_theme() call breaking blocks page. #177582 by sun: Fixed bluebreeze theme compatibility. Index: admin_menu.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.module,v retrieving revision 1.10.4.6 diff -u -p -r1.10.4.6 admin_menu.module --- admin_menu.module 8 Sep 2007 18:01:08 -0000 1.10.4.6 +++ admin_menu.module 28 Sep 2007 23:51:52 -0000 @@ -37,11 +37,15 @@ function admin_menu_block($op = 'list', 'file' => drupal_get_path('module', 'admin_menu') . '/admin_menu.css', 'type' => 'module', ); - if (file_exists(path_to_theme() . '/admin_menu.css')) { - $css_files[] = array( - 'file' => path_to_theme() . '/admin_menu.css', - 'type' => 'theme', - ); + // path_to_theme() invokes init_theme(), thus it must not be invoked in + // block settings to allow initializing of the selected theme. + if (strpos($_GET['q'], 'admin/build/block') === FALSE) { + if (file_exists(path_to_theme() . '/admin_menu.css')) { + $css_files[] = array( + 'file' => path_to_theme() . '/admin_menu.css', + 'type' => 'theme', + ); + } } foreach ($css_files as $css_file) { drupal_add_css($css_file['file'], $css_file['type'], 'all', false);