@@ -1,48 +1,48 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Advanced OpenReports, SugarCRM Reporting. |
|
4 | - * @package Advanced OpenReports for SugarCRM |
|
5 | - * @copyright SalesAgility Ltd http://www.salesagility.com |
|
6 | - * |
|
7 | - * This program is free software; you can redistribute it and/or modify |
|
8 | - * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by |
|
9 | - * the Free Software Foundation; either version 3 of the License, or |
|
10 | - * (at your option) any later version. |
|
11 | - * |
|
12 | - * This program is distributed in the hope that it will be useful, |
|
13 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
15 | - * GNU General Public License for more details. |
|
16 | - * |
|
17 | - * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
18 | - * along with this program; if not, see http://www.gnu.org/licenses |
|
19 | - * or write to the Free Software Foundation,Inc., 51 Franklin Street, |
|
20 | - * Fifth Floor, Boston, MA 02110-1301 USA |
|
21 | - * |
|
22 | - * @author SalesAgility <[email protected]> |
|
23 | - */ |
|
3 | + * Advanced OpenReports, SugarCRM Reporting. |
|
4 | + * @package Advanced OpenReports for SugarCRM |
|
5 | + * @copyright SalesAgility Ltd http://www.salesagility.com |
|
6 | + * |
|
7 | + * This program is free software; you can redistribute it and/or modify |
|
8 | + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by |
|
9 | + * the Free Software Foundation; either version 3 of the License, or |
|
10 | + * (at your option) any later version. |
|
11 | + * |
|
12 | + * This program is distributed in the hope that it will be useful, |
|
13 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
15 | + * GNU General Public License for more details. |
|
16 | + * |
|
17 | + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
18 | + * along with this program; if not, see http://www.gnu.org/licenses |
|
19 | + * or write to the Free Software Foundation,Inc., 51 Franklin Street, |
|
20 | + * Fifth Floor, Boston, MA 02110-1301 USA |
|
21 | + * |
|
22 | + * @author SalesAgility <[email protected]> |
|
23 | + */ |
|
24 | 24 | |
25 | 25 | $viewdefs ['AOR_Reports'] = |
26 | 26 | array ( |
27 | - 'EditView' => |
|
28 | - array ( |
|
27 | + 'EditView' => |
|
28 | + array ( |
|
29 | 29 | 'templateMeta' => |
30 | 30 | array ( |
31 | - 'maxColumns' => '2', |
|
32 | - 'widths' => |
|
33 | - array ( |
|
31 | + 'maxColumns' => '2', |
|
32 | + 'widths' => |
|
33 | + array ( |
|
34 | 34 | 0 => |
35 | 35 | array ( |
36 | - 'label' => '10', |
|
37 | - 'field' => '30', |
|
36 | + 'label' => '10', |
|
37 | + 'field' => '30', |
|
38 | 38 | ), |
39 | 39 | 1 => |
40 | 40 | array ( |
41 | - 'label' => '10', |
|
42 | - 'field' => '30', |
|
41 | + 'label' => '10', |
|
42 | + 'field' => '30', |
|
43 | + ), |
|
43 | 44 | ), |
44 | - ), |
|
45 | - 'useTabs' => false, |
|
45 | + 'useTabs' => false, |
|
46 | 46 | 'form' => array( |
47 | 47 | 'headerTpl' => 'modules/AOR_Reports/tpls/EditViewHeader.tpl', |
48 | 48 | 'footerTpl' => 'modules/AOR_Reports/tpls/EditViewFooter.tpl', |
@@ -50,38 +50,38 @@ discard block |
||
50 | 50 | ), |
51 | 51 | 'panels' => |
52 | 52 | array ( |
53 | - 'default' => |
|
54 | - array ( |
|
53 | + 'default' => |
|
54 | + array ( |
|
55 | 55 | 0 => |
56 | 56 | array ( |
57 | - 0 => 'name', |
|
58 | - 1 => 'assigned_user_name', |
|
57 | + 0 => 'name', |
|
58 | + 1 => 'assigned_user_name', |
|
59 | 59 | ), |
60 | 60 | 1 => |
61 | 61 | array ( |
62 | - 0 => |
|
63 | - array ( |
|
62 | + 0 => |
|
63 | + array ( |
|
64 | 64 | 'name' => 'report_module', |
65 | 65 | 'studio' => 'visible', |
66 | 66 | 'label' => 'LBL_REPORT_MODULE', |
67 | - ), |
|
68 | - 1 => '', |
|
67 | + ), |
|
68 | + 1 => '', |
|
69 | 69 | ), |
70 | - 2 => |
|
71 | - array ( |
|
72 | - 0 => |
|
73 | - array ( |
|
74 | - 'name' => 'graphs_per_row', |
|
75 | - 'label' => 'LBL_GRAPHS_PER_ROW', |
|
76 | - ), |
|
77 | - 1 => '', |
|
78 | - ), |
|
70 | + 2 => |
|
71 | + array ( |
|
72 | + 0 => |
|
73 | + array ( |
|
74 | + 'name' => 'graphs_per_row', |
|
75 | + 'label' => 'LBL_GRAPHS_PER_ROW', |
|
76 | + ), |
|
77 | + 1 => '', |
|
78 | + ), |
|
79 | 79 | // 2 => |
80 | 80 | // array ( |
81 | 81 | // 0 => 'description', |
82 | 82 | // ), |
83 | - ), |
|
83 | + ), |
|
84 | + ), |
|
84 | 85 | ), |
85 | - ), |
|
86 | 86 | ); |
87 | 87 | ?> |
@@ -1,37 +1,37 @@ |
||
1 | 1 | <?php |
2 | 2 | if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
3 | 3 | /** |
4 | - * Advanced OpenReports, SugarCRM Reporting. |
|
5 | - * @package Advanced OpenReports for SugarCRM |
|
6 | - * @copyright SalesAgility Ltd http://www.salesagility.com |
|
7 | - * |
|
8 | - * This program is free software; you can redistribute it and/or modify |
|
9 | - * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by |
|
10 | - * the Free Software Foundation; either version 3 of the License, or |
|
11 | - * (at your option) any later version. |
|
12 | - * |
|
13 | - * This program is distributed in the hope that it will be useful, |
|
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 | - * GNU General Public License for more details. |
|
17 | - * |
|
18 | - * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
19 | - * along with this program; if not, see http://www.gnu.org/licenses |
|
20 | - * or write to the Free Software Foundation,Inc., 51 Franklin Street, |
|
21 | - * Fifth Floor, Boston, MA 02110-1301 USA |
|
22 | - * |
|
23 | - * @author SalesAgility <[email protected]> |
|
24 | - */ |
|
4 | + * Advanced OpenReports, SugarCRM Reporting. |
|
5 | + * @package Advanced OpenReports for SugarCRM |
|
6 | + * @copyright SalesAgility Ltd http://www.salesagility.com |
|
7 | + * |
|
8 | + * This program is free software; you can redistribute it and/or modify |
|
9 | + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by |
|
10 | + * the Free Software Foundation; either version 3 of the License, or |
|
11 | + * (at your option) any later version. |
|
12 | + * |
|
13 | + * This program is distributed in the hope that it will be useful, |
|
14 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 | + * GNU General Public License for more details. |
|
17 | + * |
|
18 | + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
19 | + * along with this program; if not, see http://www.gnu.org/licenses |
|
20 | + * or write to the Free Software Foundation,Inc., 51 Franklin Street, |
|
21 | + * Fifth Floor, Boston, MA 02110-1301 USA |
|
22 | + * |
|
23 | + * @author SalesAgility <[email protected]> |
|
24 | + */ |
|
25 | 25 | |
26 | 26 | $popupMeta = array('moduleMain' => 'AOR_Reports', |
27 | - 'varName' => 'AOR_Report', |
|
28 | - 'orderBy' => 'aor_reports.name', |
|
29 | - 'whereClauses' => |
|
30 | - array('name' => 'aor_reports.name', |
|
31 | - ), |
|
32 | - 'searchInputs'=> array('aor_reports_number', 'name', 'priority','status'), |
|
27 | + 'varName' => 'AOR_Report', |
|
28 | + 'orderBy' => 'aor_reports.name', |
|
29 | + 'whereClauses' => |
|
30 | + array('name' => 'aor_reports.name', |
|
31 | + ), |
|
32 | + 'searchInputs'=> array('aor_reports_number', 'name', 'priority','status'), |
|
33 | 33 | |
34 | - ); |
|
34 | + ); |
|
35 | 35 | ?> |
36 | 36 | |
37 | 37 |
@@ -1,60 +1,60 @@ |
||
1 | 1 | <?php |
2 | 2 | if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
3 | 3 | /** |
4 | - * Advanced OpenReports, SugarCRM Reporting. |
|
5 | - * @package Advanced OpenReports for SugarCRM |
|
6 | - * @copyright SalesAgility Ltd http://www.salesagility.com |
|
7 | - * |
|
8 | - * This program is free software; you can redistribute it and/or modify |
|
9 | - * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by |
|
10 | - * the Free Software Foundation; either version 3 of the License, or |
|
11 | - * (at your option) any later version. |
|
12 | - * |
|
13 | - * This program is distributed in the hope that it will be useful, |
|
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 | - * GNU General Public License for more details. |
|
17 | - * |
|
18 | - * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
19 | - * along with this program; if not, see http://www.gnu.org/licenses |
|
20 | - * or write to the Free Software Foundation,Inc., 51 Franklin Street, |
|
21 | - * Fifth Floor, Boston, MA 02110-1301 USA |
|
22 | - * |
|
23 | - * @author SalesAgility <[email protected]> |
|
24 | - */ |
|
4 | + * Advanced OpenReports, SugarCRM Reporting. |
|
5 | + * @package Advanced OpenReports for SugarCRM |
|
6 | + * @copyright SalesAgility Ltd http://www.salesagility.com |
|
7 | + * |
|
8 | + * This program is free software; you can redistribute it and/or modify |
|
9 | + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by |
|
10 | + * the Free Software Foundation; either version 3 of the License, or |
|
11 | + * (at your option) any later version. |
|
12 | + * |
|
13 | + * This program is distributed in the hope that it will be useful, |
|
14 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 | + * GNU General Public License for more details. |
|
17 | + * |
|
18 | + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
19 | + * along with this program; if not, see http://www.gnu.org/licenses |
|
20 | + * or write to the Free Software Foundation,Inc., 51 Franklin Street, |
|
21 | + * Fifth Floor, Boston, MA 02110-1301 USA |
|
22 | + * |
|
23 | + * @author SalesAgility <[email protected]> |
|
24 | + */ |
|
25 | 25 | |
26 | 26 | |
27 | 27 | $subpanel_layout = array( |
28 | - 'top_buttons' => array( |
|
29 | - array('widget_class' => 'SubPanelTopCreateButton'), |
|
30 | - array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'AOR_Reports'), |
|
31 | - ), |
|
28 | + 'top_buttons' => array( |
|
29 | + array('widget_class' => 'SubPanelTopCreateButton'), |
|
30 | + array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'AOR_Reports'), |
|
31 | + ), |
|
32 | 32 | |
33 | - 'where' => '', |
|
33 | + 'where' => '', |
|
34 | 34 | |
35 | - 'list_fields' => array( |
|
36 | - 'name'=>array( |
|
37 | - 'vname' => 'LBL_NAME', |
|
38 | - 'widget_class' => 'SubPanelDetailViewLink', |
|
39 | - 'width' => '45%', |
|
40 | - ), |
|
41 | - 'date_modified'=>array( |
|
42 | - 'vname' => 'LBL_DATE_MODIFIED', |
|
43 | - 'width' => '45%', |
|
44 | - ), |
|
45 | - 'edit_button'=>array( |
|
35 | + 'list_fields' => array( |
|
36 | + 'name'=>array( |
|
37 | + 'vname' => 'LBL_NAME', |
|
38 | + 'widget_class' => 'SubPanelDetailViewLink', |
|
39 | + 'width' => '45%', |
|
40 | + ), |
|
41 | + 'date_modified'=>array( |
|
42 | + 'vname' => 'LBL_DATE_MODIFIED', |
|
43 | + 'width' => '45%', |
|
44 | + ), |
|
45 | + 'edit_button'=>array( |
|
46 | 46 | 'vname' => 'LBL_EDIT_BUTTON', |
47 | - 'widget_class' => 'SubPanelEditButton', |
|
48 | - 'module' => 'AOR_Reports', |
|
49 | - 'width' => '4%', |
|
50 | - ), |
|
51 | - 'remove_button'=>array( |
|
47 | + 'widget_class' => 'SubPanelEditButton', |
|
48 | + 'module' => 'AOR_Reports', |
|
49 | + 'width' => '4%', |
|
50 | + ), |
|
51 | + 'remove_button'=>array( |
|
52 | 52 | 'vname' => 'LBL_REMOVE', |
53 | - 'widget_class' => 'SubPanelRemoveButton', |
|
54 | - 'module' => 'AOR_Reports', |
|
55 | - 'width' => '5%', |
|
56 | - ), |
|
57 | - ), |
|
53 | + 'widget_class' => 'SubPanelRemoveButton', |
|
54 | + 'module' => 'AOR_Reports', |
|
55 | + 'width' => '5%', |
|
56 | + ), |
|
57 | + ), |
|
58 | 58 | ); |
59 | 59 | |
60 | 60 | ?> |
@@ -31,15 +31,15 @@ |
||
31 | 31 | ), |
32 | 32 | |
33 | 33 | |
34 | - 'panels' =>array ( |
|
35 | - 'default' => |
|
36 | - array ( |
|
34 | + 'panels' =>array ( |
|
35 | + 'default' => |
|
36 | + array ( |
|
37 | 37 | |
38 | 38 | array ( |
39 | - 'name', |
|
40 | - 'assigned_user_name', |
|
39 | + 'name', |
|
40 | + 'assigned_user_name', |
|
41 | + ), |
|
41 | 42 | ), |
42 | - ), |
|
43 | 43 | |
44 | 44 | ), |
45 | 45 |
@@ -1,67 +1,67 @@ |
||
1 | 1 | <?php |
2 | 2 | if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
3 | 3 | /** |
4 | - * Advanced OpenReports, SugarCRM Reporting. |
|
5 | - * @package Advanced OpenReports for SugarCRM |
|
6 | - * @copyright SalesAgility Ltd http://www.salesagility.com |
|
7 | - * |
|
8 | - * This program is free software; you can redistribute it and/or modify |
|
9 | - * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by |
|
10 | - * the Free Software Foundation; either version 3 of the License, or |
|
11 | - * (at your option) any later version. |
|
12 | - * |
|
13 | - * This program is distributed in the hope that it will be useful, |
|
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 | - * GNU General Public License for more details. |
|
17 | - * |
|
18 | - * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
19 | - * along with this program; if not, see http://www.gnu.org/licenses |
|
20 | - * or write to the Free Software Foundation,Inc., 51 Franklin Street, |
|
21 | - * Fifth Floor, Boston, MA 02110-1301 USA |
|
22 | - * |
|
23 | - * @author SalesAgility <[email protected]> |
|
24 | - */ |
|
4 | + * Advanced OpenReports, SugarCRM Reporting. |
|
5 | + * @package Advanced OpenReports for SugarCRM |
|
6 | + * @copyright SalesAgility Ltd http://www.salesagility.com |
|
7 | + * |
|
8 | + * This program is free software; you can redistribute it and/or modify |
|
9 | + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by |
|
10 | + * the Free Software Foundation; either version 3 of the License, or |
|
11 | + * (at your option) any later version. |
|
12 | + * |
|
13 | + * This program is distributed in the hope that it will be useful, |
|
14 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 | + * GNU General Public License for more details. |
|
17 | + * |
|
18 | + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
19 | + * along with this program; if not, see http://www.gnu.org/licenses |
|
20 | + * or write to the Free Software Foundation,Inc., 51 Franklin Street, |
|
21 | + * Fifth Floor, Boston, MA 02110-1301 USA |
|
22 | + * |
|
23 | + * @author SalesAgility <[email protected]> |
|
24 | + */ |
|
25 | 25 | |
26 | 26 | |
27 | 27 | $listViewDefs ['AOR_Reports'] = |
28 | 28 | array ( |
29 | - 'NAME' => |
|
30 | - array ( |
|
29 | + 'NAME' => |
|
30 | + array ( |
|
31 | 31 | 'width' => '15%', |
32 | 32 | 'label' => 'LBL_NAME', |
33 | 33 | 'default' => true, |
34 | 34 | 'link' => true, |
35 | - ), |
|
36 | - 'REPORT_MODULE' => |
|
37 | - array ( |
|
35 | + ), |
|
36 | + 'REPORT_MODULE' => |
|
37 | + array ( |
|
38 | 38 | 'type' => 'enum', |
39 | 39 | 'default' => true, |
40 | 40 | 'studio' => 'visible', |
41 | 41 | 'label' => 'LBL_REPORT_MODULE', |
42 | 42 | 'width' => '15%', |
43 | - ), |
|
44 | - 'ASSIGNED_USER_NAME' => |
|
45 | - array ( |
|
43 | + ), |
|
44 | + 'ASSIGNED_USER_NAME' => |
|
45 | + array ( |
|
46 | 46 | 'width' => '15%', |
47 | 47 | 'label' => 'LBL_ASSIGNED_TO_NAME', |
48 | 48 | 'module' => 'Employees', |
49 | 49 | 'id' => 'ASSIGNED_USER_ID', |
50 | 50 | 'default' => true, |
51 | - ), |
|
52 | - 'DATE_ENTERED' => |
|
53 | - array ( |
|
51 | + ), |
|
52 | + 'DATE_ENTERED' => |
|
53 | + array ( |
|
54 | 54 | 'type' => 'datetime', |
55 | 55 | 'label' => 'LBL_DATE_ENTERED', |
56 | 56 | 'width' => '15%', |
57 | 57 | 'default' => true, |
58 | - ), |
|
59 | - 'DATE_MODIFIED' => |
|
60 | - array ( |
|
58 | + ), |
|
59 | + 'DATE_MODIFIED' => |
|
60 | + array ( |
|
61 | 61 | 'type' => 'datetime', |
62 | 62 | 'label' => 'LBL_DATE_MODIFIED', |
63 | 63 | 'width' => '15%', |
64 | 64 | 'default' => true, |
65 | - ), |
|
65 | + ), |
|
66 | 66 | ); |
67 | 67 | ?> |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | var $onlyCharts; |
13 | 13 | |
14 | 14 | function AORReportsDashlet($id, $def = array()) { |
15 | - global $current_user, $app_strings; |
|
15 | + global $current_user, $app_strings; |
|
16 | 16 | |
17 | 17 | parent::Dashlet($id); |
18 | 18 | $this->isConfigurable = true; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
71 | - function process() { |
|
71 | + function process() { |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | public function displayOptions() { |
@@ -3,6 +3,6 @@ |
||
3 | 3 | global $app_strings; |
4 | 4 | |
5 | 5 | $dashletMeta['AORReportsDashlet'] = array('module' => 'AOR_Reports', |
6 | - 'title' => translate('LBL_AOR_REPORTS_DASHLET', 'AOR_Reports'), |
|
7 | - 'description' => 'Displays Reports', |
|
8 | - 'category' => 'Module Views'); |
|
6 | + 'title' => translate('LBL_AOR_REPORTS_DASHLET', 'AOR_Reports'), |
|
7 | + 'description' => 'Displays Reports', |
|
8 | + 'category' => 'Module Views'); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->base_path = "custom/Extension/modules/{$this->module}/Ext/Vardefs"; |
52 | 52 | } |
53 | 53 | |
54 | - function getModuleName() |
|
54 | + function getModuleName() |
|
55 | 55 | { |
56 | 56 | return $this->module ; |
57 | 57 | } |
@@ -69,11 +69,11 @@ discard block |
||
69 | 69 | |
70 | 70 | |
71 | 71 | /** |
72 | - * This will add the bean as a reference in this object as well as building the custom field cache if it has not been built |
|
73 | - * LOADS THE BEAN IF THE BEAN IS NOT BEING PASSED ALONG IN SETUP IT SHOULD BE SET PRIOR TO SETUP |
|
74 | - * |
|
75 | - * @param SUGARBEAN $bean |
|
76 | - */ |
|
72 | + * This will add the bean as a reference in this object as well as building the custom field cache if it has not been built |
|
73 | + * LOADS THE BEAN IF THE BEAN IS NOT BEING PASSED ALONG IN SETUP IT SHOULD BE SET PRIOR TO SETUP |
|
74 | + * |
|
75 | + * @param SUGARBEAN $bean |
|
76 | + */ |
|
77 | 77 | function setup($bean = null) { |
78 | 78 | if ($bean) { |
79 | 79 | $this->bean = $bean; |
@@ -95,12 +95,12 @@ discard block |
||
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
98 | - * Builds the cache for custom fields based on the vardefs |
|
99 | - * |
|
100 | - * @param STRING $module |
|
101 | - * @param boolean saveCache Boolean value indicating whether or not to pass saveCache value to saveToVardef, defaults to true |
|
102 | - * @return unknown |
|
103 | - */ |
|
98 | + * Builds the cache for custom fields based on the vardefs |
|
99 | + * |
|
100 | + * @param STRING $module |
|
101 | + * @param boolean saveCache Boolean value indicating whether or not to pass saveCache value to saveToVardef, defaults to true |
|
102 | + * @return unknown |
|
103 | + */ |
|
104 | 104 | function buildCache($module = false, $saveCache=true) { |
105 | 105 | //We can't build the cache while installing as the required database tables may not exist. |
106 | 106 | if (!empty($GLOBALS['installing']) && $GLOBALS['installing'] == true|| empty($GLOBALS['db'])) |
@@ -161,8 +161,8 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
164 | - * Returns the widget for a custom field from the fields_meta_data table. |
|
165 | - */ |
|
164 | + * Returns the widget for a custom field from the fields_meta_data table. |
|
165 | + */ |
|
166 | 166 | function getFieldWidget($module, $fieldName) { |
167 | 167 | if (empty($module) || empty($fieldName)){ |
168 | 168 | sugar_die("Unable to load widget for '$module' : '$fieldName'"); |
@@ -179,12 +179,12 @@ discard block |
||
179 | 179 | |
180 | 180 | |
181 | 181 | /** |
182 | - * Updates the cached vardefs with the custom field information stored in result |
|
183 | - * |
|
184 | - * @param string $module |
|
185 | - * @param array $result |
|
186 | - * @param boolean saveCache Boolean value indicating whether or not to call VardefManager::saveCache, defaults to true |
|
187 | - */ |
|
182 | + * Updates the cached vardefs with the custom field information stored in result |
|
183 | + * |
|
184 | + * @param string $module |
|
185 | + * @param array $result |
|
186 | + * @param boolean saveCache Boolean value indicating whether or not to call VardefManager::saveCache, defaults to true |
|
187 | + */ |
|
188 | 188 | function saveToVardef($module,$result,$saveCache=true) { |
189 | 189 | |
190 | 190 | |
@@ -248,14 +248,14 @@ discard block |
||
248 | 248 | } |
249 | 249 | |
250 | 250 | /** |
251 | - * returns either false or an array containing the select and join parameter for a query using custom fields |
|
252 | - * @param $expandedList boolean If true, return a list of all fields with source=custom_fields in the select instead of the standard _cstm.* |
|
253 | - * This is required for any downstream construction of a SQL statement where we need to manipulate the select list, |
|
254 | - * for example, listviews with custom relate fields where the value comes from join rather than from the custom table |
|
255 | - * |
|
256 | - * @return array select=>select columns, join=>prebuilt join statement |
|
257 | - */ |
|
258 | - function getJOIN( $expandedList = false , $includeRelates = false, &$where = false){ |
|
251 | + * returns either false or an array containing the select and join parameter for a query using custom fields |
|
252 | + * @param $expandedList boolean If true, return a list of all fields with source=custom_fields in the select instead of the standard _cstm.* |
|
253 | + * This is required for any downstream construction of a SQL statement where we need to manipulate the select list, |
|
254 | + * for example, listviews with custom relate fields where the value comes from join rather than from the custom table |
|
255 | + * |
|
256 | + * @return array select=>select columns, join=>prebuilt join statement |
|
257 | + */ |
|
258 | + function getJOIN( $expandedList = false , $includeRelates = false, &$where = false){ |
|
259 | 259 | if(!$this->bean->hasCustomFields()){ |
260 | 260 | return array( |
261 | 261 | 'select' => '', |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | |
309 | 309 | } |
310 | 310 | |
311 | - function getRelateJoin($field_def, $joinTableAlias, $withIdName = true) { |
|
311 | + function getRelateJoin($field_def, $joinTableAlias, $withIdName = true) { |
|
312 | 312 | if (empty($field_def['type']) || $field_def['type'] != "relate") { |
313 | 313 | return false; |
314 | 314 | } |
@@ -346,13 +346,13 @@ discard block |
||
346 | 346 | $ret_array['from'] = " LEFT JOIN $rel_table $joinTableAlias ON $tableName.$relID = $joinTableAlias.id" |
347 | 347 | . " AND $joinTableAlias.deleted=0 "; |
348 | 348 | return $ret_array; |
349 | - } |
|
349 | + } |
|
350 | 350 | |
351 | - /** |
|
352 | - * Fills in all the custom fields of type relate relationships for an object |
|
353 | - * |
|
354 | - */ |
|
355 | - function fill_relationships(){ |
|
351 | + /** |
|
352 | + * Fills in all the custom fields of type relate relationships for an object |
|
353 | + * |
|
354 | + */ |
|
355 | + function fill_relationships(){ |
|
356 | 356 | global $beanList, $beanFiles; |
357 | 357 | if(!empty($this->bean->relDepth)) { |
358 | 358 | if($this->bean->relDepth > 1)return; |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | * |
388 | 388 | * @param boolean $isUpdate |
389 | 389 | */ |
390 | - function save($isUpdate){ |
|
390 | + function save($isUpdate){ |
|
391 | 391 | |
392 | 392 | if($this->bean->hasCustomFields() && isset($this->bean->id)){ |
393 | 393 | |
@@ -422,8 +422,8 @@ discard block |
||
422 | 422 | } |
423 | 423 | |
424 | 424 | $val = $this->bean->$name; |
425 | - if(($field['type'] == 'date' || $field['type'] == 'datetimecombo') && (empty($this->bean->$name )|| $this->bean->$name == '1900-01-01')){ |
|
426 | - $quote = ''; |
|
425 | + if(($field['type'] == 'date' || $field['type'] == 'datetimecombo') && (empty($this->bean->$name )|| $this->bean->$name == '1900-01-01')){ |
|
426 | + $quote = ''; |
|
427 | 427 | $val = 'NULL'; |
428 | 428 | $this->bean->$name = ''; // do not set it to string 'NULL' |
429 | 429 | } |
@@ -571,11 +571,11 @@ discard block |
||
571 | 571 | if($field){ |
572 | 572 | if(!$is_update){ |
573 | 573 | //Do two SQL calls here in this case |
574 | - //The first is to create the column in the custom table without the default value |
|
575 | - //The second is to modify the column created in the custom table to set the default value |
|
576 | - //We do this so that the existing entries in the custom table don't have the default value set |
|
577 | - $field->default = ''; |
|
578 | - $field->default_value = ''; |
|
574 | + //The first is to create the column in the custom table without the default value |
|
575 | + //The second is to modify the column created in the custom table to set the default value |
|
576 | + //We do this so that the existing entries in the custom table don't have the default value set |
|
577 | + $field->default = ''; |
|
578 | + $field->default_value = ''; |
|
579 | 579 | // resetting default and default_value does not work for multienum and causes trouble for mssql |
580 | 580 | // so using a temporary variable here to indicate that we don't want default for this query |
581 | 581 | $field->no_default = 1; |
@@ -583,19 +583,19 @@ discard block |
||
583 | 583 | // unsetting temporary member variable |
584 | 584 | unset($field->no_default); |
585 | 585 | if(!empty($query)){ |
586 | - $GLOBALS['db']->query($query, true, "Cannot create column"); |
|
587 | - $field->default = $fmd->default_value; |
|
588 | - $field->default_value = $fmd->default_value; |
|
589 | - $query = $field->get_db_modify_alter_table($this->bean->table_name . '_cstm'); |
|
590 | - if(!empty($query)){ |
|
591 | - $GLOBALS['db']->query($query, true, "Cannot set default"); |
|
592 | - } |
|
586 | + $GLOBALS['db']->query($query, true, "Cannot create column"); |
|
587 | + $field->default = $fmd->default_value; |
|
588 | + $field->default_value = $fmd->default_value; |
|
589 | + $query = $field->get_db_modify_alter_table($this->bean->table_name . '_cstm'); |
|
590 | + if(!empty($query)){ |
|
591 | + $GLOBALS['db']->query($query, true, "Cannot set default"); |
|
592 | + } |
|
593 | 593 | } |
594 | 594 | }else{ |
595 | 595 | $query = $field->get_db_modify_alter_table($this->bean->table_name . '_cstm'); |
596 | 596 | if(!empty($query)){ |
597 | - $GLOBALS['db']->query($query, true, "Cannot modify field"); |
|
598 | - } |
|
597 | + $GLOBALS['db']->query($query, true, "Cannot modify field"); |
|
598 | + } |
|
599 | 599 | } |
600 | 600 | $fmd->save(); |
601 | 601 | $this->buildCache($this->module); |
@@ -761,12 +761,12 @@ discard block |
||
761 | 761 | ) |
762 | 762 | ); |
763 | 763 | $ididx = array( |
764 | - 'id'=>array( |
|
765 | - 'name' =>$this->bean->table_name."_cstm_pk", |
|
766 | - 'type' =>'primary', |
|
767 | - 'fields'=>array('id_c') |
|
764 | + 'id'=>array( |
|
765 | + 'name' =>$this->bean->table_name."_cstm_pk", |
|
766 | + 'type' =>'primary', |
|
767 | + 'fields'=>array('id_c') |
|
768 | 768 | ), |
769 | - ); |
|
769 | + ); |
|
770 | 770 | |
771 | 771 | $query = $GLOBALS['db']->createTableSQLParams($this->bean->table_name."_cstm", $iddef, $ididx); |
772 | 772 | if(!$GLOBALS['db']->supports("inline_keys")) { |
@@ -798,14 +798,14 @@ discard block |
||
798 | 798 | * |
799 | 799 | */ |
800 | 800 | function add_existing_custom_fields($execute = true){ |
801 | - $out = ""; |
|
801 | + $out = ""; |
|
802 | 802 | if($this->bean->hasCustomFields()){ |
803 | - foreach($this->bean->field_defs as $name=>$data){ |
|
804 | - if(empty($data['source']) || $data['source'] != 'custom_fields') |
|
803 | + foreach($this->bean->field_defs as $name=>$data){ |
|
804 | + if(empty($data['source']) || $data['source'] != 'custom_fields') |
|
805 | 805 | continue; |
806 | - $out .= $this->add_existing_custom_field($data, $execute); |
|
807 | - } |
|
808 | - } |
|
806 | + $out .= $this->add_existing_custom_field($data, $execute); |
|
807 | + } |
|
808 | + } |
|
809 | 809 | return $out; |
810 | 810 | } |
811 | 811 | |
@@ -959,7 +959,7 @@ discard block |
||
959 | 959 | |
960 | 960 | } |
961 | 961 | |
962 | - function populateXTPL($xtpl, $view) { |
|
962 | + function populateXTPL($xtpl, $view) { |
|
963 | 963 | |
964 | 964 | if($this->bean->hasCustomFields()){ |
965 | 965 | $results = $this->getAllFieldsView($view, 'xtpl'); |
@@ -984,12 +984,12 @@ discard block |
||
984 | 984 | } |
985 | 985 | |
986 | 986 | function getAllFieldsView($view, $type){ |
987 | - require_once ('modules/DynamicFields/FieldCases.php'); |
|
988 | - $results = array(); |
|
989 | - foreach($this->bean->field_defs as $name=>$data){ |
|
987 | + require_once ('modules/DynamicFields/FieldCases.php'); |
|
988 | + $results = array(); |
|
989 | + foreach($this->bean->field_defs as $name=>$data){ |
|
990 | 990 | if(empty($data['source']) || $data['source'] != 'custom_fields') |
991 | 991 | { |
992 | - continue; |
|
992 | + continue; |
|
993 | 993 | } |
994 | 994 | $field = get_widget ( $data ['type'] ); |
995 | 995 | $field->populateFromRow($data); |
@@ -51,95 +51,95 @@ |
||
51 | 51 | |
52 | 52 | |
53 | 53 | class FieldsMetaData extends SugarBean { |
54 | - // database table columns |
|
55 | - var $id; |
|
56 | - var $name; |
|
57 | - var $vname; |
|
58 | - var $custom_module; |
|
59 | - var $type; |
|
60 | - var $len; |
|
61 | - var $required; |
|
62 | - var $default_value; |
|
63 | - var $deleted; |
|
64 | - var $ext1; |
|
65 | - var $ext2; |
|
66 | - var $ext3; |
|
67 | - var $audited; |
|
68 | - var $inline_edit; |
|
54 | + // database table columns |
|
55 | + var $id; |
|
56 | + var $name; |
|
57 | + var $vname; |
|
58 | + var $custom_module; |
|
59 | + var $type; |
|
60 | + var $len; |
|
61 | + var $required; |
|
62 | + var $default_value; |
|
63 | + var $deleted; |
|
64 | + var $ext1; |
|
65 | + var $ext2; |
|
66 | + var $ext3; |
|
67 | + var $audited; |
|
68 | + var $inline_edit; |
|
69 | 69 | var $duplicate_merge; |
70 | 70 | var $reportable; |
71 | - var $required_fields = array("name"=>1, "date_start"=>2, "time_start"=>3,); |
|
72 | - |
|
73 | - var $table_name = 'fields_meta_data'; |
|
74 | - var $object_name = 'FieldsMetaData'; |
|
75 | - var $module_dir = 'DynamicFields'; |
|
76 | - var $column_fields = array( |
|
77 | - 'id', |
|
78 | - 'name', |
|
79 | - 'vname', |
|
80 | - 'custom_module', |
|
81 | - 'type', |
|
82 | - 'len', |
|
83 | - 'required', |
|
84 | - 'default_value', |
|
85 | - 'deleted', |
|
86 | - 'ext1', |
|
87 | - 'ext2', |
|
88 | - 'ext3', |
|
89 | - 'audited', |
|
90 | - 'inline_edit', |
|
91 | - 'massupdate', |
|
71 | + var $required_fields = array("name"=>1, "date_start"=>2, "time_start"=>3,); |
|
72 | + |
|
73 | + var $table_name = 'fields_meta_data'; |
|
74 | + var $object_name = 'FieldsMetaData'; |
|
75 | + var $module_dir = 'DynamicFields'; |
|
76 | + var $column_fields = array( |
|
77 | + 'id', |
|
78 | + 'name', |
|
79 | + 'vname', |
|
80 | + 'custom_module', |
|
81 | + 'type', |
|
82 | + 'len', |
|
83 | + 'required', |
|
84 | + 'default_value', |
|
85 | + 'deleted', |
|
86 | + 'ext1', |
|
87 | + 'ext2', |
|
88 | + 'ext3', |
|
89 | + 'audited', |
|
90 | + 'inline_edit', |
|
91 | + 'massupdate', |
|
92 | 92 | 'duplicate_merge', |
93 | 93 | 'reportable', |
94 | - ); |
|
95 | - |
|
96 | - var $list_fields = array( |
|
97 | - 'id', |
|
98 | - 'name', |
|
99 | - 'vname', |
|
100 | - 'type', |
|
101 | - 'len', |
|
102 | - 'required', |
|
103 | - 'default_value', |
|
104 | - 'audited', |
|
94 | + ); |
|
95 | + |
|
96 | + var $list_fields = array( |
|
97 | + 'id', |
|
98 | + 'name', |
|
99 | + 'vname', |
|
100 | + 'type', |
|
101 | + 'len', |
|
102 | + 'required', |
|
103 | + 'default_value', |
|
104 | + 'audited', |
|
105 | 105 | 'inline_edit', |
106 | - 'massupdate', |
|
106 | + 'massupdate', |
|
107 | 107 | 'duplicate_merge', |
108 | 108 | 'reportable', |
109 | - ); |
|
109 | + ); |
|
110 | 110 | |
111 | - var $field_name_map; |
|
112 | - var $new_schema = true; |
|
111 | + var $field_name_map; |
|
112 | + var $new_schema = true; |
|
113 | 113 | |
114 | - ////////////////////////////////////////////////////////////////// |
|
115 | - // METHODS |
|
116 | - ////////////////////////////////////////////////////////////////// |
|
114 | + ////////////////////////////////////////////////////////////////// |
|
115 | + // METHODS |
|
116 | + ////////////////////////////////////////////////////////////////// |
|
117 | 117 | |
118 | - function FieldsMetaData() |
|
119 | - { |
|
120 | - parent::SugarBean(); |
|
121 | - $this->disable_row_level_security = true; |
|
122 | - } |
|
118 | + function FieldsMetaData() |
|
119 | + { |
|
120 | + parent::SugarBean(); |
|
121 | + $this->disable_row_level_security = true; |
|
122 | + } |
|
123 | 123 | |
124 | - function mark_deleted($id) |
|
125 | - { |
|
126 | - $query = "DELETE FROM $this->table_name WHERE id='$id'"; |
|
127 | - $this->db->query($query, true,"Error deleting record: "); |
|
128 | - $this->mark_relationships_deleted($id); |
|
124 | + function mark_deleted($id) |
|
125 | + { |
|
126 | + $query = "DELETE FROM $this->table_name WHERE id='$id'"; |
|
127 | + $this->db->query($query, true,"Error deleting record: "); |
|
128 | + $this->mark_relationships_deleted($id); |
|
129 | 129 | |
130 | - } |
|
130 | + } |
|
131 | 131 | |
132 | - function get_list_view_data(){ |
|
133 | - $data = parent::get_list_view_data(); |
|
134 | - $data['VNAME'] = translate($this->vname, $this->custom_module); |
|
135 | - $data['NAMELINK'] = '<input class="checkbox" type="checkbox" name="remove[]" value="' . $this->id . '"> <a href="index.php?module=Studio&action=wizard&wizard=EditCustomFieldsWizard&option=EditCustomField&record=' . $this->id . '" >'; |
|
136 | - return $data; |
|
137 | - } |
|
138 | - |
|
139 | - |
|
140 | - function get_summary_text() |
|
141 | - { |
|
142 | - return $this->name; |
|
143 | - } |
|
132 | + function get_list_view_data(){ |
|
133 | + $data = parent::get_list_view_data(); |
|
134 | + $data['VNAME'] = translate($this->vname, $this->custom_module); |
|
135 | + $data['NAMELINK'] = '<input class="checkbox" type="checkbox" name="remove[]" value="' . $this->id . '"> <a href="index.php?module=Studio&action=wizard&wizard=EditCustomFieldsWizard&option=EditCustomField&record=' . $this->id . '" >'; |
|
136 | + return $data; |
|
137 | + } |
|
138 | + |
|
139 | + |
|
140 | + function get_summary_text() |
|
141 | + { |
|
142 | + return $this->name; |
|
143 | + } |
|
144 | 144 | } |
145 | 145 | ?> |