Completed
Push — develop ( 695bbe )
by Adam
37:32 queued 21:39
created
include/generic/SugarWidgets/SugarWidgetSubPanelDetailViewLink.php 1 patch
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -45,65 +45,65 @@  discard block
 block discarded – undo
45 45
 
46 46
 class SugarWidgetSubPanelDetailViewLink extends SugarWidgetField
47 47
 {
48
-	function displayList($layout_def)
49
-	{
50
-		global $focus;
51
-
52
-		$module = '';
53
-		$record = '';
54
-
55
-		if(isset($layout_def['varname']))
56
-		{
57
-			$key = strtoupper($layout_def['varname']);
58
-		}
59
-		else
60
-		{
61
-			$key = $this->_get_column_alias($layout_def);
62
-			$key = strtoupper($key);
63
-		}
64
-		if (empty($layout_def['fields'][$key])) {
65
-			return "";
66
-		} else {
67
-			$value = $layout_def['fields'][$key];
68
-		}
69
-
70
-
71
-		if(empty($layout_def['target_record_key']))
72
-		{
73
-			$record = $layout_def['fields']['ID'];
74
-		}
75
-		else
76
-		{
77
-			$record_key = strtoupper($layout_def['target_record_key']);
78
-			$record = $layout_def['fields'][$record_key];
79
-		}
80
-
81
-		if(!empty($layout_def['target_module_key'])) {
82
-			if (!empty($layout_def['fields'][strtoupper($layout_def['target_module_key'])])) {
83
-				$module=$layout_def['fields'][strtoupper($layout_def['target_module_key'])];
84
-			}
85
-		}
48
+    function displayList($layout_def)
49
+    {
50
+        global $focus;
51
+
52
+        $module = '';
53
+        $record = '';
54
+
55
+        if(isset($layout_def['varname']))
56
+        {
57
+            $key = strtoupper($layout_def['varname']);
58
+        }
59
+        else
60
+        {
61
+            $key = $this->_get_column_alias($layout_def);
62
+            $key = strtoupper($key);
63
+        }
64
+        if (empty($layout_def['fields'][$key])) {
65
+            return "";
66
+        } else {
67
+            $value = $layout_def['fields'][$key];
68
+        }
69
+
70
+
71
+        if(empty($layout_def['target_record_key']))
72
+        {
73
+            $record = $layout_def['fields']['ID'];
74
+        }
75
+        else
76
+        {
77
+            $record_key = strtoupper($layout_def['target_record_key']);
78
+            $record = $layout_def['fields'][$record_key];
79
+        }
80
+
81
+        if(!empty($layout_def['target_module_key'])) {
82
+            if (!empty($layout_def['fields'][strtoupper($layout_def['target_module_key'])])) {
83
+                $module=$layout_def['fields'][strtoupper($layout_def['target_module_key'])];
84
+            }
85
+        }
86 86
 
87 87
         if (empty($module)) {
88
-			if(empty($layout_def['target_module']))
89
-			{
90
-				$module = $layout_def['module'];
91
-			}
92
-		else
93
-			{
94
-				$module = $layout_def['target_module'];
95
-			}
96
-		}
88
+            if(empty($layout_def['target_module']))
89
+            {
90
+                $module = $layout_def['module'];
91
+            }
92
+        else
93
+            {
94
+                $module = $layout_def['target_module'];
95
+            }
96
+        }
97 97
 
98 98
         //links to email module now need additional information.
99 99
         //this is to resolve the information about the target of the emails. necessitated by feature that allow
100 100
         //only on email record for the whole campaign.
101 101
         $parent='';
102 102
         if (!empty($layout_def['parent_info'])) {
103
-			if (!empty($focus)){
104
-	            $parent="&parent_id=".$focus->id;
105
-	            $parent.="&parent_module=".$focus->module_dir;
106
-			}
103
+            if (!empty($focus)){
104
+                $parent="&parent_id=".$focus->id;
105
+                $parent.="&parent_module=".$focus->module_dir;
106
+            }
107 107
         } else {
108 108
             if(!empty($layout_def['parent_id'])) {
109 109
                 if (isset($layout_def['fields'][strtoupper($layout_def['parent_id'])])) {
@@ -117,13 +117,13 @@  discard block
 block discarded – undo
117 117
             }
118 118
         }
119 119
 
120
-		$action = 'DetailView';
121
-		$value = $layout_def['fields'][$key];
122
-		global $current_user;
123
-		if(  !empty($record) &&
124
-			($layout_def['DetailView'] && !$layout_def['owner_module'] 
125
-			||  $layout_def['DetailView'] && !ACLController::moduleSupportsACL($layout_def['owner_module']) 
126
-			|| ACLController::checkAccess($layout_def['owner_module'], 'view', $layout_def['owner_id'] == $current_user->id)))
120
+        $action = 'DetailView';
121
+        $value = $layout_def['fields'][$key];
122
+        global $current_user;
123
+        if(  !empty($record) &&
124
+            ($layout_def['DetailView'] && !$layout_def['owner_module'] 
125
+            ||  $layout_def['DetailView'] && !ACLController::moduleSupportsACL($layout_def['owner_module']) 
126
+            || ACLController::checkAccess($layout_def['owner_module'], 'view', $layout_def['owner_id'] == $current_user->id)))
127 127
         {
128 128
             $link = ajaxLink("index.php?module=$module&action=$action&record={$record}{$parent}");
129 129
             if ($module == 'EAPM')
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
             }
133 133
             return '<a href="' . $link . '" >'."$value</a>";
134 134
 
135
-		}else{
136
-			return $value;
137
-		}
135
+        }else{
136
+            return $value;
137
+        }
138 138
 		
139
-	}
139
+    }
140 140
 }
141 141
 
142 142
 ?>
143 143
\ No newline at end of file
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelRemoveButtonProjects.php 1 patch
Indentation   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -45,83 +45,83 @@
 block discarded – undo
45 45
 
46 46
 class SugarWidgetSubPanelRemoveButtonProjects 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
-		global $current_user;
57
+        global $current_user;
58 58
 		
59
-		$parent_record_id = $_REQUEST['record'];
60
-		$parent_module = $_REQUEST['module'];
59
+        $parent_record_id = $_REQUEST['record'];
60
+        $parent_module = $_REQUEST['module'];
61 61
 
62
-		if ($layout_def['module'] == 'Holidays'){
63
-			$action = 'DeleteHolidayRelationship';
64
-		}
65
-		else if ($layout_def['module'] == 'Users' || $layout_def['module'] == 'Contacts'){
66
-			$action = 'DeleteResourceRelationship';
67
-		}
68
-		else{
69
-			$action = 'DeleteRelationship';
70
-		}
62
+        if ($layout_def['module'] == 'Holidays'){
63
+            $action = 'DeleteHolidayRelationship';
64
+        }
65
+        else if ($layout_def['module'] == 'Users' || $layout_def['module'] == 'Contacts'){
66
+            $action = 'DeleteResourceRelationship';
67
+        }
68
+        else{
69
+            $action = 'DeleteRelationship';
70
+        }
71 71
 
72
-		$record = $layout_def['fields']['ID'];
73
-		$current_module=$layout_def['module'];	
74
-		$hideremove=false;			
72
+        $record = $layout_def['fields']['ID'];
73
+        $current_module=$layout_def['module'];	
74
+        $hideremove=false;			
75 75
 		
76
-		$return_module = $_REQUEST['module'];
77
-		$return_action = 'SubPanelViewer';
78
-		$subpanel = $layout_def['subpanel_id'];
79
-		$return_id = $_REQUEST['record'];
76
+        $return_module = $_REQUEST['module'];
77
+        $return_action = 'SubPanelViewer';
78
+        $subpanel = $layout_def['subpanel_id'];
79
+        $return_id = $_REQUEST['record'];
80 80
 		
81 81
 		
82
-		$focus = new Project();
82
+        $focus = new Project();
83 83
 		
84
-		$focus->retrieve($return_id);
84
+        $focus->retrieve($return_id);
85 85
 		
86
-		if ($current_user->id == $focus->assigned_user_id || is_admin($current_user)){
87
-			$is_owner = true;
88
-		}
89
-		else{
90
-			$is_owner = false;
91
-		}
86
+        if ($current_user->id == $focus->assigned_user_id || is_admin($current_user)){
87
+            $is_owner = true;
88
+        }
89
+        else{
90
+            $is_owner = false;
91
+        }
92 92
 				
93
-		if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
94
-			$linked_field= $layout_def['linked_field_set'] ;
95
-		} else {
96
-			$linked_field = $layout_def['linked_field'];
97
-		}
98
-		$refresh_page = 0;
99
-		if(!empty($layout_def['refresh_page'])){
100
-			$refresh_page = 1;
101
-		}
102
-		$return_url = "index.php?module=$return_module&action=$return_action&subpanel=$subpanel&record=$return_id&sugar_body_only=1&inline=1";
93
+        if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) {
94
+            $linked_field= $layout_def['linked_field_set'] ;
95
+        } else {
96
+            $linked_field = $layout_def['linked_field'];
97
+        }
98
+        $refresh_page = 0;
99
+        if(!empty($layout_def['refresh_page'])){
100
+            $refresh_page = 1;
101
+        }
102
+        $return_url = "index.php?module=$return_module&action=$return_action&subpanel=$subpanel&record=$return_id&sugar_body_only=1&inline=1";
103 103
 
104
-		$icon_remove_text = strtolower($app_strings['LBL_ID_FF_REMOVE']);
105
-		$icon_remove_html = SugarThemeRegistry::current()->getImage( 'delete_inline', 'align="absmiddle" border="0"',null,null,'.gif','');//setting alt to blank on purpose on subpanels for 508
106
-		$remove_url = $layout_def['start_link_wrapper']
107
-			. "index.php?module=$parent_module"
108
-			. "&action=$action"
109
-			. "&record=$parent_record_id"
110
-			. "&linked_field=$linked_field"
111
-			. "&linked_id=$record"
112
-			. "&return_url=" . urlencode(urlencode($return_url))
113
-			. "&refresh_page=1"
114
-			. $layout_def['end_link_wrapper'];
115
-		$remove_confirmation_text = $app_strings['NTC_REMOVE_CONFIRMATION'];
116
-		//based on listview since that lets you select records
117
-		if($layout_def['ListView'] && !$hideremove && $is_owner) {
118
-			return '<a href="' . $remove_url . '"'
119
-			. ' class="listViewTdToolsS1"'
120
-			. " onclick=\"return confirm('$remove_confirmation_text');\""
121
-			. ">$icon_remove_html&nbsp;$icon_remove_text</a>";
122
-		}else{
123
-			return '';
124
-		}
125
-	}
104
+        $icon_remove_text = strtolower($app_strings['LBL_ID_FF_REMOVE']);
105
+        $icon_remove_html = SugarThemeRegistry::current()->getImage( 'delete_inline', 'align="absmiddle" border="0"',null,null,'.gif','');//setting alt to blank on purpose on subpanels for 508
106
+        $remove_url = $layout_def['start_link_wrapper']
107
+            . "index.php?module=$parent_module"
108
+            . "&action=$action"
109
+            . "&record=$parent_record_id"
110
+            . "&linked_field=$linked_field"
111
+            . "&linked_id=$record"
112
+            . "&return_url=" . urlencode(urlencode($return_url))
113
+            . "&refresh_page=1"
114
+            . $layout_def['end_link_wrapper'];
115
+        $remove_confirmation_text = $app_strings['NTC_REMOVE_CONFIRMATION'];
116
+        //based on listview since that lets you select records
117
+        if($layout_def['ListView'] && !$hideremove && $is_owner) {
118
+            return '<a href="' . $remove_url . '"'
119
+            . ' class="listViewTdToolsS1"'
120
+            . " onclick=\"return confirm('$remove_confirmation_text');\""
121
+            . ">$icon_remove_html&nbsp;$icon_remove_text</a>";
122
+        }else{
123
+            return '';
124
+        }
125
+    }
126 126
 }
127 127
 ?>
128 128
\ No newline at end of file
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldmultienum.php 1 patch
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -41,26 +41,26 @@  discard block
 block discarded – undo
41 41
 
42 42
 
43 43
 class SugarWidgetFieldMultiEnum extends SugarWidgetFieldEnum {
44
-	public function queryFilternot_one_of(&$layout_def) {
45
-		$arr = array ();
46
-		foreach ($layout_def['input_name0'] as $value) {
47
-			array_push($arr, "'".$GLOBALS['db']->quote($value)."'");
48
-		}
49
-	    $reporter = $this->layout_manager->getAttribute("reporter");
44
+    public function queryFilternot_one_of(&$layout_def) {
45
+        $arr = array ();
46
+        foreach ($layout_def['input_name0'] as $value) {
47
+            array_push($arr, "'".$GLOBALS['db']->quote($value)."'");
48
+        }
49
+        $reporter = $this->layout_manager->getAttribute("reporter");
50 50
 
51
-    	$col_name = $this->_get_column_select($layout_def) . " NOT LIKE " ;
52
-    	$arr_count = count($arr);
53
-    	$query = "";
54
-    	foreach($arr as $key=>$val) {
55
-    		$query .= $col_name;
56
-			$value = preg_replace("/^'/", "'%", $val, 1);
57
-			$value = preg_replace("/'$/", "%'", $value, 1);
58
-			$query .= $value;
59
-			if ($key != ($arr_count - 1))
60
-    			$query.= " OR " ;	
61
-    	}
62
-		return '('.$query.')';        
63
-	}
51
+        $col_name = $this->_get_column_select($layout_def) . " NOT LIKE " ;
52
+        $arr_count = count($arr);
53
+        $query = "";
54
+        foreach($arr as $key=>$val) {
55
+            $query .= $col_name;
56
+            $value = preg_replace("/^'/", "'%", $val, 1);
57
+            $value = preg_replace("/'$/", "%'", $value, 1);
58
+            $query .= $value;
59
+            if ($key != ($arr_count - 1))
60
+                $query.= " OR " ;	
61
+        }
62
+        return '('.$query.')';        
63
+    }
64 64
         
65 65
     public function queryFilterone_of(&$layout_def) {
66 66
         //Fix for inaccurate filtering of contacts in Contacts dashlet on multiselects.
@@ -72,47 +72,47 @@  discard block
 block discarded – undo
72 72
                 array_push($arr, "'^^'");
73 73
             }
74 74
         }
75
-	    $reporter = $this->layout_manager->getAttribute("reporter");
75
+        $reporter = $this->layout_manager->getAttribute("reporter");
76 76
 
77
-    	$col_name = $this->_get_column_select($layout_def) . " LIKE " ;
78
-    	$arr_count = count($arr);
79
-    	$query = "";
80
-    	foreach($arr as $key=>$val) {
81
-    		$query .= $col_name;
82
-			$value = preg_replace("/^'/", "'%", $val, 1);
83
-			$value = preg_replace("/'$/", "%'", $value, 1);
84
-			$query .= $value;
85
-			if ($key != ($arr_count - 1))
86
-    			$query.= " OR " ;	
87
-    	}
88
-		return '('.$query.')';        
89
-	}
77
+        $col_name = $this->_get_column_select($layout_def) . " LIKE " ;
78
+        $arr_count = count($arr);
79
+        $query = "";
80
+        foreach($arr as $key=>$val) {
81
+            $query .= $col_name;
82
+            $value = preg_replace("/^'/", "'%", $val, 1);
83
+            $value = preg_replace("/'$/", "%'", $value, 1);
84
+            $query .= $value;
85
+            if ($key != ($arr_count - 1))
86
+                $query.= " OR " ;	
87
+        }
88
+        return '('.$query.')';        
89
+    }
90 90
 
91
-	public function queryFilteris($layout_def) {
92
-		$input_name0 = $layout_def['input_name0'];
93
-		if (is_array($layout_def['input_name0'])) {
94
-			$input_name0 = $layout_def['input_name0'][0];
95
-		}
91
+    public function queryFilteris($layout_def) {
92
+        $input_name0 = $layout_def['input_name0'];
93
+        if (is_array($layout_def['input_name0'])) {
94
+            $input_name0 = $layout_def['input_name0'][0];
95
+        }
96 96
 
97
-		// Bug 40022
98
-		// IS filter doesn't add the carets (^) to multienum custom field values  
99
-		$input_name0 = $this->encodeMultienumCustom($layout_def, $input_name0);
97
+        // Bug 40022
98
+        // IS filter doesn't add the carets (^) to multienum custom field values  
99
+        $input_name0 = $this->encodeMultienumCustom($layout_def, $input_name0);
100 100
 		
101
-		return $this->_get_column_select($layout_def)." = ".$this->reporter->db->quoted($input_name0)."\n";
102
-	}
101
+        return $this->_get_column_select($layout_def)." = ".$this->reporter->db->quoted($input_name0)."\n";
102
+    }
103 103
 
104
-	public function queryFilteris_not($layout_def) {
105
-		$input_name0 = $layout_def['input_name0'];
106
-		if (is_array($layout_def['input_name0'])) {
107
-			$input_name0 = $layout_def['input_name0'][0];
108
-		}
104
+    public function queryFilteris_not($layout_def) {
105
+        $input_name0 = $layout_def['input_name0'];
106
+        if (is_array($layout_def['input_name0'])) {
107
+            $input_name0 = $layout_def['input_name0'][0];
108
+        }
109 109
 
110
-		// Bug 50549
111
-		// IS NOT filter doesn't add the carets (^) to multienum custom field values  
112
-		$input_name0 = $this->encodeMultienumCustom($layout_def, $input_name0);
110
+        // Bug 50549
111
+        // IS NOT filter doesn't add the carets (^) to multienum custom field values  
112
+        $input_name0 = $this->encodeMultienumCustom($layout_def, $input_name0);
113 113
 		
114
-		return $this->_get_column_select($layout_def)." <> ".$this->reporter->db->quoted($input_name0)."\n";
115
-	}
114
+        return $this->_get_column_select($layout_def)." <> ".$this->reporter->db->quoted($input_name0)."\n";
115
+    }
116 116
 	
117 117
     /**
118 118
      * Returns an OrderBy query for multi-select. We treat multi-select the same as a normal field because
@@ -131,13 +131,13 @@  discard block
 block discarded – undo
131 131
      * @return string
132 132
      */
133 133
     private function encodeMultienumCustom($layout_def, $value) {
134
-    	$field_def = $this->reporter->getFieldDefFromLayoutDef($layout_def);
135
-    	// Check if it is a custom field
136
-		if (!empty($field_def['source']) && ($field_def['source'] == 'custom_fields' || ($field_def['source'] == 'non-db' && !empty($field_def['ext2']) && !empty($field_def['id']))) && !empty($field_def['real_table']))
137
-		{
138
-			$value = encodeMultienumValue(array($value)); 
139
-		}
140
-		return $value;
134
+        $field_def = $this->reporter->getFieldDefFromLayoutDef($layout_def);
135
+        // Check if it is a custom field
136
+        if (!empty($field_def['source']) && ($field_def['source'] == 'custom_fields' || ($field_def['source'] == 'non-db' && !empty($field_def['ext2']) && !empty($field_def['id']))) && !empty($field_def['real_table']))
137
+        {
138
+            $value = encodeMultienumValue(array($value)); 
139
+        }
140
+        return $value;
141 141
     }
142 142
 }
143 143
 ?>
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFielddate.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             }
55 55
         }
56 56
         $content = $this->displayListPlain($layout_def);
57
-		return $content;
57
+        return $content;
58 58
     }
59 59
 
60 60
     function queryFilterBefore($layout_def)
@@ -88,26 +88,26 @@  discard block
 block discarded – undo
88 88
             $this->queryDateOp($column, $end, "<=", "date").")\n";
89 89
     }
90 90
 
91
-	function queryFilterTP_yesterday($layout_def)
92
-	{
93
-		global $timedate;
91
+    function queryFilterTP_yesterday($layout_def)
92
+    {
93
+        global $timedate;
94 94
         $layout_def['input_name0'] = $timedate->asDbDate($timedate->getNow(true)->get("-1 day"));
95 95
         return $this->queryFilterOn($layout_def);
96
-	}
96
+    }
97 97
 
98
-	function queryFilterTP_today($layout_def)
99
-	{
100
-		global $timedate;
98
+    function queryFilterTP_today($layout_def)
99
+    {
100
+        global $timedate;
101 101
         $layout_def['input_name0'] = $timedate->asDbDate($timedate->getNow(true));
102 102
         return $this->queryFilterOn($layout_def);
103
-	}
103
+    }
104 104
 
105
-	function queryFilterTP_tomorrow(& $layout_def)
106
-	{
107
-		global $timedate;
108
-		$layout_def['input_name0'] = $timedate->asDbDate($timedate->getNow(true)->get("+1 day"));
105
+    function queryFilterTP_tomorrow(& $layout_def)
106
+    {
107
+        global $timedate;
108
+        $layout_def['input_name0'] = $timedate->asDbDate($timedate->getNow(true)->get("+1 day"));
109 109
         return $this->queryFilterOn($layout_def);
110
-	}
110
+    }
111 111
 
112 112
     protected function queryMonth($layout_def, $month)
113 113
     {
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelManageAcceptancesButton.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
         global $mod_strings;
12 12
         
13 13
         $button  = "<form id='ManageAcceptancesForm' name='ManageAcceptancesForm' method='post' action=''>";
14
-       // $button .= "<input id='custom_hidden_5' type='hidden' name='custom_hidden_5' value=''/>";
14
+        // $button .= "<input id='custom_hidden_5' type='hidden' name='custom_hidden_5' value=''/>";
15 15
         $button .= "<input id='Manage_Acceptances' class='button' type='button' name='Manage_Acceptances' onclick='manage_acceptances();' value='".$mod_strings['LBL_MANAGE_ACCEPTANCES']."'/>\n</form>";
16 16
         return $button;
17 17
     }
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldfloat.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
 
42 42
 class SugarWidgetFieldFloat extends SugarWidgetFieldInt
43 43
 {
44
- function displayList($layout_def)
45
- {
44
+    function displayList($layout_def)
45
+    {
46 46
  	
47 47
     $vardef = $this->getVardef($layout_def);
48 48
 
@@ -51,37 +51,37 @@  discard block
 block discarded – undo
51 51
     } else {
52 52
         $precision = null;
53 53
     }
54
-	return format_number(parent::displayListPlain($layout_def), $precision, $precision);
55
- }
54
+    return format_number(parent::displayListPlain($layout_def), $precision, $precision);
55
+    }
56 56
 
57
- function displayListPlain($layout_def)
58
- {
59
-     return $this->displayList($layout_def);
60
- }
61
- function queryFilterEquals(&$layout_def)
62
- {	
57
+    function displayListPlain($layout_def)
58
+    {
59
+        return $this->displayList($layout_def);
60
+    }
61
+    function queryFilterEquals(&$layout_def)
62
+    {	
63 63
     return $this->_get_column_select($layout_def)."= ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
64
- }
64
+    }
65 65
                                                                                  
66
- function queryFilterNot_Equals(&$layout_def)
67
- {
68
-	return $this->_get_column_select($layout_def)."!=".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
69
- }
66
+    function queryFilterNot_Equals(&$layout_def)
67
+    {
68
+    return $this->_get_column_select($layout_def)."!=".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
69
+    }
70 70
                                                                                  
71
- function queryFilterGreater(&$layout_def)
72
- {
71
+    function queryFilterGreater(&$layout_def)
72
+    {
73 73
     return $this->_get_column_select($layout_def)." > ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
74
- }
74
+    }
75 75
                                                                                  
76
- function queryFilterLess(&$layout_def)
77
- {
78
-	return $this->_get_column_select($layout_def)." < ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
79
- }
76
+    function queryFilterLess(&$layout_def)
77
+    {
78
+    return $this->_get_column_select($layout_def)." < ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0']))."\n";
79
+    }
80 80
 
81
- function queryFilterBetween(&$layout_def)
82
- {
83
-	return $this->_get_column_select($layout_def)." BETWEEN ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0'])). " AND " . $GLOBALS['db']->quote(unformat_number($layout_def['input_name1'])) . "\n";
84
- }
81
+    function queryFilterBetween(&$layout_def)
82
+    {
83
+    return $this->_get_column_select($layout_def)." BETWEEN ".$GLOBALS['db']->quote(unformat_number($layout_def['input_name0'])). " AND " . $GLOBALS['db']->quote(unformat_number($layout_def['input_name1'])) . "\n";
84
+    }
85 85
 
86 86
 
87 87
 }
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldsingleenum.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,13 +51,13 @@
 block discarded – undo
51 51
                 $ops = $layout_def['options'];
52 52
             }
53 53
             elseif (isset($layout_def['options']) && isset($app_list_strings[$layout_def['options']])){ 
54
-            	$ops = $app_list_strings[$layout_def['options']];
54
+                $ops = $app_list_strings[$layout_def['options']];
55 55
                 if(array_key_exists('', $app_list_strings[$layout_def['options']])) {
56
-             	   unset($ops['']);
57
-	            }
56
+                    unset($ops['']);
57
+                }
58 58
             }
59 59
             else{
60
-            	$ops = array();
60
+                $ops = array();
61 61
             }
62 62
         }
63 63
         else {
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetSubPanelTopMessage.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
 
47 47
 class SugarWidgetSubPanelTopMessage extends SugarWidgetSubPanelTopButton
48 48
 {
49
-	function display($defines)
50
-	{
49
+    function display($defines)
50
+    {
51 51
         return $defines['message'];
52
-	}
52
+    }
53 53
 }
54 54
\ No newline at end of file
Please login to merge, or discard this patch.
include/generic/SugarWidgets/SugarWidgetFieldenum.php 1 patch
Indentation   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -58,39 +58,39 @@  discard block
 block discarded – undo
58 58
     }
59 59
 
60 60
     public function queryFilteris($layout_def) {
61
-		$input_name0 = $layout_def['input_name0'];
62
-		if (is_array($layout_def['input_name0'])) {
63
-			$input_name0 = $layout_def['input_name0'][0];
64
-		}
65
-		return $this->_get_column_select($layout_def)." = ".$this->reporter->db->quoted($input_name0)."\n";
66
-	}
67
-
68
-	public function queryFilteris_not($layout_def) {
69
-		$input_name0 = $layout_def['input_name0'];
70
-		if (is_array($layout_def['input_name0'])) {
71
-			$input_name0 = $layout_def['input_name0'][0];
72
-		}
73
-		return $this->_get_column_select($layout_def)." <> ".$this->reporter->db->quoted($input_name0)."\n";
74
-	}
75
-
76
-	public function queryFilterone_of($layout_def) {
77
-		$arr = array ();
78
-		foreach ($layout_def['input_name0'] as $value) {
79
-			$arr[] = $this->reporter->db->quoted($value);
80
-		}
81
-		$str = implode(",", $arr);
82
-		return $this->_get_column_select($layout_def)." IN (".$str.")\n";
83
-	}
84
-
85
-	public function queryFilternot_one_of($layout_def) {
86
-		$arr = array ();
87
-		foreach ($layout_def['input_name0'] as $value) {
88
-			$arr[] = $this->reporter->db->quoted($value);
89
-		}
90
-	    $reporter = $this->layout_manager->getAttribute("reporter");
91
-		$str = implode(",", $arr);
92
-		return $this->_get_column_select($layout_def)." NOT IN (".$str.")\n";
93
-	}
61
+        $input_name0 = $layout_def['input_name0'];
62
+        if (is_array($layout_def['input_name0'])) {
63
+            $input_name0 = $layout_def['input_name0'][0];
64
+        }
65
+        return $this->_get_column_select($layout_def)." = ".$this->reporter->db->quoted($input_name0)."\n";
66
+    }
67
+
68
+    public function queryFilteris_not($layout_def) {
69
+        $input_name0 = $layout_def['input_name0'];
70
+        if (is_array($layout_def['input_name0'])) {
71
+            $input_name0 = $layout_def['input_name0'][0];
72
+        }
73
+        return $this->_get_column_select($layout_def)." <> ".$this->reporter->db->quoted($input_name0)."\n";
74
+    }
75
+
76
+    public function queryFilterone_of($layout_def) {
77
+        $arr = array ();
78
+        foreach ($layout_def['input_name0'] as $value) {
79
+            $arr[] = $this->reporter->db->quoted($value);
80
+        }
81
+        $str = implode(",", $arr);
82
+        return $this->_get_column_select($layout_def)." IN (".$str.")\n";
83
+    }
84
+
85
+    public function queryFilternot_one_of($layout_def) {
86
+        $arr = array ();
87
+        foreach ($layout_def['input_name0'] as $value) {
88
+            $arr[] = $this->reporter->db->quoted($value);
89
+        }
90
+        $reporter = $this->layout_manager->getAttribute("reporter");
91
+        $str = implode(",", $arr);
92
+        return $this->_get_column_select($layout_def)." NOT IN (".$str.")\n";
93
+    }
94 94
 
95 95
     function & displayList($layout_def) {
96 96
         if(!empty($layout_def['column_key'])){
@@ -116,84 +116,84 @@  discard block
 block discarded – undo
116 116
                 $field_type = $field_def['type'];
117 117
                 $div_id = $field_def['module'] ."&$record&$field_name";
118 118
                 $str = "<div id='$div_id'>" . $cell . "&nbsp;"
119
-                     . SugarThemeRegistry::current()->getImage(
119
+                        . SugarThemeRegistry::current()->getImage(
120 120
                         "edit_inline",
121 121
                         "border='0' alt='Edit Layout' align='bottom' onClick='SUGAR.reportsInlineEdit.inlineEdit(" .
122 122
                         "\"$div_id\",\"$cell\",\"$module\",\"$record\",\"$field_name\",\"$field_type\");'"
123
-                       )
124
-                     . "</div>";
123
+                        )
124
+                        . "</div>";
125 125
             }
126 126
         }
127 127
         return $str;
128 128
     }
129
-	function & displayListPlain($layout_def) {
130
-		if(!empty($layout_def['column_key'])){
131
-			$field_def = $this->reporter->all_fields[$layout_def['column_key']];
132
-		}else if(!empty($layout_def['fields'])){
133
-			$field_def = $layout_def['fields'];
134
-		}
135
-
136
-		if (!empty($layout_def['table_key'] ) &&( empty ($field_def['fields']) || empty ($field_def['fields'][0]) || empty ($field_def['fields'][1]))){
137
-			$value = $this->_get_list_value($layout_def);
138
-		}else if(!empty($layout_def['name']) && !empty($layout_def['fields'])){
139
-			$key = strtoupper($layout_def['name']);
140
-			$value = $layout_def['fields'][$key];
141
-		}
142
-		$cell = '';
143
-
144
-			if(isset($field_def['options'])){
145
-				$cell = translate($field_def['options'], $field_def['module'], $value);
146
-			}else if(isset($field_def['type']) && $field_def['type'] == 'enum' && isset($field_def['function'])){
147
-	            global $beanFiles;
148
-	            if(empty($beanFiles)) {
149
-	                include('include/modules.php');
150
-	            }
151
-	            $bean_name = get_singular_bean_name($field_def['module']);
152
-	            require_once($beanFiles[$bean_name]);
153
-	            $list = $field_def['function']();
154
-	            $cell = $list[$value];
155
-	        }
156
-		if (is_array($cell)) {
157
-
158
-			//#22632
159
-			$value = unencodeMultienum($value);
160
-			$cell=array();
161
-			foreach($value as $val){
162
-				$returnVal = translate($field_def['options'],$field_def['module'],$val);
163
-				if(!is_array($returnVal)){
164
-					array_push( $cell, translate($field_def['options'],$field_def['module'],$val));
165
-				}
166
-			}
167
-			$cell = implode(", ",$cell);
168
-		}
169
-		return $cell;
170
-	}
171
-
172
-	public function queryOrderBy($layout_def) {
173
-		$field_def = $this->reporter->all_fields[$layout_def['column_key']];
174
-		if (!empty ($field_def['sort_on'])) {
175
-			$order_by = $layout_def['table_alias'].".".$field_def['sort_on'];
176
-		} else {
177
-			$order_by = $this->_get_column_select($layout_def);
178
-		}
179
-		$list = array();
129
+    function & displayListPlain($layout_def) {
130
+        if(!empty($layout_def['column_key'])){
131
+            $field_def = $this->reporter->all_fields[$layout_def['column_key']];
132
+        }else if(!empty($layout_def['fields'])){
133
+            $field_def = $layout_def['fields'];
134
+        }
135
+
136
+        if (!empty($layout_def['table_key'] ) &&( empty ($field_def['fields']) || empty ($field_def['fields'][0]) || empty ($field_def['fields'][1]))){
137
+            $value = $this->_get_list_value($layout_def);
138
+        }else if(!empty($layout_def['name']) && !empty($layout_def['fields'])){
139
+            $key = strtoupper($layout_def['name']);
140
+            $value = $layout_def['fields'][$key];
141
+        }
142
+        $cell = '';
143
+
144
+            if(isset($field_def['options'])){
145
+                $cell = translate($field_def['options'], $field_def['module'], $value);
146
+            }else if(isset($field_def['type']) && $field_def['type'] == 'enum' && isset($field_def['function'])){
147
+                global $beanFiles;
148
+                if(empty($beanFiles)) {
149
+                    include('include/modules.php');
150
+                }
151
+                $bean_name = get_singular_bean_name($field_def['module']);
152
+                require_once($beanFiles[$bean_name]);
153
+                $list = $field_def['function']();
154
+                $cell = $list[$value];
155
+            }
156
+        if (is_array($cell)) {
157
+
158
+            //#22632
159
+            $value = unencodeMultienum($value);
160
+            $cell=array();
161
+            foreach($value as $val){
162
+                $returnVal = translate($field_def['options'],$field_def['module'],$val);
163
+                if(!is_array($returnVal)){
164
+                    array_push( $cell, translate($field_def['options'],$field_def['module'],$val));
165
+                }
166
+            }
167
+            $cell = implode(", ",$cell);
168
+        }
169
+        return $cell;
170
+    }
171
+
172
+    public function queryOrderBy($layout_def) {
173
+        $field_def = $this->reporter->all_fields[$layout_def['column_key']];
174
+        if (!empty ($field_def['sort_on'])) {
175
+            $order_by = $layout_def['table_alias'].".".$field_def['sort_on'];
176
+        } else {
177
+            $order_by = $this->_get_column_select($layout_def);
178
+        }
179
+        $list = array();
180 180
         if(isset($field_def['options'])) {
181
-		    $list = translate($field_def['options'], $field_def['module']);
181
+            $list = translate($field_def['options'], $field_def['module']);
182 182
         } elseif(isset($field_def['type']) && $field_def['type'] == 'enum' && isset($field_def['function'])) {
183
-	        global $beanFiles;
184
-		    if(empty($beanFiles)) {
185
-		        include('include/modules.php');
186
-		    }
187
-		    $bean_name = get_singular_bean_name($field_def['module']);
188
-		    require_once($beanFiles[$bean_name]);
183
+            global $beanFiles;
184
+            if(empty($beanFiles)) {
185
+                include('include/modules.php');
186
+            }
187
+            $bean_name = get_singular_bean_name($field_def['module']);
188
+            require_once($beanFiles[$bean_name]);
189 189
             $list = $field_def['function']();
190 190
         }
191
-		if (empty ($layout_def['sort_dir']) || $layout_def['sort_dir'] == 'a') {
192
-			$order_dir = "ASC";
193
-		} else {
194
-			$order_dir = "DESC";
195
-		}
196
-		return $this->reporter->db->orderByEnum($order_by, $list, $order_dir);
191
+        if (empty ($layout_def['sort_dir']) || $layout_def['sort_dir'] == 'a') {
192
+            $order_dir = "ASC";
193
+        } else {
194
+            $order_dir = "DESC";
195
+        }
196
+        return $this->reporter->db->orderByEnum($order_by, $list, $order_dir);
197 197
     }
198 198
 
199 199
     public function displayInput($layout_def) {
@@ -204,13 +204,13 @@  discard block
 block discarded – undo
204 204
                 $ops = $layout_def['options'];
205 205
             }
206 206
             elseif (isset($layout_def['options']) && isset($app_list_strings[$layout_def['options']])){
207
-            	$ops = $app_list_strings[$layout_def['options']];
207
+                $ops = $app_list_strings[$layout_def['options']];
208 208
                 if(array_key_exists('', $app_list_strings[$layout_def['options']])) {
209
-             	   unset($ops['']);
210
-	            }
209
+                    unset($ops['']);
210
+                }
211 211
             }
212 212
             else{
213
-            	$ops = array();
213
+                $ops = array();
214 214
             }
215 215
         }
216 216
         else {
Please login to merge, or discard this patch.