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 | 1 | 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 | * Description: |
||
44 | ********************************************************************************/ |
||
45 | |||
46 | |||
47 | |||
48 | |||
49 | |||
50 | |||
51 | |||
52 | class Release extends SugarBean { |
||
53 | // Stored fields |
||
54 | var $id; |
||
55 | var $deleted; |
||
56 | var $date_entered; |
||
57 | var $date_modified; |
||
58 | var $modified_user_id; |
||
59 | var $created_by; |
||
60 | var $created_by_name; |
||
61 | var $modified_by_name; |
||
62 | var $name; |
||
63 | var $status; |
||
64 | |||
65 | var $table_name = "releases"; |
||
66 | |||
67 | var $object_name = "Release"; |
||
68 | var $module_dir = 'Releases'; |
||
69 | var $new_schema = true; |
||
70 | |||
71 | // This is used to retrieve related fields from form posts. |
||
72 | var $additional_column_fields = Array(); |
||
73 | |||
74 | 14 | public function __construct() { |
|
75 | 14 | parent::__construct(); |
|
76 | 14 | } |
|
77 | |||
78 | /** |
||
79 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
||
80 | */ |
||
81 | public function Release(){ |
||
82 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
||
83 | if(isset($GLOBALS['log'])) { |
||
84 | $GLOBALS['log']->deprecated($deprecatedMessage); |
||
85 | } |
||
86 | else { |
||
87 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
||
88 | } |
||
89 | self::__construct(); |
||
90 | } |
||
91 | |||
92 | |||
93 | 1 | function get_summary_text() |
|
94 | { |
||
95 | 1 | return "$this->name"; |
|
96 | } |
||
97 | |||
98 | 3 | function get_releases($add_blank=false,$status='Active',$where='') |
|
99 | { |
||
100 | 3 | if($where!='') { |
|
101 | 2 | $query = "SELECT id, name FROM $this->table_name where ". $where ." and deleted=0 "; |
|
102 | } |
||
103 | else { |
||
104 | 2 | $query = "SELECT id, name FROM $this->table_name where deleted=0 "; |
|
105 | } |
||
106 | 3 | if ($status=='Active') { |
|
107 | 3 | $query .= " and status='Active' "; |
|
108 | } |
||
109 | 1 | elseif ($status=='Hidden') { |
|
110 | 1 | $query .= " and status='Hidden' "; |
|
111 | } |
||
112 | elseif ($status=='All') { |
||
0 ignored issues
–
show
|
|||
113 | } |
||
114 | 3 | $query .= " order by list_order asc"; |
|
115 | 3 | $result = $this->db->query($query, false); |
|
116 | 3 | $GLOBALS['log']->debug("get_releases: result is ".var_export($result, true)); |
|
117 | |||
118 | 3 | $list = array(); |
|
119 | 3 | if ($add_blank) { |
|
120 | 2 | $list['']=''; |
|
121 | } |
||
122 | //if($this->db->getRowCount($result) > 0){ |
||
123 | // We have some data. |
||
124 | 3 | while (($row = $this->db->fetchByAssoc($result)) != null) { |
|
125 | //while ($row = $this->db->fetchByAssoc($result)) { |
||
126 | $list[$row['id']] = $row['name']; |
||
127 | $GLOBALS['log']->debug("row id is:".$row['id']); |
||
128 | $GLOBALS['log']->debug("row name is:".$row['name']); |
||
129 | } |
||
130 | //} |
||
131 | 3 | return $list; |
|
132 | } |
||
133 | |||
134 | 1 | function fill_in_additional_list_fields() |
|
135 | { |
||
136 | 1 | $this->fill_in_additional_detail_fields(); |
|
137 | 1 | } |
|
138 | |||
139 | 2 | function fill_in_additional_detail_fields() { |
|
140 | |||
141 | 2 | } |
|
142 | |||
143 | 1 | function get_list_view_data(){ |
|
144 | 1 | global $app_list_strings; |
|
145 | 1 | $temp_array = $this->get_list_view_array(); |
|
146 | 1 | $temp_array["ENCODED_NAME"]=$this->name; |
|
147 | 1 | $temp_array['ENCODED_STATUS'] = $app_list_strings['release_status_dom'][$this->status]; |
|
148 | // $temp_array["ENCODED_NAME"]=htmlspecialchars($this->name, ENT_QUOTES); |
||
149 | 1 | return $temp_array; |
|
150 | |||
151 | } |
||
152 | /** |
||
153 | builds a generic search based on the query string using or |
||
154 | do not include any $this-> because this is called on without having the class instantiated |
||
155 | */ |
||
156 | 1 | function build_generic_where_clause ($the_query_string) { |
|
157 | 1 | $where_clauses = Array(); |
|
158 | 1 | $the_query_string = $GLOBALS['db']->quote($the_query_string); |
|
159 | 1 | array_push($where_clauses, "name like '$the_query_string%'"); |
|
160 | |||
161 | 1 | $the_where = ""; |
|
162 | 1 | foreach($where_clauses as $clause) |
|
163 | { |
||
164 | 1 | if($the_where != "") $the_where .= " or "; |
|
165 | 1 | $the_where .= $clause; |
|
166 | } |
||
167 | |||
168 | |||
169 | 1 | return $the_where; |
|
170 | } |
||
171 | |||
172 | |||
173 | } |
||
174 | |||
175 | ?> |
This check looks for the bodies of
elseif
statements that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.These
elseif
bodies can be removed. If you have an empty elseif but statements in theelse
branch, consider inverting the condition.