? storm--841690-1.patch
? storm--842624-1.patch
? storm--842624-2.patch
? storm--842624-3.patch
? storm--842624-4.patch
? storm--842624-5.patch
? storm.module-updates.patch
? storm.test.patch
Index: storm.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/storm.module,v
retrieving revision 1.34
diff -u -p -r1.34 storm.module
--- storm.module	30 Jun 2010 16:42:49 -0000	1.34
+++ storm.module	1 Jul 2010 14:50:45 -0000
@@ -103,7 +103,7 @@ function storm_theme() {
   return array(
     'storm_form_group' => array(
       'file'      => 'storm.theme.inc',
-      'arguments' => array('header', 'form'),
+      'arguments' => array('form'),
     ),
     'datetime' => array(
       'file'      => 'storm.theme.inc',
@@ -720,7 +720,7 @@ function storm_icon($icon, $title) {
 
   if (variable_get('storm_icons_display', TRUE) == TRUE) {
     $available = cache_get('storm:icons');
-    if ($available == 0) {
+    if ($available == FALSE) {
       // Cache miss
       $available = storm_icon_recache();
     }
Index: stormattribute/stormattribute.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/storm/stormattribute/stormattribute.admin.inc,v
retrieving revision 1.10
diff -u -p -r1.10 stormattribute.admin.inc
--- stormattribute/stormattribute.admin.inc	30 Jun 2010 16:51:07 -0000	1.10
+++ stormattribute/stormattribute.admin.inc	1 Jul 2010 14:50:46 -0000
@@ -44,19 +44,19 @@ function stormattribute_list() {
   $args = array();
   $filterfields = array();
 
-  if ($_SESSION['stormattribute_list_filter']['domain']) {
+  if (isset($_SESSION['stormattribute_list_filter']) && $_SESSION['stormattribute_list_filter']['domain']) {
     $where[] = "domain='%s'";
     $args[] = $_SESSION['stormattribute_list_filter']['domain'];
     $filterfields[] = t('Domain');
   }
 
-  if ($_SESSION['stormattribute_list_filter']['akey']) {
+  if (isset($_SESSION['stormattribute_list_filter']) && $_SESSION['stormattribute_list_filter']['akey']) {
     $where[] = "LOWER(akey) LIKE LOWER('%s')";
     $args[] = $_SESSION['stormattribute_list_filter']['akey'];
     $filterfields[] = t('Key');
   }
 
-  if ($_SESSION['stormattribute_list_filter']['avalue']) {
+  if (isset($_SESSION['stormattribute_list_filter']) && $_SESSION['stormattribute_list_filter']['avalue']) {
     $where[] = "LOWER(avalue) LIKE LOWER('%s')";
     $args[] = $_SESSION['stormattribute_list_filter']['avalue'];
     $filterfields[] = t('Value');
@@ -74,10 +74,7 @@ function stormattribute_list() {
     $filterfields[] = t('Default');
   }
   
-  $itemsperpage = $_SESSION['stormattribute_list_filter']['itemsperpage'];
-  if (!$itemsperpage) {
-    $itemsperpage = variable_get('storm_default_items_per_page', 10);
-  }
+  $itemsperpage = isset($_SESSION['stormattribute_list_filter']) ? $_SESSION['stormattribute_list_filter']['itemsperpage'] : $itemsperpage = variable_get('storm_default_items_per_page', 10);
 
   $tablesort = tablesort_sql($header);
 
@@ -399,13 +396,13 @@ function stormattribute_form($attribute 
       $attribute->domain = $_GET['domain'];
     }
 
-    if ($_SESSION['stormattribute_list_filter']['domain'] && !$attribute->domain) {
+    if (isset($_SESSION['stormattribute_list_filter']) && $_SESSION['stormattribute_list_filter']['domain'] && !$attribute->domain) {
       $attribute->domain = $_SESSION['stormattribute_list_filter']['domain'];
     }
   }
 
   $form = array();
-  if ($attribute->aid) {
+  if (isset($attribute->aid) && $attribute->aid) {
     $form['aid'] = array(
       '#type' => 'value',
       '#value' => $attribute->aid,
@@ -414,41 +411,41 @@ function stormattribute_form($attribute 
 
   $form['group1'] = array(
     '#type' => 'markup',
-    '#theme' => 'storm_form_group',
+    //'#theme' => 'storm_form_group',
   );
 
   $form['group1']['domain'] = array(
     '#type' => 'textfield',
     '#title' => t('Domain'),
     '#required' => TRUE,
-    '#default_value' => $attribute->domain,
+    '#default_value' => isset($attribute->domain) ? $attribute->domain : '',
     '#autocomplete_path' => 'storm/attributes/domain/autocomplete',
     '#size' => 40,
   );
 
   $domains = array();
   $r = db_query("SELECT DISTINCT(domain) d FROM {stormattribute} ORDER BY domain");
-  while($i=db_fetch_object($r)) {
+  while($i = $r->fetchObject()) {
     $domains[$i->d] = $i->d;
   }
   $form['group1']['parent_domain'] = array(
     '#type' => 'select',
     '#title' => t('Parent domain'),
     '#required' => FALSE,
-    '#default_value' => $attribute->parent_domain,
+    '#default_value' => isset($attribute->parent_domain) ? $attribute->parent_domain : '',
     '#options' => array(''=>'-') + $domains,
   );
 
   $form['group2'] = array(
     '#type' => 'markup',
-    '#theme' => 'storm_form_group',
+    //'#theme' => 'storm_form_group',
   );
 
   $form['group2']['akey'] = array(
     '#type' => 'textfield',
     '#title' => t('Key'),
     '#required' => TRUE,
-    '#default_value' => $attribute->akey,
+    '#default_value' => isset($attribute->akey) ? $attribute->akey : '',
     '#size' => 25,
     '#maxlength' => 20,
   );
@@ -457,31 +454,31 @@ function stormattribute_form($attribute 
     '#type' => 'textfield',
     '#title' => t('Value'),
     '#required' => TRUE,
-    '#default_value' => $attribute->avalue,
+    '#default_value' => isset($attribute->avalue) ? $attribute->avalue : '',
     '#size' => 25,
   );
 
   $form['group2']['weight'] = array(
     '#type' => 'weight',
     '#title' => t('Weight'),
-    '#default_value' => $attribute->weight,
+    '#default_value' => isset($attribute->weight) ? $attribute->weight : 0,
   );
 
   $form['group3'] = array(
     '#type' => 'markup',
-    '#theme' => 'storm_form_group',
+    //'#theme' => 'storm_form_group',
   );
 
   $form['group3']['isactive'] = array(
     '#type' => 'checkbox',
     '#title' => t('Active'),
-    '#default_value' => $attribute->isactive,
+    '#default_value' => isset($attribute->isactive) ? $attribute->isactive : 1,
   );
 
   $form['group3']['isdefault'] = array(
     '#type' => 'checkbox',
     '#title' => t('Default'),
-    '#default_value' => $attribute->isdefault,
+    '#default_value' => isset($attribute->isdefault) ? $attribute->isdefault : 0,
   );
 
   $form['save'] = array(
@@ -489,7 +486,7 @@ function stormattribute_form($attribute 
     '#value' => t('Save')
   );
 
-  if ($attribute->aid) {
+  if (isset($attribute->aid) && $attribute->aid) {
     $form['delete'] = array(
       '#type' => 'submit',
       '#value' => t('Delete'),
