diff --git a/MAINTAINERS.txt b/MAINTAINERS.txt index 28d12060d61d4cb1abbdd42b4be6ad0f0b1d3ddc..634c24e91ed458c1920d911ffce765cc6f32c2ae 100644 --- a/MAINTAINERS.txt +++ b/MAINTAINERS.txt @@ -274,6 +274,9 @@ User module Theme maintainers ----------------- +Bartik theme +- Jen Simmons 'jensimmons' <http://drupal.org/user/140882> + Garland theme - Stefan Nagtegaal 'steef' <http://drupal.org/user/612> diff --git a/UPGRADE.txt b/UPGRADE.txt index bb0263a24df59c6e18383b23ac9e7ffd1e09b62b..fb09f082a545438bf011e08c89af135c04f7299e 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 e2155870d3a6f225e2a1e6691099bf7350b6c082..220414a2d96fcc49324438c31f12b1f54f8d4a61 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 5d87379438495f69c8e995f94eef76480a3f738c..eb7111a4788bf03ce69ce19a2b5c381a03121f0a 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 6049141f07c7333a659d260f46a82ba9b309638b..927499a8f3b7e29b4d651cace008305c21029081 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 86584df7e813a271cb709e18e725031f7895677b..ce8044ed3621e1b3e7fab51314c68d8fdf8281e2 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 dff4e6d729e40d3173c00ef3db974f5dc7f1beab..b13f30ff40ced8311924acd5d613b0b1c8134f5e 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('<front>'); - $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('<front>'); - $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 59cd8eb14945e48e64fd038aca91beced08b7905..d8ffbcbd75e43c91b667f83dca7716ac4f87dcb1 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 '<p>' . 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 <a href="@blocks">blocks administration page</a> 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'))) . '</p>'; + return '<p>' . 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 <a href="@blocks">blocks administration page</a> 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'))) . '</p>'; // 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 451575cf2864a80574f9da04b0a2b5fb7dbdf775..82385c5e9f2e12a263b89e15227c71b60e1344a5 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 35c5bbc3b568542fda2a34b2fcd3136f8bea2948..d81602463ca583dd7fca4143f11cf506994bc5ae 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 1b5dbc3514b8820acb62eefdbe8bf30001859bd2..7320bdaa7ae640373b48bbbd59af3186ee1f0570 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 3fd90efc270fc70646ef41c4fdcf4f7584af84bf..1dccb6e600d8f9c3f8eba4524326c1953b6d9527 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 1f637372374a14c5ce1b2490b085593ad2fada1d..d4dc89842589663d8f0a365cad9e018915a750bd 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 ee3ac5786db7c76be1850d2ff268a70fffaeda87..2ddc75ac4d12c748b57d20f6aa880d559af1fc77 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 1d665bf944511ee8f26613339a8593b5b265ecb4..42a9d0635c6d5f6ab5f84f65dea1e626d12dbf7c 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -1045,7 +1045,6 @@ class PageTitleFiltering extends DrupalWebTestCase { $this->assertRaw($title_filtered . '</title>', '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 c84838ee1a305a013d8712408e47194b7a55fbb2..5bad49a756cd198304b6a3da1bc675c8c3ad3146 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 2892093d5c6d5b5c387ebe34e9dabd7cecc9fd64..29b1882ef822709da8d15b3c4752a2375b4d30ee 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -319,7 +319,7 @@ * 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 74fc27766350f878b959858305392bf4af5718f0..4753f6ba35ea3a21ae77d1782a0612f50279fc02 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.