From 0447e92bf3f6e60cf308b3041ea1c685d8cecca6 Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Sun, 7 Nov 2010 00:27:20 +0000
Subject: [PATCH] - Patch #801632 by sun, Jacine: make phptemplate the default
 engine to simplify .info file.

---
 includes/common.inc                                           | 2 +-
 modules/system/system.module                                  | 3 ++-
 themes/bartik/bartik.info                                     | 1 -
 themes/garland/garland.info                                   | 1 -
 themes/seven/seven.info                                       | 1 -
 themes/stark/stark.info                                       | 1 -
 themes/tests/test_theme/test_theme.info                       | 1 -
 themes/tests/update_test_basetheme/update_test_basetheme.info | 1 -
 themes/tests/update_test_subtheme/update_test_subtheme.info   | 1 -
 9 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/includes/common.inc b/includes/common.inc
index d651131f3f83..86fb23ae94f9 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -6616,7 +6616,7 @@ function drupal_write_record($table, &$record, $primary_keys = array()) {
  * - name: The real name of the theme for display purposes
  * - description: Brief description
  * - screenshot: Path to screenshot relative to the theme's .info file.
- * - engine: Theme engine, typically: engine = phptemplate
+ * - engine: Theme engine; typically phptemplate.
  * - base: Name of a base theme, if applicable, eg: base = zen
  * - regions: Listed regions eg: region[left] = Left sidebar
  * - features: Features available eg: features[] = logo
diff --git a/modules/system/system.module b/modules/system/system.module
index 697c394ed147..004a0be93dd4 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -2410,6 +2410,7 @@ function _system_rebuild_theme_data() {
 
   // Set defaults for theme info.
   $defaults = array(
+    'engine' => 'phptemplate',
     'regions' => array(
       'sidebar_first' => 'Left sidebar',
       'sidebar_second' => 'Right sidebar',
@@ -2443,7 +2444,7 @@ function _system_rebuild_theme_data() {
     if (!empty($themes[$key]->info['base theme'])) {
       $sub_themes[] = $key;
     }
-    if (empty($themes[$key]->info['engine'])) {
+    if ($themes[$key]->info['engine'] == 'theme') {
       $filename = dirname($themes[$key]->uri) . '/' . $themes[$key]->name . '.theme';
       if (file_exists($filename)) {
         $themes[$key]->owner = $filename;
diff --git a/themes/bartik/bartik.info b/themes/bartik/bartik.info
index 689fcc330de7..447a2b6c9eb3 100644
--- a/themes/bartik/bartik.info
+++ b/themes/bartik/bartik.info
@@ -5,7 +5,6 @@ description = A flexible, recolorable theme with many regions.
 package = Core
 version = VERSION
 core = 7.x
-engine = phptemplate
 
 stylesheets[all][] = css/layout.css
 stylesheets[all][] = css/style.css
diff --git a/themes/garland/garland.info b/themes/garland/garland.info
index 13576cd1eaaf..ed681cfa970e 100644
--- a/themes/garland/garland.info
+++ b/themes/garland/garland.info
@@ -4,7 +4,6 @@ description = A multi-column theme which can be configured to modify colors and
 package = Core
 version = VERSION
 core = 7.x
-engine = phptemplate
 stylesheets[all][] = style.css
 stylesheets[print][] = print.css
 settings[garland_width] = fluid
diff --git a/themes/seven/seven.info b/themes/seven/seven.info
index fa8629887a3d..aee47e039f1c 100644
--- a/themes/seven/seven.info
+++ b/themes/seven/seven.info
@@ -4,7 +4,6 @@ description = A simple one-column, tableless, fluid width administration theme.
 package = Core
 version = VERSION
 core = 7.x
-engine = phptemplate
 stylesheets[screen][] = reset.css
 stylesheets[screen][] = style.css
 settings[shortcut_module_link] = 1
diff --git a/themes/stark/stark.info b/themes/stark/stark.info
index 5ff7efa25029..d95f5361e466 100644
--- a/themes/stark/stark.info
+++ b/themes/stark/stark.info
@@ -4,5 +4,4 @@ description = This theme demonstrates Drupal's default HTML markup and CSS style
 package = Core
 version = VERSION
 core = 7.x
-engine = phptemplate
 stylesheets[all][] = layout.css
diff --git a/themes/tests/test_theme/test_theme.info b/themes/tests/test_theme/test_theme.info
index 06fec4ed7874..3a4b7c0eaae1 100644
--- a/themes/tests/test_theme/test_theme.info
+++ b/themes/tests/test_theme/test_theme.info
@@ -2,7 +2,6 @@
 name = Test theme
 description = Theme for testing the theme system
 core = 7.x
-engine = phptemplate
 hidden = TRUE
 
 ; Normally, themes may list CSS files like this, and if they exist in the theme
diff --git a/themes/tests/update_test_basetheme/update_test_basetheme.info b/themes/tests/update_test_basetheme/update_test_basetheme.info
index f8035fa4fb58..11ff04ab3c0c 100644
--- a/themes/tests/update_test_basetheme/update_test_basetheme.info
+++ b/themes/tests/update_test_basetheme/update_test_basetheme.info
@@ -2,5 +2,4 @@
 name = Update test base theme
 description = Test theme which acts as a base theme for other test subthemes.
 core = 7.x
-engine = phptemplate
 hidden = TRUE
diff --git a/themes/tests/update_test_subtheme/update_test_subtheme.info b/themes/tests/update_test_subtheme/update_test_subtheme.info
index 95d23eefbae0..b9a9f0e37cad 100644
--- a/themes/tests/update_test_subtheme/update_test_subtheme.info
+++ b/themes/tests/update_test_subtheme/update_test_subtheme.info
@@ -2,6 +2,5 @@
 name = Update test subtheme
 description = Test theme which uses update_test_basetheme as the base theme.
 core = 7.x
-engine = phptemplate
 base theme = update_test_basetheme
 hidden = TRUE
-- 
GitLab