Completed
Push — console-installer ( 3d54e5...e2b50d )
by Adam
69:10 queued 48:24
created
include/generic/SugarWidgets/SugarWidgetSubPanelEditRoleButton.php 1 patch
Braces   +4 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.
@@ -68,7 +70,7 @@  discard block
 block discarded – undo
68 70
 		return '<a href="' . $href . '"'
69 71
             . "id=\"$unique_id\""
70 72
 			. 'class="listViewTdToolsS1">' . $app_strings['LNK_EDIT'] .'</a>&nbsp;';
71
-	}else{
73
+	} else{
72 74
 		return '';
73 75
 	}
74 76
 	}
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelTopButton_c.php 1 patch
Braces   +33 added lines, -28 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,31 +68,38 @@  discard block
 block discarded – undo
66 68
 			$class_details = $module;
67 69
 
68 70
 			// If keys were passed into the constructor, translate them from keys to values.
69
-			if(!empty($class_details['module']))
70
-				$this->module = $class_details['module'];
71
-			if(!empty($class_details['title']))
72
-				$this->title = $app_strings[$class_details['title']];
73
-			if(!empty($class_details['access_key']))
74
-				$this->access_key = $app_strings[$class_details['access_key']];
75
-			if(!empty($class_details['form_value']))
76
-				$this->form_value = translate($class_details['form_value'], $this->module);
77
-			if(!empty($class_details['additional_form_fields']))
78
-				$this->additional_form_fields = $class_details['additional_form_fields'];
71
+			if(!empty($class_details['module'])) {
72
+							$this->module = $class_details['module'];
73
+			}
74
+			if(!empty($class_details['title'])) {
75
+							$this->title = $app_strings[$class_details['title']];
76
+			}
77
+			if(!empty($class_details['access_key'])) {
78
+							$this->access_key = $app_strings[$class_details['access_key']];
79
+			}
80
+			if(!empty($class_details['form_value'])) {
81
+							$this->form_value = translate($class_details['form_value'], $this->module);
82
+			}
83
+			if(!empty($class_details['additional_form_fields'])) {
84
+							$this->additional_form_fields = $class_details['additional_form_fields'];
85
+			}
79 86
 			if(!empty($class_details['ACL'])){
80 87
 				$this->acl = $class_details['ACL'];
81 88
 			}
82
-		}
83
-		else
89
+		} else
84 90
 		{
85 91
 			$this->module = $module;
86 92
 
87 93
 			// If keys were passed into the constructor, translate them from keys to values.
88
-			if(!empty($title))
89
-				$this->title = $app_strings[$title];
90
-			if(!empty($access_key))
91
-				$this->access_key = $app_strings[$access_key];
92
-			if(!empty($form_value))
93
-				$this->form_value = translate($form_value, $module);
94
+			if(!empty($title)) {
95
+							$this->title = $app_strings[$title];
96
+			}
97
+			if(!empty($access_key)) {
98
+							$this->access_key = $app_strings[$access_key];
99
+			}
100
+			if(!empty($form_value)) {
101
+							$this->form_value = translate($form_value, $module);
102
+			}
94 103
 		}
95 104
 	}
96 105
 
@@ -116,8 +125,7 @@  discard block
 block discarded – undo
116 125
                 if(!empty($defines['focus']->$value))
117 126
                 {
118 127
                     $additionalFormFields[$key] = $defines['focus']->$value;
119
-                }
120
-                else
128
+                } else
121 129
                 {
122 130
                     $additionalFormFields[$key] = '';
123 131
                 }
@@ -128,8 +136,7 @@  discard block
 block discarded – undo
128 136
 		if(!empty($this->module))
129 137
         {
130 138
             $defines['child_module_name'] = $this->module;
131
-        }
132
-        else
139
+        } else
133 140
         {
134 141
             $defines['child_module_name'] = $defines['module'];
135 142
         }
@@ -161,7 +168,7 @@  discard block
 block discarded – undo
161 168
 
162 169
         if($currentModule == 'Campaigns'){
163 170
             $formValues['return_action'] = "DetailView";
164
-        }else{
171
+        } else{
165 172
             $formValues['return_action'] = $defines['action'];
166 173
             if ( $formValues['return_action'] == 'SubPanelViewer' ) {
167 174
                 $formValues['return_action'] = 'DetailView';
@@ -195,8 +202,7 @@  discard block
 block discarded – undo
195 202
         {
196 203
             if($defines['focus']->object_name=='Contact') {
197 204
                 $additionalFormFields['parent_type'] = 'Accounts';
198
-            }
199
-            else {
205
+            } else {
200 206
                 $additionalFormFields['parent_type'] = $defines['focus']->module_dir;
201 207
             }
202 208
         }
@@ -205,8 +211,7 @@  discard block
 block discarded – undo
205 211
             if($defines['focus']->object_name=='Contact') {
206 212
                 $additionalFormFields['parent_name'] = $defines['focus']->account_name;
207 213
                 $additionalFormFields['account_name'] = $defines['focus']->account_name;
208
-            }
209
-            else {
214
+            } else {
210 215
                 $additionalFormFields['parent_name'] = $defines['focus']->name;
211 216
             }
212 217
         }
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelTopComposeEmailButton.php 1 patch
Braces   +4 added lines, -3 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.
@@ -83,8 +85,7 @@  discard block
 block discarded – undo
83 85
 			if (isset($bean->emailAddress)){
84 86
 				$to_addrs = $bean->emailAddress->getPrimaryAddress($bean);
85 87
 				$button = "<input class='button' type='button'  value='$value'  id='". $this->getWidgetId() . "'  name='".preg_replace('[ ]', '', $value)."'   title='$title' onclick=\"location.href='mailto:$to_addrs';return false;\" />";
86
-			}
87
-			else{
88
+			} else{
88 89
 				$button = "<input class='button' type='button'  value='$value'  id='". $this->getWidgetId() ."'  name='".preg_replace('[ ]', '', $value)."'  title='$title' onclick=\"location.href='mailto:';return false;\" />";
89 90
 			}
90 91
 		} else {
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelTopButtonQuickCreate.php 1 patch
Braces   +31 added lines, -21 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,8 +62,7 @@  discard block
 block discarded – undo
60 62
 				if(!empty($defines['focus']->$value))
61 63
 				{
62 64
 					$additionalFormFields[$key] = $defines['focus']->$value;
63
-				}
64
-				else
65
+				} else
65 66
 				{
66 67
 					$additionalFormFields[$key] = '';
67 68
 				}
@@ -71,8 +72,7 @@  discard block
 block discarded – undo
71 72
 		if(!empty($this->module))
72 73
 		{
73 74
 			$defines['child_module_name'] = $this->module;
74
-		}
75
-		else
75
+		} else
76 76
 		{
77 77
 			$defines['child_module_name'] = $defines['module'];
78 78
 		}
@@ -104,8 +104,9 @@  discard block
 block discarded – undo
104 104
             $additionalFormFields['return_name'] = $defines['focus']->name;
105 105
 		}
106 106
 		
107
-		if(!empty($defines['view']))
108
-		$button .= '<input type="hidden" name="target_view" value="'. $defines['view'] . '" />';
107
+		if(!empty($defines['view'])) {
108
+				$button .= '<input type="hidden" name="target_view" value="'. $defines['view'] . '" />';
109
+		}
109 110
 		$button .= '<input type="hidden" name="to_pdf" value="true" />';
110 111
         $button .= '<input type="hidden" name="tpl" value="QuickCreate.tpl" />';
111 112
 		$button .= '<input type="hidden" name="return_module" value="' . $currentModule . "\" />\n";
@@ -119,8 +120,7 @@  discard block
 block discarded – undo
119 120
 		{
120 121
 			if($defines['focus']->object_name=='Contact') {
121 122
 				$additionalFormFields['parent_type'] = 'Accounts';
122
-			}
123
-			else {
123
+			} else {
124 124
 				$additionalFormFields['parent_type'] = $defines['focus']->module_dir;
125 125
 			}
126 126
 		}
@@ -129,8 +129,7 @@  discard block
 block discarded – undo
129 129
 			if($defines['focus']->object_name=='Contact') {
130 130
 				$additionalFormFields['parent_name'] = $defines['focus']->account_name;
131 131
 				$additionalFormFields['account_name'] = $defines['focus']->account_name;
132
-			}
133
-			else {
132
+			} else {
134 133
 				$additionalFormFields['parent_name'] = $defines['focus']->name;
135 134
 			}
136 135
 		}
@@ -139,8 +138,7 @@  discard block
 block discarded – undo
139 138
 			if($defines['focus']->object_name=='Contact') {
140 139
 				$additionalFormFields['parent_id'] = $defines['focus']->account_id;
141 140
 				$additionalFormFields['account_id'] = $defines['focus']->account_id;
142
-			}
143
-			else {
141
+			} else {
144 142
 				$additionalFormFields['parent_id'] = $defines['focus']->id;
145 143
 			}
146 144
 		}
@@ -149,15 +147,27 @@  discard block
 block discarded – undo
149 147
             //set variables to account name, or parent account name
150 148
             if(strtolower($defines['parent_bean_name']) == 'account' ){
151 149
                 //if account is parent bean, then get focus id/focus name
152
-                if(isset($defines['focus']->id))$additionalFormFields['account_id'] = $defines['focus']->id;
153
-                if(isset($defines['focus']->name))$additionalFormFields['account_name'] = $defines['focus']->name;
154
-            }elseif(strtolower($defines['parent_bean_name']) == 'quote' ){
150
+                if(isset($defines['focus']->id)) {
151
+                    $additionalFormFields['account_id'] = $defines['focus']->id;
152
+                }
153
+                if(isset($defines['focus']->name)) {
154
+                    $additionalFormFields['account_name'] = $defines['focus']->name;
155
+                }
156
+            } elseif(strtolower($defines['parent_bean_name']) == 'quote' ){
155 157
                 //if quote is parent bean, then get billing_account_id/billing_account_name
156
-                if(isset($defines['focus']->billing_account_id))$additionalFormFields['account_id'] = $defines['focus']->billing_account_id;
157
-                if(isset($defines['focus']->billing_account_name))$additionalFormFields['account_name'] = $defines['focus']->billing_account_name;
158
-            }else{
159
-                if(isset($defines['focus']->account_id))$additionalFormFields['account_id'] = $defines['focus']->account_id;
160
-                if(isset($defines['focus']->account_name))$additionalFormFields['account_name'] = $defines['focus']->account_name;
158
+                if(isset($defines['focus']->billing_account_id)) {
159
+                    $additionalFormFields['account_id'] = $defines['focus']->billing_account_id;
160
+                }
161
+                if(isset($defines['focus']->billing_account_name)) {
162
+                    $additionalFormFields['account_name'] = $defines['focus']->billing_account_name;
163
+                }
164
+            } else{
165
+                if(isset($defines['focus']->account_id)) {
166
+                    $additionalFormFields['account_id'] = $defines['focus']->account_id;
167
+                }
168
+                if(isset($defines['focus']->account_name)) {
169
+                    $additionalFormFields['account_name'] = $defines['focus']->account_name;
170
+                }
161 171
             }
162 172
         }
163 173
 
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelEmailLink.php 1 patch
Braces   +18 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.
@@ -62,14 +64,23 @@  discard block
 block discarded – undo
62 64
 
63 65
 
64 66
 
65
-			if(isset($_REQUEST['action'])) $action = $_REQUEST['action'];
66
-			else $action = '';
67
+			if(isset($_REQUEST['action'])) {
68
+			    $action = $_REQUEST['action'];
69
+			} else {
70
+			    $action = '';
71
+			}
67 72
 
68
-			if(isset($_REQUEST['module'])) $module = $_REQUEST['module'];
69
-			else $module = '';
73
+			if(isset($_REQUEST['module'])) {
74
+			    $module = $_REQUEST['module'];
75
+			} else {
76
+			    $module = '';
77
+			}
70 78
 
71
-			if(isset($_REQUEST['record'])) $record = $_REQUEST['record'];
72
-			else $record = '';
79
+			if(isset($_REQUEST['record'])) {
80
+			    $record = $_REQUEST['record'];
81
+			} else {
82
+			    $record = '';
83
+			}
73 84
 
74 85
 			if (!empty($focus->name)) {
75 86
 				$name = $focus->name;
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldtime.php 1 patch
Braces   +4 added lines, -3 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.
@@ -64,8 +66,7 @@  discard block
 block discarded – undo
64 66
                 if(!empty($date)) { // able to get the date context of the time            	
65 67
                 	$td = explode(' ', $timedate->to_display_date_time($date . ' ' . $content));
66 68
 	                return $td[1];
67
-                }
68
-                else { // assume there is no time context
69
+                } else { // assume there is no time context
69 70
                  	return $timedate->to_display_time($content);
70 71
                 }
71 72
         }
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelActivitiesStatusField.php 1 patch
Braces   +4 added lines, -3 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,8 +58,7 @@  discard block
 block discarded – undo
56 58
 		if(isset($layout_def['varname']))
57 59
 		{
58 60
 			$key = strtoupper($layout_def['varname']);
59
-		}
60
-		else
61
+		} else
61 62
 		{
62 63
 			$key = $this->_get_column_alias($layout_def);
63 64
 			$key = strtoupper($key);
Please login to merge, or discard this patch.
generic/SugarWidgets/SugarWidgetSubPanelTopScheduleMeetingButton.php 1 patch
Braces   +8 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.
@@ -61,8 +63,7 @@  discard block
 block discarded – undo
61 63
 				if(!empty($defines['focus']->$value))
62 64
 				{
63 65
 					$additionalFormFields[$key] = $defines['focus']->$value;
64
-				}
65
-				else
66
+				} else
66 67
 				{
67 68
 					$additionalFormFields[$key] = '';
68 69
 				}
@@ -72,8 +73,7 @@  discard block
 block discarded – undo
72 73
 		if(!empty($this->module))
73 74
 		{
74 75
 			$defines['child_module_name'] = $this->module;
75
-		}
76
-		else
76
+		} else
77 77
 		{
78 78
 			$defines['child_module_name'] = $defines['module'];
79 79
 		}
@@ -109,8 +109,7 @@  discard block
 block discarded – undo
109 109
 		{
110 110
 			if($defines['focus']->object_name=='Contact') {
111 111
 				$additionalFormFields['parent_type'] = 'Accounts';
112
-			}
113
-			else {
112
+			} else {
114 113
 				$additionalFormFields['parent_type'] = $defines['focus']->module_dir;
115 114
 			}
116 115
 		}
@@ -119,8 +118,7 @@  discard block
 block discarded – undo
119 118
 			if($defines['focus']->object_name=='Contact') {
120 119
 				$additionalFormFields['parent_name'] = $defines['focus']->account_name;
121 120
 				$additionalFormFields['account_name'] = $defines['focus']->account_name;
122
-			}
123
-			else {
121
+			} else {
124 122
 				$additionalFormFields['parent_name'] = $defines['focus']->name;
125 123
 			}
126 124
 		}
@@ -129,8 +127,7 @@  discard block
 block discarded – undo
129 127
 			if($defines['focus']->object_name=='Contact') {
130 128
 				$additionalFormFields['parent_id'] = $defines['focus']->account_id;
131 129
 				$additionalFormFields['account_id'] = $defines['focus']->account_id;
132
-			}
133
-			else {
130
+			} else {
134 131
 				$additionalFormFields['parent_id'] = $defines['focus']->id;
135 132
 			}
136 133
 		}
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldcurrency_id.php 1 patch
Braces   +6 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.
@@ -58,8 +60,7 @@  discard block
 block discarded – undo
58 60
             if (is_array($list))
59 61
             {
60 62
                 $list = array_merge(array($currency), $list);
61
-            }
62
-            else
63
+            } else
63 64
             {
64 65
                 $list = array($currency);
65 66
             }
@@ -105,8 +106,7 @@  discard block
 block discarded – undo
105 106
         if (!empty ($field_def['sort_on']))
106 107
         {
107 108
             $order_by = $layout_def['table_alias'].".".$field_def['sort_on'];
108
-        }
109
-        else
109
+        } else
110 110
         {
111 111
             $order_by = $this->_get_column_select($layout_def);
112 112
         }
@@ -114,8 +114,7 @@  discard block
 block discarded – undo
114 114
         if (empty ($layout_def['sort_dir']) || $layout_def['sort_dir'] == 'a')
115 115
         {
116 116
             $order_dir = "ASC";
117
-        }
118
-        else
117
+        } else
119 118
         {
120 119
             $order_dir = "DESC";
121 120
         }
Please login to merge, or discard this patch.