#898584 by Damien Tournoud, ksenzee, chx: Clean-up the upgrade path: system.
parent
061ee9d444
commit
b6d73970ae
|
@ -2060,13 +2060,15 @@ function system_update_7016() {
|
||||||
* Change the theme setting 'toggle_node_info' into a per content type variable.
|
* Change the theme setting 'toggle_node_info' into a per content type variable.
|
||||||
*/
|
*/
|
||||||
function system_update_7017() {
|
function system_update_7017() {
|
||||||
$types = node_type_get_types();
|
// Get the global theme settings.
|
||||||
if (count($types)) {
|
$settings = variable_get('theme_settings', array());
|
||||||
foreach ($types as $type) {
|
// Get the settings of the default theme.
|
||||||
$node_info = theme_get_setting('toggle_node_info_' . $type->type);
|
$settings = array_merge($settings, variable_get('theme_' . variable_get('theme_default', 'garland') . '_settings', array()));
|
||||||
if ($node_info !== NULL) {
|
|
||||||
variable_set('node_submitted_' . $type->type, $node_info);
|
$types = _update_7000_node_get_types();
|
||||||
}
|
foreach ($types as $type) {
|
||||||
|
if (isset($settings['toggle_node_info_' . $type->type])) {
|
||||||
|
variable_set('node_submitted_' . $type->type, $settings['toggle_node_info_' . $type->type]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue