Completed
Push — console-installer ( 03fc02...67c42e )
by Adam
72:27 queued 53:14
created
modules/AOS_PDF_Templates/sendEmail.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,10 +44,11 @@
 block discarded – undo
44 44
 		$email->type = "draft";
45 45
 		$email->status = "draft";
46 46
 	
47
-		if(!empty($module->billing_contact_id) && $module->billing_contact_id!="")
48
-            $contact_id = $module->billing_contact_id;
49
-        else if(!empty($module->contact_id) && $module->contact_id!="")
50
-            $contact_id = $module->contact_id;
47
+		if(!empty($module->billing_contact_id) && $module->billing_contact_id!="") {
48
+		            $contact_id = $module->billing_contact_id;
49
+		} else if(!empty($module->contact_id) && $module->contact_id!="") {
50
+                    $contact_id = $module->contact_id;
51
+        }
51 52
 
52 53
             require_once('modules/Contacts/Contact.php');
53 54
             $contact = new Contact;
Please login to merge, or discard this patch.
modules/AOW_WorkFlow/aow_utils.php 1 patch
Braces   +69 added lines, -43 removed lines patch added patch discarded remove patch
@@ -47,7 +47,9 @@  discard block
 block discarded – undo
47 47
             } //End loop.
48 48
 
49 49
             foreach($unset as $name){
50
-                if(isset($fields[$name])) unset( $fields[$name]);
50
+                if(isset($fields[$name])) {
51
+                    unset( $fields[$name]);
52
+                }
51 53
             }
52 54
 
53 55
         }
@@ -124,7 +126,7 @@  discard block
 block discarded – undo
124 126
                 if(isset($arr['vname']) && $arr['vname'] != '') {
125 127
                     $label = $rel_module_label . ' : ' . translate($arr['vname'], $mod->module_dir);
126 128
                     $module_label = trim(translate($arr['vname'],$mod->module_dir),':');
127
-                }else {
129
+                } else {
128 130
                     $label = $rel_module_label . ' : '. $name;
129 131
                     $module_label = $name;
130 132
                 }
@@ -175,7 +177,9 @@  discard block
 block discarded – undo
175 177
                         $sort_fields[$name] = $relModuleName.' : '. $name;
176 178
                     }
177 179
                     if($arr['type'] == 'relate' && isset($arr['id_name']) && $arr['id_name'] != ''){
178
-                        if(isset($fields[$arr['id_name']])) unset( $fields[$arr['id_name']]);
180
+                        if(isset($fields[$arr['id_name']])) {
181
+                            unset( $fields[$arr['id_name']]);
182
+                        }
179 183
                     }
180 184
                 }
181 185
             } //End loop.
@@ -269,7 +273,9 @@  discard block
 block discarded – undo
269 273
             $vardef['type'] = 'varchar';
270 274
         }
271 275
 
272
-        if(isset($vardef['precision'])) unset($vardef['precision']);
276
+        if(isset($vardef['precision'])) {
277
+            unset($vardef['precision']);
278
+        }
273 279
 
274 280
         //$vardef['precision'] = $locale->getPrecedentPreference('default_currency_significant_digits', $current_user);
275 281
 
@@ -308,8 +314,9 @@  discard block
 block discarded – undo
308 314
         // remove the special text entry field function 'getEmailAddressWidget'
309 315
         if ( isset($vardef['function'])
310 316
             && ( $vardef['function'] == 'getEmailAddressWidget'
311
-                || $vardef['function']['name'] == 'getEmailAddressWidget' ) )
312
-            unset($vardef['function']);
317
+                || $vardef['function']['name'] == 'getEmailAddressWidget' ) ) {
318
+                    unset($vardef['function']);
319
+        }
313 320
 
314 321
         if(isset($vardef['name']) && ($vardef['name'] == 'date_entered' || $vardef['name'] == 'date_modified')){
315 322
             $vardef['name'] = 'aow_temp_date';
@@ -334,8 +341,9 @@  discard block
 block discarded – undo
334 341
         }
335 342
 
336 343
         // hack to disable one of the js calls in this control
337
-        if ( isset($vardef['function']) && ( $vardef['function'] == 'getCurrencyDropDown' || $vardef['function']['name'] == 'getCurrencyDropDown' ) )
338
-            $contents .= "{literal}<script>function CurrencyConvertAll() { return; }</script>{/literal}";
344
+        if ( isset($vardef['function']) && ( $vardef['function'] == 'getCurrencyDropDown' || $vardef['function']['name'] == 'getCurrencyDropDown' ) ) {
345
+                    $contents .= "{literal}<script>function CurrencyConvertAll() { return; }</script>{/literal}";
346
+        }
339 347
 
340 348
         // Save it to the cache file
341 349
         if($fh = @sugar_fopen($file, 'w')) {
@@ -361,8 +369,7 @@  discard block
 block discarded – undo
361 369
     $t23 = strpos($time_format, '23') !== false ? '%H' : '%I';
362 370
     if(!isset($match[2]) || $match[2] == '') {
363 371
         $ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . "%M");
364
-    }
365
-    else {
372
+    } else {
366 373
         $pm = $match[2] == "pm" ? "%P" : "%p";
367 374
         $ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . "%M" . $pm);
368 375
     }
@@ -371,8 +378,9 @@  discard block
 block discarded – undo
371 378
 
372 379
     // populate the fieldlist from the vardefs
373 380
     $fieldlist = array();
374
-    if ( !isset($focus) || !($focus instanceof SugarBean) )
375
-        require_once($beanFiles[$beanList[$module]]);
381
+    if ( !isset($focus) || !($focus instanceof SugarBean) ) {
382
+            require_once($beanFiles[$beanList[$module]]);
383
+    }
376 384
     $focus = new $beanList[$module];
377 385
     // create the dropdowns for the parent type fields
378 386
     $vardefFields = $focus->getFieldDefinitions();
@@ -382,14 +390,17 @@  discard block
 block discarded – undo
382 390
     foreach ( $vardefFields as $name => $properties ) {
383 391
         $fieldlist[$name] = $properties;
384 392
         // fill in enums
385
-        if(isset($fieldlist[$name]['options']) && is_string($fieldlist[$name]['options']) && isset($app_list_strings[$fieldlist[$name]['options']]))
386
-            $fieldlist[$name]['options'] = $app_list_strings[$fieldlist[$name]['options']];
393
+        if(isset($fieldlist[$name]['options']) && is_string($fieldlist[$name]['options']) && isset($app_list_strings[$fieldlist[$name]['options']])) {
394
+                    $fieldlist[$name]['options'] = $app_list_strings[$fieldlist[$name]['options']];
395
+        }
387 396
         // Bug 32626: fall back on checking the mod_strings if not in the app_list_strings
388
-        elseif(isset($fieldlist[$name]['options']) && is_string($fieldlist[$name]['options']) && isset($mod_strings[$fieldlist[$name]['options']]))
389
-            $fieldlist[$name]['options'] = $mod_strings[$fieldlist[$name]['options']];
397
+        elseif(isset($fieldlist[$name]['options']) && is_string($fieldlist[$name]['options']) && isset($mod_strings[$fieldlist[$name]['options']])) {
398
+                    $fieldlist[$name]['options'] = $mod_strings[$fieldlist[$name]['options']];
399
+        }
390 400
         // Bug 22730: make sure all enums have the ability to select blank as the default value.
391
-        if(!isset($fieldlist[$name]['options']['']))
392
-            $fieldlist[$name]['options'][''] = '';
401
+        if(!isset($fieldlist[$name]['options'][''])) {
402
+                    $fieldlist[$name]['options'][''] = '';
403
+        }
393 404
     }
394 405
 
395 406
     // fill in function return values
@@ -399,8 +410,9 @@  discard block
 block discarded – undo
399 410
         {
400 411
             $function = $fieldlist[$fieldname]['function']['name'];
401 412
             // include various functions required in the various vardefs
402
-            if ( isset($fieldlist[$fieldname]['function']['include']) && is_file($fieldlist[$fieldname]['function']['include']))
403
-                require_once($fieldlist[$fieldname]['function']['include']);
413
+            if ( isset($fieldlist[$fieldname]['function']['include']) && is_file($fieldlist[$fieldname]['function']['include'])) {
414
+                            require_once($fieldlist[$fieldname]['function']['include']);
415
+            }
404 416
             $_REQUEST[$fieldname] = $value;
405 417
             $value = $function($focus, $fieldname, $value, $view);
406 418
 
@@ -456,9 +468,11 @@  discard block
 block discarded – undo
456 468
         $value = $focus->convertField($value, $fieldlist[$fieldname]);
457 469
         if(!empty($params['date_format']) && isset($params['date_format'])){
458 470
             $convert_format = "Y-m-d H:i:s";
459
-            if($fieldlist[$fieldname]['type'] == 'date') $convert_format = "Y-m-d";
471
+            if($fieldlist[$fieldname]['type'] == 'date') {
472
+                $convert_format = "Y-m-d";
473
+            }
460 474
             $fieldlist[$fieldname]['value'] = $timedate->to_display($value, $convert_format, $params['date_format']);
461
-        }else{
475
+        } else{
462 476
             $fieldlist[$fieldname]['value'] = $timedate->to_display_date_time($value, true, true);
463 477
         }
464 478
         $fieldlist[$fieldname]['name'] = $aow_field;
@@ -519,7 +533,9 @@  discard block
 block discarded – undo
519 533
 
520 534
     $value = json_decode(html_entity_decode_utf8($value), true);
521 535
 
522
-    if(!file_exists('modules/AOBH_BusinessHours/AOBH_BusinessHours.php')) unset($app_list_strings['aow_date_type_list']['business_hours']);
536
+    if(!file_exists('modules/AOBH_BusinessHours/AOBH_BusinessHours.php')) {
537
+        unset($app_list_strings['aow_date_type_list']['business_hours']);
538
+    }
523 539
 
524 540
     $field = '';
525 541
 
@@ -527,11 +543,12 @@  discard block
 block discarded – undo
527 543
         $field .= "<select type='text' name='$aow_field".'[0]'."' id='$aow_field".'[0]'."' title='' tabindex='116'>". getDateFields($module, $view, $value[0], $field_option) ."</select>&nbsp;&nbsp;";
528 544
         $field .= "<select type='text' name='$aow_field".'[1]'."' id='$aow_field".'[1]'."' onchange='date_field_change(\"$aow_field\")'  title='' tabindex='116'>". get_select_options_with_id($app_list_strings['aow_date_operator'], $value[1]) ."</select>&nbsp;";
529 545
         $display = 'none';
530
-        if($value[1] == 'plus' || $value[1] == 'minus') $display = '';
546
+        if($value[1] == 'plus' || $value[1] == 'minus') {
547
+            $display = '';
548
+        }
531 549
         $field .= "<input  type='text' style='width:40px; display:$display' name='$aow_field".'[2]'."' id='$aow_field".'[2]'."' title='' value='$value[2]' tabindex='116'>&nbsp;";
532 550
         $field .= "<select type='text' style='display:$display' name='$aow_field".'[3]'."' id='$aow_field".'[3]'."' title='' tabindex='116'>". get_select_options_with_id($app_list_strings['aow_date_type_list'], $value[3]) ."</select>";
533
-    }
534
-    else {
551
+    } else {
535 552
         $field = getDateFields($module, $view, $value[0], $field_option).' '.$app_list_strings['aow_date_operator'][$value[1]];
536 553
         if($value[1] == 'plus' || $value[1] == 'minus'){
537 554
             $field .= ' '.$value[2].' '.$app_list_strings['aow_date_type_list'][$value[3]];
@@ -547,7 +564,9 @@  discard block
 block discarded – undo
547 564
 
548 565
     $fields = $app_list_strings['aow_date_options'];
549 566
 
550
-    if(!$field_option) unset($fields['field']);
567
+    if(!$field_option) {
568
+        unset($fields['field']);
569
+    }
551 570
 
552 571
     if ($module != '') {
553 572
         if(isset($beanList[$module]) && $beanList[$module]){
@@ -580,8 +599,7 @@  discard block
 block discarded – undo
580 599
 
581 600
     if(!file_exists('modules/SecurityGroups/SecurityGroup.php')){
582 601
         unset($app_list_strings['aow_assign_options']['security_group']);
583
-    }
584
-    else{
602
+    } else{
585 603
         $securityGroups = get_bean_select_array(true, 'SecurityGroup','name', '','name',true);
586 604
     }
587 605
 
@@ -591,17 +609,19 @@  discard block
 block discarded – undo
591 609
         $field .= "<select type='text' name='$aow_field".'[0]'."' id='$aow_field".'[0]'."' onchange='assign_field_change(\"$aow_field\")' title='' tabindex='116'>". get_select_options_with_id($app_list_strings['aow_assign_options'], $value[0]) ."</select>&nbsp;&nbsp;";
592 610
         if(!file_exists('modules/SecurityGroups/SecurityGroup.php')){
593 611
             $field .= "<input type='hidden' name='$aow_field".'[1]'."' id='$aow_field".'[1]'."' value=''  />";
594
-        }
595
-        else {
612
+        } else {
596 613
             $display = 'none';
597
-            if($value[0] == 'security_group') $display = '';
614
+            if($value[0] == 'security_group') {
615
+                $display = '';
616
+            }
598 617
             $field .= "<select type='text' style='display:$display' name='$aow_field".'[1]'."' id='$aow_field".'[1]'."' title='' tabindex='116'>". get_select_options_with_id($securityGroups, $value[1]) ."</select>&nbsp;&nbsp;";
599 618
         }
600 619
         $display = 'none';
601
-        if($value[0] == 'role' || $value[0] == 'security_group') $display = '';
620
+        if($value[0] == 'role' || $value[0] == 'security_group') {
621
+            $display = '';
622
+        }
602 623
         $field .= "<select type='text' style='display:$display' name='$aow_field".'[2]'."' id='$aow_field".'[2]'."' title='' tabindex='116'>". get_select_options_with_id($roles, $value[2]) ."</select>&nbsp;&nbsp;";
603
-    }
604
-    else {
624
+    } else {
605 625
         $field = $app_list_strings['aow_assign_options'][$value[1]];
606 626
     }
607 627
     return $field;
@@ -616,8 +636,7 @@  discard block
 block discarded – undo
616 636
             $option .= '<option value="'.$key.'" selected>'.$value.'</option>';
617 637
         } else if($selected_value == $key) {
618 638
             $option .= '<option value="'.$key.'" selected>'.$value.'</option>';
619
-        }
620
-        else {
639
+        } else {
621 640
             $option .= '<option value="'.$key.'">'.$value.'</option>';
622 641
         }
623 642
     }
@@ -644,8 +663,7 @@  discard block
 block discarded – undo
644 663
         if(!empty($users[$key])) {
645 664
             return $users[$key];
646 665
         }
647
-    }
648
-    else if (is_file($file)){
666
+    } else if (is_file($file)){
649 667
         require_once($file);
650 668
         if(isset($lastUser['User']) && $lastUser['User'] != '') {
651 669
             $users_by_key = array_flip($users); // now keys are values
@@ -706,7 +724,9 @@  discard block
 block discarded – undo
706 724
             $mod = new $beanList[$module]();
707 725
 
708 726
             foreach($mod->get_related_fields() as $field){
709
-                if(isset($field['link'])) $checked_link[] = $field['link'];
727
+                if(isset($field['link'])) {
728
+                    $checked_link[] = $field['link'];
729
+                }
710 730
                 if(!isset($field['module']) || !in_array($field['module'],$emailableModules) || (isset($field['dbType']) && $field['dbType'] == "id")){
711 731
                     continue;
712 732
                 }
@@ -749,7 +769,9 @@  discard block
 block discarded – undo
749 769
     switch($bean->field_defs[$field]['type']) {
750 770
         case 'datetime':
751 771
         case 'datetimecombo':
752
-            if(empty($value)) break;
772
+            if(empty($value)) {
773
+                break;
774
+            }
753 775
             if ($value == 'NULL') {
754 776
                 $value = '';
755 777
                 break;
@@ -760,7 +782,9 @@  discard block
 block discarded – undo
760 782
             }
761 783
             break;
762 784
         case 'date':
763
-            if(empty($value)) break;
785
+            if(empty($value)) {
786
+                break;
787
+            }
764 788
             if ($value == 'NULL') {
765 789
                 $value = '';
766 790
                 break;
@@ -771,7 +795,9 @@  discard block
 block discarded – undo
771 795
             }
772 796
             break;
773 797
         case 'time':
774
-            if(empty($value)) break;
798
+            if(empty($value)) {
799
+                break;
800
+            }
775 801
             if ($value == 'NULL') {
776 802
                 $value = '';
777 803
                 break;
Please login to merge, or discard this patch.
Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php 1 patch
Braces   +21 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -62,12 +64,15 @@  discard block
 block discarded – undo
62 64
     {
63 65
         global $timedate;
64 66
 
65
-        if(empty($options['mypbss_date_start']))
66
-            $options['mypbss_date_start'] = $timedate->nowDbDate();
67
-        if(empty($options['mypbss_date_end']))
68
-            $options['mypbss_date_end'] = $timedate->asDbDate($timedate->getNow()->modify("+6 months"));
69
-        if(empty($options['title']))
70
-            $options['title'] = translate('LBL_MY_PIPELINE_FORM_TITLE', 'Home');
67
+        if(empty($options['mypbss_date_start'])) {
68
+                    $options['mypbss_date_start'] = $timedate->nowDbDate();
69
+        }
70
+        if(empty($options['mypbss_date_end'])) {
71
+                    $options['mypbss_date_end'] = $timedate->asDbDate($timedate->getNow()->modify("+6 months"));
72
+        }
73
+        if(empty($options['title'])) {
74
+                    $options['title'] = translate('LBL_MY_PIPELINE_FORM_TITLE', 'Home');
75
+        }
71 76
 
72 77
         parent::__construct($id,$options);
73 78
     }
@@ -80,11 +85,12 @@  discard block
 block discarded – undo
80 85
         global $app_list_strings;
81 86
 
82 87
         $selected_datax = array();
83
-        if (count($this->mypbss_sales_stages) > 0)
84
-            foreach ($this->mypbss_sales_stages as $key)
88
+        if (count($this->mypbss_sales_stages) > 0) {
89
+                    foreach ($this->mypbss_sales_stages as $key)
85 90
                 $selected_datax[] = $key;
86
-        else
87
-            $selected_datax = array_keys($app_list_strings['sales_stage_dom']);
91
+        } else {
92
+                    $selected_datax = array_keys($app_list_strings['sales_stage_dom']);
93
+        }
88 94
 
89 95
         $this->_searchFields['mypbss_sales_stages']['options'] = $app_list_strings['sales_stage_dom'];
90 96
         $this->_searchFields['mypbss_sales_stages']['input_name0'] = $selected_datax;
@@ -316,8 +322,7 @@  discard block
 block discarded – undo
316 322
                 $datax[$key] = $app_list_strings['sales_stage_dom'][$key];
317 323
                 array_push($selected_datax, $key);
318 324
             }
319
-        }
320
-        else {
325
+        } else {
321 326
             $datax = $app_list_strings['sales_stage_dom'];
322 327
             $selected_datax = array_keys($app_list_strings['sales_stage_dom']);
323 328
         }
@@ -391,8 +396,9 @@  discard block
 block discarded – undo
391 396
             " AND opportunities.date_closed >= ". db_convert("'".$this->mypbss_date_start."'",'date').
392 397
             " AND opportunities.date_closed <= ".db_convert("'".$this->mypbss_date_end."'",'date') .
393 398
             " AND opportunities.assigned_user_id = users.id  AND opportunities.deleted=0 ";
394
-        if ( count($this->mypbss_sales_stages) > 0 )
395
-            $query .= " AND opportunities.sales_stage IN ('" . implode("','",$this->mypbss_sales_stages) . "') ";
399
+        if ( count($this->mypbss_sales_stages) > 0 ) {
400
+                    $query .= " AND opportunities.sales_stage IN ('" . implode("','",$this->mypbss_sales_stages) . "') ";
401
+        }
396 402
         $query .= " GROUP BY opportunities.sales_stage ,users.user_name,opportunities.assigned_user_id";
397 403
 
398 404
         return $query;
Please login to merge, or discard this patch.
modules/Charts/Dashlets/OutcomeByMonthDashlet/OutcomeByMonthDashlet.php 1 patch
Braces   +18 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -66,11 +68,13 @@  discard block
 block discarded – undo
66 68
     {
67 69
         global $timedate;
68 70
 
69
-        if(empty($options['obm_date_start']))
70
-            $options['obm_date_start'] = $timedate->nowDbDate();
71
+        if(empty($options['obm_date_start'])) {
72
+                    $options['obm_date_start'] = $timedate->nowDbDate();
73
+        }
71 74
 
72
-        if(empty($options['obm_date_end']))
73
-            $options['obm_date_end'] = $timedate->asDbDate($timedate->getNow()->modify("+6 months"));
75
+        if(empty($options['obm_date_end'])) {
76
+                    $options['obm_date_end'] = $timedate->asDbDate($timedate->getNow()->modify("+6 months"));
77
+        }
74 78
 
75 79
         parent::__construct($id,$options);
76 80
     }
@@ -80,8 +84,9 @@  discard block
 block discarded – undo
80 84
      */
81 85
     public function displayOptions()
82 86
     {
83
-        if (!isset($this->obm_ids) || count($this->obm_ids) == 0)
84
-            $this->_searchFields['obm_ids']['input_name0'] = array_keys(get_user_array(false));
87
+        if (!isset($this->obm_ids) || count($this->obm_ids) == 0) {
88
+                    $this->_searchFields['obm_ids']['input_name0'] = array_keys(get_user_array(false));
89
+        }
85 90
 
86 91
         return parent::displayOptions();
87 92
     }
@@ -247,8 +252,9 @@  discard block
 block discarded – undo
247 252
         $query .= " WHERE opportunities.date_closed >= ".db_convert("'".$this->obm_date_start."'",'date') .
248 253
             " AND opportunities.date_closed <= ".db_convert("'".$this->obm_date_end."'",'date') .
249 254
             " AND opportunities.deleted=0";
250
-        if (count($this->obm_ids) > 0)
251
-            $query .= " AND opportunities.assigned_user_id IN ('" . implode("','",$this->obm_ids) . "')";
255
+        if (count($this->obm_ids) > 0) {
256
+                    $query .= " AND opportunities.assigned_user_id IN ('" . implode("','",$this->obm_ids) . "')";
257
+        }
252 258
         $query .= " GROUP BY sales_stage,".
253 259
             db_convert('opportunities.date_closed','date_format',array("'%Y-%m'"),array("'YYYY-MM'")) .
254 260
             " ORDER BY m";
@@ -274,8 +280,9 @@  discard block
 block discarded – undo
274 280
                 $chart['labels'][] = $key;
275 281
                 $chart['data'][] = array();
276 282
             }
277
-            if(!in_array($stage,$chart['key']))
278
-                $chart['key'][] = $stage;
283
+            if(!in_array($stage,$chart['key'])) {
284
+                            $chart['key'][] = $stage;
285
+            }
279 286
 
280 287
             $formattedFloat = (float)number_format((float)$i["total"], 2, '.', '');
281 288
             $chart['data'][count($chart['data'])-1][] = $formattedFloat;
Please login to merge, or discard this patch.
OpportunitiesByLeadSourceDashlet/OpportunitiesByLeadSourceDashlet.php 1 patch
Braces   +19 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -62,17 +64,19 @@  discard block
 block discarded – undo
62 64
         global $app_list_strings;
63 65
 
64 66
         $selected_datax = array();
65
-        if (!empty($this->pbls_lead_sources) && sizeof($this->pbls_lead_sources) > 0)
66
-            foreach ($this->pbls_lead_sources as $key)
67
+        if (!empty($this->pbls_lead_sources) && sizeof($this->pbls_lead_sources) > 0) {
68
+                    foreach ($this->pbls_lead_sources as $key)
67 69
                 $selected_datax[] = $key;
68
-        else
69
-            $selected_datax = array_keys($app_list_strings['lead_source_dom']);
70
+        } else {
71
+                    $selected_datax = array_keys($app_list_strings['lead_source_dom']);
72
+        }
70 73
 
71 74
         $this->_searchFields['pbls_lead_sources']['options'] = array_filter($app_list_strings['lead_source_dom']);
72 75
         $this->_searchFields['pbls_lead_sources']['input_name0'] = $selected_datax;
73 76
 
74
-        if (!isset($this->pbls_ids) || count($this->pbls_ids) == 0)
75
-            $this->_searchFields['pbls_ids']['input_name0'] = array_keys(get_user_array(false));
77
+        if (!isset($this->pbls_ids) || count($this->pbls_ids) == 0) {
78
+                    $this->_searchFields['pbls_ids']['input_name0'] = array_keys(get_user_array(false));
79
+        }
76 80
 
77 81
         return parent::displayOptions();
78 82
     }
@@ -241,12 +245,14 @@  discard block
 block discarded – undo
241 245
         $query = "SELECT lead_source,sum(amount_usdollar/1000) as total,count(*) as opp_count ".
242 246
             "FROM opportunities ";
243 247
         $query .= "WHERE opportunities.deleted=0 ";
244
-        if ( count($this->pbls_ids) > 0 )
245
-            $query .= "AND opportunities.assigned_user_id IN ('".implode("','",$this->pbls_ids)."') ";
246
-        if ( count($this->pbls_lead_sources) > 0 )
247
-            $query .= "AND opportunities.lead_source IN ('".implode("','",$this->pbls_lead_sources)."') ";
248
-        else
249
-            $query .= "AND opportunities.lead_source IN ('".implode("','",array_keys($GLOBALS['app_list_strings']['lead_source_dom']))."') ";
248
+        if ( count($this->pbls_ids) > 0 ) {
249
+                    $query .= "AND opportunities.assigned_user_id IN ('".implode("','",$this->pbls_ids)."') ";
250
+        }
251
+        if ( count($this->pbls_lead_sources) > 0 ) {
252
+                    $query .= "AND opportunities.lead_source IN ('".implode("','",$this->pbls_lead_sources)."') ";
253
+        } else {
254
+                    $query .= "AND opportunities.lead_source IN ('".implode("','",array_keys($GLOBALS['app_list_strings']['lead_source_dom']))."') ";
255
+        }
250 256
         $query .= "GROUP BY lead_source ORDER BY total DESC";
251 257
 
252 258
         return $query;
Please login to merge, or discard this patch.
OpportunitiesByLeadSourceByOutcomeDashlet.php 1 patch
Braces   +25 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -61,17 +63,19 @@  discard block
 block discarded – undo
61 63
         global $app_list_strings;
62 64
 
63 65
         $selected_datax = array();
64
-        if (!empty($this->lsbo_lead_sources) && sizeof($this->lsbo_lead_sources) > 0)
65
-            foreach ($this->lsbo_lead_sources as $key)
66
+        if (!empty($this->lsbo_lead_sources) && sizeof($this->lsbo_lead_sources) > 0) {
67
+                    foreach ($this->lsbo_lead_sources as $key)
66 68
                 $selected_datax[] = $key;
67
-        else
68
-            $selected_datax = array_keys($app_list_strings['lead_source_dom']);
69
+        } else {
70
+                    $selected_datax = array_keys($app_list_strings['lead_source_dom']);
71
+        }
69 72
 
70 73
         $this->_searchFields['lsbo_lead_sources']['options'] = array_filter($app_list_strings['lead_source_dom']);
71 74
         $this->_searchFields['lsbo_lead_sources']['input_name0'] = $selected_datax;
72 75
 
73
-        if (!isset($this->lsbo_ids) || count($this->lsbo_ids) == 0)
74
-            $this->_searchFields['lsbo_ids']['input_name0'] = array_keys(get_user_array(false));
76
+        if (!isset($this->lsbo_ids) || count($this->lsbo_ids) == 0) {
77
+                    $this->_searchFields['lsbo_ids']['input_name0'] = array_keys(get_user_array(false));
78
+        }
75 79
 
76 80
         return parent::displayOptions();
77 81
     }
@@ -131,8 +135,9 @@  discard block
 block discarded – undo
131 135
 
132 136
 
133 137
         $url_params = array();
134
-        if ( count($this->lsbo_ids) > 0 )
135
-            $url_params['assigned_user_id'] = array_values($this->lsbo_ids);
138
+        if ( count($this->lsbo_ids) > 0 ) {
139
+                    $url_params['assigned_user_id'] = array_values($this->lsbo_ids);
140
+        }
136 141
 
137 142
 
138 143
         $data = $this->getChartData($this->constructQuery());
@@ -253,12 +258,14 @@  discard block
 block discarded – undo
253 258
         $query = "SELECT lead_source,sales_stage,sum(amount_usdollar/1000) as total, ".
254 259
             "count(*) as opp_count FROM opportunities ";
255 260
         $query .= " WHERE opportunities.deleted=0 ";
256
-        if ( count($this->lsbo_ids) > 0 )
257
-            $query .= "AND opportunities.assigned_user_id IN ('".implode("','",$this->lsbo_ids)."') ";
258
-        if ( count($this->lsbo_lead_sources) > 0 )
259
-            $query .= "AND opportunities.lead_source IN ('".implode("','",$this->lsbo_lead_sources)."') ";
260
-        else
261
-            $query .= "AND opportunities.lead_source IN ('".implode("','",array_keys($GLOBALS['app_list_strings']['lead_source_dom']))."') ";
261
+        if ( count($this->lsbo_ids) > 0 ) {
262
+                    $query .= "AND opportunities.assigned_user_id IN ('".implode("','",$this->lsbo_ids)."') ";
263
+        }
264
+        if ( count($this->lsbo_lead_sources) > 0 ) {
265
+                    $query .= "AND opportunities.lead_source IN ('".implode("','",$this->lsbo_lead_sources)."') ";
266
+        } else {
267
+                    $query .= "AND opportunities.lead_source IN ('".implode("','",array_keys($GLOBALS['app_list_strings']['lead_source_dom']))."') ";
268
+        }
262 269
         $query .= " GROUP BY sales_stage,lead_source ORDER BY lead_source,sales_stage";
263 270
 
264 271
         return $query;
@@ -282,8 +289,9 @@  discard block
 block discarded – undo
282 289
                 $chart['labels'][] = $key;
283 290
                 $chart['data'][] = array();
284 291
             }
285
-            if(!in_array($stage,$chart['key']))
286
-                $chart['key'][] = $stage;
292
+            if(!in_array($stage,$chart['key'])) {
293
+                            $chart['key'][] = $stage;
294
+            }
287 295
 
288 296
             $formattedFloat = (float)number_format((float)$i["total"], 2, '.', '');
289 297
             $chart['data'][count($chart['data'])-1][] = $formattedFloat;
Please login to merge, or discard this patch.
modules/Charts/Dashlets/CampaignROIChartDashlet/CampaignROIChartDashlet.php 1 patch
Braces   +27 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -60,11 +62,12 @@  discard block
 block discarded – undo
60 62
         $this->getSeedBean()->disable_row_level_security = false;
61 63
 
62 64
         $campaigns = $this->getSeedBean()->get_full_list("","");
63
-        if ( $campaigns != null )
64
-            foreach ($campaigns as $c)
65
+        if ( $campaigns != null ) {
66
+                    foreach ($campaigns as $c)
65 67
                 $this->_searchFields['campaign_id']['options'][$c->id] = $c->name;
66
-        else
67
-            $this->_searchFields['campaign_id']['options'] = array();
68
+        } else {
69
+                    $this->_searchFields['campaign_id']['options'] = array();
70
+        }
68 71
 
69 72
         return parent::displayOptions();
70 73
     }
@@ -234,7 +237,9 @@  discard block
 block discarded – undo
234 237
 
235 238
         $opp_result=$focus->db->query($opp_query);
236 239
         $opp_data=$focus->db->fetchByAssoc($opp_result);
237
-        if (empty($opp_data['total_value'])) $opp_data['total_value']=0;
240
+        if (empty($opp_data['total_value'])) {
241
+            $opp_data['total_value']=0;
242
+        }
238 243
 
239 244
         $chartData['Total Value']= $opp_data['total_value'];
240 245
 
@@ -252,7 +257,7 @@  discard block
 block discarded – undo
252 257
         if (empty($opp_data1['revenue'])){
253 258
             $opp_data1[$mod_strings['LBL_ROI_CHART_REVENUE']] = 0;
254 259
             unset($opp_data1['revenue']);
255
-        }else{
260
+        } else{
256 261
             $opp_data1[$mod_strings['LBL_ROI_CHART_REVENUE']] = $opp_data1['revenue'];
257 262
             unset($opp_data1['revenue']);
258 263
             $not_empty = true;
@@ -269,18 +274,21 @@  discard block
 block discarded – undo
269 274
         $camp_data1=$focus->db->fetchByAssoc($camp_result1);
270 275
 
271 276
 
272
-        if (empty($camp_data1['investment']))
273
-            $camp_data1['investment'] = 0;
274
-        else
275
-            $not_empty = true;
276
-        if (empty($camp_data1['budget']))
277
-            $camp_data1['budget'] = 0;
278
-        else
279
-            $not_empty = true;
280
-        if (empty($camp_data1['expected_revenue']))
281
-            $camp_data1['expected_revenue'] = 0;
282
-        else
283
-            $not_empty = true;
277
+        if (empty($camp_data1['investment'])) {
278
+                    $camp_data1['investment'] = 0;
279
+        } else {
280
+                    $not_empty = true;
281
+        }
282
+        if (empty($camp_data1['budget'])) {
283
+                    $camp_data1['budget'] = 0;
284
+        } else {
285
+                    $not_empty = true;
286
+        }
287
+        if (empty($camp_data1['expected_revenue'])) {
288
+                    $camp_data1['expected_revenue'] = 0;
289
+        } else {
290
+                    $not_empty = true;
291
+        }
284 292
 
285 293
         $chartData['Investment']= $camp_data1['investment'];
286 294
         $chartData['Budget']= $camp_data1['budget'];
Please login to merge, or discard this patch.
modules/Administration/SupportPortal.php 1 patch
Braces   +19 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -53,7 +55,9 @@  discard block
 block discarded – undo
53 55
 
54 56
 switch ($_REQUEST['view']) {
55 57
 	case "support_portal":
56
-		if (!is_admin($current_user)) sugar_die("Unauthorized access to administration.");
58
+		if (!is_admin($current_user)) {
59
+		    sugar_die("Unauthorized access to administration.");
60
+		}
57 61
 		$GLOBALS['log']->info("Administration SupportPortal");
58 62
 
59 63
 		$iframe_url = add_http("www.sugarcrm.com/network/redirect.php?tmpl=network");
@@ -83,14 +87,18 @@  discard block
 block discarded – undo
83 87
 		$send_key = isset($_REQUEST['key']) ? $_REQUEST['key'] : "";
84 88
 		$send_anchor = '';
85 89
 		// awu: Fixes the ProjectTasks pluralization issue -- must fix in later versions.
86
-		if ($send_module == 'ProjectTasks')
87
-			$send_module = 'ProjectTask';
88
-        if ($send_module == 'ProductCatalog')
89
-                $send_module = 'ProductTemplates';
90
-        if ($send_module == 'TargetLists')
91
-                $send_module = 'ProspectLists';
92
-        if ($send_module == 'Targets')
93
-                $send_module = 'Prospects';                            
90
+		if ($send_module == 'ProjectTasks') {
91
+					$send_module = 'ProjectTask';
92
+		}
93
+        if ($send_module == 'ProductCatalog') {
94
+                        $send_module = 'ProductTemplates';
95
+        }
96
+        if ($send_module == 'TargetLists') {
97
+                        $send_module = 'ProspectLists';
98
+        }
99
+        if ($send_module == 'Targets') {
100
+                        $send_module = 'Prospects';
101
+        }
94 102
 		// FG - Bug 39819 - Check for custom help files
95 103
 		$helpPath = 'modules/'.$send_module.'/language/'.$send_lang.'.help.'.$send_action.'.html';
96 104
 		if (sugar_is_file("custom/" . $helpPath)) {
@@ -205,7 +213,7 @@  discard block
 block discarded – undo
205 213
 								$send_anchor = $map['anchor'];
206 214
 							}
207 215
 						}
208
-					}else{
216
+					} else{
209 217
 						$send_module = $map['name'];
210 218
 						if(!empty($map['anchor'])){
211 219
 								$send_anchor = $map['anchor'];
Please login to merge, or discard this patch.
modules/Administration/DiagnosticRun.php 1 patch
Braces   +74 added lines, -50 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -47,7 +49,9 @@  discard block
 block discarded – undo
47 49
 global $current_user;
48 50
 
49 51
 
50
-if (!is_admin($current_user)) sugar_die("Unauthorized access to administration.");
52
+if (!is_admin($current_user)) {
53
+    sugar_die("Unauthorized access to administration.");
54
+}
51 55
 if (isset($GLOBALS['sugar_config']['hide_admin_diagnostics']) && $GLOBALS['sugar_config']['hide_admin_diagnostics'])
52 56
 {
53 57
     sugar_die("Unauthorized access to diagnostic tool.");
@@ -131,9 +135,9 @@  discard block
 block discarded – undo
131 135
     global $currentitems;
132 136
 
133 137
     $currentitems++;
134
-    if($currentitems == $totalitems)
135
-      update_progress_bar("diagnostic", 100, 100);
136
-    else
138
+    if($currentitems == $totalitems) {
139
+          update_progress_bar("diagnostic", 100, 100);
140
+    } else
137 141
     {
138 142
       $progress_bar_percent += ($itemweight / $GLOBALS['totalweight'] * 100);
139 143
       update_progress_bar("diagnostic", $progress_bar_percent, 100);
@@ -214,18 +218,21 @@  discard block
 block discarded – undo
214 218
 			//perform this check when counter is set to two, which means it is on the 'value' column
215 219
 			if($counter == 2) {
216 220
 				//if the previous "name" column value was set to smtppass, set replace_val to true
217
-				if(strcmp($row[$counter - 1], "smtppass") == 0  )
218
-					$replace_val = true;
221
+				if(strcmp($row[$counter - 1], "smtppass") == 0  ) {
222
+									$replace_val = true;
223
+				}
219 224
 
220 225
 				//if the previous "name" column value was set to smtppass,
221 226
 				//and the "category" value set to ldap, set replace_val to true
222
-				if (strcmp($row[$counter - 2], "ldap") == 0 && strcmp($row[$counter - 1], "admin_password") == 0)
223
-					$replace_val = true;
227
+				if (strcmp($row[$counter - 2], "ldap") == 0 && strcmp($row[$counter - 1], "admin_password") == 0) {
228
+									$replace_val = true;
229
+				}
224 230
 
225 231
 				//if the previous "name" column value was set to password,
226 232
 				//and the "category" value set to proxy, set replace_val to true
227
-				if(strcmp($row[$counter - 2], "proxy") == 0 && strcmp($row[$counter - 1], "password") == 0 )
228
-					$replace_val = true;
233
+				if(strcmp($row[$counter - 2], "proxy") == 0 && strcmp($row[$counter - 1], "password") == 0 ) {
234
+									$replace_val = true;
235
+				}
229 236
 			}
230 237
 
231 238
 			if($replace_val) {
@@ -245,8 +252,9 @@  discard block
 block discarded – undo
245 252
 // Deletes the directory recursively
246 253
 function deleteDir($dir)
247 254
 {
248
-   if (substr($dir, strlen($dir)-1, 1) != '/')
249
-       $dir .= '/';
255
+   if (substr($dir, strlen($dir)-1, 1) != '/') {
256
+          $dir .= '/';
257
+   }
250 258
 
251 259
    if ($handle = opendir($dir))
252 260
    {
@@ -256,21 +264,23 @@  discard block
 block discarded – undo
256 264
            {
257 265
                if (is_dir($dir.$obj))
258 266
                {
259
-                   if (!deleteDir($dir.$obj))
260
-                       return false;
261
-               }
262
-               elseif (is_file($dir.$obj))
267
+                   if (!deleteDir($dir.$obj)) {
268
+                                          return false;
269
+                   }
270
+               } elseif (is_file($dir.$obj))
263 271
                {
264
-                   if (!unlink($dir.$obj))
265
-                       return false;
272
+                   if (!unlink($dir.$obj)) {
273
+                                          return false;
274
+                   }
266 275
                }
267 276
            }
268 277
        }
269 278
 
270 279
        closedir($handle);
271 280
 
272
-       if (!@rmdir($dir))
273
-           return false;
281
+       if (!@rmdir($dir)) {
282
+                  return false;
283
+       }
274 284
        return true;
275 285
    }
276 286
    return false;
@@ -301,10 +311,11 @@  discard block
 block discarded – undo
301 311
 
302 312
 
303 313
 	//determine if files.md5 exists or not
304
-	if(file_exists('files.md5'))
305
-		$skip_md5_diff = false;
306
-	else
307
-		$skip_md5_diff = true;
314
+	if(file_exists('files.md5')) {
315
+			$skip_md5_diff = false;
316
+	} else {
317
+			$skip_md5_diff = true;
318
+	}
308 319
 
309 320
 	// array of all tables that we need to pull rows from below
310 321
 	$getDumpsFrom = array('config' => 'config',
@@ -392,8 +403,9 @@  discard block
 block discarded – undo
392 403
 
393 404
 
394 405
     //create directory for table definitions
395
-    if($getschema)
396
-      $tablesSchemaDir = create_cache_directory("diagnostic/".$sod_guid."/diagnostic".$curdatetime."/{$db->dbName}/TableSchema/");
406
+    if($getschema) {
407
+          $tablesSchemaDir = create_cache_directory("diagnostic/".$sod_guid."/diagnostic".$curdatetime."/{$db->dbName}/TableSchema/");
408
+    }
397 409
 
398 410
     //make sure they checked the box to get basic info
399 411
     if($getinfo)
@@ -547,13 +559,13 @@  discard block
 block discarded – undo
547 559
 		if(!isset($beanFiles[$beanz]))
548 560
 		{
549 561
 			echo "<font color=orange>NO! --- ".$beanz." is not an index in \$beanFiles</font><br>";
550
-		}
551
-		else
562
+		} else
552 563
 		{
553
-			if(file_exists($beanFiles[$beanz]))
554
-				echo "<font color=green>YES --- ".$beanz." file \"".$beanFiles[$beanz]."\" exists</font><br>";
555
-			else
556
-				echo "<font color=red>NO! --- ".$beanz." file \"".$beanFiles[$beanz]."\" does NOT exist</font><br>";
564
+			if(file_exists($beanFiles[$beanz])) {
565
+							echo "<font color=green>YES --- ".$beanz." file \"".$beanFiles[$beanz]."\" exists</font><br>";
566
+			} else {
567
+							echo "<font color=red>NO! --- ".$beanz." file \"".$beanFiles[$beanz]."\" does NOT exist</font><br>";
568
+			}
557 569
 		}
558 570
 	}
559 571
 
@@ -589,8 +601,9 @@  discard block
 block discarded – undo
589 601
 	global $curdatetime;
590 602
 	global $skip_md5_diff;
591 603
 	global $sod_guid;
592
-	if(file_exists('files.md5'))
593
-        include( 'files.md5');
604
+	if(file_exists('files.md5')) {
605
+	        include( 'files.md5');
606
+	}
594 607
 	//create dir for md5s
595 608
 	$md5_directory = create_cache_directory("diagnostic/".$sod_guid."/diagnostic".$curdatetime."/md5/");
596 609
 
@@ -598,15 +611,17 @@  discard block
 block discarded – undo
598 611
 	if(!$skip_md5_diff)
599 612
 	{
600 613
 		//make sure the files.md5
601
-		if($filesmd5)
602
-			if(!copy('files.md5', $md5_directory."files.md5"))
614
+		if($filesmd5) {
615
+					if(!copy('files.md5', $md5_directory."files.md5"))
603 616
 				echo "Couldn't copy files.md5 to ".$md5_directory."<br>Skipping md5 checks.<br>";
617
+		}
604 618
 	}
605 619
 
606 620
 	$md5_string_calculated = generateMD5array('./');
607 621
 
608
-	if($md5calculated)
609
-		write_array_to_file('md5_string_calculated', $md5_string_calculated, $md5_directory."md5_array_calculated.php");
622
+	if($md5calculated) {
623
+			write_array_to_file('md5_string_calculated', $md5_string_calculated, $md5_directory."md5_array_calculated.php");
624
+	}
610 625
 
611 626
 
612 627
 	//if the files.md5 didn't exist, we can't do this
@@ -668,8 +683,9 @@  discard block
 block discarded – undo
668 683
 
669 684
     foreach($tables as $t) {
670 685
 	$name = $t;
671
-	if ( $name == "does_not_exist" )
672
-	  continue;
686
+	if ( $name == "does_not_exist" ) {
687
+		  continue;
688
+	}
673 689
 	$comment = $comments[$t];
674 690
 	echo "<h2>Table: $t</h2>
675 691
 		<p><i>{$comment}</i></p>";
@@ -686,8 +702,9 @@  discard block
 block discarded – undo
686 702
 
687 703
 	foreach($fields[$t] as $k => $v) {
688 704
 	  // we only care about physical tables ('source' can be 'non-db' or 'nondb' or 'function' )
689
-	  if ( isset( $v[ 'source' ] ))
690
-	    continue;
705
+	  if ( isset( $v[ 'source' ] )) {
706
+	  	    continue;
707
+	  }
691 708
 	  $columnname = $v[ 'name' ];
692 709
 	  $columntype = $v[ 'type' ];
693 710
 	  $columndbtype = $v[ 'dbType' ];
@@ -695,13 +712,20 @@  discard block
 block discarded – undo
695 712
 	  $columncomment = $v[ 'comment' ];
696 713
 	  $columnrequired = $v[ 'required' ];
697 714
 
698
-	  if ( empty( $columnlen ) ) $columnlen = '<i>n/a</i>';
699
-	  if ( empty( $columncomment ) ) $columncomment = '<i>(none)</i>';
700
-	  if ( !empty( $columndbtype ) ) $columntype = $columndbtype;
701
-	  if ( empty( $columnrequired ) || ( $columnrequired == false ))
702
-	    $columndisplayrequired = 'no';
703
-	  else
704
-	    $columndisplayrequired = 'yes';
715
+	  if ( empty( $columnlen ) ) {
716
+	      $columnlen = '<i>n/a</i>';
717
+	  }
718
+	  if ( empty( $columncomment ) ) {
719
+	      $columncomment = '<i>(none)</i>';
720
+	  }
721
+	  if ( !empty( $columndbtype ) ) {
722
+	      $columntype = $columndbtype;
723
+	  }
724
+	  if ( empty( $columnrequired ) || ( $columnrequired == false )) {
725
+	  	    $columndisplayrequired = 'no';
726
+	  } else {
727
+	  	    $columndisplayrequired = 'yes';
728
+	  }
705 729
 
706 730
 	  echo '<TR BGCOLOR="#FFFFFF" ALIGN=left>
707 731
 			<TD ALIGN=left class=\"tabDetailViewDF\">'.$columnname.'</TD>
Please login to merge, or discard this patch.