@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | 'table'=>'aor_conditions', |
27 | 27 | 'audited'=>false, |
28 | 28 | 'duplicate_merge'=>true, |
29 | - 'fields'=>array ( |
|
29 | + 'fields'=>array( |
|
30 | 30 | 'aor_report_id' => |
31 | - array ( |
|
31 | + array( |
|
32 | 32 | 'required' => false, |
33 | 33 | 'name' => 'aor_report_id', |
34 | 34 | 'vname' => 'LBL_AOR_REPORT_ID', |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | 'size' => '20', |
48 | 48 | ), |
49 | 49 | 'condition_order' => |
50 | - array ( |
|
50 | + array( |
|
51 | 51 | 'required' => false, |
52 | 52 | 'name' => 'condition_order', |
53 | 53 | 'vname' => 'LBL_ORDER', |
@@ -79,14 +79,14 @@ discard block |
||
79 | 79 | 'type' => 'varchar', |
80 | 80 | ), |
81 | 81 | 'module_path' => |
82 | - array ( |
|
82 | + array( |
|
83 | 83 | 'name' => 'module_path', |
84 | 84 | 'type' => 'longtext', |
85 | 85 | 'vname' => 'LBL_MODULE_PATH', |
86 | 86 | 'isnull' => true, |
87 | 87 | ), |
88 | 88 | 'field' => |
89 | - array ( |
|
89 | + array( |
|
90 | 90 | 'required' => false, |
91 | 91 | 'name' => 'field', |
92 | 92 | 'vname' => 'LBL_FIELD', |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | 'dependency' => false, |
109 | 109 | ), |
110 | 110 | 'operator' => |
111 | - array ( |
|
111 | + array( |
|
112 | 112 | 'required' => false, |
113 | 113 | 'name' => 'operator', |
114 | 114 | 'vname' => 'LBL_OPERATOR', |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | 'dependency' => false, |
132 | 132 | ), |
133 | 133 | 'value_type' => |
134 | - array ( |
|
134 | + array( |
|
135 | 135 | 'required' => false, |
136 | 136 | 'name' => 'value_type', |
137 | 137 | 'vname' => 'LBL_VALUE_TYPE', |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | 'size' => '20', |
151 | 151 | ), |
152 | 152 | 'value' => |
153 | - array ( |
|
153 | + array( |
|
154 | 154 | 'required' => false, |
155 | 155 | 'name' => 'value', |
156 | 156 | 'vname' => 'LBL_VALUE', |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | 'size' => '20', |
170 | 170 | ), |
171 | 171 | 'parameter' => |
172 | - array ( |
|
172 | + array( |
|
173 | 173 | 'required' => false, |
174 | 174 | 'name' => 'parameter', |
175 | 175 | 'vname' => 'LBL_PARAMETER', |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | 'studio' => 'visible', |
188 | 188 | ), |
189 | 189 | 'aor_reports' => |
190 | - array ( |
|
190 | + array( |
|
191 | 191 | 'name' => 'aor_reports', |
192 | 192 | 'type' => 'link', |
193 | 193 | 'relationship' => 'aor_report_aor_conditions', |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | 'source'=>'non-db', |
197 | 197 | ), |
198 | 198 | ), |
199 | - 'relationships'=>array ( |
|
199 | + 'relationships'=>array( |
|
200 | 200 | ), |
201 | 201 | 'indices' => array( |
202 | 202 | array( |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | 'unified_search'=>true, |
210 | 210 | ); |
211 | 211 | |
212 | -if (!class_exists('VardefManager')){ |
|
212 | +if (!class_exists('VardefManager')) { |
|
213 | 213 | require_once('include/SugarObjects/VardefManager.php'); |
214 | 214 | } |
215 | -VardefManager::createVardef('AOR_Conditions','AOR_Condition', array('basic')); |
|
215 | +VardefManager::createVardef('AOR_Conditions', 'AOR_Condition', array('basic')); |
@@ -23,12 +23,12 @@ discard block |
||
23 | 23 | */ |
24 | 24 | |
25 | 25 | $dictionary['AOR_Condition'] = array( |
26 | - 'table'=>'aor_conditions', |
|
27 | - 'audited'=>false, |
|
28 | - 'duplicate_merge'=>true, |
|
29 | - 'fields'=>array ( |
|
30 | - 'aor_report_id' => |
|
31 | - array ( |
|
26 | + 'table'=>'aor_conditions', |
|
27 | + 'audited'=>false, |
|
28 | + 'duplicate_merge'=>true, |
|
29 | + 'fields'=>array ( |
|
30 | + 'aor_report_id' => |
|
31 | + array ( |
|
32 | 32 | 'required' => false, |
33 | 33 | 'name' => 'aor_report_id', |
34 | 34 | 'vname' => 'LBL_AOR_REPORT_ID', |
@@ -45,9 +45,9 @@ discard block |
||
45 | 45 | 'merge_filter' => 'disabled', |
46 | 46 | 'len' => 36, |
47 | 47 | 'size' => '20', |
48 | - ), |
|
49 | - 'condition_order' => |
|
50 | - array ( |
|
48 | + ), |
|
49 | + 'condition_order' => |
|
50 | + array ( |
|
51 | 51 | 'required' => false, |
52 | 52 | 'name' => 'condition_order', |
53 | 53 | 'vname' => 'LBL_ORDER', |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | 'size' => '20', |
67 | 67 | 'enable_range_search' => false, |
68 | 68 | 'disable_num_format' => '', |
69 | - ), |
|
69 | + ), |
|
70 | 70 | 'logic_op' => array( |
71 | 71 | 'name' => 'logic_op', |
72 | 72 | 'vname' => 'LBL_LOGIC_OP', |
@@ -78,15 +78,15 @@ discard block |
||
78 | 78 | 'vname' => 'LBL_PARENTHESIS', |
79 | 79 | 'type' => 'varchar', |
80 | 80 | ), |
81 | - 'module_path' => |
|
82 | - array ( |
|
81 | + 'module_path' => |
|
82 | + array ( |
|
83 | 83 | 'name' => 'module_path', |
84 | 84 | 'type' => 'longtext', |
85 | 85 | 'vname' => 'LBL_MODULE_PATH', |
86 | 86 | 'isnull' => true, |
87 | - ), |
|
88 | - 'field' => |
|
89 | - array ( |
|
87 | + ), |
|
88 | + 'field' => |
|
89 | + array ( |
|
90 | 90 | 'required' => false, |
91 | 91 | 'name' => 'field', |
92 | 92 | 'vname' => 'LBL_FIELD', |
@@ -106,9 +106,9 @@ discard block |
||
106 | 106 | 'options' => 'user_type_dom', |
107 | 107 | 'studio' => 'visible', |
108 | 108 | 'dependency' => false, |
109 | - ), |
|
110 | - 'operator' => |
|
111 | - array ( |
|
109 | + ), |
|
110 | + 'operator' => |
|
111 | + array ( |
|
112 | 112 | 'required' => false, |
113 | 113 | 'name' => 'operator', |
114 | 114 | 'vname' => 'LBL_OPERATOR', |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | 'options' => 'aor_operator_list', |
130 | 130 | 'studio' => 'visible', |
131 | 131 | 'dependency' => false, |
132 | - ), |
|
132 | + ), |
|
133 | 133 | 'value_type' => |
134 | 134 | array ( |
135 | 135 | 'required' => false, |
@@ -152,9 +152,9 @@ discard block |
||
152 | 152 | 'options' => 'aor_condition_type_list', |
153 | 153 | 'studio' => 'visible', |
154 | 154 | 'dependency' => false, |
155 | - ), |
|
156 | - 'value' => |
|
157 | - array ( |
|
155 | + ), |
|
156 | + 'value' => |
|
157 | + array ( |
|
158 | 158 | 'required' => false, |
159 | 159 | 'name' => 'value', |
160 | 160 | 'vname' => 'LBL_VALUE', |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | 'merge_filter' => 'disabled', |
172 | 172 | 'len' => '255', |
173 | 173 | 'size' => '20', |
174 | - ), |
|
174 | + ), |
|
175 | 175 | 'parameter' => |
176 | 176 | array ( |
177 | 177 | 'required' => false, |
@@ -190,17 +190,17 @@ discard block |
||
190 | 190 | 'merge_filter' => 'disabled', |
191 | 191 | 'studio' => 'visible', |
192 | 192 | ), |
193 | - 'aor_reports' => |
|
194 | - array ( |
|
193 | + 'aor_reports' => |
|
194 | + array ( |
|
195 | 195 | 'name' => 'aor_reports', |
196 | 196 | 'type' => 'link', |
197 | 197 | 'relationship' => 'aor_report_aor_conditions', |
198 | 198 | 'module'=>'AOR_Reports', |
199 | 199 | 'bean_name'=>'AOR_Reports', |
200 | 200 | 'source'=>'non-db', |
201 | - ), |
|
201 | + ), |
|
202 | 202 | ), |
203 | - 'relationships'=>array ( |
|
203 | + 'relationships'=>array ( |
|
204 | 204 | ), |
205 | 205 | 'indices' => array( |
206 | 206 | array( |
@@ -209,8 +209,8 @@ discard block |
||
209 | 209 | 'fields' => array('aor_report_id'), |
210 | 210 | ), |
211 | 211 | ), |
212 | - 'optimistic_locking'=>true, |
|
213 | - 'unified_search'=>true, |
|
212 | + 'optimistic_locking'=>true, |
|
213 | + 'unified_search'=>true, |
|
214 | 214 | ); |
215 | 215 | |
216 | 216 | if (!class_exists('VardefManager')){ |
@@ -23,19 +23,19 @@ discard block |
||
23 | 23 | */ |
24 | 24 | |
25 | 25 | |
26 | -function display_condition_lines($focus, $field, $value, $view){ |
|
26 | +function display_condition_lines($focus, $field, $value, $view) { |
|
27 | 27 | |
28 | 28 | global $locale, $app_list_strings, $mod_strings; |
29 | 29 | |
30 | 30 | $html = ''; |
31 | 31 | |
32 | - if (!is_file('cache/jsLanguage/AOR_Conditions/' . $GLOBALS['current_language'] . '.js')) { |
|
32 | + if (!is_file('cache/jsLanguage/AOR_Conditions/'.$GLOBALS['current_language'].'.js')) { |
|
33 | 33 | require_once ('include/language/jsLanguage.php'); |
34 | 34 | jsLanguage::createModuleStringsCache('AOR_Conditions', $GLOBALS['current_language']); |
35 | 35 | } |
36 | - $html .= '<script src="cache/jsLanguage/AOR_Conditions/'. $GLOBALS['current_language'] . '.js"></script>'; |
|
36 | + $html .= '<script src="cache/jsLanguage/AOR_Conditions/'.$GLOBALS['current_language'].'.js"></script>'; |
|
37 | 37 | |
38 | - if($view == 'EditView'){ |
|
38 | + if ($view == 'EditView') { |
|
39 | 39 | |
40 | 40 | $html .= '<script src="modules/AOR_Conditions/conditionLines.js"></script>'; |
41 | 41 | $html .= "<table border='0' cellspacing='4' width='100%' id='conditionLines'></table>"; |
@@ -45,12 +45,12 @@ discard block |
||
45 | 45 | $html .= "</div>"; |
46 | 46 | |
47 | 47 | |
48 | - if(isset($focus->report_module) && $focus->report_module != ''){ |
|
48 | + if (isset($focus->report_module) && $focus->report_module != '') { |
|
49 | 49 | require_once("modules/AOW_WorkFlow/aow_utils.php"); |
50 | 50 | $html .= "<script>"; |
51 | 51 | $html .= "report_module = \"".$focus->report_module."\";"; |
52 | 52 | $html .= "document.getElementById('btn_ConditionLine').disabled = '';"; |
53 | - if($focus->id != ''){ |
|
53 | + if ($focus->id != '') { |
|
54 | 54 | $sql = "SELECT id FROM aor_conditions WHERE aor_report_id = '".$focus->id."' AND deleted = 0 ORDER BY condition_order ASC"; |
55 | 55 | $result = $focus->db->query($sql); |
56 | 56 | |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | $condition_name = new AOR_Condition(); |
59 | 59 | $condition_name->retrieve($row['id']); |
60 | 60 | $condition_name->module_path = unserialize(base64_decode($condition_name->module_path)); |
61 | - $html .= "report_fields = \"".trim(preg_replace('/\s+/', ' ', getModuleFields(getRelatedModule($focus->report_module,$condition_name->module_path[0]))))."\";"; |
|
62 | - if($condition_name->value_type == 'Date'){ |
|
61 | + $html .= "report_fields = \"".trim(preg_replace('/\s+/', ' ', getModuleFields(getRelatedModule($focus->report_module, $condition_name->module_path[0]))))."\";"; |
|
62 | + if ($condition_name->value_type == 'Date') { |
|
63 | 63 | $condition_name->value = unserialize(base64_decode($condition_name->value)); |
64 | 64 | } |
65 | 65 | $condition_item = json_encode($condition_name->toArray()); |
@@ -71,12 +71,12 @@ discard block |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | } |
74 | - else if($view == 'DetailView'){ |
|
74 | + else if ($view == 'DetailView') { |
|
75 | 75 | $html .= '<script src="modules/AOR_Conditions/conditionLines.js"></script>'; |
76 | 76 | $html .= "<table border='0' cellspacing='0' width='100%' id='conditionLines'></table>"; |
77 | 77 | |
78 | 78 | |
79 | - if(isset($focus->report_module) && $focus->report_module != ''){ |
|
79 | + if (isset($focus->report_module) && $focus->report_module != '') { |
|
80 | 80 | require_once("modules/AOW_WorkFlow/aow_utils.php"); |
81 | 81 | $html .= "<script>"; |
82 | 82 | $html .= "report_fields = \"".trim(preg_replace('/\s+/', ' ', getModuleFields($focus->report_module)))."\";"; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $condition_name = new AOR_Condition(); |
89 | 89 | $condition_name->retrieve($row['id']); |
90 | 90 | $condition_name->module_path = unserialize(base64_decode($condition_name->module_path)); |
91 | - if($condition_name->value_type == 'Date'){ |
|
91 | + if ($condition_name->value_type == 'Date') { |
|
92 | 92 | $condition_name->value = unserialize(base64_decode($condition_name->value)); |
93 | 93 | } |
94 | 94 | $condition_item = json_encode($condition_name->toArray()); |
@@ -70,8 +70,7 @@ |
||
70 | 70 | $html .= "</script>"; |
71 | 71 | } |
72 | 72 | |
73 | - } |
|
74 | - else if($view == 'DetailView'){ |
|
73 | + } else if($view == 'DetailView'){ |
|
75 | 74 | $html .= '<script src="modules/AOR_Conditions/conditionLines.js"></script>'; |
76 | 75 | $html .= "<table border='0' cellspacing='0' width='100%' id='conditionLines'></table>"; |
77 | 76 |
@@ -46,19 +46,19 @@ |
||
46 | 46 | * Contributor(s): ______________________________________.. |
47 | 47 | ********************************************************************************/ |
48 | 48 | $fields_array['EmailTemplate'] = array ('column_fields' => Array("id" |
49 | - , "date_entered" |
|
50 | - , "date_modified" |
|
51 | - , "modified_user_id" |
|
52 | - , "created_by" |
|
53 | - , "description" |
|
54 | - , "subject" |
|
55 | - , "body" |
|
56 | - , "body_html" |
|
57 | - , "name" |
|
58 | - , "published" |
|
59 | - ), |
|
49 | + , "date_entered" |
|
50 | + , "date_modified" |
|
51 | + , "modified_user_id" |
|
52 | + , "created_by" |
|
53 | + , "description" |
|
54 | + , "subject" |
|
55 | + , "body" |
|
56 | + , "body_html" |
|
57 | + , "name" |
|
58 | + , "published" |
|
59 | + ), |
|
60 | 60 | 'list_fields' => Array('id', 'name', 'description','date_modified' |
61 | - ), |
|
61 | + ), |
|
62 | 62 | 'required_fields' => array("name"=>1), |
63 | 63 | ); |
64 | 64 | ?> |
65 | 65 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * All Rights Reserved. |
46 | 46 | * Contributor(s): ______________________________________.. |
47 | 47 | ********************************************************************************/ |
48 | -$fields_array['EmailTemplate'] = array ('column_fields' => Array("id" |
|
48 | +$fields_array['EmailTemplate'] = array('column_fields' => Array("id" |
|
49 | 49 | , "date_entered" |
50 | 50 | , "date_modified" |
51 | 51 | , "modified_user_id" |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | , "name" |
58 | 58 | , "published" |
59 | 59 | ), |
60 | - 'list_fields' => Array('id', 'name', 'description','date_modified' |
|
60 | + 'list_fields' => Array('id', 'name', 'description', 'date_modified' |
|
61 | 61 | ), |
62 | 62 | 'required_fields' => array("name"=>1), |
63 | 63 | ); |
@@ -1,5 +1,7 @@ |
||
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. |
@@ -76,14 +76,14 @@ |
||
76 | 76 | $button = "<form action='index.php' method='post' name='form' id='form'>\n"; |
77 | 77 | if(!$hide_clear_button) |
78 | 78 | { |
79 | - $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" |
|
80 | - .$app_strings['LBL_CLEAR_BUTTON_TITLE']."' value=' " |
|
81 | - .$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n"; |
|
79 | + $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" |
|
80 | + .$app_strings['LBL_CLEAR_BUTTON_TITLE']."' value=' " |
|
81 | + .$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n"; |
|
82 | 82 | } |
83 | 83 | $button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='" |
84 | - .$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='" |
|
85 | - .$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' " |
|
86 | - .$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n"; |
|
84 | + .$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='" |
|
85 | + .$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' " |
|
86 | + .$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n"; |
|
87 | 87 | $button .= "</form>\n"; |
88 | 88 | |
89 | 89 |
@@ -1,5 +1,5 @@ discard block |
||
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. |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | |
74 | 74 | |
75 | 75 | $hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true; |
76 | -$button = "<form action='index.php' method='post' name='form' id='form'>\n"; |
|
77 | -if(!$hide_clear_button) |
|
76 | +$button = "<form action='index.php' method='post' name='form' id='form'>\n"; |
|
77 | +if (!$hide_clear_button) |
|
78 | 78 | { |
79 | 79 | $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" |
80 | 80 | .$app_strings['LBL_CLEAR_BUTTON_TITLE']."' value=' " |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $form->assign('MODULE_NAME', $currentModule); |
95 | 95 | $form->assign('NAME', $name); |
96 | 96 | $form->assign('DOCUMENT_NAME', $document_name); |
97 | -if(isset($_REQUEST['target'])) $form->assign('DOCUMENT_TARGET', $_REQUEST['target']); |
|
97 | +if (isset($_REQUEST['target'])) $form->assign('DOCUMENT_TARGET', $_REQUEST['target']); |
|
98 | 98 | else $form->assign('DOCUMENT_TARGET', ''); |
99 | 99 | |
100 | 100 | $form->assign('DOCUMENT_REVISION_ID', $document_revision_id); |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -94,8 +96,11 @@ discard block |
||
94 | 96 | $form->assign('MODULE_NAME', $currentModule); |
95 | 97 | $form->assign('NAME', $name); |
96 | 98 | $form->assign('DOCUMENT_NAME', $document_name); |
97 | -if(isset($_REQUEST['target'])) $form->assign('DOCUMENT_TARGET', $_REQUEST['target']); |
|
98 | -else $form->assign('DOCUMENT_TARGET', ''); |
|
99 | +if(isset($_REQUEST['target'])) { |
|
100 | + $form->assign('DOCUMENT_TARGET', $_REQUEST['target']); |
|
101 | +} else { |
|
102 | + $form->assign('DOCUMENT_TARGET', ''); |
|
103 | +} |
|
99 | 104 | |
100 | 105 | $form->assign('DOCUMENT_REVISION_ID', $document_revision_id); |
101 | 106 |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". |
39 | 39 | ********************************************************************************/ |
40 | 40 | |
41 | - //Request object must have these property values: |
|
42 | - // Module: module name, this module should have a file called TreeData.php |
|
43 | - // Function: name of the function to be called in TreeData.php, the function will be called statically. |
|
44 | - // PARAM prefixed properties: array of these property/values will be passed to the function as parameter. |
|
41 | + //Request object must have these property values: |
|
42 | + // Module: module name, this module should have a file called TreeData.php |
|
43 | + // Function: name of the function to be called in TreeData.php, the function will be called statically. |
|
44 | + // PARAM prefixed properties: array of these property/values will be passed to the function as parameter. |
|
45 | 45 | |
46 | 46 | |
47 | 47 | require_once('include/JSON.php'); |
@@ -56,27 +56,27 @@ discard block |
||
56 | 56 | $ret = array(); |
57 | 57 | |
58 | 58 | foreach($_FILES as $k => $file) { |
59 | - if(in_array(strtolower($_FILES[$k]['type']), $imgType) && $_FILES[$k]['size'] > 0) { |
|
60 | - $upload_file = new UploadFile($k); |
|
61 | - // check the file |
|
62 | - if($upload_file->confirm_upload()) { |
|
63 | - $dest = $cachedir.basename($upload_file->get_stored_file_name()); // target name |
|
64 | - $guid = create_guid(); |
|
65 | - if($upload_file->final_move($guid)) { // move to uploads |
|
66 | - $path = $upload_file->get_upload_path($guid); |
|
67 | - // if file is OK, copy to cache |
|
68 | - if(verify_uploaded_image($path) && copy($path, $dest)) { |
|
69 | - $ret[] = $dest; |
|
70 | - } |
|
71 | - // remove temp file |
|
72 | - unlink($path); |
|
73 | - } |
|
74 | - } |
|
75 | - } |
|
59 | + if(in_array(strtolower($_FILES[$k]['type']), $imgType) && $_FILES[$k]['size'] > 0) { |
|
60 | + $upload_file = new UploadFile($k); |
|
61 | + // check the file |
|
62 | + if($upload_file->confirm_upload()) { |
|
63 | + $dest = $cachedir.basename($upload_file->get_stored_file_name()); // target name |
|
64 | + $guid = create_guid(); |
|
65 | + if($upload_file->final_move($guid)) { // move to uploads |
|
66 | + $path = $upload_file->get_upload_path($guid); |
|
67 | + // if file is OK, copy to cache |
|
68 | + if(verify_uploaded_image($path) && copy($path, $dest)) { |
|
69 | + $ret[] = $dest; |
|
70 | + } |
|
71 | + // remove temp file |
|
72 | + unlink($path); |
|
73 | + } |
|
74 | + } |
|
75 | + } |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | if (!empty($ret)) { |
79 | - $json = getJSONobj(); |
|
80 | - echo $json->encode($ret); |
|
81 | - //return the parameters |
|
79 | + $json = getJSONobj(); |
|
80 | + echo $json->encode($ret); |
|
81 | + //return the parameters |
|
82 | 82 | } |
@@ -1,5 +1,5 @@ discard block |
||
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,17 +55,17 @@ discard block |
||
55 | 55 | |
56 | 56 | $ret = array(); |
57 | 57 | |
58 | -foreach($_FILES as $k => $file) { |
|
59 | - if(in_array(strtolower($_FILES[$k]['type']), $imgType) && $_FILES[$k]['size'] > 0) { |
|
58 | +foreach ($_FILES as $k => $file) { |
|
59 | + if (in_array(strtolower($_FILES[$k]['type']), $imgType) && $_FILES[$k]['size'] > 0) { |
|
60 | 60 | $upload_file = new UploadFile($k); |
61 | 61 | // check the file |
62 | - if($upload_file->confirm_upload()) { |
|
62 | + if ($upload_file->confirm_upload()) { |
|
63 | 63 | $dest = $cachedir.basename($upload_file->get_stored_file_name()); // target name |
64 | 64 | $guid = create_guid(); |
65 | - if($upload_file->final_move($guid)) { // move to uploads |
|
65 | + if ($upload_file->final_move($guid)) { // move to uploads |
|
66 | 66 | $path = $upload_file->get_upload_path($guid); |
67 | 67 | // if file is OK, copy to cache |
68 | - if(verify_uploaded_image($path) && copy($path, $dest)) { |
|
68 | + if (verify_uploaded_image($path) && copy($path, $dest)) { |
|
69 | 69 | $ret[] = $dest; |
70 | 70 | } |
71 | 71 | // remove temp file |
@@ -1,5 +1,7 @@ discard block |
||
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. |
@@ -47,8 +49,9 @@ discard block |
||
47 | 49 | require_once('include/JSON.php'); |
48 | 50 | require_once('include/upload_file.php'); |
49 | 51 | |
50 | -if (!is_dir($cachedir = sugar_cached('images/'))) |
|
52 | +if (!is_dir($cachedir = sugar_cached('images/'))) { |
|
51 | 53 | mkdir_recursive($cachedir); |
54 | +} |
|
52 | 55 | |
53 | 56 | // cn: bug 11012 - fixed some MIME types not getting picked up. Also changed array iterator. |
54 | 57 | $imgType = array('image/gif', 'image/png', 'image/x-png', 'image/bmp', 'image/jpeg', 'image/jpg', 'image/pjpeg'); |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | $GLOBALS['log']->info("EmailTemplate detail view"); |
75 | 75 | |
76 | 76 | if ($has_campaign || $inboundEmail) { |
77 | - $xtpl = new XTemplate ('modules/EmailTemplates/EditView.html'); |
|
77 | + $xtpl = new XTemplate('modules/EmailTemplates/EditView.html'); |
|
78 | 78 | } else { |
79 | - $xtpl = new XTemplate ('modules/EmailTemplates/EditViewMain.html'); |
|
79 | + $xtpl = new XTemplate('modules/EmailTemplates/EditViewMain.html'); |
|
80 | 80 | } // else |
81 | 81 | $xtpl->assign("MOD", $mod_strings); |
82 | 82 | $xtpl->assign("APP", $app_strings); |
@@ -128,13 +128,13 @@ discard block |
||
128 | 128 | require_once('include/QuickSearchDefaults.php'); |
129 | 129 | $qsd = QuickSearchDefaults::getQuickSearchDefaults(); |
130 | 130 | $sqs_objects = array('EditView_assigned_user_name' => $qsd->getQSUser()); |
131 | -$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '; enableQS();</script>'; |
|
131 | +$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = '.$json->encode($sqs_objects).'; enableQS();</script>'; |
|
132 | 132 | |
133 | 133 | $xtpl->assign("CANCEL_SCRIPT", $cancel_script); |
134 | -$xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); |
|
135 | -$xtpl->assign("JAVASCRIPT", get_set_focus_js() . $quicksearch_js); |
|
134 | +$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']); |
|
135 | +$xtpl->assign("JAVASCRIPT", get_set_focus_js().$quicksearch_js); |
|
136 | 136 | |
137 | -if (!is_file(sugar_cached('jsLanguage/') . $GLOBALS['current_language'] . '.js')) { |
|
137 | +if (!is_file(sugar_cached('jsLanguage/').$GLOBALS['current_language'].'.js')) { |
|
138 | 138 | require_once('include/language/jsLanguage.php'); |
139 | 139 | jsLanguage::createAppStringsCache($GLOBALS['current_language']); |
140 | 140 | } |
@@ -183,18 +183,18 @@ discard block |
||
183 | 183 | $record = $_REQUEST['record']; |
184 | 184 | } |
185 | 185 | |
186 | - $xtpl->assign("ADMIN_EDIT", "<a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $record . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDIT_LAYOUT']) . "</a>"); |
|
186 | + $xtpl->assign("ADMIN_EDIT", "<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action']."&from_module=".$_REQUEST['module']."&record=".$record."'>".SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDIT_LAYOUT'])."</a>"); |
|
187 | 187 | |
188 | 188 | } |
189 | 189 | if (isset($focus->parent_type) && $focus->parent_type != "") { |
190 | - $change_parent_button = "<input title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . "' |
|
191 | -tabindex='3' type='button' class='button' value='" . $app_strings['LBL_SELECT_BUTTON_LABEL'] . "' name='button' LANGUAGE=javascript onclick='return |
|
190 | + $change_parent_button = "<input title='".$app_strings['LBL_SELECT_BUTTON_TITLE']."' |
|
191 | +tabindex='3' type='button' class='button' value='" . $app_strings['LBL_SELECT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='return |
|
192 | 192 | window.open(\"index.php?module=\"+ document.EditView.parent_type.value + |
193 | 193 | \"&action=Popup&html=Popup_picker&form=TasksEditView\",\"test\",\"width=600,height=400,resizable=1,scrollbars=1\");'>"; |
194 | 194 | $xtpl->assign("CHANGE_PARENT_BUTTON", $change_parent_button); |
195 | 195 | } |
196 | 196 | if ($focus->parent_type == "Account") { |
197 | - $xtpl->assign("DEFAULT_SEARCH", "&query=true&account_id=$focus->parent_id&account_name=" . urlencode($focus->parent_name)); |
|
197 | + $xtpl->assign("DEFAULT_SEARCH", "&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name)); |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | $xtpl->assign("DESCRIPTION", $focus->description); |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | // If it's campaign then hide the Account. |
252 | 252 | if ($has_campaign) { |
253 | 253 | $dropdown = "<option value='Contacts'> |
254 | - " . $lblContactAndOthers . " |
|
254 | + " . $lblContactAndOthers." |
|
255 | 255 | </option>"; |
256 | 256 | $xtpl->assign("DROPDOWN", $dropdown); |
257 | 257 | $xtpl->assign("DEFAULT_MODULE", 'Contacts'); |
@@ -285,13 +285,13 @@ discard block |
||
285 | 285 | if (empty($the_note->filename)) { |
286 | 286 | continue; |
287 | 287 | } |
288 | - $secureLink = 'index.php?entryPoint=download&id=' . $the_note->id . '&type=Notes'; |
|
289 | - $attachments .= '<input type="checkbox" name="remove_attachment[]" value="' . $the_note->id . '"> ' . $app_strings['LNK_REMOVE'] . ' '; |
|
290 | - $attachments .= '<a href="' . $secureLink . '" target="_blank">' . $the_note->filename . '</a><br>'; |
|
288 | + $secureLink = 'index.php?entryPoint=download&id='.$the_note->id.'&type=Notes'; |
|
289 | + $attachments .= '<input type="checkbox" name="remove_attachment[]" value="'.$the_note->id.'"> '.$app_strings['LNK_REMOVE'].' '; |
|
290 | + $attachments .= '<a href="'.$secureLink.'" target="_blank">'.$the_note->filename.'</a><br>'; |
|
291 | 291 | } |
292 | 292 | } |
293 | 293 | $attJs = '<script type="text/javascript">'; |
294 | - $attJs .= 'var lnk_remove = "' . $app_strings['LNK_REMOVE'] . '";'; |
|
294 | + $attJs .= 'var lnk_remove = "'.$app_strings['LNK_REMOVE'].'";'; |
|
295 | 295 | $attJs .= '</script>'; |
296 | 296 | $xtpl->assign('ATTACHMENTS', $attachments); |
297 | 297 | $xtpl->assign('ATTACHMENTS_JAVASCRIPT', $attJs); |
@@ -1,5 +1,7 @@ discard block |
||
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 | require_once('modules/Campaigns/utils.php'); |
5 | 7 | |
@@ -26,7 +28,9 @@ discard block |
||
26 | 28 | |
27 | 29 | |
28 | 30 | //setting default flag value so due date and time not required |
29 | -if (!isset($focus->id)) $focus->date_due_flag = 1; |
|
31 | +if (!isset($focus->id)) { |
|
32 | + $focus->date_due_flag = 1; |
|
33 | +} |
|
30 | 34 | |
31 | 35 | //needed when creating a new case with default values passed in |
32 | 36 | if (isset($_REQUEST['contact_name']) && is_null($focus->contact_name)) { |
@@ -85,12 +89,16 @@ discard block |
||
85 | 89 | $xtpl->parse("main.variable_option"); |
86 | 90 | |
87 | 91 | $returnAction = 'index'; |
88 | -if (isset($_REQUEST['return_module'])) $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); |
|
92 | +if (isset($_REQUEST['return_module'])) { |
|
93 | + $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); |
|
94 | +} |
|
89 | 95 | if (isset($_REQUEST['return_action'])) { |
90 | 96 | $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']); |
91 | 97 | $returnAction = $_REQUEST['return_action']; |
92 | 98 | } |
93 | -if (isset($_REQUEST['return_id'])) $xtpl->assign("RETURN_ID", $_REQUEST['return_id']); |
|
99 | +if (isset($_REQUEST['return_id'])) { |
|
100 | + $xtpl->assign("RETURN_ID", $_REQUEST['return_id']); |
|
101 | +} |
|
94 | 102 | // handle Create $module then Cancel |
95 | 103 | if (empty($_REQUEST['return_id'])) { |
96 | 104 | $xtpl->assign("RETURN_ACTION", 'index'); |
@@ -119,8 +127,9 @@ discard block |
||
119 | 127 | ); |
120 | 128 | $json = getJSONobj(); |
121 | 129 | $xtpl->assign('encoded_assigned_users_popup_request_data', $json->encode($popup_request_data)); |
122 | -if (!empty($focus->assigned_user_name)) |
|
130 | +if (!empty($focus->assigned_user_name)) { |
|
123 | 131 | $xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name); |
132 | +} |
|
124 | 133 | |
125 | 134 | $xtpl->assign("assign_user_select", SugarThemeRegistry::current()->getImage('id-ff-select', '', null, null, '.png', $mod_strings['LBL_SELECT'])); |
126 | 135 | $xtpl->assign("assign_user_clear", SugarThemeRegistry::current()->getImage('id-ff-clear', '', null, null, '.gif', $mod_strings['LBL_ID_FF_CLEAR'])); |
@@ -142,24 +151,39 @@ discard block |
||
142 | 151 | $xtpl->assign("JSLANG", $jsLang); |
143 | 152 | |
144 | 153 | $xtpl->assign("ID", $focus->id); |
145 | -if (isset($focus->name)) $xtpl->assign("NAME", $focus->name); else $xtpl->assign("NAME", ""); |
|
154 | +if (isset($focus->name)) { |
|
155 | + $xtpl->assign("NAME", $focus->name); |
|
156 | +} else { |
|
157 | + $xtpl->assign("NAME", ""); |
|
158 | +} |
|
146 | 159 | |
147 | 160 | //Bug45632 |
148 | 161 | /* BEGIN - SECURITY GROUPS */ |
149 | 162 | /** |
150 | 163 | * if(isset($focus->assigned_user_id)) $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); else $xtpl->assign("ASSIGNED_USER_ID", ""); |
151 | 164 | */ |
152 | -if (isset($focus->assigned_user_id)) $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); |
|
153 | -else if (empty($focus->id) && empty($focus->assigned_user_id)) { |
|
165 | +if (isset($focus->assigned_user_id)) { |
|
166 | + $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); |
|
167 | +} else if (empty($focus->id) && empty($focus->assigned_user_id)) { |
|
154 | 168 | global $current_user; |
155 | 169 | $xtpl->assign("ASSIGNED_USER_ID", $current_user->id); |
156 | 170 | $xtpl->assign("ASSIGNED_USER_NAME", get_assigned_user_name($current_user->id)); |
157 | -} else $xtpl->assign("ASSIGNED_USER_ID", ""); |
|
171 | +} else { |
|
172 | + $xtpl->assign("ASSIGNED_USER_ID", ""); |
|
173 | +} |
|
158 | 174 | /* END - SECURITY GROUPS */ |
159 | 175 | //Bug45632 |
160 | 176 | |
161 | -if (isset($focus->description)) $xtpl->assign("DESCRIPTION", $focus->description); else $xtpl->assign("DESCRIPTION", ""); |
|
162 | -if (isset($focus->subject)) $xtpl->assign("SUBJECT", $focus->subject); else $xtpl->assign("SUBJECT", ""); |
|
177 | +if (isset($focus->description)) { |
|
178 | + $xtpl->assign("DESCRIPTION", $focus->description); |
|
179 | +} else { |
|
180 | + $xtpl->assign("DESCRIPTION", ""); |
|
181 | +} |
|
182 | +if (isset($focus->subject)) { |
|
183 | + $xtpl->assign("SUBJECT", $focus->subject); |
|
184 | +} else { |
|
185 | + $xtpl->assign("SUBJECT", ""); |
|
186 | +} |
|
163 | 187 | if ($focus->published == 'on') { |
164 | 188 | $xtpl->assign("PUBLISHED", "CHECKED"); |
165 | 189 | } |
@@ -201,8 +225,16 @@ discard block |
||
201 | 225 | $xtpl->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['record_type_display'], $focus->parent_type)); |
202 | 226 | //$xtpl->assign("DEFAULT_MODULE","Accounts"); |
203 | 227 | |
204 | -if (isset($focus->body)) $xtpl->assign("BODY", $focus->body); else $xtpl->assign("BODY", ""); |
|
205 | -if (isset($focus->body_html)) $xtpl->assign("BODY_HTML", $focus->body_html); else $xtpl->assign("BODY_HTML", ""); |
|
228 | +if (isset($focus->body)) { |
|
229 | + $xtpl->assign("BODY", $focus->body); |
|
230 | +} else { |
|
231 | + $xtpl->assign("BODY", ""); |
|
232 | +} |
|
233 | +if (isset($focus->body_html)) { |
|
234 | + $xtpl->assign("BODY_HTML", $focus->body_html); |
|
235 | +} else { |
|
236 | + $xtpl->assign("BODY_HTML", ""); |
|
237 | +} |
|
206 | 238 | |
207 | 239 | |
208 | 240 | if (true) { |
@@ -50,38 +50,38 @@ |
||
50 | 50 | |
51 | 51 | $focus = new EmailTemplate(); |
52 | 52 | if($_REQUEST['from'] == 'DetailView') { |
53 | - if(!isset($_REQUEST['record'])) |
|
54 | - sugar_die("A record number must be specified to delete the template."); |
|
55 | - $focus->retrieve($_REQUEST['record']); |
|
56 | - if(check_email_template_in_use($focus)) { |
|
57 | - echo 'true'; |
|
58 | - return; |
|
59 | - } |
|
60 | - echo 'false'; |
|
53 | + if(!isset($_REQUEST['record'])) |
|
54 | + sugar_die("A record number must be specified to delete the template."); |
|
55 | + $focus->retrieve($_REQUEST['record']); |
|
56 | + if(check_email_template_in_use($focus)) { |
|
57 | + echo 'true'; |
|
58 | + return; |
|
59 | + } |
|
60 | + echo 'false'; |
|
61 | 61 | } else if($_REQUEST['from'] == 'ListView') { |
62 | - $returnString = ''; |
|
63 | - $idArray = explode(',', $_REQUEST['records']); |
|
64 | - foreach($idArray as $key => $value) { |
|
65 | - if($focus->retrieve($value)) { |
|
66 | - if(check_email_template_in_use($focus)) { |
|
67 | - $returnString .= $focus->name . ','; |
|
68 | - } |
|
69 | - } |
|
70 | - } |
|
71 | - $returnString = substr($returnString, 0, -1); |
|
72 | - echo $returnString; |
|
62 | + $returnString = ''; |
|
63 | + $idArray = explode(',', $_REQUEST['records']); |
|
64 | + foreach($idArray as $key => $value) { |
|
65 | + if($focus->retrieve($value)) { |
|
66 | + if(check_email_template_in_use($focus)) { |
|
67 | + $returnString .= $focus->name . ','; |
|
68 | + } |
|
69 | + } |
|
70 | + } |
|
71 | + $returnString = substr($returnString, 0, -1); |
|
72 | + echo $returnString; |
|
73 | 73 | } else { |
74 | - echo ''; |
|
74 | + echo ''; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | function check_email_template_in_use($focus) |
78 | 78 | { |
79 | - if($focus->is_used_by_email_marketing()) { |
|
80 | - return true; |
|
81 | - } |
|
82 | - $system = $GLOBALS['sugar_config']['passwordsetting']; |
|
83 | - if($focus->id == $system['generatepasswordtmpl'] || $focus->id == $system['lostpasswordtmpl']) { |
|
84 | - return true; |
|
85 | - } |
|
79 | + if($focus->is_used_by_email_marketing()) { |
|
80 | + return true; |
|
81 | + } |
|
82 | + $system = $GLOBALS['sugar_config']['passwordsetting']; |
|
83 | + if($focus->id == $system['generatepasswordtmpl'] || $focus->id == $system['lostpasswordtmpl']) { |
|
84 | + return true; |
|
85 | + } |
|
86 | 86 | return false; |
87 | 87 | } |
@@ -1,5 +1,5 @@ discard block |
||
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. |
@@ -49,22 +49,22 @@ discard block |
||
49 | 49 | require_once('modules/EmailTemplates/EmailTemplate.php'); |
50 | 50 | |
51 | 51 | $focus = new EmailTemplate(); |
52 | -if($_REQUEST['from'] == 'DetailView') { |
|
53 | - if(!isset($_REQUEST['record'])) |
|
52 | +if ($_REQUEST['from'] == 'DetailView') { |
|
53 | + if (!isset($_REQUEST['record'])) |
|
54 | 54 | sugar_die("A record number must be specified to delete the template."); |
55 | 55 | $focus->retrieve($_REQUEST['record']); |
56 | - if(check_email_template_in_use($focus)) { |
|
56 | + if (check_email_template_in_use($focus)) { |
|
57 | 57 | echo 'true'; |
58 | 58 | return; |
59 | 59 | } |
60 | 60 | echo 'false'; |
61 | -} else if($_REQUEST['from'] == 'ListView') { |
|
61 | +} else if ($_REQUEST['from'] == 'ListView') { |
|
62 | 62 | $returnString = ''; |
63 | 63 | $idArray = explode(',', $_REQUEST['records']); |
64 | - foreach($idArray as $key => $value) { |
|
65 | - if($focus->retrieve($value)) { |
|
66 | - if(check_email_template_in_use($focus)) { |
|
67 | - $returnString .= $focus->name . ','; |
|
64 | + foreach ($idArray as $key => $value) { |
|
65 | + if ($focus->retrieve($value)) { |
|
66 | + if (check_email_template_in_use($focus)) { |
|
67 | + $returnString .= $focus->name.','; |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | } |
@@ -76,11 +76,11 @@ discard block |
||
76 | 76 | |
77 | 77 | function check_email_template_in_use($focus) |
78 | 78 | { |
79 | - if($focus->is_used_by_email_marketing()) { |
|
79 | + if ($focus->is_used_by_email_marketing()) { |
|
80 | 80 | return true; |
81 | 81 | } |
82 | 82 | $system = $GLOBALS['sugar_config']['passwordsetting']; |
83 | - if($focus->id == $system['generatepasswordtmpl'] || $focus->id == $system['lostpasswordtmpl']) { |
|
83 | + if ($focus->id == $system['generatepasswordtmpl'] || $focus->id == $system['lostpasswordtmpl']) { |
|
84 | 84 | return true; |
85 | 85 | } |
86 | 86 | return false; |
@@ -1,5 +1,7 @@ discard block |
||
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. |
@@ -50,8 +52,9 @@ discard block |
||
50 | 52 | |
51 | 53 | $focus = new EmailTemplate(); |
52 | 54 | if($_REQUEST['from'] == 'DetailView') { |
53 | - if(!isset($_REQUEST['record'])) |
|
54 | - sugar_die("A record number must be specified to delete the template."); |
|
55 | + if(!isset($_REQUEST['record'])) { |
|
56 | + sugar_die("A record number must be specified to delete the template."); |
|
57 | + } |
|
55 | 58 | $focus->retrieve($_REQUEST['record']); |
56 | 59 | if(check_email_template_in_use($focus)) { |
57 | 60 | echo 'true'; |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | require_once($beanFiles[$beanList[$key]]); |
47 | 47 | $focus = new $beanList[$key]; |
48 | 48 | $loopControl[$key][$key] = $focus; |
49 | - $prefixes[$key] = strtolower($focus->object_name) . '_'; |
|
50 | - if ($focus->object_name == 'Case') $prefixes[$key] = 'a' . strtolower($focus->object_name) . '_'; |
|
49 | + $prefixes[$key] = strtolower($focus->object_name).'_'; |
|
50 | + if ($focus->object_name == 'Case') $prefixes[$key] = 'a'.strtolower($focus->object_name).'_'; |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | |
@@ -125,16 +125,16 @@ discard block |
||
125 | 125 | if (isset($beanList[$key]) && isset($beanFiles[$beanList[$key]]) && !str_begin($key, 'AOW_') && !str_begin($key, 'zr2_')) { |
126 | 126 | |
127 | 127 | if ($key == 'Contacts') { |
128 | - $dropdown .= "<option value='" . $key . "'> |
|
129 | - " . $lblContactAndOthers . " |
|
128 | + $dropdown .= "<option value='".$key."'> |
|
129 | + " . $lblContactAndOthers." |
|
130 | 130 | </option>"; |
131 | 131 | } else if (isset($app_list_strings['moduleListSingular'][$key])) { |
132 | - $dropdown .= "<option value='" . $key . "'> |
|
133 | - " . $app_list_strings['moduleListSingular'][$key] . " |
|
132 | + $dropdown .= "<option value='".$key."'> |
|
133 | + " . $app_list_strings['moduleListSingular'][$key]." |
|
134 | 134 | </option>"; |
135 | 135 | } else { |
136 | - $dropdown .= "<option value='" . $key . "'> |
|
137 | - " . $app_list_strings['moduleList'][$key] . " |
|
136 | + $dropdown .= "<option value='".$key."'> |
|
137 | + " . $app_list_strings['moduleList'][$key]." |
|
138 | 138 | </option>"; |
139 | 139 | } |
140 | 140 | } |
@@ -1,5 +1,7 @@ discard block |
||
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 | |
5 | 7 | function generateFieldDefsJS2() |
@@ -47,7 +49,9 @@ discard block |
||
47 | 49 | $focus = new $beanList[$key]; |
48 | 50 | $loopControl[$key][$key] = $focus; |
49 | 51 | $prefixes[$key] = strtolower($focus->object_name) . '_'; |
50 | - if ($focus->object_name == 'Case') $prefixes[$key] = 'a' . strtolower($focus->object_name) . '_'; |
|
52 | + if ($focus->object_name == 'Case') { |
|
53 | + $prefixes[$key] = 'a' . strtolower($focus->object_name) . '_'; |
|
54 | + } |
|
51 | 55 | } |
52 | 56 | } |
53 | 57 | |
@@ -94,8 +98,9 @@ discard block |
||
94 | 98 | break; |
95 | 99 | } |
96 | 100 | } |
97 | - if ($dup) |
|
98 | - $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel); |
|
101 | + if ($dup) { |
|
102 | + $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel); |
|
103 | + } |
|
99 | 104 | } |
100 | 105 | } |
101 | 106 | } |
@@ -7,7 +7,7 @@ |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | |
10 | -if( |
|
10 | +if ( |
|
11 | 11 | (isset($_SESSION['screen_height']) ? $_SESSION['screen_height'] : null) != (isset($_POST['height']) ? $_POST['height'] : null) || |
12 | 12 | (isset($_SESSION['screen_width']) ? $_SESSION['screen_width'] : null) != (isset($_POST['width']) ? $_POST['width'] : null)) { |
13 | 13 | $_SESSION['screen_height'] = $_POST['height']; |