? .DS_Store
? BACKUP
? classlostD7.patch
Index: skinr.handlers.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/skinr.handlers.inc,v
retrieving revision 1.8
diff -u -p -r1.8 skinr.handlers.inc
--- skinr.handlers.inc	27 Nov 2010 23:22:26 -0000	1.8
+++ skinr.handlers.inc	3 Dec 2010 19:47:18 -0000
@@ -1,8 +1,8 @@
 <?php
-// $Id: skinr.handlers.inc,v 1.8 2010/11/27 23:22:26 jgirlygirl Exp $
+// $Id: skinr.handlers.inc,v 1.4 2010/06/02 13:16:58 moonray Exp $
 /**
  * @file
- * Defines the various default handler functions to support Skinr.
+ * Defines the various handler objects to support Skinr.
  */
 
 /*
@@ -10,15 +10,14 @@
  *
  * @param $op
  *   What kind of action is being performed. Possible values:
- *   - access skinr: Access to edit Skinr's settings.
- *   - access skinr classes: Access to edit Skinr's additional classes.
+ *   - "access skinr": access to edit skinr's selector
+ *   - "access skinr classes": access to edit skinr's additional classes
  * @param &$form
  *   Passes in the $form parameter from hook_form_alter().
  * @param $form_state
  *   Passes in the $form_state parameter from hook_form_alter().
- *
  * @return
- *   TRUE if we get access, FALSE otherwise.
+ *   TRUE if we get access, FALSE if we don't.
  */
 function skinr_access_handler($op, &$form, $form_state) {
   switch ($op) {
@@ -34,18 +33,16 @@ function skinr_access_handler($op, &$for
  *
  * @param $op
  *   What kind of action is being performed. Possible values:
- *   - form: The form elements for Skinr are being inserted in a form.
- *   - submit: The form has been submitted.
+ *   - "form": the form elements for Skinr are being inserted in a form
+ *   - "submit": the form has been submitted.
  * @param &$form
- *   - For 'form', passes in the $form parameter from hook_form_alter().
- *   - For 'submit', passes in the $form parameter from hook_form_submit().
+ *   - For "form", passes in the $form parameter from hook_form_alter().
+ *   - For "submit", passes in the $form parameter from hook_form_submit().
  * @param $form_state
- *   - For 'form', passes in the $form_state parameter from hook_form_alter().
- *   - For 'submit', passes in the $form_state parameter from
- *     hook_form_submit().
- *
+ *   - For "form", passes in the $form_state parameter from hook_form_alter().
+ *   - For "submit", passes in the $form_state parameter from hook_form_submit().
  * @return
- *   The index where we can find our values in Skinr's data structure.
+ *   The index where we can find our values in Skinrs data structure.
  */
 function skinr_index_handler($op, &$form, $form_state) {
   switch ($op) {
@@ -65,23 +62,20 @@ function skinr_index_handler($op, &$form
   }
 }
 
-/**
+/*
  * Skinr data handler.
  *
  * @param &$form
  *   Passes in the $form parameter from hook_form_submit().
  * @param $form_state
  *   Passes in the $form_state parameter from hook_form_submit().
- * @param $theme
- *   The theme that is currently being processed.
  * @param $module
  *   The module that is currently being processed.
  * @param $form_settings
  *   The settings from hook_skinr_config() for the form that's currently being
  *   processed.
- *
  * @return
- *   A skinr settings object.
+ *   TRUE if we get access, FALSE if we don't.
  */
 function skinr_data_handler(&$form, $form_state, $theme, $module, $form_settings) {
   // Ensure we have the required index_handler
@@ -90,7 +84,7 @@ function skinr_data_handler(&$form, $for
   }
   $index = skinr_handler('form_index_handler', 'form', $form_settings['index_handler'], $form, $form_state);
 
-  return skinr_skin_load($theme, $module, $index);
+  return skinr_get($theme, $module, $index);
 }
 
 /**
@@ -105,36 +99,48 @@ function skinr_data_handler(&$form, $for
  * @param $form_settings
  *   The settings from hook_skinr_config() for the form that's currently being
  *   processed.
+ * @return
+ *   TRUE if we get access, FALSE if we don't.
  */
 function skinr_submit_handler(&$form, $form_state, $module, $form_settings) {
   if (isset($form_state['values']['skinr_settings'][$module . '_group'])) {
     foreach ($form_state['values']['skinr_settings'][$module . '_group'] as $theme_name => $theme) {
-      if ((!empty($theme['widgets']) && is_array($theme['widgets'])) || isset($theme['_additional'])) {
-        $skin = new stdClass();
-        $skin->theme = $theme_name;
-        $skin->module = $module;
-        $skin->sid = skinr_handler('form_index_handler', 'submit', $form_settings['index_handler'], $form, $form_state);
-        $skin->skins = array();
-
-        if (!empty($theme['widgets']) && is_array($theme['widgets'])) {
-          foreach ($theme['widgets'] as $skin_name => $skin_value) {
-            $skin->skins['_options'][$skin_name] = $skin_value;
+      if ((isset($theme['widgets']) && count($theme['widgets'])) || isset($theme['_additional'])) {
+        $skinr = new stdClass();
+        $skinr->theme = $theme_name;
+        $skinr->module = $module;
+        $skinr->sid = skinr_handler('form_index_handler', 'submit', $form_settings['index_handler'], $form, $form_state);
+        $skinr->skins = array();
+		$saved = skinr_get($skinr->theme, $skinr->module, $skinr->sid);
+
+        if (isset($theme['widgets']) && is_array($theme['widgets'])) {
+          foreach ($theme['widgets'] as $skin_id => $skin_value) {
+            $skinr->skins[$skin_id] = $skin_value;
           }
         }
 
         if (isset($theme['_additional'])) {
           $theme['_additional'] = trim($theme['_additional']);
           if (!empty($theme['_additional'])) {
-            $skin->skins['_additional'] = $theme['_additional'];
+            $skinr->skins['_additional'] = $theme['_additional'];
           }
         }
+		else {
+          if (!user_access('access skinr classes') && isset($saved->skins['_additional'])) {
+		    // The user didn't have access to change this. Ensure the existing
+	        // custom classes remain by populating the element with the
+	        // previously saved values.
+		    $value->skins['_additional'] = $saved->skins['_additional'];
+	      }
+		}
+	
 
-        if (empty($skin->sid)) {
+        if (empty($skinr->sid)) {
           // We didn't receive a valid sid, so raise an error
           drupal_set_message(t("Skinr settings weren't saved due to an error."), 'error');
         }
 
-        skinr_skin_save($skin);
+        skinr_set($skinr);
       }
     }
   }
@@ -143,7 +149,7 @@ function skinr_submit_handler(&$form, $f
 // Declare API compatibility on behalf of core modules:
 
 /**
- * Implements hook_skinr_api().
+ * Implementation of hook_skinr_api().
  *
  * This one is used as the base to reduce errors when updating.
  */
Index: modules/panels.skinr.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/modules/panels.skinr.inc,v
retrieving revision 1.18
diff -u -p -r1.18 panels.skinr.inc
--- modules/panels.skinr.inc	27 Nov 2010 23:22:27 -0000	1.18
+++ modules/panels.skinr.inc	3 Dec 2010 19:47:18 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: panels.skinr.inc,v 1.18 2010/11/27 23:22:27 jgirlygirl Exp $
+// $Id: panels.skinr.inc,v 1.14 2010/10/29 06:24:37 jgirlygirl Exp $
 /**
  * @file
  * Provide skinr handling for panels.module.
@@ -12,9 +12,9 @@
  */
 
 /**
- * Implements hook_skinr_config_info().
+ * Implementation of hook_skinr_config().
  */
-function panels_skinr_config_info() {
+function panels_skinr_config() {
   $data['panels']['form']['panels_edit_style_settings_form'] = array(
     'index_handler' => 'panels_skinr_form_index_handler',
     'data_handler' => 'panels_skinr_data_handler',
@@ -57,17 +57,16 @@ function panels_skinr_config_info() {
  *
  * @param $op
  *   What kind of action is being performed. Possible values:
- *   - 'form': the form elements for Skinr are being inserted in a form.
- *   - 'submit': the form has been submitted.
+ *   - "form": the form elements for Skinr are being inserted in a form
+ *   - "submit": the form has been submitted.
  * @param &$form
- *   - For 'form', passes in the $form parameter from hook_form_alter().
- *   - For 'submit', passes in the $form parameter from hook_form_submit().
+ *   - For "form", passes in the $form parameter from hook_form_alter().
+ *   - For "submit", passes in the $form parameter from hook_form_submit().
  * @param $form_state
- *   - For 'form', passes in the $form_state parameter from hook_form_alter().
- *   - For 'submit', passes in the $form_state parameter from hook_form_submit().
- *
+ *   - For "form", passes in the $form_state parameter from hook_form_alter().
+ *   - For "submit", passes in the $form_state parameter from hook_form_submit().
  * @return
- *   The index where we can find our values in Skinr's data structure.
+ *   The index where we can find our values in Skinrs data structure.
  */
 function panels_skinr_form_index_handler($op, &$form, $form_state) {
   switch ($op) {
@@ -89,15 +88,14 @@ function panels_skinr_form_index_handler
  *
  * @param $op
  *   What kind of action is being performed. Possible values:
- *   - 'access skinr': access to edit Skinr's settings.
- *   - 'access skinr classes': access to edit Skinr's additional classes.
+ *   - "access skinr": access to edit skinr's selector
+ *   - "access skinr classes": access to edit skinr's additional classes
  * @param &$form
  *   Passes in the $form parameter from hook_form_alter().
  * @param $form_state
  *   Passes in the $form_state parameter from hook_form_alter().
- *
  * @return
- *   TRUE if we get access, FALSE otherwise.
+ *   TRUE if we get access, FALSE if we don't.
  */
 function panels_skinr_access_handler_display($op, &$form, $form_state) {
   // We don't want the skinr settings form to appear on this form. We only want
@@ -173,9 +171,8 @@ function panels_skinr_access_handler_dis
  * @param $form_settings
  *   The settings from hook_skinr_config() for the form that's currently being
  *   processed.
- *
  * @return
- *   A skinr settings object.
+ *   TRUE if we get access, FALSE if we don't.
  */
 function panels_skinr_data_handler(&$form, $form_state, $theme, $module, $form_settings) {
   // Ensure we have the required index_handler.
@@ -197,25 +194,26 @@ function panels_skinr_data_handler(&$for
   }
 
   // No data exists in cache, so let's grab it from the regular source.
-  return skinr_skin_load($theme, $module, $index);
+  return skinr_get($theme, $module, $index);
 }
 
 /**
  * Skinr submit handler.
  *
+ * @param $op
+ *   What kind of action is being performed. Possible values:
+ *   - "access skinr": access to edit skinr's selector
+ *   - "access skinr classes": access to edit skinr's additional classes
  * @param &$form
- *   Passes in the $form parameter from hook_form_submit().
+ *   Passes in the $form parameter from hook_form_alter().
  * @param $form_state
- *   Passes in the $form_state parameter from hook_form_submit().
- * @param $module
- *   The module that is currently being processed.
- * @param $form_settings
- *   The settings from hook_skinr_config() for the form that's currently being
- *   processed.
+ *   Passes in the $form_state parameter from hook_form_alter().
+ * @return
+ *   TRUE if we get access, FALSE if we don't.
  */
 function panels_skinr_submit_handler_settings(&$form, $form_state, $module, $form_settings) {
   foreach ($form_state['values']['skinr_settings'][$module . '_group'] as $theme_name => $theme) {
-    if ((!empty($theme['widgets']) && is_array($theme['widgets'])) || isset($theme['_additional'])) {
+    if ((isset($theme['widgets']) && count($theme['widgets'])) || isset($theme['_additional'])) {
       $hook  = $module;
       $sid   = skinr_handler('form_index_handler', 'submit', $form_settings['index_handler'], $form, $form_state);
 
@@ -223,10 +221,11 @@ function panels_skinr_submit_handler_set
       // and use that for reference on the final submit? If it works...
 
       $value = array();
+	  $saved = skinr_get($skinr->theme, $skinr->module, $skinr->sid);
 
-      if (!empty($theme['widgets']) && is_array($theme['widgets'])) {
-        foreach ($theme['widgets'] as $skin_name => $skin_value) {
-          $value['_options'][$skin_name] = $skin_value;
+      if (is_array($theme['widgets'])) {
+        foreach ($theme['widgets'] as $skin_id => $skin_value) {
+          $value[$skin_id] = $skin_value;
         }
       }
 
@@ -236,6 +235,14 @@ function panels_skinr_submit_handler_set
           $value['_additional'] = $theme['_additional'];
         }
       }
+	  else {
+        if (!user_access('access skinr classes') && isset($saved->skins['_additional'])) {
+		   // The user didn't have access to change this. Ensure the existing
+	       // custom classes remain by populating the element with the
+	       // previously saved values.
+		   $value->skins['_additional'] = $saved->skins['_additional'];
+	     }
+	   }
 
       if (empty($sid)) {
         // We didn't receive a valid sid, so raise an error.
@@ -247,7 +254,7 @@ function panels_skinr_submit_handler_set
       if (!$skinr_data = ctools_object_cache_get('skinr', $form_state['display']->did, TRUE)) {
         $skinr_data = array();
         // Fetch skinr data.
-        $skinr = skinr_skin_load($theme_name);
+        $skinr = skinr_get($theme_name);
         if (isset($skinr[$module])) {
           foreach ($skinr[$module] as $skinr_key => $skinr_value) {
             if (drupal_substr($skinr_key, 0, drupal_strlen('display-' . $form_state['display']->did)) == 'display-' . $form_state['display']->did) {
@@ -263,7 +270,7 @@ function panels_skinr_submit_handler_set
 }
 
 /**
- * @todo Remove values from skinr if a display is deleted.
+ * @todo remove values from skinr if a display is deleted
  */
 function panels_skinr_submit_handler_display(&$form, $form_state, $module, $form_settings) {
   $form_id = $form_state['values']['form_id'];
@@ -318,7 +325,7 @@ function _panels_skinr_save_and_clear_ca
         $skinr->sid = $sid;
         $skinr->skins = $skins;
 
-        skinr_skin_save($skinr);
+        skinr_set($skinr);
       }
     }
     ctools_object_cache_clear('skinr', $did);
@@ -326,15 +333,14 @@ function _panels_skinr_save_and_clear_ca
 }
 
 /**
- * Skinr preprocess hook callback.
+ * Skinr preprocess_hook_callback.
  *
  * @param &$form
  *   Passes in the $form parameter from hook_form_alter().
  * @param $form_state
  *   Passes in the $form_state parameter from hook_form_alter().
- *
  * @return
- *   An array of preprocess hooks we wish to use.
+ *   The preprocess_hook we wish to use.
  */
 function panels_skinr_preprocess_hook_callback(&$form, $form_state) {
   switch ($form_state['type']) {
@@ -348,15 +354,14 @@ function panels_skinr_preprocess_hook_ca
 }
 
 /**
- * Skinr preprocess hook callback.
+ * Skinr preprocess_hook_callback.
  *
  * @param &$form
  *   Passes in the $form parameter from hook_form_alter().
  * @param $form_state
  *   Passes in the $form_state parameter from hook_form_alter().
- *
  * @return
- *   An array of preprocess hooks we wish to use.
+ *   The preprocess_hook we wish to use.
  */
 function panels_skinr_ajax_preprocess_hook_callback(&$form, $form_state) {
   if (strpos($form['skinr']['sid']['#value'], '-region-') !== FALSE) {
@@ -375,9 +380,8 @@ function panels_skinr_ajax_preprocess_ho
  *
  * @param &$variables
  *   Passes in the $variables parameter from module_preprocess().
- *
  * @return
- *   The index where we can find our values in Skinr's data structure. If an
+ *   The index where we can find our values in Skinrs data structure. If an
  *   array is returned, it will loop through each index in Skinr's data
  *   structure and merge the returned classes.
  */
@@ -393,7 +397,7 @@ function panels_skinr_preprocess_index_h
 // Panels hooks.
 
 /**
- * Implements hook_ctools_plugin_directory() to let the system know
+ * Implementation of hook_ctools_plugin_directory() to let the system know
  * we implement panels plugins.
  */
 function skinr_ctools_plugin_directory($module, $plugin) {
Index: modules/views.skinr.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/modules/views.skinr.inc,v
retrieving revision 1.13
diff -u -p -r1.13 views.skinr.inc
--- modules/views.skinr.inc	27 Nov 2010 23:22:27 -0000	1.13
+++ modules/views.skinr.inc	3 Dec 2010 19:47:18 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: views.skinr.inc,v 1.13 2010/11/27 23:22:27 jgirlygirl Exp $
+// $Id: views.skinr.inc,v 1.8 2010/06/02 13:16:58 moonray Exp $
 
 /**
  * @file
@@ -13,9 +13,9 @@
  */
 
 /**
- * Implements hook_skinr_config_info().
+ * Implementation of hook_skinr_config().
  */
-function views_skinr_config_info() {
+function views_skinr_config() {
   $data['views']['form']['views_ui_edit_display_form'] = array(
     'index_handler' => 'views_skinr_form_index_handler',
     'access_handler' => 'views_skinr_access_handler_display',
@@ -32,6 +32,7 @@ function views_skinr_config_info() {
     'submit_handler' => 'views_skinr_submit_handler_view',
   );
   $data['views']['form']['skinr_ui_form'] = array(
+    'index_handler' => 'skinr_ajax_index_handler',
     'preprocess_hook_callback' => 'views_skinr_preprocess_hook_callback',
     'title' => t('views style settings'),
     'collapsed' => FALSE,
@@ -48,17 +49,16 @@ function views_skinr_config_info() {
  *
  * @param $op
  *   What kind of action is being performed. Possible values:
- *   - 'form': the form elements for Skinr are being inserted in a form.
- *   - 'submit': the form has been submitted.
+ *   - "form": the form elements for Skinr are being inserted in a form
+ *   - "submit": the form has been submitted.
  * @param &$form
- *   - For 'form', passes in the $form parameter from hook_form_alter().
- *   - For 'submit', passes in the $form parameter from hook_form_submit().
+ *   - For "form", passes in the $form parameter from hook_form_alter().
+ *   - For "submit", passes in the $form parameter from hook_form_submit().
  * @param $form_state
- *   - For 'form', passes in the $form_state parameter from hook_form_alter().
- *   - For 'submit', passes in the $form_state parameter from hook_form_submit().
- *
+ *   - For "form", passes in the $form_state parameter from hook_form_alter().
+ *   - For "submit", passes in the $form_state parameter from hook_form_submit().
  * @return
- *   The index where we can find our values in Skinr's data structure.
+ *   The index where we can find our values in Skinrs data structure.
  */
 function views_skinr_form_index_handler($op, &$form, $form_state) {
   switch ($op) {
@@ -88,15 +88,14 @@ function views_skinr_form_index_handler(
  *
  * @param $op
  *   What kind of action is being performed. Possible values:
- *   - 'access skinr': access to edit skinr's settings.
- *   - 'access skinr classes': access to edit skinr's additional classes.
+ *   - "access skinr": access to edit skinr's selector
+ *   - "access skinr classes": access to edit skinr's additional classes
  * @param &$form
  *   Passes in the $form parameter from hook_form_alter().
  * @param $form_state
  *   Passes in the $form_state parameter from hook_form_alter().
- *
  * @return
- *   TRUE if we get access, FALSE otherwise.
+ *   TRUE if we get access, FALSE if we don't.
  */
 function views_skinr_access_handler_display($op, &$form, $form_state) {
   if ($access = skinr_access_handler($op, $form, $form_state)) {
@@ -149,9 +148,8 @@ function views_skinr_access_handler_view
  * @param $form_settings
  *   The settings from hook_skinr_config() for the form that's currently being
  *   processed.
- *
  * @return
- *   A skinr settings object.
+ *   A skinr object.
  */
 function views_skinr_data_handler(&$form, $form_state, $theme, $module, $form_settings) {
   // Ensure we have the required index_handler
@@ -163,7 +161,7 @@ function views_skinr_data_handler(&$form
   // Fetch skinr data for this view from cache
   views_include('cache');
 
-  if ($skinrs = ctools_object_cache_get('skinr', $form_state['view']->name)) {
+  if ($skinrs = views_object_cache_get('skinr', $form_state['view']->name)) {
     if (isset($skinrs[$theme][$index])) {
       $skinr = new stdClass();
       $skinr->theme = $theme;
@@ -179,34 +177,44 @@ function views_skinr_data_handler(&$form
   }
 
   // No data exists in cache, so let's grab it from the regular source
-  return skinr_skin_load($theme, $module, $index);
+  return skinr_get($theme, $module, $index);
 }
 
 /**
  * Skinr submit handler.
  *
+ * @param $op
+ *   What kind of action is being performed. Possible values:
+ *   - "access skinr": access to edit skinr's selector
+ *   - "access skinr classes": access to edit skinr's additional classes
  * @param &$form
- *   Passes in the $form parameter from hook_form_submit().
+ *   Passes in the $form parameter from hook_form_alter().
  * @param $form_state
- *   Passes in the $form_state parameter from hook_form_submit().
- * @param $module
- *   The module that is currently being processed.
- * @param $form_settings
- *   The settings from hook_skinr_config() for the form that's currently being
- *   processed.
+ *   Passes in the $form_state parameter from hook_form_alter().
+ * @return
+ *   TRUE if we get access, FALSE if we don't.
  */
 function views_skinr_submit_handler_display(&$form, $form_state, $module, $form_settings) {
   foreach ($form_state['values']['skinr_settings'][$module .'_group'] as $theme_name => $theme) {
-    if ((!empty($theme['widgets']) && is_array($theme['widgets'])) || isset($theme['_additional'])) {
+    if ((isset($theme['widgets']) && count($theme['widgets'])) || isset($theme['_additional'])) {
       $sid   = skinr_handler('form_index_handler', 'submit', $form_settings['index_handler'], $form, $form_state);
       $value = array();
+	  $saved = skinr_get($skinr->theme, $skinr->module, $skinr->sid);
 
-      if (!empty($theme['widgets']) && is_array($theme['widgets'])) {
-        foreach ($theme['widgets'] as $skin_name => $skin_value) {
-          $value['_options'][$skin_name] = $skin_value;
+      if (is_array($theme['widgets'])) {
+        foreach ($theme['widgets'] as $skin_id => $skin_value) {
+          $value[$skin_id] = $skin_value;
         }
       }
-
+	  else {
+        if (!user_access('access skinr classes') && isset($saved->skins['_additional'])) {
+		   // The user didn't have access to change this. Ensure the existing
+	       // custom classes remain by populating the element with the
+	       // previously saved values.
+		   $value->skins['_additional'] = $saved->skins['_additional'];
+	     }
+	   }
+	
       if (isset($theme['_additional'])) {
         $theme['_additional'] = trim($theme['_additional']);
         if (!empty($theme['_additional'])) {
@@ -220,11 +228,11 @@ function views_skinr_submit_handler_disp
       }
 
       // Save skinr_settings for this view in cache
-      ctools_include('object-cache');
-      if (!$skinrs = ctools_object_cache_get('skinr', $form_state['view']->name, TRUE)) {
+      views_include('cache');
+      if (!$skinrs = views_object_cache_get('skinr', $form_state['view']->name, TRUE)) {
         $skinrs = array();
         // Fetch skinr data
-        $skinr = skinr_skin_load($theme_name);
+        $skinr = skinr_get($theme_name);
         if (isset($skinr[$module])) {
           foreach ($skinr[$module] as $skinr_key => $skinr_value) {
             if (drupal_substr($skinr_key, 0, drupal_strlen('view-'. $form_state['view']->name)) == 'view-'. $form_state['view']->name) {
@@ -243,9 +251,9 @@ function views_skinr_submit_handler_view
   switch ($form_state['values']['op']) {
     case t('Save'):
       // Fetch skinr data for this view from cache
-      ctools_include('object-cache');
+      views_include('cache');
 
-      if ($skinrs = ctools_object_cache_get('skinr', $form_state['view']->name, TRUE)) {
+      if ($skinrs = views_object_cache_get('skinr', $form_state['view']->name, TRUE)) {
         foreach ($skinrs as $theme_name => $theme) {
           foreach ($theme as $sid => $skins) {
             $skinr = new stdClass();
@@ -254,7 +262,7 @@ function views_skinr_submit_handler_view
             $skinr->sid = $sid;
             $skinr->skins = $skins;
 
-            skinr_skin_save($skinr);
+            skinr_set($skinr);
           }
         }
         views_object_cache_clear('skinr', $form_state['view']->name);
@@ -262,7 +270,7 @@ function views_skinr_submit_handler_view
       break;
     case t('Cancel'):
       // Remove our data from views cache
-      ctools_include('object-cache');
+      views_include('cache');
 
       views_object_cache_clear('skinr', $form_state['view']->name);
       break;
@@ -270,15 +278,14 @@ function views_skinr_submit_handler_view
 }
 
 /**
- * Skinr form preprocess hook callback.
+ * Skinr form preprocess_hook callback.
  *
  * @param &$form
  *   Passes in the $form parameter from hook_form_alter().
  * @param $form_state
  *   Passes in the $form_state parameter from hook_form_alter().
- *
  * @return
- *   An array of preprocess hooks we wish to use.
+ *   The preprocess_hook we wish to use.
  */
 function views_skinr_preprocess_hook_callback(&$form, $form_state) {
   $preprocess_hooks = array('views_view');
@@ -299,7 +306,7 @@ function views_skinr_preprocess_hook_cal
     // Create list of suggested templates.
     $preprocess_hooks = views_theme_functions('views_view', $view, $display);
     // Fetch additional style based suggested templates.
-    $additional_hooks = views_theme_functions($display->display_plugin, $view, $display);
+    $additional_hooks = views_theme_functions($view->style_plugin->definition['theme'], $view, $display);
 
     $preprocess_hooks = array_merge($additional_hooks, $preprocess_hooks);
   }
@@ -326,9 +333,8 @@ function _views_skinr_sidinfo($sid) {
  *
  * @param &$variables
  *   Passes in the $variables parameter from module_preprocess().
- *
  * @return
- *   The index where we can find our values in Skinr's data structure. If an
+ *   The index where we can find our values in Skinrs data structure. If an
  *   array is returned, it will loop through each index in Skinr's data
  *   structure and merge the returned classes.
  */
@@ -343,24 +349,5 @@ function views_skinr_preprocess_index_ha
 }
 
 /**
- * Implements hook_views_admin_links_alter().
- */
-function views_views_admin_links_alter(&$links, &$view) {
-  $default = $view->display_handler->is_defaulted('style_options');
-  if ($default) {
-    $sid = 'view-'. $view->name .'-display-default';
-  }
-  else {
-    $sid = 'view-'. $view->name .'-display-'. $view->current_display;
-  }
-
-  $links[] = array(
-    'title' => skinr_ui_edit_contextual_title('views', $sid),
-    'href' => 'admin/appearance/skinr/edit/nojs/views/' . $sid,
-    'query' => drupal_get_destination(),
-  );
-}
-
-/**
  * @}
  */
