Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
c7dc1e85
Commit
c7dc1e85
authored
12 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#1712352
by sun: configuration system does not support themes.
parent
d1ea099f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
core/includes/config.inc
+10
-8
10 additions, 8 deletions
core/includes/config.inc
core/includes/install.inc
+1
-1
1 addition, 1 deletion
core/includes/install.inc
core/includes/module.inc
+1
-1
1 addition, 1 deletion
core/includes/module.inc
core/includes/theme.inc
+3
-0
3 additions, 0 deletions
core/includes/theme.inc
with
15 additions
and
10 deletions
core/includes/config.inc
+
10
−
8
View file @
c7dc1e85
...
@@ -12,22 +12,24 @@
...
@@ -12,22 +12,24 @@
*/
*/
/**
/**
* Installs the default configuration of a given
module
.
* Installs the default configuration of a given
extension
.
*
*
* @param
* @param string $type
* The name of the module we are installing.
* The extension type; e.g., 'module' or 'theme'.
* @param string $name
* The name of the module or theme to install default configuration for.
*
*
* @todo Make this acknowledge other storage engines rather than having
* @todo Make this acknowledge other storage engines rather than having
* SQL be hardcoded.
* SQL be hardcoded.
*/
*/
function
config_install_default_config
(
$
modul
e
)
{
function
config_install_default_config
(
$
type
,
$nam
e
)
{
$
module_
config_dir
=
drupal_get_path
(
'module'
,
$modul
e
)
.
'/config'
;
$config_dir
=
drupal_get_path
(
$type
,
$nam
e
)
.
'/config'
;
if
(
is_dir
(
$
module_
config_dir
))
{
if
(
is_dir
(
$config_dir
))
{
$source_storage
=
new
FileStorage
(
array
(
'directory'
=>
$
module_
config_dir
));
$source_storage
=
new
FileStorage
(
array
(
'directory'
=>
$config_dir
));
$target_storage
=
new
DatabaseStorage
();
$target_storage
=
new
DatabaseStorage
();
$null_storage
=
new
NullStorage
();
$null_storage
=
new
NullStorage
();
// Upon
module
installation, only new config objects need to be created.
// Upon installation, only new config objects need to be created.
// config_sync_get_changes() would potentially perform a diff of hundreds or
// config_sync_get_changes() would potentially perform a diff of hundreds or
// even thousands of config objects that happen to be contained in the
// even thousands of config objects that happen to be contained in the
// active store. We leverage the NullStorage to avoid that needless
// active store. We leverage the NullStorage to avoid that needless
...
...
This diff is collapsed.
Click to expand it.
core/includes/install.inc
+
1
−
1
View file @
c7dc1e85
...
@@ -387,7 +387,7 @@ function drupal_install_system() {
...
@@ -387,7 +387,7 @@ function drupal_install_system() {
system_rebuild_module_data
();
system_rebuild_module_data
();
system_rebuild_theme_data
();
system_rebuild_theme_data
();
config_install_default_config
(
'system'
);
config_install_default_config
(
'module'
,
'system'
);
module_invoke
(
'system'
,
'install'
);
module_invoke
(
'system'
,
'install'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
core/includes/module.inc
+
1
−
1
View file @
c7dc1e85
...
@@ -462,7 +462,7 @@ function module_enable($module_list, $enable_dependencies = TRUE) {
...
@@ -462,7 +462,7 @@ function module_enable($module_list, $enable_dependencies = TRUE) {
$version
=
$versions
?
max
(
$versions
)
:
SCHEMA_INSTALLED
;
$version
=
$versions
?
max
(
$versions
)
:
SCHEMA_INSTALLED
;
// Install default configuration of the module.
// Install default configuration of the module.
config_install_default_config
(
$module
);
config_install_default_config
(
'module'
,
$module
);
// If the module has no current updates, but has some that were
// If the module has no current updates, but has some that were
// previously removed, set the version to the value of
// previously removed, set the version to the value of
...
...
This diff is collapsed.
Click to expand it.
core/includes/theme.inc
+
3
−
0
View file @
c7dc1e85
...
@@ -1417,6 +1417,9 @@ function theme_enable($theme_list) {
...
@@ -1417,6 +1417,9 @@ function theme_enable($theme_list) {
->
condition
(
'type'
,
'theme'
)
->
condition
(
'type'
,
'theme'
)
->
condition
(
'name'
,
$key
)
->
condition
(
'name'
,
$key
)
->
execute
();
->
execute
();
// Install default configuration of the theme.
config_install_default_config
(
'theme'
,
$key
);
}
}
list_themes
(
TRUE
);
list_themes
(
TRUE
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment