? .svn
? 922136-1.x-a.patch
? 922136-1.x.patch
? 922136.patch
? LICENSE.txt
? css
? help
? images
? js
? skinr.handlers.inc
? skinr_ui.admin.inc
? skinr_ui.info
? skinr_ui.install
? skinr_ui.rules.inc
? docs/.svn
? modules/.svn
? modules/content.skinr.inc
? modules/fieldgroup.skinr.inc
? modules/skinr.skinr.inc
? modules/panels/.svn
? translations/.svn
Index: skinr.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/skinr.install,v
retrieving revision 1.3.2.2
diff -u -p -r1.3.2.2 skinr.install
--- skinr.install	17 Jan 2010 21:36:36 -0000	1.3.2.2
+++ skinr.install	18 Oct 2010 22:57:00 -0000
@@ -15,3 +15,22 @@ function skinr_uninstall() {
     variable_del($variable->name);
   }
 }
+
+/**
+ * Update old Skinr variables per http://drupal.org/node/922136 . 
+ */
+function skinr_update_6100() {
+  $ret = array();
+  $query = db_query("SELECT name, value FROM {variable} WHERE name LIKE('skinr_%') AND name NOT LIKE('skinr_settings_%')");
+  while ($result = db_fetch_object($query)) {
+    $vars[$result->name] = $result->value;
+  }
+  foreach ($vars as $name => $value) {
+    $new_value = str_replace('-panel-', '-region-', $value);
+    if ($new_value != $value) {
+      variable_set($name, $new_value);
+      $ret[] = array('success' => TRUE, 'query' => t('Updated value of %name', array('%name' => $name)));  
+    }    
+  }
+  return $ret;
+}
\ No newline at end of file
Index: modules/panels.skinr.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/modules/panels.skinr.inc,v
retrieving revision 1.8.2.8
diff -u -p -r1.8.2.8 panels.skinr.inc
--- modules/panels.skinr.inc	4 Sep 2010 05:32:51 -0000	1.8.2.8
+++ modules/panels.skinr.inc	18 Oct 2010 22:57:01 -0000
@@ -71,7 +71,7 @@ function panels_skinr_form_index_handler
           return 'display-'. $form['#parameters'][1]['display']->did;
         case 'panel': // Deprecated in Panels 3.7
         case 'region':
-          return 'display-'. $form['#parameters'][1]['display']->did .'-panel-'. $form['#parameters'][1]['pid'];
+          return 'display-'. $form['#parameters'][1]['display']->did .'-region-'. $form['#parameters'][1]['pid'];
         case 'pane':
           return 'display-'. $form['#parameters'][1]['display']->did .'-pane-'. $form['#parameters'][1]['pid'];
       }
@@ -335,7 +335,7 @@ function panels_skinr_preprocess_hook_ca
       return 'panels_display';
     case 'panel': // Deprecated as of Panels 3.7
     case 'region':
-      return 'panels_panel';
+      return 'panels_region';
     case 'pane':
       return 'panels_pane';
   }
Index: modules/panels/skinr.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/modules/panels/skinr.inc,v
retrieving revision 1.1.4.3
diff -u -p -r1.1.4.3 skinr.inc
--- modules/panels/skinr.inc	4 Sep 2010 05:32:51 -0000	1.1.4.3
+++ modules/panels/skinr.inc	18 Oct 2010 22:57:01 -0000
@@ -40,9 +40,10 @@ function skinr_skinr_panels_styles() {
 function theme_panels_skinr_style_render_region($display, $region_id, $panes, $settings) {
   // Workaround for missing/invalid $region_id.
   if (empty($region_id)) {
-    // We grab the first pane that we know exists in this panel and extract the region_id from it.
+    // Grab the first pane that we know exists in this panel and extract the
+    // region_id from it.
     $panes_keys = array_keys($panes);
-    $panel_id = $display->content[$panes_keys[0]]->panel;
+    $region_id = $display->content[$panes_keys[0]]->panel;
   }
 
   $output = '';
@@ -50,10 +51,9 @@ function theme_panels_skinr_style_render
   foreach ($panes as $pane_id => $content) {
     // Add the separator if we've already displayed a pane.
     if ($print_separator) {
-      $output .= '<div class="panel-separator"></div>';
+      $output .= '<div class="panel-region-separator"></div>';
     }
     $output .= $text = $content;
-
     // If we displayed a pane, this will become true; if not, it will become
     // false.
     $print_separator = (bool) $text;
@@ -63,17 +63,20 @@ function theme_panels_skinr_style_render
   $hook = 'panels';
   if (isset($display->panel_settings[$region_id]['style']) && isset($display->panel_settings[$region_id]['style']) == 'skinr') {
     // Specific style set for this panel.
-    $sid = 'display-'. $display->did .'-panel-'. $region_id;
+    $sid = 'display-'. $display->did .'-region-'. $region_id;
   }
   else {
     // No specific style set, so use the display's style.
     $sid = 'display-'. $display->did;
   }
   $style = array();
-  if($skinr = skinr_get(NULL, $hook, $sid)) {
-    $style = implode(' ', skinr_flatten_skins_array($skinr->skins));
+  // Get the Skinr classes for the current panel or display.
+  if ($skinr = skinr_get(NULL, $hook, $sid)) {
+    // Convert the array to a string fit for printing in the class attribute.
+    $style = skinr_style_array_to_string($skinr);
   }
 
+  // Wrap the output in a DIV containing the Skinr class.
   if (!empty($style)) {
     $output = '<div class="'. $style .'">'. $output .'</div>';
   }
