Completed
Push — console-installer ( 186d32...cb4007 )
by Adam
91:14 queued 78:40
created
include/generic/SugarWidgets/SugarWidgetSubPanelLoadSignedButton.php 3 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -45,38 +45,38 @@
 block discarded – undo
45 45
 //this widget is used only by the document subpanel under contracts.
46 46
 class SugarWidgetSubPanelLoadSignedButton extends SugarWidgetField
47 47
 {
48
-	function displayHeaderCell($layout_def)
49
-	{
50
-		return ' ';
51
-	}
48
+    function displayHeaderCell($layout_def)
49
+    {
50
+        return ' ';
51
+    }
52 52
 
53
-	function displayList($layout_def)
54
-	{
55
-		global $app_strings;
53
+    function displayList($layout_def)
54
+    {
55
+        global $app_strings;
56 56
 		
57 57
 
58
-		$href = 'index.php?module=' . 'Documents'
59
-			. '&action=' . 'EditView'
60
-			. '&record=' . $layout_def['fields']['ID']
61
-			. '&return_module=' . $_REQUEST['module']
62
-			. '&return_action=' . 'DetailView'
63
-			. '&return_id=' . $_REQUEST['record']
64
-			. '&load_signed_id=' . $layout_def['fields']['LINKED_ID']
65
-			. '&parent_id=' . $_REQUEST['record']			
66
-			. '&parent_name=' . $layout_def['fields']['CONTRACT_NAME']			
67
-			. '&parent_type=' . $_REQUEST['module']			
68
-			. '&selected_revision_id=' . $layout_def['fields']['SELECTED_REVISION_ID']	
69
-			;
58
+        $href = 'index.php?module=' . 'Documents'
59
+            . '&action=' . 'EditView'
60
+            . '&record=' . $layout_def['fields']['ID']
61
+            . '&return_module=' . $_REQUEST['module']
62
+            . '&return_action=' . 'DetailView'
63
+            . '&return_id=' . $_REQUEST['record']
64
+            . '&load_signed_id=' . $layout_def['fields']['LINKED_ID']
65
+            . '&parent_id=' . $_REQUEST['record']			
66
+            . '&parent_name=' . $layout_def['fields']['CONTRACT_NAME']			
67
+            . '&parent_type=' . $_REQUEST['module']			
68
+            . '&selected_revision_id=' . $layout_def['fields']['SELECTED_REVISION_ID']	
69
+            ;
70 70
 
71
-		$edit_icon_html = SugarThemeRegistry::current()->getImage( 'loadSignedDocument','align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_LOAD_SIGNED']);
72
-		//if the contract state is executed or document is not a template hide this action.
73
-		if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS']=='executed') or
74
-			empty($layout_def['fields']['IS_TEMPLATE']) or $layout_def['fields']['IS_TEMPLATE']==0) {
75
-			return "";
76
-		}
77
-		return '<a href="' . $href . '"' . "title ='". $app_strings['LNK_LOAD_SIGNED_TOOLTIP']."'"
78
-			. 'class="listViewTdToolsS1">' . $edit_icon_html . '&nbsp;' . $app_strings['LNK_LOAD_SIGNED'] .'</a>&nbsp;';
79
-	}
71
+        $edit_icon_html = SugarThemeRegistry::current()->getImage( 'loadSignedDocument','align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_LOAD_SIGNED']);
72
+        //if the contract state is executed or document is not a template hide this action.
73
+        if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS']=='executed') or
74
+            empty($layout_def['fields']['IS_TEMPLATE']) or $layout_def['fields']['IS_TEMPLATE']==0) {
75
+            return "";
76
+        }
77
+        return '<a href="' . $href . '"' . "title ='". $app_strings['LNK_LOAD_SIGNED_TOOLTIP']."'"
78
+            . 'class="listViewTdToolsS1">' . $edit_icon_html . '&nbsp;' . $app_strings['LNK_LOAD_SIGNED'] .'</a>&nbsp;';
79
+    }
80 80
 		
81 81
 }
82 82
 ?>
83 83
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 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,27 +55,27 @@  discard block
 block discarded – undo
55 55
 		global $app_strings;
56 56
 		
57 57
 
58
-		$href = 'index.php?module=' . 'Documents'
59
-			. '&action=' . 'EditView'
60
-			. '&record=' . $layout_def['fields']['ID']
61
-			. '&return_module=' . $_REQUEST['module']
62
-			. '&return_action=' . 'DetailView'
63
-			. '&return_id=' . $_REQUEST['record']
64
-			. '&load_signed_id=' . $layout_def['fields']['LINKED_ID']
65
-			. '&parent_id=' . $_REQUEST['record']			
66
-			. '&parent_name=' . $layout_def['fields']['CONTRACT_NAME']			
67
-			. '&parent_type=' . $_REQUEST['module']			
68
-			. '&selected_revision_id=' . $layout_def['fields']['SELECTED_REVISION_ID']	
58
+		$href = 'index.php?module='.'Documents'
59
+			. '&action='.'EditView'
60
+			. '&record='.$layout_def['fields']['ID']
61
+			. '&return_module='.$_REQUEST['module']
62
+			. '&return_action='.'DetailView'
63
+			. '&return_id='.$_REQUEST['record']
64
+			. '&load_signed_id='.$layout_def['fields']['LINKED_ID']
65
+			. '&parent_id='.$_REQUEST['record']			
66
+			. '&parent_name='.$layout_def['fields']['CONTRACT_NAME']			
67
+			. '&parent_type='.$_REQUEST['module']			
68
+			. '&selected_revision_id='.$layout_def['fields']['SELECTED_REVISION_ID']	
69 69
 			;
70 70
 
71
-		$edit_icon_html = SugarThemeRegistry::current()->getImage( 'loadSignedDocument','align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_LOAD_SIGNED']);
71
+		$edit_icon_html = SugarThemeRegistry::current()->getImage('loadSignedDocument', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_LOAD_SIGNED']);
72 72
 		//if the contract state is executed or document is not a template hide this action.
73
-		if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS']=='executed') or
74
-			empty($layout_def['fields']['IS_TEMPLATE']) or $layout_def['fields']['IS_TEMPLATE']==0) {
73
+		if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS'] == 'executed') or
74
+			empty($layout_def['fields']['IS_TEMPLATE']) or $layout_def['fields']['IS_TEMPLATE'] == 0) {
75 75
 			return "";
76 76
 		}
77
-		return '<a href="' . $href . '"' . "title ='". $app_strings['LNK_LOAD_SIGNED_TOOLTIP']."'"
78
-			. 'class="listViewTdToolsS1">' . $edit_icon_html . '&nbsp;' . $app_strings['LNK_LOAD_SIGNED'] .'</a>&nbsp;';
77
+		return '<a href="'.$href.'"'."title ='".$app_strings['LNK_LOAD_SIGNED_TOOLTIP']."'"
78
+			. 'class="listViewTdToolsS1">'.$edit_icon_html.'&nbsp;'.$app_strings['LNK_LOAD_SIGNED'].'</a>&nbsp;';
79 79
 	}
80 80
 		
81 81
 }
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/SugarWidgetFieldbool.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -42,18 +42,18 @@  discard block
 block discarded – undo
42 42
 class SugarWidgetFieldBool extends SugarWidgetReportField
43 43
 {
44 44
 
45
- function queryFilterEquals(&$layout_def)
46
- {
45
+    function queryFilterEquals(&$layout_def)
46
+    {
47 47
 
48
-		$bool_val = $layout_def['input_name0'][0];
49
-		if ($bool_val == 'yes' || $bool_val == '1')
50
-		{
51
-			return "(".$this->_get_column_select($layout_def)." LIKE 'on' OR ".$this->_get_column_select($layout_def)."='1')\n";
52
-		} else {
53
-			//return "(".$this->_get_column_select($layout_def)." is null OR ".$this->_get_column_select($layout_def)."='0' OR ".$this->_get_column_select($layout_def)."='off')\n";
48
+        $bool_val = $layout_def['input_name0'][0];
49
+        if ($bool_val == 'yes' || $bool_val == '1')
50
+        {
51
+            return "(".$this->_get_column_select($layout_def)." LIKE 'on' OR ".$this->_get_column_select($layout_def)."='1')\n";
52
+        } else {
53
+            //return "(".$this->_get_column_select($layout_def)." is null OR ".$this->_get_column_select($layout_def)."='0' OR ".$this->_get_column_select($layout_def)."='off')\n";
54 54
             return "(".$this->_get_column_select($layout_def)." is null OR ". $this->_get_column_select($layout_def)."='0')\n";            
55
-		}
56
- }
55
+        }
56
+    }
57 57
 
58 58
     function displayListPlain($layout_def)
59 59
     {
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
         return  $cell;
86 86
     }
87 87
     
88
- function queryFilterStarts_With(&$layout_def)
89
- {
88
+    function queryFilterStarts_With(&$layout_def)
89
+    {
90 90
     return $this->queryFilterEquals($layout_def);
91
- }    
91
+    }    
92 92
  
93 93
     function displayInput(&$layout_def) 
94 94
     {
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.
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 			return "(".$this->_get_column_select($layout_def)." LIKE 'on' OR ".$this->_get_column_select($layout_def)."='1')\n";
52 52
 		} else {
53 53
 			//return "(".$this->_get_column_select($layout_def)." is null OR ".$this->_get_column_select($layout_def)."='0' OR ".$this->_get_column_select($layout_def)."='off')\n";
54
-            return "(".$this->_get_column_select($layout_def)." is null OR ". $this->_get_column_select($layout_def)."='0')\n";            
54
+            return "(".$this->_get_column_select($layout_def)." is null OR ".$this->_get_column_select($layout_def)."='0')\n";            
55 55
 		}
56 56
  }
57 57
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $key = $this->_get_column_alias($layout_def);
64 64
         $key = strtoupper($key);
65 65
         
66
-        if(empty($layout_def['fields'][$key]))
66
+        if (empty($layout_def['fields'][$key]))
67 67
         {
68 68
             $layout_def['name'] = $name;
69 69
             global $app_list_strings;
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         }
78 78
 
79 79
         $on_or_off = 'CHECKED';
80
-        if ( empty($value) ||  $value == 'off')
80
+        if (empty($value) || $value == 'off')
81 81
         {
82 82
             $on_or_off = '';
83 83
         }
Please login to merge, or discard this 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.
@@ -69,8 +71,7 @@  discard block
 block discarded – undo
69 71
             global $app_list_strings;
70 72
             if (empty($value)) {
71 73
                 $value = $app_list_strings['dom_switch_bool']['off'];
72
-            }   
73
-            else {
74
+            } else {
74 75
                 $value = $app_list_strings['dom_switch_bool']['on'];
75 76
             } 
76 77
             return $value;
@@ -97,11 +98,9 @@  discard block
 block discarded – undo
97 98
         $yes = $no = $default = '';
98 99
         if (isset($layout_def['input_name0']) && $layout_def['input_name0'] == 1) {
99 100
             $yes = ' selected="selected"';
100
-        }
101
-        elseif (isset($layout_def['input_name0']) && $layout_def['input_name0'] == 'off') {
101
+        } elseif (isset($layout_def['input_name0']) && $layout_def['input_name0'] == 'off') {
102 102
             $no = ' selected="selected"';
103
-        }
104
-        else {
103
+        } else {
105 104
             $default = ' selected="selected"';
106 105
         }
107 106
         
Please login to merge, or discard this patch.
generic/SugarWidgets/SugarWidgetSubPanelTopCreateAccountNameButton.php 3 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -50,39 +50,39 @@
 block discarded – undo
50 50
         return parent::getWidgetId();
51 51
     }
52 52
 
53
-	function display($defines, $additionalFormFields = NULL, $nonbutton = false)
54
-	{
55
-		global $app_strings;
56
-		global $currentModule;
53
+    function display($defines, $additionalFormFields = NULL, $nonbutton = false)
54
+    {
55
+        global $app_strings;
56
+        global $currentModule;
57 57
 
58
-		$title = $app_strings['LBL_NEW_BUTTON_TITLE'];
59
-		//$accesskey = $app_strings['LBL_NEW_BUTTON_KEY'];
60
-		$value = $app_strings['LBL_NEW_BUTTON_LABEL'];
61
-		$this->module = 'Contacts';
62
-		if( ACLController::moduleSupportsACL($defines['module'])  && !ACLController::checkAccess($defines['module'], 'edit', true)){
63
-			$button = "<input title='$title'class='button' type='button' name='button' value='  $value  ' disabled/>\n";
64
-			return $button;
65
-		}
58
+        $title = $app_strings['LBL_NEW_BUTTON_TITLE'];
59
+        //$accesskey = $app_strings['LBL_NEW_BUTTON_KEY'];
60
+        $value = $app_strings['LBL_NEW_BUTTON_LABEL'];
61
+        $this->module = 'Contacts';
62
+        if( ACLController::moduleSupportsACL($defines['module'])  && !ACLController::checkAccess($defines['module'], 'edit', true)){
63
+            $button = "<input title='$title'class='button' type='button' name='button' value='  $value  ' disabled/>\n";
64
+            return $button;
65
+        }
66 66
 		
67
-		$additionalFormFields = array();
68
-		if(isset($defines['focus']->billing_address_street)) 
69
-			$additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street;
70
-		if(isset($defines['focus']->billing_address_city)) 
71
-			$additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city;						  		
72
-		if(isset($defines['focus']->billing_address_state)) 
73
-			$additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state;
74
-		if(isset($defines['focus']->billing_address_country)) 
75
-			$additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country;
76
-		if(isset($defines['focus']->billing_address_postalcode)) 
77
-			$additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode;
78
-		if(isset($defines['focus']->phone_office)) 
79
-			$additionalFormFields['phone_work'] = $defines['focus']->phone_office;
67
+        $additionalFormFields = array();
68
+        if(isset($defines['focus']->billing_address_street)) 
69
+            $additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street;
70
+        if(isset($defines['focus']->billing_address_city)) 
71
+            $additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city;						  		
72
+        if(isset($defines['focus']->billing_address_state)) 
73
+            $additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state;
74
+        if(isset($defines['focus']->billing_address_country)) 
75
+            $additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country;
76
+        if(isset($defines['focus']->billing_address_postalcode)) 
77
+            $additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode;
78
+        if(isset($defines['focus']->phone_office)) 
79
+            $additionalFormFields['phone_work'] = $defines['focus']->phone_office;
80 80
 		
81 81
 		
82
-		$button = $this->_get_form($defines, $additionalFormFields);
83
-		$button .= "<input title='$title' class='button' type='submit' name='{$this->getWidgetId()}' id='{$this->getWidgetId()}' value='  $value  '/>\n";
84
-		$button .= "</form>";
85
-		return $button;
86
-	}
82
+        $button = $this->_get_form($defines, $additionalFormFields);
83
+        $button .= "<input title='$title' class='button' type='submit' name='{$this->getWidgetId()}' id='{$this->getWidgetId()}' value='  $value  '/>\n";
84
+        $button .= "</form>";
85
+        return $button;
86
+    }
87 87
 }
88 88
 ?>
89 89
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 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.
@@ -59,23 +59,23 @@  discard block
 block discarded – undo
59 59
 		//$accesskey = $app_strings['LBL_NEW_BUTTON_KEY'];
60 60
 		$value = $app_strings['LBL_NEW_BUTTON_LABEL'];
61 61
 		$this->module = 'Contacts';
62
-		if( ACLController::moduleSupportsACL($defines['module'])  && !ACLController::checkAccess($defines['module'], 'edit', true)){
62
+		if (ACLController::moduleSupportsACL($defines['module']) && !ACLController::checkAccess($defines['module'], 'edit', true)) {
63 63
 			$button = "<input title='$title'class='button' type='button' name='button' value='  $value  ' disabled/>\n";
64 64
 			return $button;
65 65
 		}
66 66
 		
67 67
 		$additionalFormFields = array();
68
-		if(isset($defines['focus']->billing_address_street)) 
68
+		if (isset($defines['focus']->billing_address_street)) 
69 69
 			$additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street;
70
-		if(isset($defines['focus']->billing_address_city)) 
70
+		if (isset($defines['focus']->billing_address_city)) 
71 71
 			$additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city;						  		
72
-		if(isset($defines['focus']->billing_address_state)) 
72
+		if (isset($defines['focus']->billing_address_state)) 
73 73
 			$additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state;
74
-		if(isset($defines['focus']->billing_address_country)) 
74
+		if (isset($defines['focus']->billing_address_country)) 
75 75
 			$additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country;
76
-		if(isset($defines['focus']->billing_address_postalcode)) 
76
+		if (isset($defines['focus']->billing_address_postalcode)) 
77 77
 			$additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode;
78
-		if(isset($defines['focus']->phone_office)) 
78
+		if (isset($defines['focus']->phone_office)) 
79 79
 			$additionalFormFields['phone_work'] = $defines['focus']->phone_office;
80 80
 		
81 81
 		
Please login to merge, or discard this patch.
Braces   +21 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -65,18 +67,24 @@  discard block
 block discarded – undo
65 67
 		}
66 68
 		
67 69
 		$additionalFormFields = array();
68
-		if(isset($defines['focus']->billing_address_street)) 
69
-			$additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street;
70
-		if(isset($defines['focus']->billing_address_city)) 
71
-			$additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city;						  		
72
-		if(isset($defines['focus']->billing_address_state)) 
73
-			$additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state;
74
-		if(isset($defines['focus']->billing_address_country)) 
75
-			$additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country;
76
-		if(isset($defines['focus']->billing_address_postalcode)) 
77
-			$additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode;
78
-		if(isset($defines['focus']->phone_office)) 
79
-			$additionalFormFields['phone_work'] = $defines['focus']->phone_office;
70
+		if(isset($defines['focus']->billing_address_street)) {
71
+					$additionalFormFields['primary_address_street'] = $defines['focus']->billing_address_street;
72
+		}
73
+		if(isset($defines['focus']->billing_address_city)) {
74
+					$additionalFormFields['primary_address_city'] = $defines['focus']->billing_address_city;
75
+		}
76
+		if(isset($defines['focus']->billing_address_state)) {
77
+					$additionalFormFields['primary_address_state'] = $defines['focus']->billing_address_state;
78
+		}
79
+		if(isset($defines['focus']->billing_address_country)) {
80
+					$additionalFormFields['primary_address_country'] = $defines['focus']->billing_address_country;
81
+		}
82
+		if(isset($defines['focus']->billing_address_postalcode)) {
83
+					$additionalFormFields['primary_address_postalcode'] = $defines['focus']->billing_address_postalcode;
84
+		}
85
+		if(isset($defines['focus']->phone_office)) {
86
+					$additionalFormFields['phone_work'] = $defines['focus']->phone_office;
87
+		}
80 88
 		
81 89
 		
82 90
 		$button = $this->_get_form($defines, $additionalFormFields);
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonMeetings.php 3 patches
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -45,35 +45,35 @@  discard block
 block discarded – undo
45 45
 
46 46
 class SugarWidgetSubPanelRemoveButtonMeetings extends SugarWidgetField
47 47
 {
48
-	function displayHeaderCell($layout_def)
49
-	{
50
-		return '&nbsp;';
51
-	}
48
+    function displayHeaderCell($layout_def)
49
+    {
50
+        return '&nbsp;';
51
+    }
52 52
 
53
-	function displayList($layout_def)
54
-	{
55
-		global $app_strings;
53
+    function displayList($layout_def)
54
+    {
55
+        global $app_strings;
56 56
 		
57 57
 				
58
-		$parent_record_id = $_REQUEST['record'];
59
-		$parent_module = $_REQUEST['module'];
58
+        $parent_record_id = $_REQUEST['record'];
59
+        $parent_module = $_REQUEST['module'];
60 60
 
61
-		$action = 'DeleteRelationship';
62
-		$record = $layout_def['fields']['ID'];
61
+        $action = 'DeleteRelationship';
62
+        $record = $layout_def['fields']['ID'];
63 63
 
64
-		$return_module = $_REQUEST['module'];
65
-		$return_action = 'SubPanelViewer';
66
-		$subpanel = $layout_def['subpanel_id'];
67
-		$return_id = $_REQUEST['record'];
64
+        $return_module = $_REQUEST['module'];
65
+        $return_action = 'SubPanelViewer';
66
+        $subpanel = $layout_def['subpanel_id'];
67
+        $return_id = $_REQUEST['record'];
68 68
 		
69 69
 		
70
-		if(isset($GLOBALS['FOCUS'])) {	
71
-			$focus = $GLOBALS['FOCUS'];
72
-		}
70
+        if(isset($GLOBALS['FOCUS'])) {	
71
+            $focus = $GLOBALS['FOCUS'];
72
+        }
73 73
 		
74 74
         /* Handle case where we generate subpanels from MySettings/LoadTabSubpanels.php */
75 75
         else if($return_module == 'MySettings') {
76
-        	global $beanList, $beanFiles;
76
+            global $beanList, $beanFiles;
77 77
             $return_module = $_REQUEST['loadModule'];
78 78
             
79 79
             $class = $beanList[$return_module];
@@ -83,37 +83,37 @@  discard block
 block discarded – undo
83 83
         }
84 84
 		
85 85
         //CCL - Comment out restriction to not remove assigned user
86
-		//if($focus->assigned_user_id == $record) return '';
86
+        //if($focus->assigned_user_id == $record) return '';
87 87
 		
88
-		if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
89
-			$linked_field= $layout_def['linked_field_set'] ;
90
-		} else {
91
-			$linked_field = $layout_def['linked_field'];
92
-		}
93
-		$refresh_page = 0;
94
-		if(!empty($layout_def['refresh_page'])){
95
-			$refresh_page = 1;
96
-		}
97
-		$return_url = "index.php?module=$return_module&action=$return_action&subpanel=$subpanel&record=$return_id&sugar_body_only=1";
88
+        if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
89
+            $linked_field= $layout_def['linked_field_set'] ;
90
+        } else {
91
+            $linked_field = $layout_def['linked_field'];
92
+        }
93
+        $refresh_page = 0;
94
+        if(!empty($layout_def['refresh_page'])){
95
+            $refresh_page = 1;
96
+        }
97
+        $return_url = "index.php?module=$return_module&action=$return_action&subpanel=$subpanel&record=$return_id&sugar_body_only=1";
98 98
 
99
-		$icon_remove_text = strtolower($app_strings['LBL_ID_FF_REMOVE']);
100
-		$remove_url = $layout_def['start_link_wrapper']
101
-			. "index.php?module=$parent_module"
102
-			. "&action=$action"
103
-			. "&record=$parent_record_id"
104
-			. "&linked_field=$linked_field"
105
-			. "&linked_id=$record"
106
-			. "&return_url=" . urlencode(urlencode($return_url))
107
-			. "&refresh_page=$refresh_page"
108
-			. $layout_def['end_link_wrapper'];
109
-		$remove_confirmation_text = $app_strings['NTC_REMOVE_CONFIRMATION'];
110
-		//based on listview since that lets you select records
111
-		if($layout_def['ListView']) {
99
+        $icon_remove_text = strtolower($app_strings['LBL_ID_FF_REMOVE']);
100
+        $remove_url = $layout_def['start_link_wrapper']
101
+            . "index.php?module=$parent_module"
102
+            . "&action=$action"
103
+            . "&record=$parent_record_id"
104
+            . "&linked_field=$linked_field"
105
+            . "&linked_id=$record"
106
+            . "&return_url=" . urlencode(urlencode($return_url))
107
+            . "&refresh_page=$refresh_page"
108
+            . $layout_def['end_link_wrapper'];
109
+        $remove_confirmation_text = $app_strings['NTC_REMOVE_CONFIRMATION'];
110
+        //based on listview since that lets you select records
111
+        if($layout_def['ListView']) {
112 112
             return "<a href=\"javascript:sub_p_rem('$subpanel', '$linked_field'" .", '$record', $refresh_page);\""
113
-			        . ' class="listViewTdToolsS1"' . " onclick=\"return sp_rem_conf();\"" . ">$icon_remove_text</a>";
114
-		}else{
115
-			return '';
116
-		}
117
-	}
113
+                    . ' class="listViewTdToolsS1"' . " onclick=\"return sp_rem_conf();\"" . ">$icon_remove_text</a>";
114
+        }else{
115
+            return '';
116
+        }
117
+    }
118 118
 }
119 119
 ?>
120 120
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 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.
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
 		$return_id = $_REQUEST['record'];
68 68
 		
69 69
 		
70
-		if(isset($GLOBALS['FOCUS'])) {	
70
+		if (isset($GLOBALS['FOCUS'])) {	
71 71
 			$focus = $GLOBALS['FOCUS'];
72 72
 		}
73 73
 		
74 74
         /* Handle case where we generate subpanels from MySettings/LoadTabSubpanels.php */
75
-        else if($return_module == 'MySettings') {
75
+        else if ($return_module == 'MySettings') {
76 76
         	global $beanList, $beanFiles;
77 77
             $return_module = $_REQUEST['loadModule'];
78 78
             
@@ -86,12 +86,12 @@  discard block
 block discarded – undo
86 86
 		//if($focus->assigned_user_id == $record) return '';
87 87
 		
88 88
 		if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
89
-			$linked_field= $layout_def['linked_field_set'] ;
89
+			$linked_field = $layout_def['linked_field_set'];
90 90
 		} else {
91 91
 			$linked_field = $layout_def['linked_field'];
92 92
 		}
93 93
 		$refresh_page = 0;
94
-		if(!empty($layout_def['refresh_page'])){
94
+		if (!empty($layout_def['refresh_page'])) {
95 95
 			$refresh_page = 1;
96 96
 		}
97 97
 		$return_url = "index.php?module=$return_module&action=$return_action&subpanel=$subpanel&record=$return_id&sugar_body_only=1";
@@ -103,15 +103,15 @@  discard block
 block discarded – undo
103 103
 			. "&record=$parent_record_id"
104 104
 			. "&linked_field=$linked_field"
105 105
 			. "&linked_id=$record"
106
-			. "&return_url=" . urlencode(urlencode($return_url))
106
+			. "&return_url=".urlencode(urlencode($return_url))
107 107
 			. "&refresh_page=$refresh_page"
108 108
 			. $layout_def['end_link_wrapper'];
109 109
 		$remove_confirmation_text = $app_strings['NTC_REMOVE_CONFIRMATION'];
110 110
 		//based on listview since that lets you select records
111
-		if($layout_def['ListView']) {
112
-            return "<a href=\"javascript:sub_p_rem('$subpanel', '$linked_field'" .", '$record', $refresh_page);\""
113
-			        . ' class="listViewTdToolsS1"' . " onclick=\"return sp_rem_conf();\"" . ">$icon_remove_text</a>";
114
-		}else{
111
+		if ($layout_def['ListView']) {
112
+            return "<a href=\"javascript:sub_p_rem('$subpanel', '$linked_field'".", '$record', $refresh_page);\""
113
+			        . ' class="listViewTdToolsS1"'." onclick=\"return sp_rem_conf();\"".">$icon_remove_text</a>";
114
+		} else {
115 115
 			return '';
116 116
 		}
117 117
 	}
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/SugarWidgetFielduser_name.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,12 +43,12 @@
 block discarded – undo
43 43
 
44 44
 class SugarWidgetFielduser_name extends SugarWidgetFieldname
45 45
 {
46
- function displayInput(&$layout_def) 
47
- {
46
+    function displayInput(&$layout_def) 
47
+    {
48 48
         $selected_users = empty($layout_def['input_name0']) ? '' : $layout_def['input_name0'];
49
- 		$str = '<select multiple="true" size="3" name="' . $layout_def['name'] . '[]">' . get_select_options_with_id(get_user_array(false), $selected_users) . '</select>';
50
- 		return $str;
51
- }
49
+            $str = '<select multiple="true" size="3" name="' . $layout_def['name'] . '[]">' . get_select_options_with_id(get_user_array(false), $selected_users) . '</select>';
50
+            return $str;
51
+    }
52 52
 }
53 53
 
54 54
 ?>
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.
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
  function displayInput(&$layout_def) 
47 47
  {
48 48
         $selected_users = empty($layout_def['input_name0']) ? '' : $layout_def['input_name0'];
49
- 		$str = '<select multiple="true" size="3" name="' . $layout_def['name'] . '[]">' . get_select_options_with_id(get_user_array(false), $selected_users) . '</select>';
49
+ 		$str = '<select multiple="true" size="3" name="'.$layout_def['name'].'[]">'.get_select_options_with_id(get_user_array(false), $selected_users).'</select>';
50 50
  		return $str;
51 51
  }
52 52
 }
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/SugarWidgetSubPanelIcon.php 3 patches
Indentation   +93 added lines, -93 removed lines patch added patch discarded remove patch
@@ -45,77 +45,77 @@  discard block
 block discarded – undo
45 45
 
46 46
 class SugarWidgetSubPanelIcon extends SugarWidgetField
47 47
 {
48
-	function displayHeaderCell($layout_def)
49
-	{
50
-		return '&nbsp;';
51
-	}
52
-
53
-	function displayList($layout_def)
54
-	{
55
-		global $app_strings;
56
-		global $app_list_strings;
57
-		global $current_user;
58
-
59
-		if(isset($layout_def['varname']))
60
-		{
61
-			$key = strtoupper($layout_def['varname']);
62
-		}
63
-		else
64
-		{
65
-			$key = $this->_get_column_alias($layout_def);
66
-			$key = strtoupper($key);
67
-		}
48
+    function displayHeaderCell($layout_def)
49
+    {
50
+        return '&nbsp;';
51
+    }
52
+
53
+    function displayList($layout_def)
54
+    {
55
+        global $app_strings;
56
+        global $app_list_strings;
57
+        global $current_user;
58
+
59
+        if(isset($layout_def['varname']))
60
+        {
61
+            $key = strtoupper($layout_def['varname']);
62
+        }
63
+        else
64
+        {
65
+            $key = $this->_get_column_alias($layout_def);
66
+            $key = strtoupper($key);
67
+        }
68 68
 //add module image
69
-		//add module image
70
-		if(!empty($layout_def['target_module_key'])) {
71
-			if (!empty($layout_def['fields'][strtoupper($layout_def['target_module_key'])])) {
72
-				$module=$layout_def['fields'][strtoupper($layout_def['target_module_key'])];
73
-			}
74
-		}
69
+        //add module image
70
+        if(!empty($layout_def['target_module_key'])) {
71
+            if (!empty($layout_def['fields'][strtoupper($layout_def['target_module_key'])])) {
72
+                $module=$layout_def['fields'][strtoupper($layout_def['target_module_key'])];
73
+            }
74
+        }
75 75
 
76 76
         if (empty($module)) {
77
-			if(empty($layout_def['target_module']))
78
-			{
79
-				$module = $layout_def['module'];
80
-			}
81
-		else
82
-			{
83
-				$module = $layout_def['target_module'];
84
-			}
85
-		}
86
-		$action = 'DetailView';
87
-		if(empty($layout_def['target_record_key']))
88
-		{
89
-			$record = $layout_def['fields']['ID'];
90
-		}
91
-		else
92
-		{
93
-			$record_key = strtoupper($layout_def['target_record_key']);
94
-			$record = $layout_def['fields'][$record_key];
95
-		}
96
-		$action_access = false;
97
-		if(!empty($record) &&
98
-			($layout_def[$action] && !$layout_def['owner_module']
99
-			||  $layout_def[$action] && !ACLController::moduleSupportsACL($layout_def['owner_module'])
100
-			|| ACLController::checkAccess($layout_def['owner_module'], 'view', $layout_def['owner_id'] == $current_user->id))) {
101
-			$action_access = true;
102
-		}
103
-		$icon_img_html = SugarThemeRegistry::current()->getImage( $module . '', 'border="0"',null,null,'.gif',$app_list_strings['moduleList'][$module]);
104
-		if (!empty($layout_def['attachment_image_only']) && $layout_def['attachment_image_only'] == true) {
105
-			$ret="";
106
-		} else {
107
-			if ($action_access) {
108
-				$ret = '<a href="index.php?module=' . $module . '&action=' . $action . '&record=' . $record	. '" >' . $icon_img_html . "</a>";
109
-			} else {
110
-				$ret = $icon_img_html;
111
-			}
112
-		}
113
-
114
-		if(!empty($layout_def['image2']) &&  !empty($layout_def['image2_ext_url_field'])){
115
-
116
-			if (!empty($layout_def['fields'][strtoupper($layout_def['image2_ext_url_field'])])) {
117
-				$link_url  = $layout_def['fields'][strtoupper($layout_def['image2_ext_url_field'])];
118
-			}
77
+            if(empty($layout_def['target_module']))
78
+            {
79
+                $module = $layout_def['module'];
80
+            }
81
+        else
82
+            {
83
+                $module = $layout_def['target_module'];
84
+            }
85
+        }
86
+        $action = 'DetailView';
87
+        if(empty($layout_def['target_record_key']))
88
+        {
89
+            $record = $layout_def['fields']['ID'];
90
+        }
91
+        else
92
+        {
93
+            $record_key = strtoupper($layout_def['target_record_key']);
94
+            $record = $layout_def['fields'][$record_key];
95
+        }
96
+        $action_access = false;
97
+        if(!empty($record) &&
98
+            ($layout_def[$action] && !$layout_def['owner_module']
99
+            ||  $layout_def[$action] && !ACLController::moduleSupportsACL($layout_def['owner_module'])
100
+            || ACLController::checkAccess($layout_def['owner_module'], 'view', $layout_def['owner_id'] == $current_user->id))) {
101
+            $action_access = true;
102
+        }
103
+        $icon_img_html = SugarThemeRegistry::current()->getImage( $module . '', 'border="0"',null,null,'.gif',$app_list_strings['moduleList'][$module]);
104
+        if (!empty($layout_def['attachment_image_only']) && $layout_def['attachment_image_only'] == true) {
105
+            $ret="";
106
+        } else {
107
+            if ($action_access) {
108
+                $ret = '<a href="index.php?module=' . $module . '&action=' . $action . '&record=' . $record	. '" >' . $icon_img_html . "</a>";
109
+            } else {
110
+                $ret = $icon_img_html;
111
+            }
112
+        }
113
+
114
+        if(!empty($layout_def['image2']) &&  !empty($layout_def['image2_ext_url_field'])){
115
+
116
+            if (!empty($layout_def['fields'][strtoupper($layout_def['image2_ext_url_field'])])) {
117
+                $link_url  = $layout_def['fields'][strtoupper($layout_def['image2_ext_url_field'])];
118
+            }
119 119
 
120 120
             $imagePath = '';
121 121
             if ( $layout_def['image2'] == '__VARIABLE' ) {
@@ -132,34 +132,34 @@  discard block
 block discarded – undo
132 132
             }
133 133
         }
134 134
 //if requested, add attachment icon.
135
-		if(!empty($layout_def['image2']) && !empty($layout_def['image2_url_field'])){
135
+        if(!empty($layout_def['image2']) && !empty($layout_def['image2_url_field'])){
136 136
 
137
-			if (is_array($layout_def['image2_url_field'])) {
138
-				//Generate file url.
139
-				if (!empty($layout_def['fields'][strtoupper($layout_def['image2_url_field']['id_field'])])
140
-				and !empty($layout_def['fields'][strtoupper($layout_def['image2_url_field']['filename_field'])]) ) {
137
+            if (is_array($layout_def['image2_url_field'])) {
138
+                //Generate file url.
139
+                if (!empty($layout_def['fields'][strtoupper($layout_def['image2_url_field']['id_field'])])
140
+                and !empty($layout_def['fields'][strtoupper($layout_def['image2_url_field']['filename_field'])]) ) {
141 141
 
142
-					$key=$layout_def['fields'][strtoupper($layout_def['image2_url_field']['id_field'])];
142
+                    $key=$layout_def['fields'][strtoupper($layout_def['image2_url_field']['id_field'])];
143 143
                     $file=$layout_def['fields'][strtoupper($layout_def['image2_url_field']['filename_field'])];
144 144
                     $filepath="index.php?entryPoint=download&id=".$key."&type=".$layout_def['module'];
145
-				}
146
-			} else {
147
-				if (!empty($layout_def['fields'][strtoupper($layout_def['image2_url_field'])])) {
148
-					$filepath="index.php?entryPoint=download&id=".$layout_def['fields']['ID']."&type=".$layout_def['module'];
149
-				}
150
-			}
151
-			$icon_img_html = SugarThemeRegistry::current()->getImage( $layout_def['image2'] . '', 'border="0"',null,null,'.gif',$layout_def['image2']);
152
-			if ($action_access && !empty($filepath)) {
153
-				$ret .= '<a href="' . $filepath. '" >' . "$icon_img_html</a>";
154
-			} elseif (!empty($filepath)) {
155
-				$ret .= $icon_img_html;
156
-			}
157
-		}
158
-		// now handle attachments for Emails
159
-		else if(!empty($layout_def['module']) && $layout_def['module'] == 'Emails' && !empty($layout_def['fields']['ATTACHMENT_IMAGE'])) {
160
-			$ret.= $layout_def['fields']['ATTACHMENT_IMAGE'];
161
-		}
162
-		return $ret;
163
-	}
145
+                }
146
+            } else {
147
+                if (!empty($layout_def['fields'][strtoupper($layout_def['image2_url_field'])])) {
148
+                    $filepath="index.php?entryPoint=download&id=".$layout_def['fields']['ID']."&type=".$layout_def['module'];
149
+                }
150
+            }
151
+            $icon_img_html = SugarThemeRegistry::current()->getImage( $layout_def['image2'] . '', 'border="0"',null,null,'.gif',$layout_def['image2']);
152
+            if ($action_access && !empty($filepath)) {
153
+                $ret .= '<a href="' . $filepath. '" >' . "$icon_img_html</a>";
154
+            } elseif (!empty($filepath)) {
155
+                $ret .= $icon_img_html;
156
+            }
157
+        }
158
+        // now handle attachments for Emails
159
+        else if(!empty($layout_def['module']) && $layout_def['module'] == 'Emails' && !empty($layout_def['fields']['ATTACHMENT_IMAGE'])) {
160
+            $ret.= $layout_def['fields']['ATTACHMENT_IMAGE'];
161
+        }
162
+        return $ret;
163
+    }
164 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.
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		global $app_list_strings;
57 57
 		global $current_user;
58 58
 
59
-		if(isset($layout_def['varname']))
59
+		if (isset($layout_def['varname']))
60 60
 		{
61 61
 			$key = strtoupper($layout_def['varname']);
62 62
 		}
@@ -67,14 +67,14 @@  discard block
 block discarded – undo
67 67
 		}
68 68
 //add module image
69 69
 		//add module image
70
-		if(!empty($layout_def['target_module_key'])) {
70
+		if (!empty($layout_def['target_module_key'])) {
71 71
 			if (!empty($layout_def['fields'][strtoupper($layout_def['target_module_key'])])) {
72
-				$module=$layout_def['fields'][strtoupper($layout_def['target_module_key'])];
72
+				$module = $layout_def['fields'][strtoupper($layout_def['target_module_key'])];
73 73
 			}
74 74
 		}
75 75
 
76 76
         if (empty($module)) {
77
-			if(empty($layout_def['target_module']))
77
+			if (empty($layout_def['target_module']))
78 78
 			{
79 79
 				$module = $layout_def['module'];
80 80
 			}
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 			}
85 85
 		}
86 86
 		$action = 'DetailView';
87
-		if(empty($layout_def['target_record_key']))
87
+		if (empty($layout_def['target_record_key']))
88 88
 		{
89 89
 			$record = $layout_def['fields']['ID'];
90 90
 		}
@@ -94,70 +94,70 @@  discard block
 block discarded – undo
94 94
 			$record = $layout_def['fields'][$record_key];
95 95
 		}
96 96
 		$action_access = false;
97
-		if(!empty($record) &&
97
+		if (!empty($record) &&
98 98
 			($layout_def[$action] && !$layout_def['owner_module']
99 99
 			||  $layout_def[$action] && !ACLController::moduleSupportsACL($layout_def['owner_module'])
100 100
 			|| ACLController::checkAccess($layout_def['owner_module'], 'view', $layout_def['owner_id'] == $current_user->id))) {
101 101
 			$action_access = true;
102 102
 		}
103
-		$icon_img_html = SugarThemeRegistry::current()->getImage( $module . '', 'border="0"',null,null,'.gif',$app_list_strings['moduleList'][$module]);
103
+		$icon_img_html = SugarThemeRegistry::current()->getImage($module.'', 'border="0"', null, null, '.gif', $app_list_strings['moduleList'][$module]);
104 104
 		if (!empty($layout_def['attachment_image_only']) && $layout_def['attachment_image_only'] == true) {
105
-			$ret="";
105
+			$ret = "";
106 106
 		} else {
107 107
 			if ($action_access) {
108
-				$ret = '<a href="index.php?module=' . $module . '&action=' . $action . '&record=' . $record	. '" >' . $icon_img_html . "</a>";
108
+				$ret = '<a href="index.php?module='.$module.'&action='.$action.'&record='.$record.'" >'.$icon_img_html."</a>";
109 109
 			} else {
110 110
 				$ret = $icon_img_html;
111 111
 			}
112 112
 		}
113 113
 
114
-		if(!empty($layout_def['image2']) &&  !empty($layout_def['image2_ext_url_field'])){
114
+		if (!empty($layout_def['image2']) && !empty($layout_def['image2_ext_url_field'])) {
115 115
 
116 116
 			if (!empty($layout_def['fields'][strtoupper($layout_def['image2_ext_url_field'])])) {
117
-				$link_url  = $layout_def['fields'][strtoupper($layout_def['image2_ext_url_field'])];
117
+				$link_url = $layout_def['fields'][strtoupper($layout_def['image2_ext_url_field'])];
118 118
 			}
119 119
 
120 120
             $imagePath = '';
121
-            if ( $layout_def['image2'] == '__VARIABLE' ) {
122
-                if ( !empty($layout_def['fields'][$key.'_ICON']) ) {
121
+            if ($layout_def['image2'] == '__VARIABLE') {
122
+                if (!empty($layout_def['fields'][$key.'_ICON'])) {
123 123
                     $imagePath = $layout_def['fields'][$key.'_ICON'];
124 124
                 }
125 125
             } else {
126 126
                 $imagePath = $layout_def['image2'];
127 127
             }
128 128
 
129
-            if ( !empty($imagePath) ) {
130
-                $icon_img_html = SugarThemeRegistry::current()->getImage( $imagePath . '', 'border="0"',null,null,'.gif',$imagePath);
131
-                $ret.= (empty($link_url)) ? '' : '&nbsp;<a href="' . $link_url. '" TARGET = "_blank">' . "$icon_img_html</a>";
129
+            if (!empty($imagePath)) {
130
+                $icon_img_html = SugarThemeRegistry::current()->getImage($imagePath.'', 'border="0"', null, null, '.gif', $imagePath);
131
+                $ret .= (empty($link_url)) ? '' : '&nbsp;<a href="'.$link_url.'" TARGET = "_blank">'."$icon_img_html</a>";
132 132
             }
133 133
         }
134 134
 //if requested, add attachment icon.
135
-		if(!empty($layout_def['image2']) && !empty($layout_def['image2_url_field'])){
135
+		if (!empty($layout_def['image2']) && !empty($layout_def['image2_url_field'])) {
136 136
 
137 137
 			if (is_array($layout_def['image2_url_field'])) {
138 138
 				//Generate file url.
139 139
 				if (!empty($layout_def['fields'][strtoupper($layout_def['image2_url_field']['id_field'])])
140
-				and !empty($layout_def['fields'][strtoupper($layout_def['image2_url_field']['filename_field'])]) ) {
140
+				and !empty($layout_def['fields'][strtoupper($layout_def['image2_url_field']['filename_field'])])) {
141 141
 
142
-					$key=$layout_def['fields'][strtoupper($layout_def['image2_url_field']['id_field'])];
143
-                    $file=$layout_def['fields'][strtoupper($layout_def['image2_url_field']['filename_field'])];
144
-                    $filepath="index.php?entryPoint=download&id=".$key."&type=".$layout_def['module'];
142
+					$key = $layout_def['fields'][strtoupper($layout_def['image2_url_field']['id_field'])];
143
+                    $file = $layout_def['fields'][strtoupper($layout_def['image2_url_field']['filename_field'])];
144
+                    $filepath = "index.php?entryPoint=download&id=".$key."&type=".$layout_def['module'];
145 145
 				}
146 146
 			} else {
147 147
 				if (!empty($layout_def['fields'][strtoupper($layout_def['image2_url_field'])])) {
148
-					$filepath="index.php?entryPoint=download&id=".$layout_def['fields']['ID']."&type=".$layout_def['module'];
148
+					$filepath = "index.php?entryPoint=download&id=".$layout_def['fields']['ID']."&type=".$layout_def['module'];
149 149
 				}
150 150
 			}
151
-			$icon_img_html = SugarThemeRegistry::current()->getImage( $layout_def['image2'] . '', 'border="0"',null,null,'.gif',$layout_def['image2']);
151
+			$icon_img_html = SugarThemeRegistry::current()->getImage($layout_def['image2'].'', 'border="0"', null, null, '.gif', $layout_def['image2']);
152 152
 			if ($action_access && !empty($filepath)) {
153
-				$ret .= '<a href="' . $filepath. '" >' . "$icon_img_html</a>";
153
+				$ret .= '<a href="'.$filepath.'" >'."$icon_img_html</a>";
154 154
 			} elseif (!empty($filepath)) {
155 155
 				$ret .= $icon_img_html;
156 156
 			}
157 157
 		}
158 158
 		// now handle attachments for Emails
159
-		else if(!empty($layout_def['module']) && $layout_def['module'] == 'Emails' && !empty($layout_def['fields']['ATTACHMENT_IMAGE'])) {
160
-			$ret.= $layout_def['fields']['ATTACHMENT_IMAGE'];
159
+		else if (!empty($layout_def['module']) && $layout_def['module'] == 'Emails' && !empty($layout_def['fields']['ATTACHMENT_IMAGE'])) {
160
+			$ret .= $layout_def['fields']['ATTACHMENT_IMAGE'];
161 161
 		}
162 162
 		return $ret;
163 163
 	}
Please login to merge, or discard this 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.
@@ -59,8 +61,7 @@  discard block
 block discarded – undo
59 61
 		if(isset($layout_def['varname']))
60 62
 		{
61 63
 			$key = strtoupper($layout_def['varname']);
62
-		}
63
-		else
64
+		} else
64 65
 		{
65 66
 			$key = $this->_get_column_alias($layout_def);
66 67
 			$key = strtoupper($key);
@@ -77,8 +78,7 @@  discard block
 block discarded – undo
77 78
 			if(empty($layout_def['target_module']))
78 79
 			{
79 80
 				$module = $layout_def['module'];
80
-			}
81
-		else
81
+			} else
82 82
 			{
83 83
 				$module = $layout_def['target_module'];
84 84
 			}
@@ -87,8 +87,7 @@  discard block
 block discarded – undo
87 87
 		if(empty($layout_def['target_record_key']))
88 88
 		{
89 89
 			$record = $layout_def['fields']['ID'];
90
-		}
91
-		else
90
+		} else
92 91
 		{
93 92
 			$record_key = strtoupper($layout_def['target_record_key']);
94 93
 			$record = $layout_def['fields'][$record_key];
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelConcat.php 3 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -45,21 +45,21 @@
 block discarded – undo
45 45
 
46 46
 class SugarWidgetSubPanelConcat extends SugarWidgetField
47 47
 {
48
-	function displayList(&$layout_def)
49
-	{
50
-		$value='';
51
-		if (isset($layout_def['source']) and is_array($layout_def['source']) and isset($layout_def['fields']) and is_array($layout_def['fields'])) {
48
+    function displayList(&$layout_def)
49
+    {
50
+        $value='';
51
+        if (isset($layout_def['source']) and is_array($layout_def['source']) and isset($layout_def['fields']) and is_array($layout_def['fields'])) {
52 52
 			
53
-			foreach ($layout_def['source'] as $field) {
53
+            foreach ($layout_def['source'] as $field) {
54 54
 			
55
-				if (isset($layout_def['fields'][strtoupper($field)])) {
56
-					$value.=$layout_def['fields'][strtoupper($field)];
57
-				} else {
58
-					$value.=$field;
59
-				}	
60
-			}
61
-		}
62
-		return $value;
63
-	}
55
+                if (isset($layout_def['fields'][strtoupper($field)])) {
56
+                    $value.=$layout_def['fields'][strtoupper($field)];
57
+                } else {
58
+                    $value.=$field;
59
+                }	
60
+            }
61
+        }
62
+        return $value;
63
+    }
64 64
 }
65 65
 ?>
66 66
\ 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.
@@ -47,15 +47,15 @@  discard block
 block discarded – undo
47 47
 {
48 48
 	function displayList(&$layout_def)
49 49
 	{
50
-		$value='';
50
+		$value = '';
51 51
 		if (isset($layout_def['source']) and is_array($layout_def['source']) and isset($layout_def['fields']) and is_array($layout_def['fields'])) {
52 52
 			
53 53
 			foreach ($layout_def['source'] as $field) {
54 54
 			
55 55
 				if (isset($layout_def['fields'][strtoupper($field)])) {
56
-					$value.=$layout_def['fields'][strtoupper($field)];
56
+					$value .= $layout_def['fields'][strtoupper($field)];
57 57
 				} else {
58
-					$value.=$field;
58
+					$value .= $field;
59 59
 				}	
60 60
 			}
61 61
 		}
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/SugarWidgetSubPanelRemoveButton.php 3 patches
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -45,81 +45,81 @@
 block discarded – undo
45 45
 
46 46
 class SugarWidgetSubPanelRemoveButton extends SugarWidgetField
47 47
 {
48
-	function displayHeaderCell($layout_def)
49
-	{
50
-		return '&nbsp;';
51
-	}
48
+    function displayHeaderCell($layout_def)
49
+    {
50
+        return '&nbsp;';
51
+    }
52 52
 
53
-	function displayList($layout_def)
54
-	{
53
+    function displayList($layout_def)
54
+    {
55 55
 		
56
-		global $app_strings;
56
+        global $app_strings;
57 57
         global $subpanel_item_count;
58 58
 
59
-		$unique_id = $layout_def['subpanel_id']."_remove_".$subpanel_item_count; //bug 51512
59
+        $unique_id = $layout_def['subpanel_id']."_remove_".$subpanel_item_count; //bug 51512
60 60
 		
61
-		$parent_record_id = $_REQUEST['record'];
62
-		$parent_module = $_REQUEST['module'];
61
+        $parent_record_id = $_REQUEST['record'];
62
+        $parent_module = $_REQUEST['module'];
63 63
 
64
-		$action = 'DeleteRelationship';
65
-		$record = $layout_def['fields']['ID'];
66
-		$current_module=$layout_def['module'];
67
-		//in document revisions subpanel ,users are now allowed to 
68
-		//delete the latest revsion of a document. this will be tested here
69
-		//and if the condition is met delete button will be removed.
70
-		$hideremove=false;
71
-		if ($current_module=='DocumentRevisions') {
72
-			if ($layout_def['fields']['ID']==$layout_def['fields']['LATEST_REVISION_ID']) {
73
-				$hideremove=true;
74
-			}
75
-		}
76
-		// Implicit Team-memberships are not "removeable" 
77
-		elseif ($_REQUEST['module'] == 'Teams' && $current_module == 'Users') {
78
-			if($layout_def['fields']['UPLINE'] != translate('LBL_TEAM_UPLINE_EXPLICIT', 'Users')) {
79
-				$hideremove = true;
80
-			}	
64
+        $action = 'DeleteRelationship';
65
+        $record = $layout_def['fields']['ID'];
66
+        $current_module=$layout_def['module'];
67
+        //in document revisions subpanel ,users are now allowed to 
68
+        //delete the latest revsion of a document. this will be tested here
69
+        //and if the condition is met delete button will be removed.
70
+        $hideremove=false;
71
+        if ($current_module=='DocumentRevisions') {
72
+            if ($layout_def['fields']['ID']==$layout_def['fields']['LATEST_REVISION_ID']) {
73
+                $hideremove=true;
74
+            }
75
+        }
76
+        // Implicit Team-memberships are not "removeable" 
77
+        elseif ($_REQUEST['module'] == 'Teams' && $current_module == 'Users') {
78
+            if($layout_def['fields']['UPLINE'] != translate('LBL_TEAM_UPLINE_EXPLICIT', 'Users')) {
79
+                $hideremove = true;
80
+            }	
81 81
 			
82
-			//We also cannot remove the user whose private team is set to the parent_record_id value
83
-			$user = new User();
84
-			$user->retrieve($layout_def['fields']['ID']);
85
-			if($parent_record_id == $user->getPrivateTeamID())
86
-			{
87
-			    $hideremove = true;
88
-			}
89
-		}
82
+            //We also cannot remove the user whose private team is set to the parent_record_id value
83
+            $user = new User();
84
+            $user->retrieve($layout_def['fields']['ID']);
85
+            if($parent_record_id == $user->getPrivateTeamID())
86
+            {
87
+                $hideremove = true;
88
+            }
89
+        }
90 90
 		
91 91
 		
92
-		$return_module = $_REQUEST['module'];
93
-		$return_action = 'SubPanelViewer';
94
-		$subpanel = $layout_def['subpanel_id'];
95
-		$return_id = $_REQUEST['record'];
96
-		if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
97
-			$linked_field= $layout_def['linked_field_set'] ;
98
-		} else {
99
-			$linked_field = $layout_def['linked_field'];
100
-		}
101
-		$refresh_page = 0;
102
-		if(!empty($layout_def['refresh_page'])){
103
-			$refresh_page = 1;
104
-		}
105
-		$return_url = "index.php?module=$return_module&action=$return_action&subpanel=$subpanel&record=$return_id&sugar_body_only=1&inline=1";
92
+        $return_module = $_REQUEST['module'];
93
+        $return_action = 'SubPanelViewer';
94
+        $subpanel = $layout_def['subpanel_id'];
95
+        $return_id = $_REQUEST['record'];
96
+        if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
97
+            $linked_field= $layout_def['linked_field_set'] ;
98
+        } else {
99
+            $linked_field = $layout_def['linked_field'];
100
+        }
101
+        $refresh_page = 0;
102
+        if(!empty($layout_def['refresh_page'])){
103
+            $refresh_page = 1;
104
+        }
105
+        $return_url = "index.php?module=$return_module&action=$return_action&subpanel=$subpanel&record=$return_id&sugar_body_only=1&inline=1";
106 106
 
107
-		$icon_remove_text = mb_strtolower($app_strings['LBL_ID_FF_REMOVE'], 'UTF-8');
107
+        $icon_remove_text = mb_strtolower($app_strings['LBL_ID_FF_REMOVE'], 'UTF-8');
108 108
 		
109
-         if($linked_field == 'get_emails_by_assign_or_link')
109
+            if($linked_field == 'get_emails_by_assign_or_link')
110 110
             $linked_field = 'emails';
111
-		//based on listview since that lets you select records
112
-		if($layout_def['ListView'] && !$hideremove) {
111
+        //based on listview since that lets you select records
112
+        if($layout_def['ListView'] && !$hideremove) {
113 113
             $retStr = "<a href=\"javascript:sub_p_rem('$subpanel', '$linked_field'" 
114 114
                     .", '$record', $refresh_page);\"" 
115
-			. ' class="listViewTdToolsS1"'
115
+            . ' class="listViewTdToolsS1"'
116 116
             . "id=$unique_id"
117
-			. " onclick=\"return sp_rem_conf();\""
118
-			. ">$icon_remove_text</a>";
117
+            . " onclick=\"return sp_rem_conf();\""
118
+            . ">$icon_remove_text</a>";
119 119
         return $retStr;
120 120
             
121
-		}else{
122
-			return '';
123
-		}
124
-	}
121
+        }else{
122
+            return '';
123
+        }
124
+    }
125 125
 }
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 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.
@@ -63,26 +63,26 @@  discard block
 block discarded – undo
63 63
 
64 64
 		$action = 'DeleteRelationship';
65 65
 		$record = $layout_def['fields']['ID'];
66
-		$current_module=$layout_def['module'];
66
+		$current_module = $layout_def['module'];
67 67
 		//in document revisions subpanel ,users are now allowed to 
68 68
 		//delete the latest revsion of a document. this will be tested here
69 69
 		//and if the condition is met delete button will be removed.
70
-		$hideremove=false;
71
-		if ($current_module=='DocumentRevisions') {
72
-			if ($layout_def['fields']['ID']==$layout_def['fields']['LATEST_REVISION_ID']) {
73
-				$hideremove=true;
70
+		$hideremove = false;
71
+		if ($current_module == 'DocumentRevisions') {
72
+			if ($layout_def['fields']['ID'] == $layout_def['fields']['LATEST_REVISION_ID']) {
73
+				$hideremove = true;
74 74
 			}
75 75
 		}
76 76
 		// Implicit Team-memberships are not "removeable" 
77 77
 		elseif ($_REQUEST['module'] == 'Teams' && $current_module == 'Users') {
78
-			if($layout_def['fields']['UPLINE'] != translate('LBL_TEAM_UPLINE_EXPLICIT', 'Users')) {
78
+			if ($layout_def['fields']['UPLINE'] != translate('LBL_TEAM_UPLINE_EXPLICIT', 'Users')) {
79 79
 				$hideremove = true;
80 80
 			}	
81 81
 			
82 82
 			//We also cannot remove the user whose private team is set to the parent_record_id value
83 83
 			$user = new User();
84 84
 			$user->retrieve($layout_def['fields']['ID']);
85
-			if($parent_record_id == $user->getPrivateTeamID())
85
+			if ($parent_record_id == $user->getPrivateTeamID())
86 86
 			{
87 87
 			    $hideremove = true;
88 88
 			}
@@ -94,22 +94,22 @@  discard block
 block discarded – undo
94 94
 		$subpanel = $layout_def['subpanel_id'];
95 95
 		$return_id = $_REQUEST['record'];
96 96
 		if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
97
-			$linked_field= $layout_def['linked_field_set'] ;
97
+			$linked_field = $layout_def['linked_field_set'];
98 98
 		} else {
99 99
 			$linked_field = $layout_def['linked_field'];
100 100
 		}
101 101
 		$refresh_page = 0;
102
-		if(!empty($layout_def['refresh_page'])){
102
+		if (!empty($layout_def['refresh_page'])) {
103 103
 			$refresh_page = 1;
104 104
 		}
105 105
 		$return_url = "index.php?module=$return_module&action=$return_action&subpanel=$subpanel&record=$return_id&sugar_body_only=1&inline=1";
106 106
 
107 107
 		$icon_remove_text = mb_strtolower($app_strings['LBL_ID_FF_REMOVE'], 'UTF-8');
108 108
 		
109
-         if($linked_field == 'get_emails_by_assign_or_link')
109
+         if ($linked_field == 'get_emails_by_assign_or_link')
110 110
             $linked_field = 'emails';
111 111
 		//based on listview since that lets you select records
112
-		if($layout_def['ListView'] && !$hideremove) {
112
+		if ($layout_def['ListView'] && !$hideremove) {
113 113
             $retStr = "<a href=\"javascript:sub_p_rem('$subpanel', '$linked_field'" 
114 114
                     .", '$record', $refresh_page);\"" 
115 115
 			. ' class="listViewTdToolsS1"'
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 			. ">$icon_remove_text</a>";
119 119
         return $retStr;
120 120
             
121
-		}else{
121
+		} else {
122 122
 			return '';
123 123
 		}
124 124
 	}
Please login to merge, or discard this patch.
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -106,8 +108,9 @@  discard block
 block discarded – undo
106 108
 
107 109
 		$icon_remove_text = mb_strtolower($app_strings['LBL_ID_FF_REMOVE'], 'UTF-8');
108 110
 		
109
-         if($linked_field == 'get_emails_by_assign_or_link')
110
-            $linked_field = 'emails';
111
+         if($linked_field == 'get_emails_by_assign_or_link') {
112
+                     $linked_field = 'emails';
113
+         }
111 114
 		//based on listview since that lets you select records
112 115
 		if($layout_def['ListView'] && !$hideremove) {
113 116
             $retStr = "<a href=\"javascript:sub_p_rem('$subpanel', '$linked_field'" 
@@ -118,7 +121,7 @@  discard block
 block discarded – undo
118 121
 			. ">$icon_remove_text</a>";
119 122
         return $retStr;
120 123
             
121
-		}else{
124
+		} else{
122 125
 			return '';
123 126
 		}
124 127
 	}
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldcurrency.php 3 patches
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         if (empty($global_currency_obj))
53 53
         {
54 54
         $global_currency_obj = new Currency();
55
-      //  $global_currency_symbol = '$';
55
+        //  $global_currency_symbol = '$';
56 56
                                                                                        
57 57
         if($current_user->getPreference('currency') )
58 58
         {
@@ -106,18 +106,18 @@  discard block
 block discarded – undo
106 106
             $record = $layout_def['fields'][strtoupper($layout_def['table_alias']."_id")];
107 107
         }
108 108
         if (!empty($record)) {
109
-	        $field_name = $layout_def['name'];
110
-	        $field_type = $field_def['type'];
111
-	        $module = $field_def['module'];
109
+            $field_name = $layout_def['name'];
110
+            $field_type = $field_def['type'];
111
+            $module = $field_def['module'];
112 112
 	
113
-	        $div_id = $module ."&$record&$field_name";
114
-	        $str = "<div id='$div_id'>".$display;
113
+            $div_id = $module ."&$record&$field_name";
114
+            $str = "<div id='$div_id'>".$display;
115 115
             global $sugar_config;
116 116
             if (isset ($sugar_config['enable_inline_reports_edit']) && $sugar_config['enable_inline_reports_edit']) {
117 117
                 $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\",\"$currency_id\",\"$symbol\");'");
118 118
             }
119
-	        $str .= "</div>";
120
-	        return $str;
119
+            $str .= "</div>";
120
+            return $str;
121 121
         }
122 122
         else
123 123
             return $display;
@@ -135,61 +135,61 @@  discard block
 block discarded – undo
135 135
         );
136 136
         return $value;
137 137
     }                                                          
138
- function queryFilterEquals(&$layout_def)
139
- {
140
-     return $this->_get_column_select($layout_def)."=".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
141
- }
138
+    function queryFilterEquals(&$layout_def)
139
+    {
140
+        return $this->_get_column_select($layout_def)."=".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
141
+    }
142 142
                                                                                        
143
- function queryFilterNot_Equals(&$layout_def)
144
- {
145
-     return $this->_get_column_select($layout_def)."!=".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
146
- }
143
+    function queryFilterNot_Equals(&$layout_def)
144
+    {
145
+        return $this->_get_column_select($layout_def)."!=".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
146
+    }
147 147
                                                                                        
148
- function queryFilterGreater(&$layout_def)
149
- {
150
-     return $this->_get_column_select($layout_def)." > ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
151
- }
148
+    function queryFilterGreater(&$layout_def)
149
+    {
150
+        return $this->_get_column_select($layout_def)." > ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
151
+    }
152 152
                                                                                        
153
- function queryFilterLess(&$layout_def)
154
- {
155
-     return $this->_get_column_select($layout_def)." < ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
156
- }
153
+    function queryFilterLess(&$layout_def)
154
+    {
155
+        return $this->_get_column_select($layout_def)." < ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
156
+    }
157 157
 
158
- function queryFilterBetween(&$layout_def){
159
-     return $this->_get_column_select($layout_def)." > ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0'])). " AND ". $this->_get_column_select($layout_def)." < ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name1']))."\n";
160
- }
158
+    function queryFilterBetween(&$layout_def){
159
+        return $this->_get_column_select($layout_def)." > ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0'])). " AND ". $this->_get_column_select($layout_def)." < ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name1']))."\n";
160
+    }
161 161
 
162
- function isSystemCurrency(&$layout_def)
163
- {
164
-     if (strpos($layout_def['name'],'_usdoll') === false) {
165
-         return false;
166
-     } else {
167
-         return true;
168
-     }
169
- }
162
+    function isSystemCurrency(&$layout_def)
163
+    {
164
+        if (strpos($layout_def['name'],'_usdoll') === false) {
165
+            return false;
166
+        } else {
167
+            return true;
168
+        }
169
+    }
170 170
 
171
- function querySelect(&$layout_def)
172
- {
171
+    function querySelect(&$layout_def)
172
+    {
173 173
     // add currency column to select
174 174
     $table = $this->getCurrencyIdTable($layout_def);
175 175
     if($table) {
176 176
         return $this->_get_column_select($layout_def)." ".$this->_get_column_alias($layout_def)." , ".$table.".currency_id ". $this->getTruncatedColumnAlias($this->_get_column_alias($layout_def)."_currency") . "\n";
177 177
     }
178 178
     return $this->_get_column_select($layout_def)." ".$this->_get_column_alias($layout_def)."\n";
179
- }
179
+    }
180 180
 
181
- function queryGroupBy($layout_def)
182
- {
181
+    function queryGroupBy($layout_def)
182
+    {
183 183
     // add currency column to group by
184 184
     $table = $this->getCurrencyIdTable($layout_def);
185 185
     if($table) {
186 186
         return $this->_get_column_select($layout_def)." , ".$table.".currency_id \n";
187 187
     }
188 188
     return $this->_get_column_select($layout_def)." \n";
189
- }
189
+    }
190 190
 
191
- function getCurrencyIdTable($layout_def)
192
- {
191
+    function getCurrencyIdTable($layout_def)
192
+    {
193 193
     // We need to fetch the currency id as well
194 194
     if ( !$this->isSystemCurrency($layout_def) && empty($layout_def['group_function'])) {
195 195
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         }
220 220
     }
221 221
     return false;
222
- }
222
+    }
223 223
 
224 224
     /**
225 225
      * Return currency for layout_def
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 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,13 +48,13 @@  discard block
 block discarded – undo
48 48
 
49 49
 function get_currency()
50 50
 {
51
-        global $current_user,$global_currency_obj;
51
+        global $current_user, $global_currency_obj;
52 52
         if (empty($global_currency_obj))
53 53
         {
54 54
         $global_currency_obj = new Currency();
55 55
       //  $global_currency_symbol = '$';
56 56
 
57
-        if($current_user->getPreference('currency') )
57
+        if ($current_user->getPreference('currency'))
58 58
         {
59 59
                 $global_currency_obj->retrieve($current_user->getPreference('currency'));
60 60
         }
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
     /**
78 78
      * @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
79 79
      */
80
-    function SugarWidgetFieldCurrency(&$layout_manager){
80
+    function SugarWidgetFieldCurrency(&$layout_manager) {
81 81
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
82
-        if(isset($GLOBALS['log'])) {
82
+        if (isset($GLOBALS['log'])) {
83 83
             $GLOBALS['log']->deprecated($deprecatedMessage);
84 84
         }
85 85
         else {
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
             $currency_id = $locale->getPrecedentPreference('currency');
98 98
 
99 99
             // If it's not grouped, or if it's grouped around a system currency column, look up the currency symbol so we can display it next to the amount
100
-            if ( empty($layout_def['group_function']) || $this->isSystemCurrency($layout_def) ) {
100
+            if (empty($layout_def['group_function']) || $this->isSystemCurrency($layout_def)) {
101 101
                 $c = $this->getCurrency($layout_def);
102
-                if(!empty($c['currency_id']) && !empty($c['currency_symbol']))
102
+                if (!empty($c['currency_id']) && !empty($c['currency_symbol']))
103 103
                 {
104 104
                     $symbol = $c['currency_symbol'];
105 105
                     $currency_id = $c['currency_id'];
@@ -109,15 +109,15 @@  discard block
 block discarded – undo
109 109
             $layout_def['currency_id'] = $currency_id;
110 110
             $display = $this->displayListPlain($layout_def);
111 111
 
112
-        if(!empty($layout_def['column_key'])){
112
+        if (!empty($layout_def['column_key'])) {
113 113
             $field_def = $this->reporter->all_fields[$layout_def['column_key']];
114
-        }else if(!empty($layout_def['fields'])){
114
+        } else if (!empty($layout_def['fields'])) {
115 115
             $field_def = $layout_def['fields'];
116 116
         }
117 117
         $record = '';
118 118
         if ($layout_def['table_key'] == 'self' && isset($layout_def['fields']['PRIMARYID']))
119 119
             $record = $layout_def['fields']['PRIMARYID'];
120
-        else if (isset($layout_def['fields'][strtoupper($layout_def['table_alias']."_id")])){
120
+        else if (isset($layout_def['fields'][strtoupper($layout_def['table_alias']."_id")])) {
121 121
             $record = $layout_def['fields'][strtoupper($layout_def['table_alias']."_id")];
122 122
         }
123 123
         if (!empty($record)) {
@@ -125,11 +125,11 @@  discard block
 block discarded – undo
125 125
 	        $field_type = $field_def['type'];
126 126
 	        $module = $field_def['module'];
127 127
 
128
-	        $div_id = $module ."&$record&$field_name";
128
+	        $div_id = $module."&$record&$field_name";
129 129
 	        $str = "<div id='$div_id'>".$display;
130 130
             global $sugar_config;
131 131
             if (isset ($sugar_config['enable_inline_reports_edit']) && $sugar_config['enable_inline_reports_edit']) {
132
-                $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\",\"$currency_id\",\"$symbol\");'");
132
+                $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\",\"$currency_id\",\"$symbol\");'");
133 133
             }
134 134
 	        $str .= "</div>";
135 135
 	        return $str;
@@ -170,13 +170,13 @@  discard block
 block discarded – undo
170 170
      return $this->_get_column_select($layout_def)." < ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
171 171
  }
172 172
 
173
- function queryFilterBetween(&$layout_def){
174
-     return $this->_get_column_select($layout_def)." > ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0'])). " AND ". $this->_get_column_select($layout_def)." < ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name1']))."\n";
173
+ function queryFilterBetween(&$layout_def) {
174
+     return $this->_get_column_select($layout_def)." > ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))." AND ".$this->_get_column_select($layout_def)." < ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name1']))."\n";
175 175
  }
176 176
 
177 177
  function isSystemCurrency(&$layout_def)
178 178
  {
179
-     if (strpos($layout_def['name'],'_usdoll') === false) {
179
+     if (strpos($layout_def['name'], '_usdoll') === false) {
180 180
          return false;
181 181
      } else {
182 182
          return true;
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
  {
188 188
     // add currency column to select
189 189
     $table = $this->getCurrencyIdTable($layout_def);
190
-    if($table) {
191
-        return $this->_get_column_select($layout_def)." ".$this->_get_column_alias($layout_def)." , ".$table.".currency_id ". $this->getTruncatedColumnAlias($this->_get_column_alias($layout_def)."_currency") . "\n";
190
+    if ($table) {
191
+        return $this->_get_column_select($layout_def)." ".$this->_get_column_alias($layout_def)." , ".$table.".currency_id ".$this->getTruncatedColumnAlias($this->_get_column_alias($layout_def)."_currency")."\n";
192 192
     }
193 193
     return $this->_get_column_select($layout_def)." ".$this->_get_column_alias($layout_def)."\n";
194 194
  }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
  {
198 198
     // add currency column to group by
199 199
     $table = $this->getCurrencyIdTable($layout_def);
200
-    if($table) {
200
+    if ($table) {
201 201
         return $this->_get_column_select($layout_def)." , ".$table.".currency_id \n";
202 202
     }
203 203
     return $this->_get_column_select($layout_def)." \n";
@@ -206,9 +206,9 @@  discard block
 block discarded – undo
206 206
  function getCurrencyIdTable($layout_def)
207 207
  {
208 208
     // We need to fetch the currency id as well
209
-    if ( !$this->isSystemCurrency($layout_def) && empty($layout_def['group_function'])) {
209
+    if (!$this->isSystemCurrency($layout_def) && empty($layout_def['group_function'])) {
210 210
 
211
-        if ( !empty($layout_def['table_alias']) ) {
211
+        if (!empty($layout_def['table_alias'])) {
212 212
             $table = $layout_def['table_alias'];
213 213
         } else {
214 214
             $table = '';
@@ -219,16 +219,16 @@  discard block
 block discarded – undo
219 219
             $real_table = $this->reporter->all_fields[$layout_def['column_key']]['real_table'];
220 220
 
221 221
         $add_currency_id = false;
222
-        if(!empty($table)) {
222
+        if (!empty($table)) {
223 223
             $cols = $GLOBALS['db']->getHelper()->get_columns($real_table);
224 224
             $add_currency_id = isset($cols['currency_id']) ? true : false;
225 225
 
226
-            if(!$add_currency_id && preg_match('/.*?_cstm$/i', $real_table)) {
226
+            if (!$add_currency_id && preg_match('/.*?_cstm$/i', $real_table)) {
227 227
                 $table = str_replace('_cstm', '', $table);
228 228
                 $cols = $GLOBALS['db']->getHelper()->get_columns($table);
229 229
                 $add_currency_id = isset($cols['currency_id']) ? true : false;
230 230
             }
231
-            if($add_currency_id) {
231
+            if ($add_currency_id) {
232 232
                 return $table;
233 233
             }
234 234
         }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     {
246 246
         $currency_id = false;
247 247
         $currency_symbol = false;
248
-        if(isset($layout_def['currency_symbol']) && isset($layout_def['currency_id']))
248
+        if (isset($layout_def['currency_symbol']) && isset($layout_def['currency_id']))
249 249
         {
250 250
             $currency_symbol = $layout_def['currency_symbol'];
251 251
             $currency_id = $layout_def['currency_id'];
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         else
254 254
         {
255 255
             $key = strtoupper(isset($layout_def['varname']) ? $layout_def['varname'] : $this->_get_column_alias($layout_def));
256
-            if ( $this->isSystemCurrency($layout_def) )
256
+            if ($this->isSystemCurrency($layout_def))
257 257
             {
258 258
                 $currency_id = '-99';
259 259
             }
@@ -261,14 +261,14 @@  discard block
 block discarded – undo
261 261
             {
262 262
                 $currency_id = $layout_def['fields'][$key.'_CURRENCY'];
263 263
             }
264
-            elseif(isset($layout_def['fields'][$this->getTruncatedColumnAlias($this->_get_column_alias($layout_def)."_currency")]))
264
+            elseif (isset($layout_def['fields'][$this->getTruncatedColumnAlias($this->_get_column_alias($layout_def)."_currency")]))
265 265
             {
266 266
                 $currency_id = $layout_def['fields'][$this->getTruncatedColumnAlias($this->_get_column_alias($layout_def)."_currency")];
267 267
             }
268
-            if($currency_id)
268
+            if ($currency_id)
269 269
             {
270 270
                 $currency = BeanFactory::getBean('Currencies', $currency_id);
271
-                if(!empty($currency ->symbol))
271
+                if (!empty($currency ->symbol))
272 272
                 {
273 273
                     $currency_symbol = $currency ->symbol;
274 274
                 }
Please login to merge, or discard this patch.
Braces   +17 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -57,8 +59,7 @@  discard block
 block discarded – undo
57 59
         if($current_user->getPreference('currency') )
58 60
         {
59 61
                 $global_currency_obj->retrieve($current_user->getPreference('currency'));
60
-        }
61
-        else
62
+        } else
62 63
         {
63 64
                 $global_currency_obj->retrieve('-99');
64 65
         }
@@ -81,8 +82,7 @@  discard block
 block discarded – undo
81 82
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
82 83
         if(isset($GLOBALS['log'])) {
83 84
             $GLOBALS['log']->deprecated($deprecatedMessage);
84
-        }
85
-        else {
85
+        } else {
86 86
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
87 87
         }
88 88
         self::__construct($layout_manager);
@@ -111,13 +111,13 @@  discard block
 block discarded – undo
111 111
 
112 112
         if(!empty($layout_def['column_key'])){
113 113
             $field_def = $this->reporter->all_fields[$layout_def['column_key']];
114
-        }else if(!empty($layout_def['fields'])){
114
+        } else if(!empty($layout_def['fields'])){
115 115
             $field_def = $layout_def['fields'];
116 116
         }
117 117
         $record = '';
118
-        if ($layout_def['table_key'] == 'self' && isset($layout_def['fields']['PRIMARYID']))
119
-            $record = $layout_def['fields']['PRIMARYID'];
120
-        else if (isset($layout_def['fields'][strtoupper($layout_def['table_alias']."_id")])){
118
+        if ($layout_def['table_key'] == 'self' && isset($layout_def['fields']['PRIMARYID'])) {
119
+                    $record = $layout_def['fields']['PRIMARYID'];
120
+        } else if (isset($layout_def['fields'][strtoupper($layout_def['table_alias']."_id")])){
121 121
             $record = $layout_def['fields'][strtoupper($layout_def['table_alias']."_id")];
122 122
         }
123 123
         if (!empty($record)) {
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
             }
134 134
 	        $str .= "</div>";
135 135
 	        return $str;
136
+        } else {
137
+                    return $display;
136 138
         }
137
-        else
138
-            return $display;
139 139
     }
140 140
 
141 141
     function displayListPlain($layout_def) {
@@ -215,8 +215,9 @@  discard block
 block discarded – undo
215 215
         }
216 216
 
217 217
         $real_table = '';
218
-        if (!empty($this->reporter->all_fields[$layout_def['column_key']]['real_table']))
219
-            $real_table = $this->reporter->all_fields[$layout_def['column_key']]['real_table'];
218
+        if (!empty($this->reporter->all_fields[$layout_def['column_key']]['real_table'])) {
219
+                    $real_table = $this->reporter->all_fields[$layout_def['column_key']]['real_table'];
220
+        }
220 221
 
221 222
         $add_currency_id = false;
222 223
         if(!empty($table)) {
@@ -249,19 +250,16 @@  discard block
 block discarded – undo
249 250
         {
250 251
             $currency_symbol = $layout_def['currency_symbol'];
251 252
             $currency_id = $layout_def['currency_id'];
252
-        }
253
-        else
253
+        } else
254 254
         {
255 255
             $key = strtoupper(isset($layout_def['varname']) ? $layout_def['varname'] : $this->_get_column_alias($layout_def));
256 256
             if ( $this->isSystemCurrency($layout_def) )
257 257
             {
258 258
                 $currency_id = '-99';
259
-            }
260
-            elseif (isset($layout_def['fields'][$key.'_CURRENCY']))
259
+            } elseif (isset($layout_def['fields'][$key.'_CURRENCY']))
261 260
             {
262 261
                 $currency_id = $layout_def['fields'][$key.'_CURRENCY'];
263
-            }
264
-            elseif(isset($layout_def['fields'][$this->getTruncatedColumnAlias($this->_get_column_alias($layout_def)."_currency")]))
262
+            } elseif(isset($layout_def['fields'][$this->getTruncatedColumnAlias($this->_get_column_alias($layout_def)."_currency")]))
265 263
             {
266 264
                 $currency_id = $layout_def['fields'][$this->getTruncatedColumnAlias($this->_get_column_alias($layout_def)."_currency")];
267 265
             }
Please login to merge, or discard this patch.