Test Failed
Push — CI ( 0f01dd...c95a04 )
by Adam
55:13
created
modules/EmailTemplates/EmailTemplate.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.
@@ -179,8 +181,9 @@  discard block
 block discarded – undo
179 181
                             break;
180 182
                         }
181 183
                     }
182
-                    if ($dup)
183
-                        $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel);
184
+                    if ($dup) {
185
+                                            $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel);
186
+                    }
184 187
                 }
185 188
             }
186 189
         }
@@ -253,8 +256,9 @@  discard block
 block discarded – undo
253 256
                             break;
254 257
                         }
255 258
                     }
256
-                    if ($dup)
257
-                        $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel);
259
+                    if ($dup) {
260
+                                            $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel);
261
+                    }
258 262
                 }
259 263
             }
260 264
         }
@@ -314,8 +318,9 @@  discard block
 block discarded – undo
314 318
     function parse_tracker_urls($template_text_array, $url_template, $tracked_urls, $removeme_url_template)
315 319
     {
316 320
         global $beanFiles, $beanList, $app_list_strings, $sugar_config;
317
-        if (!isset($this->parsed_urls))
318
-            $this->parsed_urls = array();
321
+        if (!isset($this->parsed_urls)) {
322
+                    $this->parsed_urls = array();
323
+        }
319 324
 
320 325
         $return_array = $template_text_array;
321 326
         if (count($tracked_urls) > 0) {
@@ -398,8 +403,9 @@  discard block
 block discarded – undo
398 403
             $user->retrieve($focus->assigned_user_id);
399 404
         }
400 405
 
401
-        if (!isset($this->parsed_entities))
402
-            $this->parsed_entities = array();
406
+        if (!isset($this->parsed_entities)) {
407
+                    $this->parsed_entities = array();
408
+        }
403 409
 
404 410
         //parse the template and find all the dynamic strings that need replacement.
405 411
         // Bug #48111 It's strange why prefix for User module is contact_user (see self::generateFieldDefsJS method)
@@ -775,8 +781,9 @@  discard block
 block discarded – undo
775 781
         $template = new EmailTemplate();
776 782
         $optionKey = $template->field_defs['type']['options'];
777 783
         $options = $GLOBALS['app_list_strings'][$optionKey];
778
-        if (!is_admin($GLOBALS['current_user']) && isset($options['workflow']))
779
-            unset($options['workflow']);
784
+        if (!is_admin($GLOBALS['current_user']) && isset($options['workflow'])) {
785
+                    unset($options['workflow']);
786
+        }
780 787
 
781 788
         return $options;
782 789
     }
Please login to merge, or discard this patch.
modules/FP_events/responseEntryPoint.php 1 patch
Braces   +18 added lines, -31 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
 	global $db;
5 7
 	 
@@ -29,16 +31,13 @@  discard block
 block discarded – undo
29 31
                     
30 32
                     $url = $event->accept_redirect;
31 33
                     header('Location: ' . $url);    
32
-                }
33
-                else{
34
+                } else{
34 35
                     echo 'Thank you for accepting';
35 36
                 }   
36
-    		}
37
-    		else {
37
+    		} else {
38 38
     			echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.';
39 39
     		}	
40
-    	}
41
-    	else if($response == 'decline'){
40
+    	} else if($response == 'decline'){
42 41
     		//check to see if they have already responded to the email
43 42
             $check_q = 'SELECT email_responded FROM fp_events_contacts_c WHERE fp_events_contactsfp_events_ida="'.$event->id.'" AND fp_events_contactscontacts_idb="'.$delegate_id.'"';
44 43
              $check = $db->getOne($check_q);
@@ -52,12 +51,10 @@  discard block
 block discarded – undo
52 51
                     $url = $event->decline_redirect;
53 52
                     header('Location: ' . $url);    
54 53
                     
55
-                }
56
-                else{
54
+                } else{
57 55
                     echo 'Thank you for declining';
58 56
                 }
59
-    		}
60
-    		else {
57
+    		} else {
61 58
     			echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.';
62 59
     		}
63 60
     	}
@@ -79,16 +76,13 @@  discard block
 block discarded – undo
79 76
                     
80 77
                     $url = $event->accept_redirect;
81 78
                     header('Location: ' . $url);    
82
-                }
83
-                else{
79
+                } else{
84 80
                     echo 'Thank you for accepting';
85 81
                 }   
86
-            }
87
-            else {
82
+            } else {
88 83
                 echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.';
89 84
             }   
90
-    	}
91
-    	else if($response == 'decline'){
85
+    	} else if($response == 'decline'){
92 86
             //check to see if they have already responded to the email
93 87
             $check_q = 'SELECT email_responded FROM fp_events_prospects_1_c WHERE fp_events_prospects_1fp_events_ida="'.$event->id.'" AND fp_events_prospects_1prospects_idb="'.$delegate_id.'"';
94 88
              $check = $db->getOne($check_q);
@@ -101,12 +95,10 @@  discard block
 block discarded – undo
101 95
                     $url = $event->decline_redirect;
102 96
                     header('Location: ' . $url);    
103 97
                     
104
-                }
105
-                else{
98
+                } else{
106 99
                     echo 'Thank you for declining';
107 100
                 }
108
-            }
109
-            else {
101
+            } else {
110 102
                 echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.';
111 103
             }
112 104
     	}
@@ -127,16 +119,13 @@  discard block
 block discarded – undo
127 119
                     
128 120
                     $url = $event->accept_redirect;
129 121
                     header('Location: ' . $url);    
130
-                }
131
-                else{
122
+                } else{
132 123
                     echo 'Thank you for accepting';
133 124
                 }   
134
-            }
135
-            else {
125
+            } else {
136 126
                 echo 'There was a problem with the link please contact the sender of the invite';
137 127
             }   
138
-    	}
139
-    	else if($response == 'decline'){
128
+    	} else if($response == 'decline'){
140 129
     		//check to see if they have already responded to the email
141 130
             $check_q = 'SELECT email_responded FROM fp_events_leads_1_c WHERE fp_events_leads_1fp_events_ida="'.$event->id.'" AND fp_events_leads_1leads_idb="'.$delegate_id.'"';
142 131
              $check = $db->getOne($check_q);
@@ -150,12 +139,10 @@  discard block
 block discarded – undo
150 139
                     $url = $event->decline_redirect;
151 140
                     header('Location: ' . $url);    
152 141
                     
153
-                }
154
-                else{
142
+                } else{
155 143
                     echo 'Thank you for declining';
156 144
                 }
157
-            }
158
-            else {
145
+            } else {
159 146
                 echo 'There was a problem with the link please contact the sender of the invite';
160 147
             }
161 148
     	}
Please login to merge, or discard this patch.
modules/Meetings/JoinExternalMeeting.php 1 patch
Braces   +6 added lines, -4 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.
@@ -56,7 +58,7 @@  discard block
 block discarded – undo
56 58
 if ( $_REQUEST['host_meeting'] == '1' ) {
57 59
     if($meetingBean->assigned_user_id == $GLOBALS['current_user']->id || is_admin($GLOBALS['current_user']) || is_admin_for_module($GLOBALS['current_user'],'Meetings')){
58 60
         SugarApplication::redirect($meetingBean->host_url);
59
-    }else{
61
+    } else{
60 62
         //since they are now the owner of the meeting nor an Admin they cannot start the meeting.
61 63
         $tplFile = 'modules/Meetings/tpls/extMeetingNoStart.tpl';
62 64
         if ( file_exists('custom/'.$tplFile) ) {
@@ -68,10 +70,10 @@  discard block
 block discarded – undo
68 70
         $ss->assign('bean',$meetingBean->toArray());
69 71
         $ss->display($tplFile);
70 72
     }
71
-}else{
73
+} else{
72 74
     if(isset($row['id']) || $meetingBean->assigned_user_id == $GLOBALS['current_user']->id || is_admin($GLOBALS['current_user']) || is_admin_for_module($GLOBALS['current_user'],'Meetings')){
73 75
       SugarApplication::redirect($meetingBean->join_url);
74
-    }else{
76
+    } else{
75 77
         //if the user is not invited or the owner of the meeting or an admin then they cannot join the meeting.
76 78
         $tplFile = 'modules/Meetings/tpls/extMeetingNotInvited.tpl';
77 79
         if ( file_exists('custom/'.$tplFile) ) {
Please login to merge, or discard this patch.
modules/Meetings/MeetingsQuickCreate.php 1 patch
Braces   +12 added lines, -7 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.
@@ -75,12 +77,15 @@  discard block
 block discarded – undo
75 77
         $this->javascript->setSugarBean($focus);
76 78
         $this->javascript->addAllFields('');
77 79
 
78
-		if (is_null($focus->date_start))
79
-			$focus->date_start = $timedate->to_display_date(TimeDate::getInstance()->nowDb());
80
-		if (is_null($focus->time_start))
81
-			$focus->time_start = $timedate->to_display_time(TimeDate::getInstance()->nowDb(), true);
82
-		if (!isset ($focus->duration_hours))
83
-			$focus->duration_hours = "1";
80
+		if (is_null($focus->date_start)) {
81
+					$focus->date_start = $timedate->to_display_date(TimeDate::getInstance()->nowDb());
82
+		}
83
+		if (is_null($focus->time_start)) {
84
+					$focus->time_start = $timedate->to_display_time(TimeDate::getInstance()->nowDb(), true);
85
+		}
86
+		if (!isset ($focus->duration_hours)) {
87
+					$focus->duration_hours = "1";
88
+		}
84 89
 
85 90
         
86 91
         $date_start_array=explode(" ",trim($focus->date_start));
Please login to merge, or discard this patch.
modules/Meetings/Meeting.php 1 patch
Braces   +48 added lines, -39 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.
@@ -207,8 +209,9 @@  discard block
 block discarded – undo
207 209
 		}*/
208 210
 
209 211
 		// prevent a mass mailing for recurring meetings created in Calendar module
210
-		if(empty($this->id) && !empty($_REQUEST['module']) && $_REQUEST['module'] == "Calendar" && !empty($_REQUEST['repeat_type']) && !empty($this->repeat_parent_id))
211
-			$check_notify = false;
212
+		if(empty($this->id) && !empty($_REQUEST['module']) && $_REQUEST['module'] == "Calendar" && !empty($_REQUEST['repeat_type']) && !empty($this->repeat_parent_id)) {
213
+					$check_notify = false;
214
+		}
212 215
 
213 216
         if (empty($this->status) ) {
214 217
             $this->status = $this->getDefaultStatus();
@@ -312,10 +315,11 @@  discard block
 block discarded – undo
312 315
 
313 316
         $query .= $custom_join['join'];
314 317
 
315
-		if($where != "")
316
-			$query .= " where $where AND ".$where_auto;
317
-		else
318
-			$query .= " where ".$where_auto;
318
+		if($where != "") {
319
+					$query .= " where $where AND ".$where_auto;
320
+		} else {
321
+					$query .= " where ".$where_auto;
322
+		}
319 323
 
320 324
         $order_by = $this->process_order_by($order_by);
321 325
         if (!empty($order_by)) {
@@ -405,15 +409,18 @@  discard block
 block discarded – undo
405 409
 		}
406 410
 
407 411
         //setting default date and time
408
-		if (is_null($this->date_start))
409
-			$this->date_start = $timedate->now();
410
-		if (is_null($this->time_start))
411
-			$this->time_start = $timedate->to_display_time(TimeDate::getInstance()->nowDb(), true);
412
+		if (is_null($this->date_start)) {
413
+					$this->date_start = $timedate->now();
414
+		}
415
+		if (is_null($this->time_start)) {
416
+					$this->time_start = $timedate->to_display_time(TimeDate::getInstance()->nowDb(), true);
417
+		}
412 418
 		if (is_null($this->duration_hours)) {
413 419
 			$this->duration_hours = "0";
414 420
 		}
415
-		if (is_null($this->duration_minutes))
416
-			$this->duration_minutes = "1";
421
+		if (is_null($this->duration_minutes)) {
422
+					$this->duration_minutes = "1";
423
+		}
417 424
 
418 425
 		if(empty($this->id) && !empty($_REQUEST['date_start'])){
419 426
 			$this->date_start = $_REQUEST['date_start'];
@@ -432,8 +439,7 @@  discard block
 block discarded – undo
432 439
                     $td = $td->modify("+{$this->duration_minutes} mins");
433 440
                 }
434 441
                 $this->date_end = $td->format($GLOBALS['timedate']->get_date_time_format());
435
-            } 
436
-            else 
442
+            } else 
437 443
             {
438 444
                 $GLOBALS['log']->fatal("Meeting::save: Bad date {$this->date_start} for format ".$GLOBALS['timedate']->get_date_time_format());
439 445
             }
@@ -455,8 +461,9 @@  discard block
 block discarded – undo
455 461
 
456 462
 		if ( empty($this->id) ) {
457 463
 		    $reminder_t = $GLOBALS['current_user']->getPreference('reminder_time');
458
-		    if ( isset($reminder_t) )
459
-		        $this->reminder_time = $reminder_t;
464
+		    if ( isset($reminder_t) ) {
465
+		    		        $this->reminder_time = $reminder_t;
466
+		    }
460 467
 		}
461 468
 		$this->reminder_checked = $this->reminder_time == -1 ? false : true;
462 469
 
@@ -465,8 +472,9 @@  discard block
 block discarded – undo
465 472
 		}
466 473
 		if(empty($this->id)){ 
467 474
 			$reminder_t = $GLOBALS['current_user']->getPreference('email_reminder_time');
468
-			if(isset($reminder_t))
469
-		    		$this->email_reminder_time = $reminder_t;
475
+			if(isset($reminder_t)) {
476
+					    		$this->email_reminder_time = $reminder_t;
477
+			}
470 478
 		}
471 479
 		$this->email_reminder_checked = $this->email_reminder_time == -1 ? false : true;
472 480
 
@@ -482,12 +490,14 @@  discard block
 block discarded – undo
482 490
 		$meeting_fields = $this->get_list_view_array();
483 491
 
484 492
 		global $app_list_strings, $focus, $action, $currentModule;
485
-		if(isset($this->parent_type))
486
-			$meeting_fields['PARENT_MODULE'] = $this->parent_type;
493
+		if(isset($this->parent_type)) {
494
+					$meeting_fields['PARENT_MODULE'] = $this->parent_type;
495
+		}
487 496
 		if($this->status == "Planned") {
488 497
 			//cn: added this if() to deal with sequential Closes in Meetings.	this is a hack to a hack(formbase.php->handleRedirect)
489
-			if(empty($action))
490
-			     $action = "index";
498
+			if(empty($action)) {
499
+						     $action = "index";
500
+			}
491 501
             $setCompleteUrl = "<a id='{$this->id}' onclick='SUGAR.util.closeActivityPanel.show(\"{$this->module_dir}\",\"{$this->id}\",\"Held\",\"listview\",\"1\");'>";
492 502
 			if ($this->ACLAccess('edit')) {
493 503
                 $meeting_fields['SET_COMPLETE'] = $setCompleteUrl . SugarThemeRegistry::current()->getImage("close_inline"," border='0'",null,null,'.gif',translate('LBL_CLOSEINLINE'))."</a>";
@@ -502,7 +512,7 @@  discard block
 block discarded – undo
502 512
 		$date_db = $timedate->to_db($mergeTime);
503 513
 		if($date_db	< $today	) {
504 514
 			$meeting_fields['DATE_START']= "<font class='overdueTask'>".$meeting_fields['DATE_START']."</font>";
505
-		}else if($date_db	< $nextday) {
515
+		} else if($date_db	< $nextday) {
506 516
 			$meeting_fields['DATE_START'] = "<font class='todaysTask'>".$meeting_fields['DATE_START']."</font>";
507 517
 		} else {
508 518
 			$meeting_fields['DATE_START'] = "<font class='futureTask'>".$meeting_fields['DATE_START']."</font>";
@@ -669,14 +679,12 @@  discard block
 block discarded – undo
669 679
 			{
670 680
 				vCal::cache_sugar_vcal($user);
671 681
 			}
672
-		}
673
-		else if($user->object_name == 'Contact')
682
+		} else if($user->object_name == 'Contact')
674 683
 		{
675 684
 			$relate_values = array('contact_id'=>$user->id,'meeting_id'=>$this->id);
676 685
 			$data_values = array('accept_status'=>$status);
677 686
 			$this->set_relationship($this->rel_contacts_table, $relate_values, true, true,$data_values);
678
-		}
679
-        else if($user->object_name == 'Lead')
687
+		} else if($user->object_name == 'Lead')
680 688
 		{
681 689
 			$relate_values = array('lead_id'=>$user->id,'meeting_id'=>$this->id);
682 690
 			$data_values = array('accept_status'=>$status);
@@ -730,8 +738,9 @@  discard block
 block discarded – undo
730 738
 		global $sugar_config;
731 739
 		if(isset($sugar_config['disable_notify_current_user']) && $sugar_config['disable_notify_current_user']) {
732 740
 			global $current_user;
733
-			if(isset($list[$current_user->id]))
734
-				unset($list[$current_user->id]);
741
+			if(isset($list[$current_user->id])) {
742
+							unset($list[$current_user->id]);
743
+			}
735 744
 		}
736 745
 		return $list;
737 746
 	}
@@ -822,11 +831,10 @@  discard block
 block discarded – undo
822 831
            //add assigned_user_id to exclude list and let the logic from MeetingFormBase determine whether assigned user id gets added to the relationship
823 832
            	if(!empty($GLOBALS['soap_server_object'])){
824 833
            		$exclude = array('contact_id', 'user_id');
825
-           	}else{
834
+           	} else{
826 835
 	    		$exclude = array('contact_id', 'user_id','assigned_user_id');
827 836
            	}
828
-           }
829
-           else{
837
+           } else{
830 838
            	$exclude = array('user_id');
831 839
            }
832 840
         }
@@ -841,13 +849,14 @@  discard block
 block discarded – undo
841 849
 	{
842 850
 	    if ( $this->parent_type == 'Contacts' ) {
843 851
 	        $this->load_relationship('contacts');
844
-	        if ( !$this->contacts->relationship_exists('contacts',array('id'=>$this->parent_id)) )
845
-	            $this->contacts->add($this->parent_id);
846
-	    }
847
-	    elseif ( $this->parent_type == 'Leads' ) {
852
+	        if ( !$this->contacts->relationship_exists('contacts',array('id'=>$this->parent_id)) ) {
853
+	        	            $this->contacts->add($this->parent_id);
854
+	        }
855
+	    } elseif ( $this->parent_type == 'Leads' ) {
848 856
 	        $this->load_relationship('leads');
849
-	        if ( !$this->leads->relationship_exists('leads',array('id'=>$this->parent_id)) )
850
-	            $this->leads->add($this->parent_id);
857
+	        if ( !$this->leads->relationship_exists('leads',array('id'=>$this->parent_id)) ) {
858
+	        	            $this->leads->add($this->parent_id);
859
+	        }
851 860
 	    }
852 861
 
853 862
 	    parent::afterImportSave();
Please login to merge, or discard this patch.
modules/Meetings/metadata/additionalDetails.php 1 patch
Braces   +6 added lines, -2 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.
@@ -94,7 +96,9 @@  discard block
 block discarded – undo
94 96
 
95 97
     if(!empty($fields['DESCRIPTION'])) {
96 98
         $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
97
-        if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
99
+        if(strlen($fields['DESCRIPTION']) > 300) {
100
+            $overlib_string .= '...';
101
+        }
98 102
         $overlib_string .= '<br>';
99 103
     }
100 104
     $overlib_string .= '<br>';
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.module.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,11 +87,14 @@
 block discarded – undo
87 87
 		$ajax = new AjaxCompose();
88 88
 		$ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.main("mb")');
89 89
 		$ajax->addCrumb(' '. $package->name,'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package='.$package->name.'")');
90
-		if(empty($module_name))$module_name = translate('LBL_NEW_MODULE', 'ModuleBuilder');
90
+		if(empty($module_name)) {
91
+		    $module_name = translate('LBL_NEW_MODULE', 'ModuleBuilder');
92
+		}
91 93
 		$ajax->addCrumb($module_name, '');
92 94
 		$html=$smarty->fetch('modules/ModuleBuilder/tpls/MBModule/module.tpl');
93
-		if(!empty($_REQUEST['action']) && $_REQUEST['action']=='SaveModule')
94
-			$html .="<script>ModuleBuilder.treeRefresh('ModuleBuilder')</script>";
95
+		if(!empty($_REQUEST['action']) && $_REQUEST['action']=='SaveModule') {
96
+					$html .="<script>ModuleBuilder.treeRefresh('ModuleBuilder')</script>";
97
+		}
95 98
 		$ajax->addSection('center', translate('LBL_SECTION_MODULE', 'ModuleBuilder'), $html);
96 99
 		
97 100
 		echo $ajax->getJavascript();
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.searchview.php 1 patch
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (! defined ( 'sugarEntry' ) || ! sugarEntry)
3
-die ( 'Not A Valid Entry Point' ) ;
2
+if (! defined ( 'sugarEntry' ) || ! sugarEntry) {
3
+    die ( 'Not A Valid Entry Point' ) ;
4
+}
4 5
 /*********************************************************************************
5 6
  * SugarCRM Community Edition is a customer relationship management program developed by
6 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -119,14 +120,18 @@  discard block
 block discarded – undo
119 120
  			$ajax->addCrumb ( $_REQUEST [ 'view_package' ], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=' . $_REQUEST [ 'view_package' ] . '")' ) ;
120 121
  			$ajax->addCrumb ( $this->editModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=module&view_package=' . $_REQUEST [ 'view_package' ] . "&view_module={$this->editModule}" . '")'  ) ;
121 122
  			$ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view_module=' . $this->editModule. '&view_package=' . $_REQUEST['view_package'] . '")'  ) ;
122
- 			if ( $layoutLabel == 'LBL_LAYOUTS' ) $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view=search&view_module=' .$this->editModule . '&view_package=' . $_REQUEST [ 'view_package' ] . '")'  ) ;
123
+ 			if ( $layoutLabel == 'LBL_LAYOUTS' ) {
124
+ 			    $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view=search&view_module=' .$this->editModule . '&view_package=' . $_REQUEST [ 'view_package' ] . '")'  ) ;
125
+ 			}
123 126
  			$ajax->addCrumb ( translate ( $searchLabel, 'ModuleBuilder' ), '' ) ;
124 127
  		} else
125 128
  		{
126 129
  			$ajax->addCrumb ( translate ( 'LBL_STUDIO', 'ModuleBuilder' ), 'ModuleBuilder.main("studio")' ) ;
127 130
  			$ajax->addCrumb ( $this->translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module=' . $this->editModule . '")'  ) ;
128 131
  			$ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view='.$layoutView.'&view_module=' . $this->editModule . '")'  ) ;
129
- 			if ( $layoutLabel == 'LBL_LAYOUTS' ) $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view=search&view_module=' .$this->editModule . '")' ) ;
132
+ 			if ( $layoutLabel == 'LBL_LAYOUTS' ) {
133
+ 			    $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view=search&view_module=' .$this->editModule . '")' ) ;
134
+ 			}
130 135
  			$ajax->addCrumb ( translate ( $searchLabel, 'ModuleBuilder' ), ''  ) ;
131 136
  		}
132 137
  		$this->title = $searchLabel;
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.relationship.php 1 patch
Braces   +10 added lines, -7 removed lines patch added patch discarded remove patch
@@ -120,8 +120,9 @@  discard block
 block discarded – undo
120 120
                 
121 121
         $cardinality = array ( MB_ONETOONE => translate ( 'LBL_ONETOONE' ) , MB_ONETOMANY => translate ( 'LBL_ONETOMANY' ) , MB_MANYTOONE=> translate ( 'LBL_MANYTOONE' ), MB_MANYTOMANY => translate ( 'LBL_MANYTOMANY' ), ) ;
122 122
         
123
-        if (!$this->fromModuleBuilder)
124
-            unset($cardinality[MB_MANYTOONE]);
123
+        if (!$this->fromModuleBuilder) {
124
+                    unset($cardinality[MB_MANYTOONE]);
125
+        }
125 126
             
126 127
         $relationships = $module->getRelationships () ;
127 128
         
@@ -136,7 +137,7 @@  discard block
 block discarded – undo
136 137
 	            $definition['lhs_label'] = isset($modStrings[$relationship->getTitleKey()])?$modStrings[$relationship->getTitleKey()] : $relationship->lhs_module;
137 138
 	            $modStrings = return_module_language( $selected_lang, $relationship->lhs_module, true ) ;
138 139
 	    		$definition['rhs_label'] = isset($modStrings[$relationship->getTitleKey(true)])?$modStrings[$relationship->getTitleKey(true)] : $relationship->rhs_module ;
139
-			}else{
140
+			} else{
140 141
 				#30624
141 142
 				if(!empty($_REQUEST['rhs_module'])){
142 143
 					$definition['rhs_label'] = $_REQUEST['rhs_module'];
@@ -254,12 +255,14 @@  discard block
 block discarded – undo
254 255
                     }
255 256
                     $this->smarty->assign ( 'relationship_role_column_enum', $validRoleColumnFields ) ;
256 257
                 }
257
-                if (! empty ( $relationship->relationship_role_column_value ))
258
-                    $this->smarty->assign ( 'relationship_role_column_value', $relationship->relationship_role_column_value ) ;
258
+                if (! empty ( $relationship->relationship_role_column_value )) {
259
+                                    $this->smarty->assign ( 'relationship_role_column_value', $relationship->relationship_role_column_value ) ;
260
+                }
259 261
                 break ;
260 262
             case MB_MANYTOMANY :
261
-                if (! empty ( $relationship->relationship_role_column_value ))
262
-                    $this->smarty->assign ( 'relationship_role_column_value', $relationship->relationship_role_column_value ) ;
263
+                if (! empty ( $relationship->relationship_role_column_value )) {
264
+                                    $this->smarty->assign ( 'relationship_role_column_value', $relationship->relationship_role_column_value ) ;
265
+                }
263 266
                 break ;
264 267
         }
265 268
         
Please login to merge, or discard this patch.