From e3a52979f60fe66b66e7eea9e4a8213ded7ff834 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 8 Aug 2010 19:35:49 +0000 Subject: - Patch #865072 by bleen18, jhodgdon: updates to reflect that Bartik is default theme now. --- MAINTAINERS.txt | 3 ++ UPGRADE.txt | 2 +- includes/common.inc | 4 +- includes/theme.inc | 4 +- includes/theme.maintenance.inc | 4 +- modules/block/block.test | 2 +- modules/color/color.test | 58 ++++++++++++++++++++--------- modules/help/help.api.php | 2 +- modules/simpletest/tests/batch.test | 1 - modules/simpletest/tests/common.test | 4 +- modules/simpletest/tests/common_test.module | 4 +- modules/simpletest/tests/menu.test | 18 ++++----- modules/simpletest/tests/theme.test | 3 +- modules/system/page.tpl.php | 2 +- modules/system/system.test | 17 ++++----- modules/system/theme.api.php | 4 +- sites/default/default.settings.php | 2 +- themes/bartik/templates/page.tpl.php | 2 +- 18 files changed, 80 insertions(+), 56 deletions(-) diff --git a/MAINTAINERS.txt b/MAINTAINERS.txt index 28d12060d..634c24e91 100644 --- a/MAINTAINERS.txt +++ b/MAINTAINERS.txt @@ -274,6 +274,9 @@ User module Theme maintainers ----------------- +Bartik theme +- Jen Simmons 'jensimmons' + Garland theme - Stefan Nagtegaal 'steef' diff --git a/UPGRADE.txt b/UPGRADE.txt index bb0263a24..fb09f082a 100644 --- a/UPGRADE.txt +++ b/UPGRADE.txt @@ -45,7 +45,7 @@ Let's begin! option is at http://www.example.com/?q=admin/config/development/maintenance (replace www.example.com with your installation's domain name and path). -4. If using a custom or contributed theme, switch to Garland. +4. If using a custom or contributed theme, switch to Bartik. 5. Disable all custom and contributed modules. This includes any modules that are not listed under 'Core - required' or 'Core - optional' on diff --git a/includes/common.inc b/includes/common.inc index e2155870d..220414a2d 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2785,7 +2785,7 @@ function drupal_add_css($data = NULL, $options = NULL) { * module styles through CSS selectors. * * Themes may replace module-defined CSS files by adding a stylesheet with the - * same filename. For example, themes/garland/system-menus.css would replace + * same filename. For example, themes/bartik/system-menus.css would replace * modules/system/system-menus.css. This allows themes to override complete * CSS files, rather than specific selectors, when necessary. * @@ -6086,7 +6086,7 @@ function drupal_write_record($table, &$record, $primary_keys = array()) { * - stylesheets: Theme stylesheets eg: stylesheets[all][] = my-style.css * - scripts: Theme scripts eg: scripts[] = my-script.css * - * @see garland.info + * @see bartik.info * * @param $filename * The file we are parsing. Accepts file with relative or absolute path. diff --git a/includes/theme.inc b/includes/theme.inc index 5d8737943..eb7111a47 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -342,7 +342,7 @@ function drupal_theme_rebuild() { * The loaded $theme object as returned from list_themes(). * @param $path * The directory where $name is. For example, modules/system or - * themes/garland. + * themes/bartik. * * @see theme() * @see _theme_process_registry() @@ -557,7 +557,7 @@ function _theme_build_registry($theme, $base_theme, $theme_engine) { * - 'stylesheets': A two dimensional array, using the first key for the * 'media' attribute (e.g. 'all'), the second for the name of the file * (e.g. style.css). The value is a complete filepath - * (e.g. themes/garland/style.css). + * (e.g. themes/bartik/style.css). * - 'scripts': An associative array of JavaScripts, using the filename as key * and the complete filepath as value. * - 'engine': The name of the theme engine. diff --git a/includes/theme.maintenance.inc b/includes/theme.maintenance.inc index 6049141f0..927499a8f 100644 --- a/includes/theme.maintenance.inc +++ b/includes/theme.maintenance.inc @@ -12,7 +12,7 @@ * Used for site installs, updates and when the site is in maintenance mode. * It also applies when the database is unavailable or bootstrap was not * complete. Seven is always used for the initial install and update operations. - * In other cases, Garland is used, but this can be overridden by setting a + * In other cases, Bartik is used, but this can be overridden by setting a * "maintenance_theme" key in the $conf variable in settings.php. */ function _drupal_maintenance_theme() { @@ -45,7 +45,7 @@ function _drupal_maintenance_theme() { } // We use the default theme as the maintenance theme. If a default theme - // isn't specified in the database or in settings.php, we use Garland. + // isn't specified in the database or in settings.php, we use Bartik. $custom_theme = variable_get('maintenance_theme', variable_get('theme_default', 'bartik')); } diff --git a/modules/block/block.test b/modules/block/block.test index 86584df7e..ce8044ed3 100644 --- a/modules/block/block.test +++ b/modules/block/block.test @@ -314,7 +314,7 @@ class NewDefaultThemeBlocks extends DrupalWebTestCase { } /** - * Check the enabled Garland blocks are correctly copied over. + * Check the enabled Bartik blocks are correctly copied over. */ function testNewDefaultThemeBlocks() { // Create administrative user. diff --git a/modules/color/color.test b/modules/color/color.test index dff4e6d72..b13f30ff4 100644 --- a/modules/color/color.test +++ b/modules/color/color.test @@ -11,11 +11,12 @@ */ class ColorTestCase extends DrupalWebTestCase { protected $big_user; + protected $themes; public static function getInfo() { return array( 'name' => 'Color functionality', - 'description' => 'Modify the garland theme color and make sure the changes are reflected on the frontend', + 'description' => 'Modify the Bartik and Garland theme colors and make sure the changes are reflected on the frontend', 'group' => 'Color', ); } @@ -26,40 +27,63 @@ class ColorTestCase extends DrupalWebTestCase { // Create users. $this->big_user = $this->drupalCreateUser(array('administer themes')); - // This test relies on Garland, the mother of all the colorable themes. - theme_enable(array('garland')); - variable_set('theme_default', 'garland'); + // This tests the color module in both Bartik and Garland. + $this->themes = array( + 'bartik' => array( + 'palette_input' => 'palette[bg]', + 'scheme' => 'Slate', + 'scheme_color' => '#3b3b3b', + ), + 'garland' => array( + 'palette_input' => 'palette[link]', + 'scheme' => 'greenbeam', + 'scheme_color' => '#0c7a00', + ), + ); + theme_enable(array_keys($this->themes)); } /** * Test color module functionality. */ function testColor() { + foreach ($this->themes as $theme => $test_values) { + debug($theme); + $this->_testColor($theme, $test_values); + } + } + + /** + * Tests color module functionality using the given theme. + */ + function _testColor($theme, $test_values) { + variable_set('theme_default', $theme); + $settings_path = 'admin/appearance/settings/' . $theme; + $this->drupalLogin($this->big_user); - $this->drupalGet('admin/appearance/settings/garland'); + $this->drupalGet($settings_path); $this->assertResponse(200); $edit['scheme'] = ''; - $edit['palette[link]'] = '#123456'; - $this->drupalPost('admin/appearance/settings/garland', $edit, t('Save configuration')); + $edit[$test_values['palette_input']] = '#123456'; + $this->drupalPost($settings_path, $edit, t('Save configuration')); $this->drupalGet(''); - $stylesheets = variable_get('color_garland_stylesheets', array()); - $this->assertPattern('|' . file_create_url($stylesheets[0]) . '|', 'Make sure the color stylesheet is included in the content.'); + $stylesheets = variable_get('color_' . $theme . '_stylesheets', array()); + $this->assertPattern('|' . file_create_url($stylesheets[0]) . '|', 'Make sure the color stylesheet is included in the content. (' . $theme . ')'); $stylesheet_content = join("\n", file($stylesheets[0])); $matched = preg_match('/(.*color: #123456.*)/i', $stylesheet_content, $matches); - $this->assertTrue($matched == 1, 'Make sure the color we changed is in the color stylesheet.'); + $this->assertTrue($matched == 1, 'Make sure the color we changed is in the color stylesheet. (' . $theme . ')'); - $this->drupalGet('admin/appearance/settings/garland'); + $this->drupalGet($settings_path); $this->assertResponse(200); - $edit['scheme'] = 'greenbeam'; - $this->drupalPost('admin/appearance/settings/garland', $edit, t('Save configuration')); + $edit['scheme'] = $test_values['scheme']; + $this->drupalPost($settings_path, $edit, t('Save configuration')); $this->drupalGet(''); - $stylesheets = variable_get('color_garland_stylesheets', array()); + $stylesheets = variable_get('color_' . $theme . '_stylesheets', array()); $stylesheet_content = join("\n", file($stylesheets[0])); - $matched = preg_match('/(.*color: #0c7a00.*)/i', $stylesheet_content, $matches); - $this->assertTrue($matched == 1, 'Make sure the color we changed is in the color stylesheet.'); + $matched = preg_match('/(.*color: ' . $test_values['scheme_color'] . '.*)/i', $stylesheet_content, $matches); + $this->assertTrue($matched == 1, 'Make sure the color we changed is in the color stylesheet. (' . $theme . ')'); } - } diff --git a/modules/help/help.api.php b/modules/help/help.api.php index 59cd8eb14..d8ffbcbd7 100644 --- a/modules/help/help.api.php +++ b/modules/help/help.api.php @@ -50,7 +50,7 @@ function hook_help($path, $arg) { switch ($path) { // Main module help for the block module case 'admin/help#block': - return '

' . t('Blocks are boxes of content rendered into an area, or region, of a web page. The default theme Garland, for example, implements the regions "left sidebar", "right sidebar", "content", "header", and "footer", and a block may appear in any one of these areas. The blocks administration page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions.', array('@blocks' => url('admin/structure/block'))) . '

'; + return '

' . t('Blocks are boxes of content rendered into an area, or region, of a web page. The default theme Bartik, for example, implements the regions "first sidebar", "second sidebar", "featured", "content", "header", "footer", etc., and a block may appear in any one of these areas. The blocks administration page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions.', array('@blocks' => url('admin/structure/block'))) . '

'; // Help for another path in the block module case 'admin/structure/block': diff --git a/modules/simpletest/tests/batch.test b/modules/simpletest/tests/batch.test index 451575cf2..82385c5e9 100644 --- a/modules/simpletest/tests/batch.test +++ b/modules/simpletest/tests/batch.test @@ -274,7 +274,6 @@ class BatchPageTestCase extends DrupalWebTestCase { function testBatchProgressPageTheme() { // Make sure that the page which starts the batch (an administrative page) // is using a different theme than would normally be used by the batch API. - variable_set('theme_default', 'garland'); variable_set('admin_theme', 'seven'); // Visit an administrative page that runs a test batch, and check that the // theme that was used during batch execution (which the batch callback diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test index 35c5bbc3b..d81602463 100644 --- a/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -23,10 +23,10 @@ class DrupalAlterTestCase extends DrupalWebTestCase { } function testDrupalAlter() { - // This test depends on Garland, so make sure that it is always the current + // This test depends on Bartik, so make sure that it is always the current // active theme. global $theme, $base_theme_info; - $theme = 'garland'; + $theme = 'bartik'; $base_theme_info = array(); $array = array('foo' => 'bar'); diff --git a/modules/simpletest/tests/common_test.module b/modules/simpletest/tests/common_test.module index 1b5dbc351..7320bdaa7 100644 --- a/modules/simpletest/tests/common_test.module +++ b/modules/simpletest/tests/common_test.module @@ -133,12 +133,12 @@ function common_test_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) { } /** - * Implements hook_TYPE_alter() on behalf of Garland theme. + * Implements hook_TYPE_alter() on behalf of Bartik theme. * * Same as common_test_drupal_alter_alter(), but here, we verify that themes * can also alter and come last. */ -function garland_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) { +function bartik_drupal_alter_alter(&$data, &$arg2 = NULL, &$arg3 = NULL) { // Alter first argument. if (is_array($data)) { $data['foo'] .= ' theme'; diff --git a/modules/simpletest/tests/menu.test b/modules/simpletest/tests/menu.test index 3fd90efc2..1dccb6e60 100644 --- a/modules/simpletest/tests/menu.test +++ b/modules/simpletest/tests/menu.test @@ -20,8 +20,8 @@ class MenuRouterTestCase extends DrupalWebTestCase { parent::setUp('menu_test'); // Make the tests below more robust by explicitly setting the default theme // and administrative theme that they expect. - theme_enable(array('garland')); - variable_set('theme_default', 'garland'); + theme_enable(array('bartik')); + variable_set('theme_default', 'bartik'); variable_set('admin_theme', 'seven'); } @@ -81,7 +81,7 @@ class MenuRouterTestCase extends DrupalWebTestCase { // For a regular user, the fact that the site is in maintenance mode means // we expect the theme callback system to be bypassed entirely. $this->drupalGet('menu-test/theme-callback/use-admin-theme'); - $this->assertRaw('garland/style.css', t("The maintenance theme's CSS appears on the page.")); + $this->assertRaw('bartik/css/style.css', t("The maintenance theme's CSS appears on the page.")); // An administrator, however, should continue to see the requested theme. $admin_user = $this->drupalCreateUser(array('access site in maintenance mode')); @@ -130,8 +130,8 @@ class MenuRouterTestCase extends DrupalWebTestCase { function testThemeCallbackOptionalTheme() { // Request a theme that is not enabled. $this->drupalGet('menu-test/theme-callback/use-stark-theme'); - $this->assertText('Custom theme: NONE. Actual theme: garland.', t('The theme callback system falls back on the default theme when a theme that is not enabled is requested.')); - $this->assertRaw('garland/style.css', t("The default theme's CSS appears on the page.")); + $this->assertText('Custom theme: NONE. Actual theme: bartik.', t('The theme callback system falls back on the default theme when a theme that is not enabled is requested.')); + $this->assertRaw('bartik/css/style.css', t("The default theme's CSS appears on the page.")); // Now enable the theme and request it again. theme_enable(array('stark')); @@ -145,8 +145,8 @@ class MenuRouterTestCase extends DrupalWebTestCase { */ function testThemeCallbackFakeTheme() { $this->drupalGet('menu-test/theme-callback/use-fake-theme'); - $this->assertText('Custom theme: NONE. Actual theme: garland.', t('The theme callback system falls back on the default theme when a theme that does not exist is requested.')); - $this->assertRaw('garland/style.css', t("The default theme's CSS appears on the page.")); + $this->assertText('Custom theme: NONE. Actual theme: bartik.', t('The theme callback system falls back on the default theme when a theme that does not exist is requested.')); + $this->assertRaw('bartik/css/style.css', t("The default theme's CSS appears on the page.")); } /** @@ -154,8 +154,8 @@ class MenuRouterTestCase extends DrupalWebTestCase { */ function testThemeCallbackNoThemeRequested() { $this->drupalGet('menu-test/theme-callback/no-theme-requested'); - $this->assertText('Custom theme: NONE. Actual theme: garland.', t('The theme callback system falls back on the default theme when no theme is requested.')); - $this->assertRaw('garland/style.css', t("The default theme's CSS appears on the page.")); + $this->assertText('Custom theme: NONE. Actual theme: bartik.', t('The theme callback system falls back on the default theme when no theme is requested.')); + $this->assertRaw('bartik/css/style.css', t("The default theme's CSS appears on the page.")); } /** diff --git a/modules/simpletest/tests/theme.test b/modules/simpletest/tests/theme.test index 1f6373723..d4dc89842 100644 --- a/modules/simpletest/tests/theme.test +++ b/modules/simpletest/tests/theme.test @@ -170,7 +170,6 @@ class ThemeHookInitUnitTest extends DrupalWebTestCase { function setUp() { parent::setUp('theme_test'); - variable_set('theme_default', 'garland'); } /** @@ -179,6 +178,6 @@ class ThemeHookInitUnitTest extends DrupalWebTestCase { function testThemeInitializationHookInit() { $this->drupalGet('theme-test/hook-init'); $this->assertRaw('Themed output generated in hook_init()', t('Themed output generated in hook_init() correctly appears on the page.')); - $this->assertRaw('garland/style.css', t("The default theme's CSS appears on the page when the theme system is initialized in hook_init().")); + $this->assertRaw('bartik/css/style.css', t("The default theme's CSS appears on the page when the theme system is initialized in hook_init().")); } } diff --git a/modules/system/page.tpl.php b/modules/system/page.tpl.php index ee3ac5786..2ddc75ac4 100644 --- a/modules/system/page.tpl.php +++ b/modules/system/page.tpl.php @@ -11,7 +11,7 @@ * - $base_path: The base URL path of the Drupal installation. At the very * least, this will always default to /. * - $directory: The directory the template is located in, e.g. modules/system - * or themes/garland. + * or themes/bartik. * - $is_front: TRUE if the current page is the front page. * - $logged_in: TRUE if the user is registered and signed in. * - $is_admin: TRUE if the user has permission to access administration pages. diff --git a/modules/system/system.test b/modules/system/system.test index 1d665bf94..42a9d0635 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -1045,7 +1045,6 @@ class PageTitleFiltering extends DrupalWebTestCase { $this->assertRaw($title_filtered . '', 'Check for the filtered version of the title.'); // Test the slogan. - // Currently Garland is not displaying the slogan so this test is escaped. $this->assertNoRaw($slogan, 'Check for the unfiltered version of the slogan.'); $this->assertRaw($slogan_filtered, 'Check for the filtered version of the slogan.'); } @@ -1296,22 +1295,22 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase { variable_set('theme_default', 'stark'); // Enable an administration theme and show it on the node admin pages. $edit = array( - 'admin_theme' => 'garland', + 'admin_theme' => 'seven', 'node_admin_theme' => TRUE, ); $this->drupalPost('admin/appearance', $edit, t('Save configuration')); $this->drupalGet('admin/config'); - $this->assertRaw('themes/garland', t('Administration theme used on an administration page.')); + $this->assertRaw('themes/seven', t('Administration theme used on an administration page.')); $this->drupalGet('node/' . $this->node->nid); $this->assertRaw('themes/stark', t('Site default theme used on node page.')); $this->drupalGet('node/add'); - $this->assertRaw('themes/garland', t('Administration theme used on the add content page.')); + $this->assertRaw('themes/seven', t('Administration theme used on the add content page.')); $this->drupalGet('node/' . $this->node->nid . '/edit'); - $this->assertRaw('themes/garland', t('Administration theme used on the edit content page.')); + $this->assertRaw('themes/seven', t('Administration theme used on the edit content page.')); // Disable the admin theme on the node admin pages. $edit = array( @@ -1320,13 +1319,13 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase { $this->drupalPost('admin/appearance', $edit, t('Save configuration')); $this->drupalGet('admin/config'); - $this->assertRaw('themes/garland', t('Administration theme used on an administration page.')); + $this->assertRaw('themes/seven', t('Administration theme used on an administration page.')); $this->drupalGet('node/add'); $this->assertRaw('themes/stark', t('Site default theme used on the add content page.')); // Reset to the default theme settings. - variable_set('theme_default', 'garland'); + variable_set('theme_default', 'bartik'); $edit = array( 'admin_theme' => '0', 'node_admin_theme' => FALSE, @@ -1334,10 +1333,10 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase { $this->drupalPost('admin/appearance', $edit, t('Save configuration')); $this->drupalGet('admin'); - $this->assertRaw('themes/garland', t('Site default theme used on administration page.')); + $this->assertRaw('themes/bartik', t('Site default theme used on administration page.')); $this->drupalGet('node/add'); - $this->assertRaw('themes/garland', t('Site default theme used on the add content page.')); + $this->assertRaw('themes/bartik', t('Site default theme used on the add content page.')); } } diff --git a/modules/system/theme.api.php b/modules/system/theme.api.php index c84838ee1..5bad49a75 100644 --- a/modules/system/theme.api.php +++ b/modules/system/theme.api.php @@ -56,9 +56,9 @@ * themes utilizing an engine will have their well-named theming functions * automatically registered for them. While this can vary based upon the theme * engine, the standard set by phptemplate is that theme functions should be - * named THEMENAME_HOOK. For example, for Drupal's default theme (Garland) to + * named THEMENAME_HOOK. For example, for Drupal's default theme (Bartik) to * implement the 'table' hook, the phptemplate.engine would find - * garland_table(). + * bartik_table(). * * The theme system is described and defined in theme.inc. * diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index 2892093d5..29b1882ef 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -319,7 +319,7 @@ ini_set('session.cookie_lifetime', 2000000); * theme. It is located inside 'modules/system/maintenance-page.tpl.php'. * Note: This setting does not apply to installation and update pages. */ -# $conf['maintenance_theme'] = 'garland'; +# $conf['maintenance_theme'] = 'bartik'; /** * Enable this setting to determine the correct IP address of the remote diff --git a/themes/bartik/templates/page.tpl.php b/themes/bartik/templates/page.tpl.php index 74fc27766..4753f6ba3 100644 --- a/themes/bartik/templates/page.tpl.php +++ b/themes/bartik/templates/page.tpl.php @@ -15,7 +15,7 @@ * - $base_path: The base URL path of the Drupal installation. At the very * least, this will always default to /. * - $directory: The directory the template is located in, e.g. modules/system - * or themes/garland. + * or themes/bartik. * - $is_front: TRUE if the current page is the front page. * - $logged_in: TRUE if the user is registered and signed in. * - $is_admin: TRUE if the user has permission to access administration pages. -- cgit v1.2.3