This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
||
3 | /********************************************************************************* |
||
4 | * SugarCRM Community Edition is a customer relationship management program developed by |
||
5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
||
6 | |||
7 | * SuiteCRM is an extension to SugarCRM Community Edition developed by Salesagility Ltd. |
||
8 | * Copyright (C) 2011 - 2014 Salesagility Ltd. |
||
9 | * |
||
10 | * This program is free software; you can redistribute it and/or modify it under |
||
11 | * the terms of the GNU Affero General Public License version 3 as published by the |
||
12 | * Free Software Foundation with the addition of the following permission added |
||
13 | * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK |
||
14 | * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY |
||
15 | * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
||
16 | * |
||
17 | * This program is distributed in the hope that it will be useful, but WITHOUT |
||
18 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
||
19 | * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more |
||
20 | * details. |
||
21 | * |
||
22 | * You should have received a copy of the GNU Affero General Public License along with |
||
23 | * this program; if not, see http://www.gnu.org/licenses or write to the Free |
||
24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
||
25 | * 02110-1301 USA. |
||
26 | * |
||
27 | * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, |
||
28 | * SW2-130, Cupertino, CA 95014, USA. or at email address [email protected]. |
||
29 | * |
||
30 | * The interactive user interfaces in modified source and object code versions |
||
31 | * of this program must display Appropriate Legal Notices, as required under |
||
32 | * Section 5 of the GNU Affero General Public License version 3. |
||
33 | * |
||
34 | * In accordance with Section 7(b) of the GNU Affero General Public License version 3, |
||
35 | * these Appropriate Legal Notices must retain the display of the "Powered by |
||
36 | * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not |
||
37 | * reasonably feasible for technical reasons, the Appropriate Legal Notices must |
||
38 | * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". |
||
39 | ********************************************************************************/ |
||
40 | |||
41 | |||
42 | |||
43 | require_once('modules/DynamicFields/templates/Fields/TemplateTextArea.php'); |
||
44 | require_once('modules/DynamicFields/templates/Fields/TemplateFloat.php'); |
||
45 | require_once('modules/DynamicFields/templates/Fields/TemplateInt.php'); |
||
46 | require_once('modules/DynamicFields/templates/Fields/TemplateDate.php'); |
||
47 | require_once('modules/DynamicFields/templates/Fields/TemplateDatetimecombo.php'); |
||
48 | require_once('modules/DynamicFields/templates/Fields/TemplateBoolean.php'); |
||
49 | require_once('modules/DynamicFields/templates/Fields/TemplateEnum.php'); |
||
50 | require_once('modules/DynamicFields/templates/Fields/TemplateMultiEnum.php'); |
||
51 | require_once('modules/DynamicFields/templates/Fields/TemplateRadioEnum.php'); |
||
52 | require_once('modules/DynamicFields/templates/Fields/TemplateEmail.php'); |
||
53 | require_once('modules/DynamicFields/templates/Fields/TemplateRelatedTextField.php'); |
||
54 | |||
55 | require_once('modules/DynamicFields/templates/Fields/TemplateURL.php'); |
||
56 | require_once('modules/DynamicFields/templates/Fields/TemplateIFrame.php'); |
||
57 | require_once('modules/DynamicFields/templates/Fields/TemplateHTML.php'); |
||
58 | require_once('modules/DynamicFields/templates/Fields/TemplatePhone.php'); |
||
59 | require_once('modules/DynamicFields/templates/Fields/TemplateCurrency.php'); |
||
60 | require_once('modules/DynamicFields/templates/Fields/TemplateParent.php'); |
||
61 | require_once('modules/DynamicFields/templates/Fields/TemplateCurrencyId.php'); |
||
62 | require_once('modules/DynamicFields/templates/Fields/TemplateAddress.php'); |
||
63 | require_once('modules/DynamicFields/templates/Fields/TemplateParentType.php'); |
||
64 | require_once('modules/DynamicFields/templates/Fields/TemplateEncrypt.php'); |
||
65 | require_once('modules/DynamicFields/templates/Fields/TemplateId.php'); |
||
66 | require_once('modules/DynamicFields/templates/Fields/TemplateImage.php'); |
||
67 | require_once('modules/DynamicFields/templates/Fields/TemplateDecimal.php'); |
||
68 | function get_widget($type) |
||
69 | { |
||
70 | |||
71 | 22 | $local_temp = null; |
|
72 | 22 | switch(strtolower($type)){ |
|
73 | 22 | case 'char': |
|
74 | 22 | case 'varchar': |
|
75 | 22 | case 'varchar2': |
|
76 | 22 | $local_temp = new TemplateText(); break; |
|
0 ignored issues
–
show
|
|||
77 | 22 | case 'text': |
|
78 | 22 | case 'textarea': |
|
79 | $local_temp = new TemplateTextArea(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
80 | 22 | case 'double': |
|
0 ignored issues
–
show
The case body in a switch statement must start on the line following the statement.
According to the PSR-2, the body of a case statement must start on the line immediately following the case statement. switch ($expr) {
case "A":
doSomething(); //right
break;
case "B":
doSomethingElse(); //wrong
break;
} To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
81 | |||
82 | 22 | case 'float': |
|
83 | 22 | $local_temp = new TemplateFloat(); break; |
|
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
84 | case 'decimal': |
||
85 | $local_temp = new TemplateDecimal(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
86 | case 'int': |
||
87 | $local_temp = new TemplateInt(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
88 | case 'date': |
||
89 | $local_temp = new TemplateDate(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
90 | case 'bool': |
||
91 | $local_temp = new TemplateBoolean(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
92 | case 'relate': |
||
93 | $local_temp = new TemplateRelatedTextField(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
94 | case 'enum': |
||
95 | $local_temp = new TemplateEnum(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
96 | case 'multienum': |
||
97 | $local_temp = new TemplateMultiEnum(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
98 | case 'radioenum': |
||
99 | $local_temp = new TemplateRadioEnum(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
100 | case 'email': |
||
101 | $local_temp = new TemplateEmail(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
102 | case 'url': |
||
103 | $local_temp = new TemplateURL(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
104 | case 'iframe': |
||
105 | $local_temp = new TemplateIFrame(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
106 | case 'html': |
||
107 | $local_temp = new TemplateHTML(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
108 | case 'phone': |
||
109 | $local_temp = new TemplatePhone(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
110 | case 'currency': |
||
111 | $local_temp = new TemplateCurrency(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
112 | case 'parent': |
||
113 | $local_temp = new TemplateParent(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
114 | case 'parent_type': |
||
115 | $local_temp = new TemplateParentType(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
116 | case 'currency_id': |
||
117 | $local_temp = new TemplateCurrencyId(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
118 | case 'address': |
||
119 | $local_temp = new TemplateAddress(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
120 | case 'encrypt': |
||
121 | $local_temp = new TemplateEncrypt(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
122 | case 'id': |
||
123 | $local_temp = new TemplateId(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
124 | case 'datetimecombo': |
||
125 | case 'datetime': |
||
126 | $local_temp = new TemplateDatetimecombo(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
127 | case 'image': |
||
128 | $local_temp = new TemplateImage(); break; |
||
0 ignored issues
–
show
Terminating statement must be on a line by itself
As per the PSR-2 coding standard, the switch ($expr) {
case "A":
doSomething();
break; //wrong
case "B":
doSomething();
break; //right
case "C:":
doSomething();
return true; //right
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig. ![]() |
|||
129 | default: |
||
130 | $file = false; |
||
131 | if(file_exists('custom/modules/DynamicFields/templates/Fields/Template'. ucfirst($type) . '.php')){ |
||
132 | $file = 'custom/modules/DynamicFields/templates/Fields/Template'. ucfirst($type) . '.php'; |
||
133 | }else if(file_exists('modules/DynamicFields/templates/Fields/Template'. ucfirst($type) . '.php')){ |
||
134 | $file = 'modules/DynamicFields/templates/Fields/Template'. ucfirst($type) . '.php'; |
||
135 | } |
||
136 | if(!empty($file)){ |
||
137 | require_once($file); |
||
138 | $class = 'Template' . ucfirst($type) ; |
||
139 | $customClass = 'Custom' . $class; |
||
140 | if(class_exists($customClass)){ |
||
141 | $local_temp = new $customClass(); |
||
142 | }else{ |
||
143 | $local_temp = new $class(); |
||
144 | } |
||
145 | break; |
||
146 | }else{ |
||
147 | $local_temp = new TemplateText(); break; |
||
148 | } |
||
149 | } |
||
150 | |||
151 | 22 | return $local_temp; |
|
152 | } |
||
153 | ?> |
As per the PSR-2 coding standard, the
break
(or other terminating) statement must be on a line of its own.To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.