Completed
Push — console-installer ( 3d54e5...e2b50d )
by Adam
69:10 queued 48:24
created
include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonAccount.php 3 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -43,14 +43,14 @@
 block discarded – undo
43 43
 
44 44
 
45 45
 class SugarWidgetSubPanelRemoveButtonAccount extends SugarWidgetSubPanelRemoveButton {
46
-	/**
47
-	 * 
48
-	 * @see SugarWidgetSubPanelRemoveButton::displayList()
49
-	 */
50
-	function displayList(&$layout_def) {
51
-		if (!$layout_def['EditView']) {
52
-			return false;
53
-		}
54
-		return parent::displayList($layout_def);
55
-	}
46
+    /**
47
+     * 
48
+     * @see SugarWidgetSubPanelRemoveButton::displayList()
49
+     */
50
+    function displayList(&$layout_def) {
51
+        if (!$layout_def['EditView']) {
52
+            return false;
53
+        }
54
+        return parent::displayList($layout_def);
55
+    }
56 56
 }
57 57
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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.
Please login to merge, or discard this patch.
generic/SugarWidgets/SugarWidgetSubPanelEditSecurityGroupUserButton.php 3 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /**
4 4
  * SugarWidgetSubPanelEditRoleButton
5 5
  *
@@ -59,18 +59,18 @@  discard block
 block discarded – undo
59 59
 		global $image_path;
60 60
 
61 61
 		$href = 'index.php?module=SecurityGroups'
62
-			. '&action=' . 'SecurityGroupUserRelationshipEdit'
63
-			. '&record=' . $layout_def['fields']['SECURITYGROUP_NONINHERIT_ID']
64
-			. '&return_module=' . $_REQUEST['module']
65
-			. '&return_action=' . 'DetailView'
66
-			. '&return_id=' . $_REQUEST['record'];
62
+			. '&action='.'SecurityGroupUserRelationshipEdit'
63
+			. '&record='.$layout_def['fields']['SECURITYGROUP_NONINHERIT_ID']
64
+			. '&return_module='.$_REQUEST['module']
65
+			. '&return_action='.'DetailView'
66
+			. '&return_id='.$_REQUEST['record'];
67 67
 
68
-		$edit_icon_html = SugarThemeRegistry::current()->getImage( 'edit_inline', 'align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_EDIT']);
68
+		$edit_icon_html = SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT']);
69 69
 		//based on listview since that lets you select records
70
-		if($layout_def['ListView']){
71
-			return '<a href="' . $href . '"'
72
-				. 'class="listViewTdToolsS1">' . $edit_icon_html . '&nbsp;' . $app_strings['LNK_EDIT'] .'</a>&nbsp;';
73
-		}else{
70
+		if ($layout_def['ListView']) {
71
+			return '<a href="'.$href.'"'
72
+				. 'class="listViewTdToolsS1">'.$edit_icon_html.'&nbsp;'.$app_strings['LNK_EDIT'].'</a>&nbsp;';
73
+		} else {
74 74
 			return '';
75 75
 		}
76 76
 	}
Please login to merge, or discard this patch.
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -43,37 +43,37 @@
 block discarded – undo
43 43
 
44 44
 class SugarWidgetSubPanelEditSecurityGroupUserButton extends SugarWidgetField
45 45
 {
46
-	function displayHeaderCell(&$layout_def)
47
-	{
48
-		return '&nbsp;';
49
-	}
46
+    function displayHeaderCell(&$layout_def)
47
+    {
48
+        return '&nbsp;';
49
+    }
50 50
 
51
-	function displayDetail($layout_def) {
51
+    function displayDetail($layout_def) {
52 52
 
53
-		return displayList($layout_def);
54
-	}
53
+        return displayList($layout_def);
54
+    }
55 55
 
56
-	function displayList(&$layout_def)
57
-	{
58
-		global $app_strings;
59
-		global $image_path;
56
+    function displayList(&$layout_def)
57
+    {
58
+        global $app_strings;
59
+        global $image_path;
60 60
 
61
-		$href = 'index.php?module=SecurityGroups'
62
-			. '&action=' . 'SecurityGroupUserRelationshipEdit'
63
-			. '&record=' . $layout_def['fields']['SECURITYGROUP_NONINHERIT_ID']
64
-			. '&return_module=' . $_REQUEST['module']
65
-			. '&return_action=' . 'DetailView'
66
-			. '&return_id=' . $_REQUEST['record'];
61
+        $href = 'index.php?module=SecurityGroups'
62
+            . '&action=' . 'SecurityGroupUserRelationshipEdit'
63
+            . '&record=' . $layout_def['fields']['SECURITYGROUP_NONINHERIT_ID']
64
+            . '&return_module=' . $_REQUEST['module']
65
+            . '&return_action=' . 'DetailView'
66
+            . '&return_id=' . $_REQUEST['record'];
67 67
 
68
-		$edit_icon_html = SugarThemeRegistry::current()->getImage( 'edit_inline', 'align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_EDIT']);
69
-		//based on listview since that lets you select records
70
-		if($layout_def['ListView']){
71
-			return '<a href="' . $href . '"'
72
-				. 'class="listViewTdToolsS1">' . $edit_icon_html . '&nbsp;' . $app_strings['LNK_EDIT'] .'</a>&nbsp;';
73
-		}else{
74
-			return '';
75
-		}
76
-	}
68
+        $edit_icon_html = SugarThemeRegistry::current()->getImage( 'edit_inline', 'align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_EDIT']);
69
+        //based on listview since that lets you select records
70
+        if($layout_def['ListView']){
71
+            return '<a href="' . $href . '"'
72
+                . 'class="listViewTdToolsS1">' . $edit_icon_html . '&nbsp;' . $app_strings['LNK_EDIT'] .'</a>&nbsp;';
73
+        }else{
74
+            return '';
75
+        }
76
+    }
77 77
 
78 78
 }
79 79
 
Please login to merge, or discard this 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.
@@ -111,7 +113,7 @@  discard block
 block discarded – undo
111 113
 		if($layout_def['ListView']) {
112 114
             return "<a href=\"javascript:sub_p_rem('$subpanel', '$linked_field'" .", '$record', $refresh_page);\""
113 115
 			        . ' class="listViewTdToolsS1"' . " onclick=\"return sp_rem_conf();\"" . ">$icon_remove_text</a>";
114
-		}else{
116
+		} else{
115 117
 			return '';
116 118
 		}
117 119
 	}
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelActivitiesStatusField.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -46,27 +46,27 @@
 block discarded – undo
46 46
 
47 47
 class SugarWidgetSubPanelActivitiesStatusField extends SugarWidgetField
48 48
 {
49
-	function displayList($layout_def)
50
-	{
51
-		global $current_language;
52
-		$app_list_strings = return_app_list_strings_language($current_language);
49
+    function displayList($layout_def)
50
+    {
51
+        global $current_language;
52
+        $app_list_strings = return_app_list_strings_language($current_language);
53 53
 		
54
-		$module = empty($layout_def['module']) ? '' : $layout_def['module'];
54
+        $module = empty($layout_def['module']) ? '' : $layout_def['module'];
55 55
 		
56
-		if(isset($layout_def['varname']))
57
-		{
58
-			$key = strtoupper($layout_def['varname']);
59
-		}
60
-		else
61
-		{
62
-			$key = $this->_get_column_alias($layout_def);
63
-			$key = strtoupper($key);
64
-		}
56
+        if(isset($layout_def['varname']))
57
+        {
58
+            $key = strtoupper($layout_def['varname']);
59
+        }
60
+        else
61
+        {
62
+            $key = $this->_get_column_alias($layout_def);
63
+            $key = strtoupper($key);
64
+        }
65 65
 
66
-		$value = $layout_def['fields'][$key];
67
-		// cn: bug 5813, removing double-derivation of lang-pack value
68
-		return $value;
69
-	}
66
+        $value = $layout_def['fields'][$key];
67
+        // cn: bug 5813, removing double-derivation of lang-pack value
68
+        return $value;
69
+    }
70 70
 }
71 71
 
72 72
 ?>
73 73
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 		
54 54
 		$module = empty($layout_def['module']) ? '' : $layout_def['module'];
55 55
 		
56
-		if(isset($layout_def['varname']))
56
+		if (isset($layout_def['varname']))
57 57
 		{
58 58
 			$key = strtoupper($layout_def['varname']);
59 59
 		}
Please login to merge, or discard this 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 3 patches
Indentation   +116 added lines, -116 removed lines patch added patch discarded remove patch
@@ -45,121 +45,121 @@
 block discarded – undo
45 45
 
46 46
 class SugarWidgetSubPanelTopScheduleMeetingButton extends SugarWidgetSubPanelTopButtonQuickCreate
47 47
 {
48
-	function &_get_form($defines, $additionalFormFields = null, $asUrl = false)
49
-	{
50
-		global $app_strings;
51
-		global $currentModule;
52
-
53
-		$this->module="Meetings";
54
-		$this->subpanelDiv = "activities";
55
-
56
-		// Create the additional form fields with real values if they were not passed in
57
-		if(empty($additionalFormFields) && $this->additional_form_fields)
58
-		{
59
-			foreach($this->additional_form_fields as $key=>$value)
60
-			{
61
-				if(!empty($defines['focus']->$value))
62
-				{
63
-					$additionalFormFields[$key] = $defines['focus']->$value;
64
-				}
65
-				else
66
-				{
67
-					$additionalFormFields[$key] = '';
68
-				}
69
-			}
70
-		}
71
-
72
-		if(!empty($this->module))
73
-		{
74
-			$defines['child_module_name'] = $this->module;
75
-		}
76
-		else
77
-		{
78
-			$defines['child_module_name'] = $defines['module'];
79
-		}
80
-
81
-		if(!empty($this->subpanelDiv))
82
-		{
83
-			$defines['subpanelDiv'] = $this->subpanelDiv;
84
-		}
85
-
86
-		$defines['parent_bean_name'] = get_class( $defines['focus']);
87
-
88
-		$form = 'form' . $defines['child_module_name'];
89
-		$button = '<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_' . strtolower($defines['subpanelDiv']) . '\', \'' . addslashes($app_strings['LBL_LOADING']) . '\');" action="index.php" method="post" name="form" id="form' . $form . "\">\n";
90
-
91
-		//module_button is used to override the value of module name
92
-		$button .= "<input type='hidden' name='target_module' value='".$defines['child_module_name']."'>\n";
93
-		$button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_id' value='".$defines['focus']->id."'>\n";
94
-
95
-		if(isset($defines['focus']->name))
96
-		{
97
-			$button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_name' value='".$defines['focus']->name."'>";
98
-		}
99
-
100
-		$button .= '<input type="hidden" name="to_pdf" value="true" />';
48
+    function &_get_form($defines, $additionalFormFields = null, $asUrl = false)
49
+    {
50
+        global $app_strings;
51
+        global $currentModule;
52
+
53
+        $this->module="Meetings";
54
+        $this->subpanelDiv = "activities";
55
+
56
+        // Create the additional form fields with real values if they were not passed in
57
+        if(empty($additionalFormFields) && $this->additional_form_fields)
58
+        {
59
+            foreach($this->additional_form_fields as $key=>$value)
60
+            {
61
+                if(!empty($defines['focus']->$value))
62
+                {
63
+                    $additionalFormFields[$key] = $defines['focus']->$value;
64
+                }
65
+                else
66
+                {
67
+                    $additionalFormFields[$key] = '';
68
+                }
69
+            }
70
+        }
71
+
72
+        if(!empty($this->module))
73
+        {
74
+            $defines['child_module_name'] = $this->module;
75
+        }
76
+        else
77
+        {
78
+            $defines['child_module_name'] = $defines['module'];
79
+        }
80
+
81
+        if(!empty($this->subpanelDiv))
82
+        {
83
+            $defines['subpanelDiv'] = $this->subpanelDiv;
84
+        }
85
+
86
+        $defines['parent_bean_name'] = get_class( $defines['focus']);
87
+
88
+        $form = 'form' . $defines['child_module_name'];
89
+        $button = '<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_' . strtolower($defines['subpanelDiv']) . '\', \'' . addslashes($app_strings['LBL_LOADING']) . '\');" action="index.php" method="post" name="form" id="form' . $form . "\">\n";
90
+
91
+        //module_button is used to override the value of module name
92
+        $button .= "<input type='hidden' name='target_module' value='".$defines['child_module_name']."'>\n";
93
+        $button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_id' value='".$defines['focus']->id."'>\n";
94
+
95
+        if(isset($defines['focus']->name))
96
+        {
97
+            $button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_name' value='".$defines['focus']->name."'>";
98
+        }
99
+
100
+        $button .= '<input type="hidden" name="to_pdf" value="true" />';
101 101
         $button .= '<input type="hidden" name="tpl" value="QuickCreate.tpl" />';
102
-		$button .= '<input type="hidden" name="return_module" value="' . $currentModule . "\" />\n";
103
-		$button .= '<input type="hidden" name="return_action" value="' . $defines['action'] . "\" />\n";
104
-		$button .= '<input type="hidden" name="return_id" value="' . $defines['focus']->id . "\" />\n";
105
-		$button .= '<input type="hidden" name="record" value="" />';
106
-
107
-		// TODO: move this out and get $additionalFormFields working properly
108
-		if(empty($additionalFormFields['parent_type']))
109
-		{
110
-			if($defines['focus']->object_name=='Contact') {
111
-				$additionalFormFields['parent_type'] = 'Accounts';
112
-			}
113
-			else {
114
-				$additionalFormFields['parent_type'] = $defines['focus']->module_dir;
115
-			}
116
-		}
117
-		if(empty($additionalFormFields['parent_name']))
118
-		{
119
-			if($defines['focus']->object_name=='Contact') {
120
-				$additionalFormFields['parent_name'] = $defines['focus']->account_name;
121
-				$additionalFormFields['account_name'] = $defines['focus']->account_name;
122
-			}
123
-			else {
124
-				$additionalFormFields['parent_name'] = $defines['focus']->name;
125
-			}
126
-		}
127
-		if(empty($additionalFormFields['parent_id']))
128
-		{
129
-			if($defines['focus']->object_name=='Contact') {
130
-				$additionalFormFields['parent_id'] = $defines['focus']->account_id;
131
-				$additionalFormFields['account_id'] = $defines['focus']->account_id;
132
-			}
133
-			else {
134
-				$additionalFormFields['parent_id'] = $defines['focus']->id;
135
-			}
136
-		}
137
-
138
-		$button .= '<input type="hidden" name="action" value="SubpanelCreates" />' . "\n";
139
-		$button .= '<input type="hidden" name="module" value="Home" />' . "\n";
140
-		$button .= '<input type="hidden" name="target_action" value="QuickCreate" />' . "\n";
141
-
142
-		// fill in additional form fields for all but action
143
-		foreach($additionalFormFields as $key => $value)
144
-		{
145
-			if($key != 'action')
146
-			{
147
-				$button .= '<input type="hidden" name="' . $key . '" value="' . $value . '" />' . "\n";
148
-			}
149
-		}
150
-		$button .= getVersionedScript('include/SugarFields/Fields/Datetimecombo/Datetimecombo.js')."\n";
151
-		$button .= getVersionedScript('cache/include/javascript/sugar_grp_jsolait.js')."\n";
152
-
153
-		return $button;
154
-	}
155
-
156
-	function display($defines, $additionalFormFields = null, $nonbutton = false)
157
-	{
158
-	    $focus = new Meeting;
159
-		if ( !$focus->ACLAccess('EditView') ) {
160
-		    return '';
161
-	    }
162
-
163
-		return parent::display($defines, $additionalFormFields);
164
-	}
102
+        $button .= '<input type="hidden" name="return_module" value="' . $currentModule . "\" />\n";
103
+        $button .= '<input type="hidden" name="return_action" value="' . $defines['action'] . "\" />\n";
104
+        $button .= '<input type="hidden" name="return_id" value="' . $defines['focus']->id . "\" />\n";
105
+        $button .= '<input type="hidden" name="record" value="" />';
106
+
107
+        // TODO: move this out and get $additionalFormFields working properly
108
+        if(empty($additionalFormFields['parent_type']))
109
+        {
110
+            if($defines['focus']->object_name=='Contact') {
111
+                $additionalFormFields['parent_type'] = 'Accounts';
112
+            }
113
+            else {
114
+                $additionalFormFields['parent_type'] = $defines['focus']->module_dir;
115
+            }
116
+        }
117
+        if(empty($additionalFormFields['parent_name']))
118
+        {
119
+            if($defines['focus']->object_name=='Contact') {
120
+                $additionalFormFields['parent_name'] = $defines['focus']->account_name;
121
+                $additionalFormFields['account_name'] = $defines['focus']->account_name;
122
+            }
123
+            else {
124
+                $additionalFormFields['parent_name'] = $defines['focus']->name;
125
+            }
126
+        }
127
+        if(empty($additionalFormFields['parent_id']))
128
+        {
129
+            if($defines['focus']->object_name=='Contact') {
130
+                $additionalFormFields['parent_id'] = $defines['focus']->account_id;
131
+                $additionalFormFields['account_id'] = $defines['focus']->account_id;
132
+            }
133
+            else {
134
+                $additionalFormFields['parent_id'] = $defines['focus']->id;
135
+            }
136
+        }
137
+
138
+        $button .= '<input type="hidden" name="action" value="SubpanelCreates" />' . "\n";
139
+        $button .= '<input type="hidden" name="module" value="Home" />' . "\n";
140
+        $button .= '<input type="hidden" name="target_action" value="QuickCreate" />' . "\n";
141
+
142
+        // fill in additional form fields for all but action
143
+        foreach($additionalFormFields as $key => $value)
144
+        {
145
+            if($key != 'action')
146
+            {
147
+                $button .= '<input type="hidden" name="' . $key . '" value="' . $value . '" />' . "\n";
148
+            }
149
+        }
150
+        $button .= getVersionedScript('include/SugarFields/Fields/Datetimecombo/Datetimecombo.js')."\n";
151
+        $button .= getVersionedScript('cache/include/javascript/sugar_grp_jsolait.js')."\n";
152
+
153
+        return $button;
154
+    }
155
+
156
+    function display($defines, $additionalFormFields = null, $nonbutton = false)
157
+    {
158
+        $focus = new Meeting;
159
+        if ( !$focus->ACLAccess('EditView') ) {
160
+            return '';
161
+        }
162
+
163
+        return parent::display($defines, $additionalFormFields);
164
+    }
165 165
 }?>
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -50,15 +50,15 @@  discard block
 block discarded – undo
50 50
 		global $app_strings;
51 51
 		global $currentModule;
52 52
 
53
-		$this->module="Meetings";
53
+		$this->module = "Meetings";
54 54
 		$this->subpanelDiv = "activities";
55 55
 
56 56
 		// Create the additional form fields with real values if they were not passed in
57
-		if(empty($additionalFormFields) && $this->additional_form_fields)
57
+		if (empty($additionalFormFields) && $this->additional_form_fields)
58 58
 		{
59
-			foreach($this->additional_form_fields as $key=>$value)
59
+			foreach ($this->additional_form_fields as $key=>$value)
60 60
 			{
61
-				if(!empty($defines['focus']->$value))
61
+				if (!empty($defines['focus']->$value))
62 62
 				{
63 63
 					$additionalFormFields[$key] = $defines['focus']->$value;
64 64
 				}
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			}
70 70
 		}
71 71
 
72
-		if(!empty($this->module))
72
+		if (!empty($this->module))
73 73
 		{
74 74
 			$defines['child_module_name'] = $this->module;
75 75
 		}
@@ -78,45 +78,45 @@  discard block
 block discarded – undo
78 78
 			$defines['child_module_name'] = $defines['module'];
79 79
 		}
80 80
 
81
-		if(!empty($this->subpanelDiv))
81
+		if (!empty($this->subpanelDiv))
82 82
 		{
83 83
 			$defines['subpanelDiv'] = $this->subpanelDiv;
84 84
 		}
85 85
 
86
-		$defines['parent_bean_name'] = get_class( $defines['focus']);
86
+		$defines['parent_bean_name'] = get_class($defines['focus']);
87 87
 
88
-		$form = 'form' . $defines['child_module_name'];
89
-		$button = '<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_' . strtolower($defines['subpanelDiv']) . '\', \'' . addslashes($app_strings['LBL_LOADING']) . '\');" action="index.php" method="post" name="form" id="form' . $form . "\">\n";
88
+		$form = 'form'.$defines['child_module_name'];
89
+		$button = '<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_'.strtolower($defines['subpanelDiv']).'\', \''.addslashes($app_strings['LBL_LOADING']).'\');" action="index.php" method="post" name="form" id="form'.$form."\">\n";
90 90
 
91 91
 		//module_button is used to override the value of module name
92 92
 		$button .= "<input type='hidden' name='target_module' value='".$defines['child_module_name']."'>\n";
93 93
 		$button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_id' value='".$defines['focus']->id."'>\n";
94 94
 
95
-		if(isset($defines['focus']->name))
95
+		if (isset($defines['focus']->name))
96 96
 		{
97 97
 			$button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_name' value='".$defines['focus']->name."'>";
98 98
 		}
99 99
 
100 100
 		$button .= '<input type="hidden" name="to_pdf" value="true" />';
101 101
         $button .= '<input type="hidden" name="tpl" value="QuickCreate.tpl" />';
102
-		$button .= '<input type="hidden" name="return_module" value="' . $currentModule . "\" />\n";
103
-		$button .= '<input type="hidden" name="return_action" value="' . $defines['action'] . "\" />\n";
104
-		$button .= '<input type="hidden" name="return_id" value="' . $defines['focus']->id . "\" />\n";
102
+		$button .= '<input type="hidden" name="return_module" value="'.$currentModule."\" />\n";
103
+		$button .= '<input type="hidden" name="return_action" value="'.$defines['action']."\" />\n";
104
+		$button .= '<input type="hidden" name="return_id" value="'.$defines['focus']->id."\" />\n";
105 105
 		$button .= '<input type="hidden" name="record" value="" />';
106 106
 
107 107
 		// TODO: move this out and get $additionalFormFields working properly
108
-		if(empty($additionalFormFields['parent_type']))
108
+		if (empty($additionalFormFields['parent_type']))
109 109
 		{
110
-			if($defines['focus']->object_name=='Contact') {
110
+			if ($defines['focus']->object_name == 'Contact') {
111 111
 				$additionalFormFields['parent_type'] = 'Accounts';
112 112
 			}
113 113
 			else {
114 114
 				$additionalFormFields['parent_type'] = $defines['focus']->module_dir;
115 115
 			}
116 116
 		}
117
-		if(empty($additionalFormFields['parent_name']))
117
+		if (empty($additionalFormFields['parent_name']))
118 118
 		{
119
-			if($defines['focus']->object_name=='Contact') {
119
+			if ($defines['focus']->object_name == 'Contact') {
120 120
 				$additionalFormFields['parent_name'] = $defines['focus']->account_name;
121 121
 				$additionalFormFields['account_name'] = $defines['focus']->account_name;
122 122
 			}
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
 				$additionalFormFields['parent_name'] = $defines['focus']->name;
125 125
 			}
126 126
 		}
127
-		if(empty($additionalFormFields['parent_id']))
127
+		if (empty($additionalFormFields['parent_id']))
128 128
 		{
129
-			if($defines['focus']->object_name=='Contact') {
129
+			if ($defines['focus']->object_name == 'Contact') {
130 130
 				$additionalFormFields['parent_id'] = $defines['focus']->account_id;
131 131
 				$additionalFormFields['account_id'] = $defines['focus']->account_id;
132 132
 			}
@@ -135,16 +135,16 @@  discard block
 block discarded – undo
135 135
 			}
136 136
 		}
137 137
 
138
-		$button .= '<input type="hidden" name="action" value="SubpanelCreates" />' . "\n";
139
-		$button .= '<input type="hidden" name="module" value="Home" />' . "\n";
140
-		$button .= '<input type="hidden" name="target_action" value="QuickCreate" />' . "\n";
138
+		$button .= '<input type="hidden" name="action" value="SubpanelCreates" />'."\n";
139
+		$button .= '<input type="hidden" name="module" value="Home" />'."\n";
140
+		$button .= '<input type="hidden" name="target_action" value="QuickCreate" />'."\n";
141 141
 
142 142
 		// fill in additional form fields for all but action
143
-		foreach($additionalFormFields as $key => $value)
143
+		foreach ($additionalFormFields as $key => $value)
144 144
 		{
145
-			if($key != 'action')
145
+			if ($key != 'action')
146 146
 			{
147
-				$button .= '<input type="hidden" name="' . $key . '" value="' . $value . '" />' . "\n";
147
+				$button .= '<input type="hidden" name="'.$key.'" value="'.$value.'" />'."\n";
148 148
 			}
149 149
 		}
150 150
 		$button .= getVersionedScript('include/SugarFields/Fields/Datetimecombo/Datetimecombo.js')."\n";
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	function display($defines, $additionalFormFields = null, $nonbutton = false)
157 157
 	{
158 158
 	    $focus = new Meeting;
159
-		if ( !$focus->ACLAccess('EditView') ) {
159
+		if (!$focus->ACLAccess('EditView')) {
160 160
 		    return '';
161 161
 	    }
162 162
 
Please login to merge, or discard this 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/SugarWidgetSubPanelCloseButton.php 3 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -45,34 +45,34 @@
 block discarded – undo
45 45
 //TODO Rename this to close button field
46 46
 class SugarWidgetSubPanelCloseButton extends SugarWidgetField
47 47
 {
48
-	function displayList($layout_def)
49
-	{
50
-		global $app_strings;
48
+    function displayList($layout_def)
49
+    {
50
+        global $app_strings;
51 51
         global $subpanel_item_count;
52
-		$return_module = $_REQUEST['module'];
53
-		$return_id = $_REQUEST['record'];
54
-		$module_name = $layout_def['module'];
55
-		$record_id = $layout_def['fields']['ID'];
52
+        $return_module = $_REQUEST['module'];
53
+        $return_id = $_REQUEST['record'];
54
+        $module_name = $layout_def['module'];
55
+        $record_id = $layout_def['fields']['ID'];
56 56
         $unique_id = $layout_def['subpanel_id']."_close_".$subpanel_item_count; //bug 51512
57 57
 
58
-		// calls and meetings are held.
59
-		$new_status = 'Held';
58
+        // calls and meetings are held.
59
+        $new_status = 'Held';
60 60
 		
61
-		switch($module_name)
62
-		{
63
-			case 'Tasks':
64
-				$new_status = 'Completed';
65
-				break;
66
-		}
61
+        switch($module_name)
62
+        {
63
+            case 'Tasks':
64
+                $new_status = 'Completed';
65
+                break;
66
+        }
67 67
         
68
-		if ($layout_def['EditView']) {
69
-		    $html = "<a id=\"$unique_id\" onclick='SUGAR.util.closeActivityPanel.show(\"$module_name\",\"$record_id\",\"$new_status\",\"subpanel\",\"{$layout_def['subpanel_id']}\");' >".$app_strings['LNK_CLOSE']."</a>";
70
-		    return $html;
71
-		} else {
72
-		    return '';
73
-		}
68
+        if ($layout_def['EditView']) {
69
+            $html = "<a id=\"$unique_id\" onclick='SUGAR.util.closeActivityPanel.show(\"$module_name\",\"$record_id\",\"$new_status\",\"subpanel\",\"{$layout_def['subpanel_id']}\");' >".$app_strings['LNK_CLOSE']."</a>";
70
+            return $html;
71
+        } else {
72
+            return '';
73
+        }
74 74
 
75
-	}
75
+    }
76 76
 }
77 77
 
78 78
 ?>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 		// calls and meetings are held.
59 59
 		$new_status = 'Held';
60 60
 		
61
-		switch($module_name)
61
+		switch ($module_name)
62 62
 		{
63 63
 			case 'Tasks':
64 64
 				$new_status = 'Completed';
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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.
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelDeleteButton.php 3 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -44,40 +44,40 @@
 block discarded – undo
44 44
 
45 45
 class SugarWidgetSubPanelDeleteButton extends SugarWidgetField
46 46
 {
47
-	function displayList($layout_def)
48
-	{
49
-		global $app_strings;
47
+    function displayList($layout_def)
48
+    {
49
+        global $app_strings;
50 50
         global $subpanel_item_count;
51
-		$return_module = $_REQUEST['module'];
52
-		$return_id = $_REQUEST['record'];
53
-		$module_name = $layout_def['module'];
54
-		$record_id = $layout_def['fields']['ID'];
51
+        $return_module = $_REQUEST['module'];
52
+        $return_id = $_REQUEST['record'];
53
+        $module_name = $layout_def['module'];
54
+        $record_id = $layout_def['fields']['ID'];
55 55
         $unique_id = $layout_def['subpanel_id']."_delete_".$subpanel_item_count; //bug 51512
56 56
 
57
-		// calls and meetings are held.
58
-		$new_status = 'Held';
57
+        // calls and meetings are held.
58
+        $new_status = 'Held';
59 59
 
60
-		switch($module_name)
61
-		{
62
-			case 'Tasks':
63
-				$new_status = 'Completed';
64
-				break;
65
-		}
66
-		$subpanel = $layout_def['subpanel_id'];
67
-		if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
68
-			$linked_field= $layout_def['linked_field_set'] ;
69
-		} else {
70
-			$linked_field = $layout_def['linked_field'];
71
-		}
72
-		$refresh_page = 0;
73
-		if(!empty($layout_def['refresh_page'])){
74
-			$refresh_page = 1;
75
-		}
60
+        switch($module_name)
61
+        {
62
+            case 'Tasks':
63
+                $new_status = 'Completed';
64
+                break;
65
+        }
66
+        $subpanel = $layout_def['subpanel_id'];
67
+        if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
68
+            $linked_field= $layout_def['linked_field_set'] ;
69
+        } else {
70
+            $linked_field = $layout_def['linked_field'];
71
+        }
72
+        $refresh_page = 0;
73
+        if(!empty($layout_def['refresh_page'])){
74
+            $refresh_page = 1;
75
+        }
76 76
 
77
-		$html = "<a id=\"$unique_id\" onclick='return sp_del_conf();' href=\"javascript:sub_p_del('$subpanel', '$module_name', '$record_id', $refresh_page);\">".$app_strings['LNK_DELETE']."</a>";
78
-		return $html;
77
+        $html = "<a id=\"$unique_id\" onclick='return sp_del_conf();' href=\"javascript:sub_p_del('$subpanel', '$module_name', '$record_id', $refresh_page);\">".$app_strings['LNK_DELETE']."</a>";
78
+        return $html;
79 79
 
80
-	}
80
+    }
81 81
 }
82 82
 
83 83
 ?>
84 84
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		// calls and meetings are held.
58 58
 		$new_status = 'Held';
59 59
 
60
-		switch($module_name)
60
+		switch ($module_name)
61 61
 		{
62 62
 			case 'Tasks':
63 63
 				$new_status = 'Completed';
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
 		}
66 66
 		$subpanel = $layout_def['subpanel_id'];
67 67
 		if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
68
-			$linked_field= $layout_def['linked_field_set'] ;
68
+			$linked_field = $layout_def['linked_field_set'];
69 69
 		} else {
70 70
 			$linked_field = $layout_def['linked_field'];
71 71
 		}
72 72
 		$refresh_page = 0;
73
-		if(!empty($layout_def['refresh_page'])){
73
+		if (!empty($layout_def['refresh_page'])) {
74 74
 			$refresh_page = 1;
75 75
 		}
76 76
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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.
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldname.php 3 patches
Indentation   +163 added lines, -163 removed lines patch added patch discarded remove patch
@@ -52,33 +52,33 @@  discard block
 block discarded – undo
52 52
         $this->reporter = $this->layout_manager->getAttribute('reporter');
53 53
     }
54 54
 
55
-	function displayList(&$layout_def)
56
-	{
57
-		if(empty($layout_def['column_key']))
58
-		{
59
-			return $this->displayListPlain($layout_def);
60
-		}
61
-
62
-		$module = $this->reporter->all_fields[$layout_def['column_key']]['module'];
63
-		$name = $layout_def['name'];
64
-		$layout_def['name'] = 'id';
65
-		$key = $this->_get_column_alias($layout_def);
66
-		$key = strtoupper($key);
67
-
68
-		if(empty($layout_def['fields'][$key]))
69
-		{
70
-		  $layout_def['name'] = $name;
71
-			return $this->displayListPlain($layout_def);
72
-		}
73
-
74
-		$record = $layout_def['fields'][$key];
75
-		$layout_def['name'] = $name;
76
-		global $current_user;
77
-		if ($module == 'Users' && !is_admin($current_user))
78
-        	$module = 'Employees';
79
-		$str = "<a target='_blank' href=\"index.php?action=DetailView&module=$module&record=$record\">";
80
-		$str .= $this->displayListPlain($layout_def);
81
-		$str .= "</a>";
55
+    function displayList(&$layout_def)
56
+    {
57
+        if(empty($layout_def['column_key']))
58
+        {
59
+            return $this->displayListPlain($layout_def);
60
+        }
61
+
62
+        $module = $this->reporter->all_fields[$layout_def['column_key']]['module'];
63
+        $name = $layout_def['name'];
64
+        $layout_def['name'] = 'id';
65
+        $key = $this->_get_column_alias($layout_def);
66
+        $key = strtoupper($key);
67
+
68
+        if(empty($layout_def['fields'][$key]))
69
+        {
70
+            $layout_def['name'] = $name;
71
+            return $this->displayListPlain($layout_def);
72
+        }
73
+
74
+        $record = $layout_def['fields'][$key];
75
+        $layout_def['name'] = $name;
76
+        global $current_user;
77
+        if ($module == 'Users' && !is_admin($current_user))
78
+            $module = 'Employees';
79
+        $str = "<a target='_blank' href=\"index.php?action=DetailView&module=$module&record=$record\">";
80
+        $str .= $this->displayListPlain($layout_def);
81
+        $str .= "</a>";
82 82
 
83 83
 
84 84
         global $sugar_config;
@@ -94,37 +94,37 @@  discard block
 block discarded – undo
94 94
                 $str .= "&nbsp;" .SugarThemeRegistry::current()->getImage("edit_inline","border='0' alt='Edit Layout' align='bottom' onClick='SUGAR.reportsInlineEdit.inlineEdit(\"$div_id\",\"$value\",\"$module\",\"$record\",\"$field_name\",\"$field_type\");'");
95 95
             $str .= "</div>";
96 96
         }
97
-		return $str;
98
-	}
97
+        return $str;
98
+    }
99 99
 
100
-	function _get_normal_column_select($layout_def)
101
-	{
100
+    function _get_normal_column_select($layout_def)
101
+    {
102 102
         if ( isset($this->reporter->all_fields) ) {
103 103
             $field_def = $this->reporter->all_fields[$layout_def['column_key']];
104 104
         } else {
105 105
             $field_def = array();
106 106
         }
107 107
 
108
-		if (empty($field_def['fields']) || empty($field_def['fields'][0]) || empty($field_def['fields'][1]))
109
-		{
110
-			return parent::_get_column_select($layout_def);
111
-		}
108
+        if (empty($field_def['fields']) || empty($field_def['fields'][0]) || empty($field_def['fields'][1]))
109
+        {
110
+            return parent::_get_column_select($layout_def);
111
+        }
112 112
 
113
-		//	 'fields' are the two fields to concatenate to create the name.
114
-		if ( ! empty($layout_def['table_alias'])) {
115
-		    $alias = $this->reporter->db->concat($layout_def['table_alias'], $field_def['fields']);
116
-		} elseif (! empty($layout_def['name'])) {
117
-			$alias = $layout_def['name'];
118
-		} else {
119
-			$alias = "*";
120
-		}
113
+        //	 'fields' are the two fields to concatenate to create the name.
114
+        if ( ! empty($layout_def['table_alias'])) {
115
+            $alias = $this->reporter->db->concat($layout_def['table_alias'], $field_def['fields']);
116
+        } elseif (! empty($layout_def['name'])) {
117
+            $alias = $layout_def['name'];
118
+        } else {
119
+            $alias = "*";
120
+        }
121 121
 
122
-		return $alias;
123
-	}
122
+        return $alias;
123
+    }
124 124
 
125
-	function _get_column_select($layout_def)
126
-	{
127
-		global $locale, $current_user;
125
+    function _get_column_select($layout_def)
126
+    {
127
+        global $locale, $current_user;
128 128
 
129 129
         if ( isset($this->reporter->all_fields) ) {
130 130
             $field_def = $this->reporter->all_fields[$layout_def['column_key']];
@@ -135,141 +135,141 @@  discard block
 block discarded – undo
135 135
         //	 'fields' are the two fields to concatenate to create the name
136 136
         if(!isset($field_def['fields']))
137 137
         {
138
-			return $this->_get_normal_column_select($layout_def);
138
+            return $this->_get_normal_column_select($layout_def);
139
+        }
140
+        $localeNameFormat = $locale->getLocaleFormatMacro($current_user);
141
+        $localeNameFormat = trim(preg_replace('/s/i', '', $localeNameFormat));
142
+
143
+        if (empty($field_def['fields']) || empty($field_def['fields'][0]) || empty($field_def['fields'][1])) {
144
+            return parent::_get_column_select($layout_def);
145
+        }
146
+
147
+        if ( ! empty($layout_def['table_alias'])) {
148
+            $comps = preg_split("/([fl])/", $localeNameFormat, null, PREG_SPLIT_DELIM_CAPTURE);
149
+            $name = array();
150
+            foreach($comps as $val) {
151
+                if($val == 'f') {
152
+                    $name[] = $this->reporter->db->convert($layout_def['table_alias'].".".$field_def['fields'][0], 'IFNULL', array("''"));
153
+                } elseif($val == 'l') {
154
+                    $name[] = $this->reporter->db->convert($layout_def['table_alias'].".".$field_def['fields'][1], 'IFNULL', array("''"));
155
+                } else {
156
+                    if(!empty($val)) {
157
+                        $name[] = $this->reporter->db->quoted($val);
158
+                    }
159
+                }
160
+            }
161
+            $alias = $this->reporter->db->convert($name, "CONCAT");
162
+        } elseif (! empty($layout_def['name']))	{
163
+            $alias = $layout_def['name'];
164
+        } else {
165
+            $alias = "*";
166
+        }
167
+
168
+        return $alias;
169
+    }
170
+
171
+    function queryFilterIs($layout_def)
172
+    {
173
+
174
+        $layout_def['name'] = 'id';
175
+        $layout_def['type'] = 'id';
176
+        $input_name0 = $layout_def['input_name0'];
177
+
178
+        if ( is_array($layout_def['input_name0']))
179
+        {
180
+            $input_name0 = $layout_def['input_name0'][0];
181
+        }
182
+        if ($input_name0 == 'Current User') {
183
+            global $current_user;
184
+            $input_name0 = $current_user->id;
185
+        }
186
+
187
+        return SugarWidgetFieldid::_get_column_select($layout_def)."="
188
+            .$this->reporter->db->quoted($input_name0)."\n";
189
+    }
190
+
191
+    function queryFilteris_not($layout_def)
192
+    {
193
+
194
+        $layout_def['name'] = 'id';
195
+        $layout_def['type'] = 'id';
196
+        $input_name0 = $layout_def['input_name0'];
197
+
198
+        if ( is_array($layout_def['input_name0']))
199
+        {
200
+            $input_name0 = $layout_def['input_name0'][0];
201
+        }
202
+        if ($input_name0 == 'Current User') {
203
+            global $current_user;
204
+            $input_name0 = $current_user->id;
139 205
         }
140
-		$localeNameFormat = $locale->getLocaleFormatMacro($current_user);
141
-		$localeNameFormat = trim(preg_replace('/s/i', '', $localeNameFormat));
142
-
143
-		if (empty($field_def['fields']) || empty($field_def['fields'][0]) || empty($field_def['fields'][1])) {
144
-			return parent::_get_column_select($layout_def);
145
-		}
146
-
147
-		if ( ! empty($layout_def['table_alias'])) {
148
-		    $comps = preg_split("/([fl])/", $localeNameFormat, null, PREG_SPLIT_DELIM_CAPTURE);
149
-		    $name = array();
150
-		    foreach($comps as $val) {
151
-		        if($val == 'f') {
152
-		            $name[] = $this->reporter->db->convert($layout_def['table_alias'].".".$field_def['fields'][0], 'IFNULL', array("''"));
153
-		        } elseif($val == 'l') {
154
-		            $name[] = $this->reporter->db->convert($layout_def['table_alias'].".".$field_def['fields'][1], 'IFNULL', array("''"));
155
-		        } else {
156
-		            if(!empty($val)) {
157
-		                $name[] = $this->reporter->db->quoted($val);
158
-		            }
159
-		        }
160
-		    }
161
-		    $alias = $this->reporter->db->convert($name, "CONCAT");
162
-		} elseif (! empty($layout_def['name']))	{
163
-			$alias = $layout_def['name'];
164
-		} else {
165
-			$alias = "*";
166
-		}
167
-
168
-		return $alias;
169
-	}
170
-
171
-	function queryFilterIs($layout_def)
172
-	{
173
-
174
-		$layout_def['name'] = 'id';
175
-		$layout_def['type'] = 'id';
176
-		$input_name0 = $layout_def['input_name0'];
177
-
178
-		if ( is_array($layout_def['input_name0']))
179
-		{
180
-			$input_name0 = $layout_def['input_name0'][0];
181
-		}
182
-		if ($input_name0 == 'Current User') {
183
-			global $current_user;
184
-			$input_name0 = $current_user->id;
185
-		}
186
-
187
-		return SugarWidgetFieldid::_get_column_select($layout_def)."="
188
-			.$this->reporter->db->quoted($input_name0)."\n";
189
-	}
190
-
191
-	function queryFilteris_not($layout_def)
192
-	{
193
-
194
-		$layout_def['name'] = 'id';
195
-		$layout_def['type'] = 'id';
196
-		$input_name0 = $layout_def['input_name0'];
197
-
198
-		if ( is_array($layout_def['input_name0']))
199
-		{
200
-			$input_name0 = $layout_def['input_name0'][0];
201
-		}
202
-		if ($input_name0 == 'Current User') {
203
-			global $current_user;
204
-			$input_name0 = $current_user->id;
205
-		}
206
-
207
-		return SugarWidgetFieldid::_get_column_select($layout_def)."<>"
208
-			.$this->reporter->db->quoted($input_name0)."\n";
209
-	}
206
+
207
+        return SugarWidgetFieldid::_get_column_select($layout_def)."<>"
208
+            .$this->reporter->db->quoted($input_name0)."\n";
209
+    }
210 210
 
211 211
     // $rename_columns, if true then you're coming from reports
212
-	function queryFilterone_of($layout_def, $rename_columns = true)
213
-	{
212
+    function queryFilterone_of($layout_def, $rename_columns = true)
213
+    {
214 214
 
215 215
         if($rename_columns) { // this was a hack to get reports working, sugarwidgets should not be renaming $name!
216
-    		$layout_def['name'] = 'id';
217
-    		$layout_def['type'] = 'id';
216
+            $layout_def['name'] = 'id';
217
+            $layout_def['type'] = 'id';
218
+        }
219
+        $arr = array();
220
+
221
+        foreach($layout_def['input_name0'] as $value)
222
+        {
223
+            if ($value == 'Current User') {
224
+                global $current_user;
225
+                array_push($arr,$this->reporter->db->quoted($current_user->id));
226
+            }
227
+            else
228
+                array_push($arr,$this->reporter->db->quoted($value));
218 229
         }
219
-		$arr = array();
220
-
221
-		foreach($layout_def['input_name0'] as $value)
222
-		{
223
-			if ($value == 'Current User') {
224
-				global $current_user;
225
-				array_push($arr,$this->reporter->db->quoted($current_user->id));
226
-			}
227
-			else
228
-				array_push($arr,$this->reporter->db->quoted($value));
229
-		}
230
-
231
-		$str = implode(",",$arr);
232
-
233
-		return SugarWidgetFieldid::_get_column_select($layout_def)." IN (".$str.")\n";
234
-	}
230
+
231
+        $str = implode(",",$arr);
232
+
233
+        return SugarWidgetFieldid::_get_column_select($layout_def)." IN (".$str.")\n";
234
+    }
235 235
     // $rename_columns, if true then you're coming from reports
236
-	function queryFilternot_one_of($layout_def, $rename_columns = true)
237
-	{
236
+    function queryFilternot_one_of($layout_def, $rename_columns = true)
237
+    {
238 238
 
239 239
         if($rename_columns) { // this was a hack to get reports working, sugarwidgets should not be renaming $name!
240
-    		$layout_def['name'] = 'id';
241
-    		$layout_def['type'] = 'id';
240
+            $layout_def['name'] = 'id';
241
+            $layout_def['type'] = 'id';
242 242
         }
243
-		$arr = array();
243
+        $arr = array();
244 244
 
245
-		foreach($layout_def['input_name0'] as $value)
246
-		{
247
-			if ($value == 'Current User') {
248
-				global $current_user;
249
-				array_push($arr,$this->reporter->db->quoted($current_user->id));
250
-			}
251
-			else
252
-				array_push($arr,$this->reporter->db->quoted($value));
253
-		}
245
+        foreach($layout_def['input_name0'] as $value)
246
+        {
247
+            if ($value == 'Current User') {
248
+                global $current_user;
249
+                array_push($arr,$this->reporter->db->quoted($current_user->id));
250
+            }
251
+            else
252
+                array_push($arr,$this->reporter->db->quoted($value));
253
+        }
254 254
 
255
-		$str = implode(",",$arr);
255
+        $str = implode(",",$arr);
256 256
 
257
-		return SugarWidgetFieldid::_get_column_select($layout_def)." NOT IN (".$str.")\n";
258
-	}
257
+        return SugarWidgetFieldid::_get_column_select($layout_def)." NOT IN (".$str.")\n";
258
+    }
259 259
 
260
-	function &queryGroupBy($layout_def)
261
-	{
260
+    function &queryGroupBy($layout_def)
261
+    {
262 262
         if($layout_def['name'] == 'full_name') {
263
-             $layout_def['name'] = 'id';
264
-             $layout_def['type'] = 'id';
263
+                $layout_def['name'] = 'id';
264
+                $layout_def['type'] = 'id';
265 265
 
266
-             $group_by =  SugarWidgetFieldid::_get_column_select($layout_def)."\n";
266
+                $group_by =  SugarWidgetFieldid::_get_column_select($layout_def)."\n";
267 267
         } else {
268 268
             // group by clause for user name passes through here.
269
-             $group_by = $this->_get_column_select($layout_def)."\n";
269
+                $group_by = $this->_get_column_select($layout_def)."\n";
270 270
         }
271 271
         return $group_by;
272
-	}
272
+    }
273 273
 }
274 274
 
275 275
 ?>
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
     /**
56 56
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
57 57
      */
58
-    function SugarWidgetFieldName(&$layout_manager){
58
+    function SugarWidgetFieldName(&$layout_manager) {
59 59
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
60
-        if(isset($GLOBALS['log'])) {
60
+        if (isset($GLOBALS['log'])) {
61 61
             $GLOBALS['log']->deprecated($deprecatedMessage);
62 62
         }
63 63
         else {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
 	function displayList(&$layout_def)
71 71
 	{
72
-		if(empty($layout_def['column_key']))
72
+		if (empty($layout_def['column_key']))
73 73
 		{
74 74
 			return $this->displayListPlain($layout_def);
75 75
 		}
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 		$key = $this->_get_column_alias($layout_def);
81 81
 		$key = strtoupper($key);
82 82
 
83
-		if(empty($layout_def['fields'][$key]))
83
+		if (empty($layout_def['fields'][$key]))
84 84
 		{
85 85
 		  $layout_def['name'] = $name;
86 86
 			return $this->displayListPlain($layout_def);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             $field_type = $field_def['type'];
107 107
             $str .= "</a>";
108 108
             if ($field_name == 'name')
109
-                $str .= "&nbsp;" .SugarThemeRegistry::current()->getImage("edit_inline","border='0' alt='Edit Layout' align='bottom' onClick='SUGAR.reportsInlineEdit.inlineEdit(\"$div_id\",\"$value\",\"$module\",\"$record\",\"$field_name\",\"$field_type\");'");
109
+                $str .= "&nbsp;".SugarThemeRegistry::current()->getImage("edit_inline", "border='0' alt='Edit Layout' align='bottom' onClick='SUGAR.reportsInlineEdit.inlineEdit(\"$div_id\",\"$value\",\"$module\",\"$record\",\"$field_name\",\"$field_type\");'");
110 110
             $str .= "</div>";
111 111
         }
112 112
 		return $str;
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
 	function _get_normal_column_select($layout_def)
116 116
 	{
117
-        if ( isset($this->reporter->all_fields) ) {
117
+        if (isset($this->reporter->all_fields)) {
118 118
             $field_def = $this->reporter->all_fields[$layout_def['column_key']];
119 119
         } else {
120 120
             $field_def = array();
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
 		}
127 127
 
128 128
 		//	 'fields' are the two fields to concatenate to create the name.
129
-		if ( ! empty($layout_def['table_alias'])) {
129
+		if (!empty($layout_def['table_alias'])) {
130 130
 		    $alias = $this->reporter->db->concat($layout_def['table_alias'], $field_def['fields']);
131
-		} elseif (! empty($layout_def['name'])) {
131
+		} elseif (!empty($layout_def['name'])) {
132 132
 			$alias = $layout_def['name'];
133 133
 		} else {
134 134
 			$alias = "*";
@@ -141,14 +141,14 @@  discard block
 block discarded – undo
141 141
 	{
142 142
 		global $locale, $current_user;
143 143
 
144
-        if ( isset($this->reporter->all_fields) ) {
144
+        if (isset($this->reporter->all_fields)) {
145 145
             $field_def = $this->reporter->all_fields[$layout_def['column_key']];
146 146
         } else {
147 147
             $field_def = array();
148 148
         }
149 149
 
150 150
         //	 'fields' are the two fields to concatenate to create the name
151
-        if(!isset($field_def['fields']))
151
+        if (!isset($field_def['fields']))
152 152
         {
153 153
 			return $this->_get_normal_column_select($layout_def);
154 154
         }
@@ -159,22 +159,22 @@  discard block
 block discarded – undo
159 159
 			return parent::_get_column_select($layout_def);
160 160
 		}
161 161
 
162
-		if ( ! empty($layout_def['table_alias'])) {
162
+		if (!empty($layout_def['table_alias'])) {
163 163
 		    $comps = preg_split("/([fl])/", $localeNameFormat, null, PREG_SPLIT_DELIM_CAPTURE);
164 164
 		    $name = array();
165
-		    foreach($comps as $val) {
166
-		        if($val == 'f') {
165
+		    foreach ($comps as $val) {
166
+		        if ($val == 'f') {
167 167
 		            $name[] = $this->reporter->db->convert($layout_def['table_alias'].".".$field_def['fields'][0], 'IFNULL', array("''"));
168
-		        } elseif($val == 'l') {
168
+		        } elseif ($val == 'l') {
169 169
 		            $name[] = $this->reporter->db->convert($layout_def['table_alias'].".".$field_def['fields'][1], 'IFNULL', array("''"));
170 170
 		        } else {
171
-		            if(!empty($val)) {
171
+		            if (!empty($val)) {
172 172
 		                $name[] = $this->reporter->db->quoted($val);
173 173
 		            }
174 174
 		        }
175 175
 		    }
176 176
 		    $alias = $this->reporter->db->convert($name, "CONCAT");
177
-		} elseif (! empty($layout_def['name']))	{
177
+		} elseif (!empty($layout_def['name'])) {
178 178
 			$alias = $layout_def['name'];
179 179
 		} else {
180 180
 			$alias = "*";
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 		$layout_def['type'] = 'id';
191 191
 		$input_name0 = $layout_def['input_name0'];
192 192
 
193
-		if ( is_array($layout_def['input_name0']))
193
+		if (is_array($layout_def['input_name0']))
194 194
 		{
195 195
 			$input_name0 = $layout_def['input_name0'][0];
196 196
 		}
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 		$layout_def['type'] = 'id';
211 211
 		$input_name0 = $layout_def['input_name0'];
212 212
 
213
-		if ( is_array($layout_def['input_name0']))
213
+		if (is_array($layout_def['input_name0']))
214 214
 		{
215 215
 			$input_name0 = $layout_def['input_name0'][0];
216 216
 		}
@@ -227,23 +227,23 @@  discard block
 block discarded – undo
227 227
 	function queryFilterone_of($layout_def, $rename_columns = true)
228 228
 	{
229 229
 
230
-        if($rename_columns) { // this was a hack to get reports working, sugarwidgets should not be renaming $name!
230
+        if ($rename_columns) { // this was a hack to get reports working, sugarwidgets should not be renaming $name!
231 231
     		$layout_def['name'] = 'id';
232 232
     		$layout_def['type'] = 'id';
233 233
         }
234 234
 		$arr = array();
235 235
 
236
-		foreach($layout_def['input_name0'] as $value)
236
+		foreach ($layout_def['input_name0'] as $value)
237 237
 		{
238 238
 			if ($value == 'Current User') {
239 239
 				global $current_user;
240
-				array_push($arr,$this->reporter->db->quoted($current_user->id));
240
+				array_push($arr, $this->reporter->db->quoted($current_user->id));
241 241
 			}
242 242
 			else
243
-				array_push($arr,$this->reporter->db->quoted($value));
243
+				array_push($arr, $this->reporter->db->quoted($value));
244 244
 		}
245 245
 
246
-		$str = implode(",",$arr);
246
+		$str = implode(",", $arr);
247 247
 
248 248
 		return SugarWidgetFieldid::_get_column_select($layout_def)." IN (".$str.")\n";
249 249
 	}
@@ -251,34 +251,34 @@  discard block
 block discarded – undo
251 251
 	function queryFilternot_one_of($layout_def, $rename_columns = true)
252 252
 	{
253 253
 
254
-        if($rename_columns) { // this was a hack to get reports working, sugarwidgets should not be renaming $name!
254
+        if ($rename_columns) { // this was a hack to get reports working, sugarwidgets should not be renaming $name!
255 255
     		$layout_def['name'] = 'id';
256 256
     		$layout_def['type'] = 'id';
257 257
         }
258 258
 		$arr = array();
259 259
 
260
-		foreach($layout_def['input_name0'] as $value)
260
+		foreach ($layout_def['input_name0'] as $value)
261 261
 		{
262 262
 			if ($value == 'Current User') {
263 263
 				global $current_user;
264
-				array_push($arr,$this->reporter->db->quoted($current_user->id));
264
+				array_push($arr, $this->reporter->db->quoted($current_user->id));
265 265
 			}
266 266
 			else
267
-				array_push($arr,$this->reporter->db->quoted($value));
267
+				array_push($arr, $this->reporter->db->quoted($value));
268 268
 		}
269 269
 
270
-		$str = implode(",",$arr);
270
+		$str = implode(",", $arr);
271 271
 
272 272
 		return SugarWidgetFieldid::_get_column_select($layout_def)." NOT IN (".$str.")\n";
273 273
 	}
274 274
 
275 275
 	function &queryGroupBy($layout_def)
276 276
 	{
277
-        if($layout_def['name'] == 'full_name') {
277
+        if ($layout_def['name'] == 'full_name') {
278 278
              $layout_def['name'] = 'id';
279 279
              $layout_def['type'] = 'id';
280 280
 
281
-             $group_by =  SugarWidgetFieldid::_get_column_select($layout_def)."\n";
281
+             $group_by = SugarWidgetFieldid::_get_column_select($layout_def)."\n";
282 282
         } else {
283 283
             // group by clause for user name passes through here.
284 284
              $group_by = $this->_get_column_select($layout_def)."\n";
Please login to merge, or discard this patch.
Braces   +14 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.
@@ -59,8 +61,7 @@  discard block
 block discarded – undo
59 61
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
60 62
         if(isset($GLOBALS['log'])) {
61 63
             $GLOBALS['log']->deprecated($deprecatedMessage);
62
-        }
63
-        else {
64
+        } else {
64 65
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
65 66
         }
66 67
         self::__construct($layout_manager);
@@ -89,8 +90,9 @@  discard block
 block discarded – undo
89 90
 		$record = $layout_def['fields'][$key];
90 91
 		$layout_def['name'] = $name;
91 92
 		global $current_user;
92
-		if ($module == 'Users' && !is_admin($current_user))
93
-        	$module = 'Employees';
93
+		if ($module == 'Users' && !is_admin($current_user)) {
94
+		        	$module = 'Employees';
95
+		}
94 96
 		$str = "<a target='_blank' href=\"index.php?action=DetailView&module=$module&record=$record\">";
95 97
 		$str .= $this->displayListPlain($layout_def);
96 98
 		$str .= "</a>";
@@ -105,8 +107,9 @@  discard block
 block discarded – undo
105 107
             $field_name = $layout_def['name'];
106 108
             $field_type = $field_def['type'];
107 109
             $str .= "</a>";
108
-            if ($field_name == 'name')
109
-                $str .= "&nbsp;" .SugarThemeRegistry::current()->getImage("edit_inline","border='0' alt='Edit Layout' align='bottom' onClick='SUGAR.reportsInlineEdit.inlineEdit(\"$div_id\",\"$value\",\"$module\",\"$record\",\"$field_name\",\"$field_type\");'");
110
+            if ($field_name == 'name') {
111
+                            $str .= "&nbsp;" .SugarThemeRegistry::current()->getImage("edit_inline","border='0' alt='Edit Layout' align='bottom' onClick='SUGAR.reportsInlineEdit.inlineEdit(\"$div_id\",\"$value\",\"$module\",\"$record\",\"$field_name\",\"$field_type\");'");
112
+            }
110 113
             $str .= "</div>";
111 114
         }
112 115
 		return $str;
@@ -238,9 +241,9 @@  discard block
 block discarded – undo
238 241
 			if ($value == 'Current User') {
239 242
 				global $current_user;
240 243
 				array_push($arr,$this->reporter->db->quoted($current_user->id));
244
+			} else {
245
+							array_push($arr,$this->reporter->db->quoted($value));
241 246
 			}
242
-			else
243
-				array_push($arr,$this->reporter->db->quoted($value));
244 247
 		}
245 248
 
246 249
 		$str = implode(",",$arr);
@@ -262,9 +265,9 @@  discard block
 block discarded – undo
262 265
 			if ($value == 'Current User') {
263 266
 				global $current_user;
264 267
 				array_push($arr,$this->reporter->db->quoted($current_user->id));
268
+			} else {
269
+							array_push($arr,$this->reporter->db->quoted($value));
265 270
 			}
266
-			else
267
-				array_push($arr,$this->reporter->db->quoted($value));
268 271
 		}
269 272
 
270 273
 		$str = implode(",",$arr);
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldurl.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
 class SugarWidgetFieldURL extends SugarWidgetFieldVarchar
43 43
 {
44
- 	/* Display item as link
44
+        /* Display item as link
45 45
      * @param array $layout_def definition of field which we want to display as link
46 46
      * @return string html code
47 47
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     function displayList($layout_def) 
49 49
     {
50 50
         $urlValue = trim($this->_get_list_value($layout_def));
51
-        return '<a target="_blank" href="' . $urlValue . '">' . $urlValue . "</a>";
51
+        return '<a target="_blank" href="'.$urlValue.'">'.$urlValue."</a>";
52 52
     }
53 53
     
54 54
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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.
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldimage.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@
 block discarded – undo
42 42
 class SugarWidgetFieldImage extends SugarWidgetFieldVarchar
43 43
 {
44 44
 
45
-	function displayListPlain($layout_def) {
46
-		$value = $this->_get_list_value($layout_def);
47
-		return "<a href=\"javascript:SUGAR.image.lightbox('index.php?entryPoint=download&id=$value&type=SugarFieldImage&isTempFile=1')\">"
48
-		       . translate("LBL_VIEW_IMAGE") . '</a>';
49
-	}
45
+    function displayListPlain($layout_def) {
46
+        $value = $this->_get_list_value($layout_def);
47
+        return "<a href=\"javascript:SUGAR.image.lightbox('index.php?entryPoint=download&id=$value&type=SugarFieldImage&isTempFile=1')\">"
48
+                . translate("LBL_VIEW_IMAGE") . '</a>';
49
+    }
50 50
 }
51 51
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -45,6 +45,6 @@  discard block
 block discarded – undo
45 45
 	function displayListPlain($layout_def) {
46 46
 		$value = $this->_get_list_value($layout_def);
47 47
 		return "<a href=\"javascript:SUGAR.image.lightbox('index.php?entryPoint=download&id=$value&type=SugarFieldImage&isTempFile=1')\">"
48
-		       . translate("LBL_VIEW_IMAGE") . '</a>';
48
+		       . translate("LBL_VIEW_IMAGE").'</a>';
49 49
 	}
50 50
 }
51 51
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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.
Please login to merge, or discard this patch.