summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEarl Miles2009-08-06 01:18:11 (GMT)
committer Earl Miles2009-08-06 01:18:11 (GMT)
commit916943bcb83fb7ed5c50bfd419b4467fa2c57d16 (patch)
treee7101847ffbbe7beaab06417f70e8dc499af37e5
parent2ca062a6de8358ccc4f63e58316b8b7c1b1a9b7d (diff)
#538900: Fix bug with flexible when having multiple regions of the same name if they have a space.
-rw-r--r--CHANGELOG.txt2
-rw-r--r--plugins/layouts/flexible/flexible.inc6
2 files changed, 5 insertions, 3 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 47fbe1d..92d0232 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -7,6 +7,8 @@ Panels 6.x-3.0-dev
#535606: Mini panel deletion deleted all block config of all mini panels.
#539418 by esmerel: Remove reference to panel page from module description.
#535722: Fix incorrect "title" tag on categories in add content modal.
+Fix a bug with drag and drop UI that caused panes to break after other panes were added.
+#538900: Fix bug with flexible when having multiple regions of the same name if they have a space.
Panels 6.x-3.0-rc1
==================
diff --git a/plugins/layouts/flexible/flexible.inc b/plugins/layouts/flexible/flexible.inc
index e1a37dd..6a0bfa5 100644
--- a/plugins/layouts/flexible/flexible.inc
+++ b/plugins/layouts/flexible/flexible.inc
@@ -655,7 +655,7 @@ function panels_flexible_get_css_group(&$css, $renderer, $list, $owner_id, $type
$renderer->scale[$id] = $scale;
}
}
-
+
// If there is any total remaining, we need to offset the splitter
// by this much too.
if ($left_total) {
@@ -1131,11 +1131,11 @@ function panels_flexible_add_item_form_submit(&$form, &$form_state) {
if ($item['type'] == 'region') {
// derive the region key from the title
- $key = drupal_strtolower($item['title']);
+ $key = preg_replace("/[^a-z0-9]/", '_', drupal_strtolower($item['title']));
while (isset($settings['items'][$key])) {
$key .= '_';
}
- $form_state['key'] = $key = preg_replace("/[^a-z0-9]/", '_', $key);
+ $form_state['key'] = $key;
}
else {
$form_state['key'] = $key = max(array_keys($settings['items'])) + 1;