Commit 7d7aee29 authored by dsnopek's avatar dsnopek Committed by joseph.olstad

Issue #2856433 by dsnopek, natew: Update 7205 doesn't check if file view modes...

Issue #2856433 by dsnopek, natew: Update 7205 doesn't check if file view modes are enabled before migrating the configuration
parent dcee2995
......@@ -178,7 +178,7 @@ function media_wysiwyg_update_7205() {
// Migrate the configuration from the old variables into the new DB tables.
$types = file_type_load_all(TRUE);
foreach ($types as $type) {
$enabled = variable_get("media_wysiwyg_view_mode_" . $type->type . "_file__wysiwyg_restricted_view_modes_status", FALSE);
$enabled = variable_get("media_wysiwyg_view_mode_" . $type->type . "_file_wysiwyg_restricted_view_modes_status", FALSE);
if ($enabled) {
$wysiwyg_restricted_view_modes = variable_get("media_wysiwyg_view_mode_" . $type->type . "_file_wysiwyg_restricted_view_modes", array());
foreach ($wysiwyg_restricted_view_modes as $wysiwyg_restricted_view_mode) {
......@@ -191,7 +191,7 @@ function media_wysiwyg_update_7205() {
}
}
$enabled = variable_get("media_wysiwyg_view_mode_" . $type->type . "_wysiwyg_view_mode_status");
$enabled = variable_get("media_wysiwyg_view_mode_" . $type->type . "_wysiwyg_view_mode_status", FALSE);
if ($enabled) {
$file_wysiwyg_view_mode = variable_get("media_wysiwyg_view_mode_" . $type->type . "_file_wysiwyg_view_mode", 'wysiwyg');
db_insert('media_view_mode_wysiwyg')
......
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