Index: skinr.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/skinr.info,v
retrieving revision 1.4
diff -u -p -r1.4 skinr.info
--- skinr.info	16 Oct 2010 22:22:17 -0000	1.4
+++ skinr.info	8 Dec 2010 17:35:16 -0000
@@ -1,16 +1,7 @@
-;$Id: skinr.info,v 1.4 2010/10/16 22:22:17 jgirlygirl Exp $
-
+; $Id: skinr.info,v 1.4 2010/10/16 22:22:17 jgirlygirl Exp $
 name = Skinr
 description = Provides a way to define and/or skin bits of Drupal output from the UI.
 package = Skinr
 core = 7.x
 
-files[] = skinr.module
-files[] = skinr.handlers.inc
-files[] = modules/block.skinr.inc
-files[] = modules/comment.skinr.inc
-files[] = modules/node.skinr.inc
-files[] = modules/panels.skinr.inc
-files[] = modules/skinr.skinr.inc
-files[] = modules/views.skinr.inc
 files[] = tests/skinr.test
Index: skinr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/skinr.module,v
retrieving revision 1.33
diff -u -p -r1.33 skinr.module
--- skinr.module	27 Nov 2010 23:22:26 -0000	1.33
+++ skinr.module	8 Dec 2010 21:39:44 -0000
@@ -39,13 +39,13 @@ function skinr_module_implements_alter(&
  */
 function skinr_init() {
   module_load_include('inc', 'skinr', 'skinr.handlers');
-  skinr_module_include('skinr.inc');
+  skinr_module_load_all_includes();
 }
 
 /**
  * Implements hook_preprocess().
  *
- * @todo Account for drupal's caching being enabled and make it work.
+ * @todo Account for Drupal's caching being enabled and make it work.
  */
 function skinr_preprocess(&$variables, $hook) {
   // Fix for update script.
@@ -57,10 +57,7 @@ function skinr_preprocess(&$variables, $
   $current_theme = skinr_current_theme();
   $theme_registry = theme_get_registry();
 
-  $original_hook = $hook;
-  if (isset($theme_registry[$hook]['original hook'])) {
-    $original_hook = $theme_registry[$hook]['original hook'];
-  }
+  $original_hook = (isset($theme_registry[$hook]['original hook']) ? $theme_registry[$hook]['original hook'] : $hook);
 
   foreach ($config as $module => $module_settings) {
     if (!empty($module_settings['preprocess'][$original_hook])) {
@@ -81,13 +78,13 @@ function skinr_preprocess(&$variables, $
         }
         $variables['classes_array'] = array_merge($variables['classes_array'], $extracted['classes']);
 
-        // Add a hook for skinr_ui to plug into: hook_skinr_preprocess_alter().
-        $data = array(
+        // Invoke hook_skinr_preprocess_alter() in all modules.
+        $context = array(
           'hook' => $hook,
           'variables' => &$variables,
           'skin' => &$extracted,
         );
-        drupal_alter('skinr_preprocess', $data);
+        drupal_alter('skinr_preprocess', $context);
       }
     }
   }
@@ -120,7 +117,7 @@ function skinr_skin_extract($module, $si
   if (!is_array($sids)) {
     $sids = array($sids);
   }
-  if (is_null($theme)) {
+  if (!isset($theme)) {
     $theme = skinr_current_theme();
   }
 
@@ -202,7 +199,7 @@ function skinr_skin_get_files($skin_opti
           if (!empty($skin_info_option['attached'][$type])) {
             foreach ($skin_info_option['attached'][$type] as $file) {
               $enabled = FALSE;
-              if (in_multiarray($skin_info_option_name, $skin_options)) {
+              if (_skinr_in_multiarray($skin_info_option_name, $skin_options)) {
                 $enabled = TRUE;
               }
 
@@ -246,7 +243,7 @@ function skinr_skin_get_files($skin_opti
  * @return
  *   Returns TRUE if $needle is found in the array, FALSE otherwise.
  */
-function in_multiarray($needle, $haystack) {
+function _skinr_in_multiarray($needle, $haystack) {
   if (is_array($haystack)) {
     // If $needle is in $haystack return TRUE.
     if (in_array($needle, $haystack)) {
@@ -255,7 +252,7 @@ function in_multiarray($needle, $haystac
 
     // If $needle isn't in $haystack, then check each item in the array.
     foreach ($haystack as $haybale) {
-      if (is_array($haybale) && in_multiarray($needle, $haybale)) {
+      if (is_array($haybale) && _skinr_in_multiarray($needle, $haybale)) {
         return TRUE;
       }
     }
@@ -424,19 +421,11 @@ function skinr_rule_visible($rid) {
 // Include file helpers.
 
 /**
- * Include files as necessary.
- *
- * @param $file
- *   The file to include. The filename needs to be prefixed with the
- *   implementing module's name (e.g. MODULE.$file), but do not include the
- *   module name prefix in your function call.
+ * Includes $module.skinr.inc files.
  */
-function skinr_module_include($file) {
+function skinr_module_load_all_includes() {
   foreach (skinr_get_module_apis() as $module => $info) {
-    $filepath = DRUPAL_ROOT . "/$info[path]/$module.$file";
-    if (file_exists($filepath)) {
-      require_once $filepath;
-    }
+    module_load_include('skinr.inc', $module);
   }
 }
 
@@ -444,9 +433,9 @@ function skinr_module_include($file) {
  * Get a list of modules that support skinr.
  */
 function skinr_get_module_apis() {
-  $cache = &drupal_static(__FUNCTION__, NULL);
+  $cache = &drupal_static(__FUNCTION__);
 
-  if (is_null($cache)) {
+  if (!isset($cache)) {
     $cache = array();
     foreach (module_implements('skinr_api') as $module) {
       $function = $module . '_skinr_api';
@@ -582,7 +571,7 @@ function skinr_skin_delete_multiple($arg
 function skinr_skin_load($theme = NULL, $module = NULL, $sid = NULL) {
   $skins = &drupal_static(__FUNCTION__, array());
 
-  if (is_null($theme)) {
+  if (!isset($theme)) {
     $theme = skinr_current_theme();
   }
 
@@ -590,11 +579,11 @@ function skinr_skin_load($theme = NULL, 
     if (!isset($skins[$theme])) {
       $skins[$theme] = array();
     }
-    if (!is_null($module) && !isset($skins[$theme][$module])) {
+    if (isset($module) && !isset($skins[$theme][$module])) {
       $skins[$theme][$module] = array();
     }
 
-    if (!is_null($module) && !is_null($sid)) {
+    if (isset($module) && isset($sid)) {
       // Fetch just this sid.
       $result = db_query("SELECT theme, module, sid, settings, skins FROM {skinr} WHERE theme = :theme AND module = :module AND sid = :sid", array(
         ':theme' => $theme,
@@ -602,7 +591,7 @@ function skinr_skin_load($theme = NULL, 
         ':sid' => $sid,
       ));
     }
-    elseif (!is_null($module)) {
+    elseif (isset($module)) {
       // Fetch all settings for this theme and module.
       $result = db_query("SELECT theme, module, sid, settings, skins FROM {skinr} WHERE theme = :theme AND module = :module", array(
         ':theme' => $theme,
@@ -623,13 +612,13 @@ function skinr_skin_load($theme = NULL, 
     }
   }
 
-  if (is_null($sid) && is_null($module)) {
+  if (!isset($sid) && isset($module)) {
     // Return all the skinrs for the theme.
     if (isset($skins[$theme])) {
       return $skins[$theme];
     }
   }
-  elseif(is_null($sid)) {
+  elseif (!isset($sid)) {
     // Return all the skinrs for the module.
     if (isset($skins[$theme][$module])) {
       return $skins[$theme][$module];
@@ -784,8 +773,9 @@ function skinr_plugin_hooks() {
 }
 
 /**
- * Helper function to prepend a path to an array of stylesheets or scripts
- * in a .info file. If the url is absolute (e.g. the url start with 'http://')
+ * Helper function to prepend a path to an array of stylesheet or script filenames.
+ *
+ * If the url is absolute (e.g. the url start with 'http://' or 'https://')
  * the path does not get prepended.
  *
  * @param $files
@@ -797,13 +787,13 @@ function skinr_plugin_hooks() {
 function _skinr_add_path_to_files(&$files, $path) {
   foreach ($files as $key => $file) {
     if (is_array($file)) {
-      if (strpos($file[0], 'http://') === 0) {
+      if (strpos($file[0], 'http://') === 0 || strpos($file[0], 'https://') === 0 ) {
         continue;
       }
       $files[$key][0] = $path . '/' . $file[0];
     }
     else {
-      if (strpos($file, 'http://') === 0) {
+      if (strpos($file, 'http://') === 0 || strpos($file, 'https://') === 0) {
         continue;
       }
       $files[$key] = $path . '/' . $file;
@@ -815,7 +805,7 @@ function _skinr_add_path_to_files(&$file
  * Parse a skin_infos array as returned from a skins plugin.
  *
  * This function inserts any missing defaults and updates the stylesheet and
- * script paths to be relative to drupal's root.
+ * script paths to be relative to Drupal's root.
  *
  * @param $skin_infos
  *   A skins array as returned from a skins plugin.
@@ -890,7 +880,6 @@ function skinr_get_skin_info() {
     // Load skins from hook_skinr_skins().
     $hooks = skinr_plugin_hooks();
     foreach ($hooks as $hook => $source) {
-      // @todo Update the hook name once we settle on one.
       $function = $hook . '_skinr_skin_info';
       $result = $function();
       if (isset($result)) {
@@ -929,7 +918,6 @@ function skinr_get_group_info() {
     // Load skins from hook_skinr_groups().
     $hooks = skinr_plugin_hooks();
     foreach ($hooks as $hook => $source) {
-      // @todo Update the hook name once we settle on one.
       $function = $hook . '_skinr_group_info';
       $result = $function();
       if (isset($result)) {
@@ -963,7 +951,7 @@ function skinr_get_group_info() {
 function skinr_get_config_info() {
   $config = &drupal_static(__FUNCTION__);
 
-  if (is_null($config)) {
+  if (!isset($config)) {
     $config = module_invoke_all('skinr_config_info');
     drupal_alter('skinr_config_info', $config);
   }
Index: skinr_ui.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/skinr_ui.admin.inc,v
retrieving revision 1.19
diff -u -p -r1.19 skinr_ui.admin.inc
--- skinr_ui.admin.inc	27 Nov 2010 23:22:26 -0000	1.19
+++ skinr_ui.admin.inc	8 Dec 2010 17:36:15 -0000
@@ -411,47 +411,6 @@ function skinr_ui_multiple_delete_confir
 }
 
 /**
- * Form builder for the Skinr settings administration form.
- *
- * @ingroup forms
- */
-function skinr_ui_settings($form, &$form_state) {
-  $form = array();
-
-  $form['overlay'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Overlay'),
-    '#collapsible' => TRUE,
-  );
-  $form['overlay']['skinr_overlay_width'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Window width'),
-    '#default_value' => variable_get('skinr_overlay_width', 600),
-    '#description' => t('The width of the overlay window. Leave this field blank to allow the window to automatically resize itself to a minimal width.'),
-  );
-  $form['overlay']['skinr_overlay_height'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Window height'),
-    '#default_value' => variable_get('skinr_overlay_height', NULL),
-    '#description' => t('The height of the overlay window. Leave this field blank to allow the window to automatically resize itself to the height of your browser.'),
-  );
-
-  return system_settings_form($form);
-}
-
-/**
- * Form validation handler for skinr_ui_settings().
- */
-function skinr_ui_settings_validate(&$form, &$form_state) {
-  if (empty($form_state['values']['skinr_overlay_width'])) {
-    $form_state['values']['skinr_overlay_width'] = NULL;
-  }
-  if (empty($form_state['values']['skinr_overlay_height'])) {
-    $form_state['values']['skinr_overlay_height'] = NULL;
-  }
-}
-
-/**
  * Form builder for the skin info listing form.
  *
  * @ingroup forms
Index: skinr_ui.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/skinr_ui.info,v
retrieving revision 1.2
diff -u -p -r1.2 skinr_ui.info
--- skinr_ui.info	25 Feb 2010 01:17:00 -0000	1.2
+++ skinr_ui.info	8 Dec 2010 17:36:15 -0000
@@ -6,7 +6,6 @@ package = Skinr
 core = 7.x
 
 dependencies[] = skinr
-;dependencies[] = dialog
 
 files[] = skinr_ui.module
 files[] = skinr_ui.admin.inc
Index: skinr_ui.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/skinr_ui.module,v
retrieving revision 1.21
diff -u -p -r1.21 skinr_ui.module
--- skinr_ui.module	27 Nov 2010 23:22:26 -0000	1.21
+++ skinr_ui.module	8 Dec 2010 17:36:15 -0000
@@ -149,21 +149,8 @@ function skinr_ui_menu() {
     'file' => 'skinr_ui.admin.inc',
   );
 
-  // Settings.
-  $items['admin/appearance/skinr/settings'] = array(
-    'title' => 'Settings',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('skinr_ui_settings'),
-    'type' => MENU_LOCAL_TASK,
-    'access arguments' => array('administer skinr'),
-    'parent' => 'admin/appearance/skinr',
-    'weight' => 4,
-    'description' => t('Configure Skinr settings.'),
-    'file' => 'skinr_ui.admin.inc',
-  );
-
   // Edit Skinr settings.
-  $items['admin/appearance/skinr/edit/%dialog_js/%/%'] = array(
+  $items['admin/appearance/skinr/edit/%skinr_js/%/%'] = array(
     'title' => 'Edit skin',
     'title callback' => 'skinr_ui_edit_title',
     'title arguments' => array(5, 6),
@@ -173,7 +160,7 @@ function skinr_ui_menu() {
     'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
     'access arguments' => array('administer skinr'),
   );
-  $items['admin/appearance/skinr/edit/%dialog_js/%/%/configure'] = array(
+  $items['admin/appearance/skinr/edit/%skinr_js/%/%/configure'] = array(
     'title' => 'Edit skin',
     'title callback' => 'skinr_ui_edit_contextual_title',
     'title arguments' => array(5, 6),
@@ -203,13 +190,14 @@ function skinr_ui_menu() {
   return $items;
 }
 
-if (!function_exists('dialog_js_load')) {
-  function dialog_js_load($js = 'nojs') {
-    if ($js == 'ajax') {
-      return TRUE;
-    }
-    return 0;
+/**
+ * Helper function to determine if ajax is used to call a function.
+ */
+function skinr_js_load($js = 'nojs') {
+  if ($js == 'ajax') {
+    return TRUE;
   }
+  return 0;
 }
 
 /**
@@ -316,8 +304,6 @@ function skinr_ui_edit_contextual_title(
  *   index handler. Used by the javascript UI to update all elements involved.
  */
 function skinr_ui_edit($js = FALSE, $module, $sid, $sids = NULL) {
-  global $gskinr;
-
   if ($js) {
     // Do additional ajax related stuff.
   }
Index: skinr_ui.rules.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/skinr/skinr_ui.rules.inc,v
retrieving revision 1.8
diff -u -p -r1.8 skinr_ui.rules.inc
--- skinr_ui.rules.inc	3 Dec 2010 19:51:24 -0000	1.8
+++ skinr_ui.rules.inc	8 Dec 2010 18:28:47 -0000
@@ -127,7 +127,6 @@ function skinr_rule_add_submit($form, &$
  * @ingroup forms
  */
 function skinr_rule_edit($form, &$form_state, $rid = NULL) {
-  $form = array();
   $form['rule'] = array(
     '#type' => 'fieldset',
     '#title' => t('Skinr rule visibility'),
@@ -144,7 +143,7 @@ function skinr_rule_edit($form, &$form_s
       'pages' => $form_state['values']['pages'],
     );
   }
-  elseif(!is_null($rid) && $rule = skinr_rule_load($rid)) {
+  elseif (isset($rid) && $rule = skinr_rule_load($rid)) {
     $rule = (array) $rule;
     $form['rule']['rid'] = array(
       '#type' => 'value',
