Commit e3a52979 authored by Dries's avatar Dries

- Patch #865072 by bleen18, jhodgdon: updates to reflect that Bartik is default theme now.

parent 1c4b5b9f
......@@ -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>
......
......@@ -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
......
......@@ -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.
......
......@@ -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.
......
......@@ -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'));
}
......
......@@ -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.
......
......@@ -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 . ')');
}
}
......@@ -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':
......
......@@ -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
......
......@@ -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');
......
......@@ -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';
......
......@@ -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."));
}
/**
......
......@@ -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()."));
}
}
......@@ -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.
......
......@@ -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.'));
}
}
......
......@@ -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.
*
......
......@@ -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
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment