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) |
||
3 | die ( 'Not A Valid Entry Point' ) ; |
||
4 | /********************************************************************************* |
||
5 | * SugarCRM Community Edition is a customer relationship management program developed by |
||
6 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
||
7 | |||
8 | * SuiteCRM is an extension to SugarCRM Community Edition developed by Salesagility Ltd. |
||
9 | * Copyright (C) 2011 - 2014 Salesagility Ltd. |
||
10 | * |
||
11 | * This program is free software; you can redistribute it and/or modify it under |
||
12 | * the terms of the GNU Affero General Public License version 3 as published by the |
||
13 | * Free Software Foundation with the addition of the following permission added |
||
14 | * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK |
||
15 | * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY |
||
16 | * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
||
17 | * |
||
18 | * This program is distributed in the hope that it will be useful, but WITHOUT |
||
19 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
||
20 | * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more |
||
21 | * details. |
||
22 | * |
||
23 | * You should have received a copy of the GNU Affero General Public License along with |
||
24 | * this program; if not, see http://www.gnu.org/licenses or write to the Free |
||
25 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
||
26 | * 02110-1301 USA. |
||
27 | * |
||
28 | * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, |
||
29 | * SW2-130, Cupertino, CA 95014, USA. or at email address [email protected]. |
||
30 | * |
||
31 | * The interactive user interfaces in modified source and object code versions |
||
32 | * of this program must display Appropriate Legal Notices, as required under |
||
33 | * Section 5 of the GNU Affero General Public License version 3. |
||
34 | * |
||
35 | * In accordance with Section 7(b) of the GNU Affero General Public License version 3, |
||
36 | * these Appropriate Legal Notices must retain the display of the "Powered by |
||
37 | * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not |
||
38 | * reasonably feasible for technical reasons, the Appropriate Legal Notices must |
||
39 | * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". |
||
40 | ********************************************************************************/ |
||
41 | |||
42 | |||
43 | |||
44 | |||
45 | |||
46 | require_once ('modules/ModuleBuilder/views/view.listview.php') ; |
||
47 | require_once 'modules/ModuleBuilder/parsers/constants.php' ; |
||
48 | |||
49 | class ViewSearchView extends ViewListView |
||
50 | { |
||
51 | function __construct() |
||
52 | { |
||
53 | parent::__construct(); |
||
54 | if (!empty($_REQUEST['searchlayout'])) { |
||
55 | $this->editLayout = $_REQUEST['searchlayout']; |
||
56 | } |
||
57 | } |
||
58 | |||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
59 | /** |
||
0 ignored issues
–
show
|
|||
60 | * @see SugarView::_getModuleTitleParams() |
||
61 | */ |
||
62 | protected function _getModuleTitleParams($browserTitle = false) |
||
63 | { |
||
64 | global $mod_strings; |
||
65 | |||
66 | return array( |
||
67 | translate('LBL_MODULE_NAME','Administration'), |
||
68 | ModuleBuilderController::getModuleTitle(), |
||
69 | ); |
||
70 | } |
||
71 | |||
72 | // DO NOT REMOVE - overrides parent ViewEdit preDisplay() which attempts to load a bean for a non-existent module |
||
73 | function preDisplay() |
||
74 | { |
||
75 | } |
||
76 | |||
77 | function display( |
||
78 | $preview = false |
||
79 | ) |
||
80 | { |
||
81 | $packageName = (isset ( $_REQUEST [ 'view_package' ] )) ? $_REQUEST [ 'view_package' ] : '' ; |
||
82 | require_once 'modules/ModuleBuilder/parsers/ParserFactory.php' ; |
||
83 | $parser = ParserFactory::getParser ( $this->editLayout , $this->editModule, $packageName ) ; |
||
84 | |||
85 | $smarty = parent::constructSmarty ( $parser ) ; |
||
86 | $smarty->assign ( 'action', 'searchViewSave' ) ; |
||
87 | $smarty->assign ( 'view', $this->editLayout ) ; |
||
88 | $smarty->assign ( 'helpName', 'searchViewEditor' ) ; |
||
89 | $smarty->assign ( 'helpDefault', 'modify' ) ; |
||
90 | |||
91 | if ($preview) |
||
92 | { |
||
93 | echo $smarty->fetch ( "modules/ModuleBuilder/tpls/Preview/listView.tpl" ) ; |
||
94 | } else |
||
95 | { |
||
96 | $ajax = $this->constructAjax () ; |
||
97 | $ajax->addSection ( 'center', translate ($this->title), $smarty->fetch ( "modules/ModuleBuilder/tpls/listView.tpl" ) ) ; |
||
98 | echo $ajax->getJavascript () ; |
||
99 | } |
||
100 | } |
||
101 | |||
102 | function constructAjax() |
||
103 | { |
||
104 | require_once ('modules/ModuleBuilder/MB/AjaxCompose.php') ; |
||
105 | $ajax = new AjaxCompose ( ) ; |
||
106 | switch ( $this->editLayout ) |
||
107 | { |
||
108 | default: |
||
0 ignored issues
–
show
default: $searchLabe...per($this->editLayout); does not seem to be reachable.
This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed. Unreachable code is most often the result of function fx() {
try {
doSomething();
return true;
}
catch (\Exception $e) {
return false;
}
return false;
}
In the above example, the last ![]() |
|||
109 | $searchLabel = 'LBL_' . strtoupper ( $this->editLayout) ; |
||
110 | } |
||
111 | |||
112 | $layoutLabel = 'LBL_LAYOUTS' ; |
||
113 | $layoutView = 'layouts' ; |
||
114 | |||
115 | |||
116 | if ($this->fromModuleBuilder) |
||
117 | { |
||
118 | $ajax->addCrumb ( translate ( 'LBL_MODULEBUILDER', 'ModuleBuilder' ), 'ModuleBuilder.main("mb")' ) ; |
||
119 | $ajax->addCrumb ( $_REQUEST [ 'view_package' ], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=' . $_REQUEST [ 'view_package' ] . '")' ) ; |
||
120 | $ajax->addCrumb ( $this->editModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=module&view_package=' . $_REQUEST [ 'view_package' ] . "&view_module={$this->editModule}" . '")' ) ; |
||
121 | $ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view_module=' . $this->editModule. '&view_package=' . $_REQUEST['view_package'] . '")' ) ; |
||
122 | if ( $layoutLabel == 'LBL_LAYOUTS' ) $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view=search&view_module=' .$this->editModule . '&view_package=' . $_REQUEST [ 'view_package' ] . '")' ) ; |
||
123 | $ajax->addCrumb ( translate ( $searchLabel, 'ModuleBuilder' ), '' ) ; |
||
0 ignored issues
–
show
The variable
$searchLabel seems only to be defined at a later point. Did you maybe move this code here without moving the variable definition?
This error can happen if you refactor code and forget to move the variable initialization. Let’s take a look at a simple example: function someFunction() {
$x = 5;
echo $x;
}
The above code is perfectly fine. Now imagine that we re-order the statements: function someFunction() {
echo $x;
$x = 5;
}
In that case, ![]() |
|||
124 | } else |
||
125 | { |
||
126 | $ajax->addCrumb ( translate ( 'LBL_STUDIO', 'ModuleBuilder' ), 'ModuleBuilder.main("studio")' ) ; |
||
127 | $ajax->addCrumb ( $this->translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module=' . $this->editModule . '")' ) ; |
||
128 | $ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view='.$layoutView.'&view_module=' . $this->editModule . '")' ) ; |
||
129 | if ( $layoutLabel == 'LBL_LAYOUTS' ) $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view=search&view_module=' .$this->editModule . '")' ) ; |
||
130 | $ajax->addCrumb ( translate ( $searchLabel, 'ModuleBuilder' ), '' ) ; |
||
0 ignored issues
–
show
The variable
$searchLabel seems only to be defined at a later point. Did you maybe move this code here without moving the variable definition?
This error can happen if you refactor code and forget to move the variable initialization. Let’s take a look at a simple example: function someFunction() {
$x = 5;
echo $x;
}
The above code is perfectly fine. Now imagine that we re-order the statements: function someFunction() {
echo $x;
$x = 5;
}
In that case, ![]() |
|||
131 | } |
||
132 | $this->title = $searchLabel; |
||
0 ignored issues
–
show
The variable
$searchLabel seems only to be defined at a later point. Did you maybe move this code here without moving the variable definition?
This error can happen if you refactor code and forget to move the variable initialization. Let’s take a look at a simple example: function someFunction() {
$x = 5;
echo $x;
}
The above code is perfectly fine. Now imagine that we re-order the statements: function someFunction() {
echo $x;
$x = 5;
}
In that case, ![]() |
|||
133 | return $ajax ; |
||
134 | } |
||
135 | } |
||
136 |