Added default value for fortune 1000 condiiton
authorchandra shekhar
Wed, 18 Apr 2012 06:59:46 +0000 (11:59 +0530)
committerchandra shekhar
Wed, 18 Apr 2012 06:59:46 +0000 (11:59 +0530)
demandbase_fortune1000/plugins/demandbase_fortune1000_condition.inc

index 7705c80..516a18d 100755 (executable)
@@ -65,6 +65,9 @@ class DemandbaseFortune1000Condition extends context_condition {
       $demandbase_client_obj =  new demandbase_client();
       // Include the fortune1000 for matching.
       $current_fortune1000 = $demandbase_client_obj->fetch_data(variable_get('demandbase_fortune_1000', 'fortune_1000'));
+                       if (!$current_fortune1000) {
+                               $current_fortune1000 = 2;
+                       }
       foreach ($this->get_contexts() as $context) {
         $options = $this->fetch_from_context($context, 'values');
         if ($demandbase_client_obj->match($current_fortune1000, $options, TRUE)) {