@@ -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. |
@@ -52,12 +52,12 @@ discard block |
||
52 | 52 | |
53 | 53 | $json = getJSONobj(); |
54 | 54 | $selectedTable = $json->decode(html_entity_decode($_REQUEST['selectedTable'])); |
55 | - if(isset($tagArticleIds['jsonObject']) && $tagArticleIds['jsonObject'] != null){ |
|
55 | + if (isset($tagArticleIds['jsonObject']) && $tagArticleIds['jsonObject'] != null) { |
|
56 | 56 | $selectedTable = $selectedTable['jsonObject']; |
57 | 57 | } |
58 | 58 | $GLOBALS['log']->fatal('************ comes here *********'); |
59 | 59 | //$GLOBALS['log']->fatal($_REQUEST['selectedTable']); |
60 | -function tableColumns($table_name){ |
|
60 | +function tableColumns($table_name) { |
|
61 | 61 | $GLOBALS['log']->fatal('********TABLE PASSED******* '.$table_name); |
62 | 62 | global $sugar_config; |
63 | 63 | global $setup_db_database_name; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | //$db = &DBManagerFactory::getInstance('information_schema'); |
70 | 70 | |
71 | - $db_name= $sugar_config['dbconfig']['db_name']; |
|
71 | + $db_name = $sugar_config['dbconfig']['db_name']; |
|
72 | 72 | $setup_db_host_name = $sugar_config['dbconfig']['db_host_name']; |
73 | 73 | $setup_db_admin_user_name = $sugar_config['dbconfig']['db_user_name']; |
74 | 74 | $setup_db_host_instance = $sugar_config['dbconfig']['db_host_instance']; |
@@ -77,21 +77,21 @@ discard block |
||
77 | 77 | $link = @mysql_connect($setup_db_host_name, $setup_db_admin_user_name, $setup_db_admin_password); |
78 | 78 | mysql_select_db('information_schema'); |
79 | 79 | |
80 | - $qu="SELECT column_name FROM information_schema.columns WHERE table_schema = '".$db_name."' AND table_name = '".$table_name."'"; |
|
81 | - $ct =mysql_query($qu,$link); |
|
80 | + $qu = "SELECT column_name FROM information_schema.columns WHERE table_schema = '".$db_name."' AND table_name = '".$table_name."'"; |
|
81 | + $ct = mysql_query($qu, $link); |
|
82 | 82 | //$cols= ''; |
83 | 83 | $colsDrop = array(); |
84 | - while($row = mysql_fetch_assoc($ct)){ |
|
85 | - $colsDrop[] =$row['column_name']; |
|
84 | + while ($row = mysql_fetch_assoc($ct)) { |
|
85 | + $colsDrop[] = $row['column_name']; |
|
86 | 86 | } |
87 | 87 | return $colsDrop; |
88 | 88 | } |
89 | 89 | |
90 | 90 | $colsDrop = tableColumns($_REQUEST['selectedTable']); |
91 | -if($colsDrop != null){ |
|
91 | +if ($colsDrop != null) { |
|
92 | 92 | $colsDropDown = "<option value=".$_REQUEST['selectedTable']." Columns>".$_REQUEST['selectedTable']." Columns</option>"; |
93 | - foreach($colsDrop as $col){ |
|
94 | - $colsDropDown .="<option value={$col}>{$col}</option>"; |
|
93 | + foreach ($colsDrop as $col) { |
|
94 | + $colsDropDown .= "<option value={$col}>{$col}</option>"; |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 | //$response = "<script>document.getElementById('select_column').innerHTML=$colsDropDown</script>"; |
@@ -34,25 +34,25 @@ discard block |
||
34 | 34 | * "Powered by SugarCRM". |
35 | 35 | ********************************************************************************/ |
36 | 36 | |
37 | -function build_argument_string($arguments=array()) { |
|
38 | - if(!is_array($arguments)) { |
|
37 | +function build_argument_string($arguments = array()) { |
|
38 | + if (!is_array($arguments)) { |
|
39 | 39 | return ''; |
40 | 40 | } |
41 | 41 | |
42 | 42 | $argument_string = ''; |
43 | 43 | $count = 0; |
44 | - foreach($arguments as $arg) { |
|
45 | - if($count != 0) |
|
44 | + foreach ($arguments as $arg) { |
|
45 | + if ($count != 0) |
|
46 | 46 | { |
47 | 47 | //If current directory or parent directory is specified, substitute with full path |
48 | - if($arg == '.') |
|
48 | + if ($arg == '.') |
|
49 | 49 | { |
50 | 50 | $arg = getcwd(); |
51 | 51 | } else if ($arg == '..') { |
52 | 52 | $dir = getcwd(); |
53 | 53 | $arg = substr($dir, 0, strrpos($dir, DIRECTORY_SEPARATOR)); |
54 | 54 | } |
55 | - $argument_string .= ' ' . escapeshellarg($arg); |
|
55 | + $argument_string .= ' '.escapeshellarg($arg); |
|
56 | 56 | } |
57 | 57 | $count++; |
58 | 58 | } |
@@ -69,12 +69,12 @@ discard block |
||
69 | 69 | |
70 | 70 | $php_path = ''; |
71 | 71 | $run_dce_upgrade = false; |
72 | -if(isset($argv[3]) && is_dir($argv[3]) && file_exists($argv[3]."/ini_setup.php")) { |
|
72 | +if (isset($argv[3]) && is_dir($argv[3]) && file_exists($argv[3]."/ini_setup.php")) { |
|
73 | 73 | //this is a dce call, set the dce flag |
74 | 74 | chdir($argv[3]); |
75 | 75 | $run_dce_upgrade = true; |
76 | 76 | //set the php path if found |
77 | - if(is_file($argv[7].'dce_config.php')){ |
|
77 | + if (is_file($argv[7].'dce_config.php')) { |
|
78 | 78 | include($argv[7].'dce_config.php'); |
79 | 79 | $php_path = $dce_config['client_php_path'].'/'; |
80 | 80 | } |
@@ -82,34 +82,34 @@ discard block |
||
82 | 82 | |
83 | 83 | $php_file = $argv[0]; |
84 | 84 | $p_info = pathinfo($php_file); |
85 | -$php_dir = (isset($p_info['dirname']) && $p_info['dirname'] != '.') ? $p_info['dirname'] . '/' : ''; |
|
85 | +$php_dir = (isset($p_info['dirname']) && $p_info['dirname'] != '.') ? $p_info['dirname'].'/' : ''; |
|
86 | 86 | |
87 | -$step1 = $php_path."php -f {$php_dir}silentUpgrade_step1.php " . build_argument_string($argv); |
|
87 | +$step1 = $php_path."php -f {$php_dir}silentUpgrade_step1.php ".build_argument_string($argv); |
|
88 | 88 | passthru($step1, $output); |
89 | -if($output != 0) { |
|
89 | +if ($output != 0) { |
|
90 | 90 | echo "*************** step1 failed ***************: $output\n"; |
91 | 91 | } |
92 | 92 | $has_error = $output == 0 ? false : true; |
93 | 93 | |
94 | -if(!$has_error) { |
|
95 | - if($run_dce_upgrade) { |
|
96 | - $step2 = $php_path."php -f {$php_dir}silentUpgrade_dce_step1.php " . build_argument_string($argv); |
|
94 | +if (!$has_error) { |
|
95 | + if ($run_dce_upgrade) { |
|
96 | + $step2 = $php_path."php -f {$php_dir}silentUpgrade_dce_step1.php ".build_argument_string($argv); |
|
97 | 97 | passthru($step2, $output); |
98 | 98 | } else { |
99 | - $step2 = "php -f {$php_dir}silentUpgrade_step2.php " . build_argument_string($argv); |
|
99 | + $step2 = "php -f {$php_dir}silentUpgrade_step2.php ".build_argument_string($argv); |
|
100 | 100 | passthru($step2, $output); |
101 | 101 | } |
102 | 102 | } |
103 | 103 | |
104 | -if($run_dce_upgrade) { |
|
104 | +if ($run_dce_upgrade) { |
|
105 | 105 | $has_error = $output == 0 ? false : true; |
106 | - if(!$has_error) { |
|
107 | - $step3 = $php_path."php -f {$php_dir}silentUpgrade_dce_step2.php " . build_argument_string($argv); |
|
106 | + if (!$has_error) { |
|
107 | + $step3 = $php_path."php -f {$php_dir}silentUpgrade_dce_step2.php ".build_argument_string($argv); |
|
108 | 108 | passthru($step3, $output); |
109 | 109 | } |
110 | 110 | } |
111 | 111 | |
112 | -if($output != 0) { |
|
112 | +if ($output != 0) { |
|
113 | 113 | echo "*************** silentupgrade failed ***************: $output\n"; |
114 | 114 | } |
115 | 115 | exit($output); |
@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | 'table'=>'aor_reports', |
42 | 42 | 'audited'=>true, |
43 | 43 | 'duplicate_merge'=>true, |
44 | - 'fields'=>array ( |
|
44 | + 'fields'=>array( |
|
45 | 45 | 'report_module' => |
46 | - array ( |
|
46 | + array( |
|
47 | 47 | 'required' => true, |
48 | 48 | 'name' => 'report_module', |
49 | 49 | 'vname' => 'LBL_REPORT_MODULE', |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | ), |
69 | 69 | |
70 | 70 | 'graphs_per_row' => |
71 | - array ( |
|
71 | + array( |
|
72 | 72 | 'required' => true, |
73 | 73 | 'name' => 'graphs_per_row', |
74 | 74 | 'vname' => 'LBL_GRAPHS_PER_ROW', |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | ), |
80 | 80 | |
81 | 81 | 'field_lines' => |
82 | - array ( |
|
82 | + array( |
|
83 | 83 | 'required' => false, |
84 | 84 | 'name' => 'field_lines', |
85 | 85 | 'vname' => 'LBL_FIELD_LINES', |
@@ -92,14 +92,14 @@ discard block |
||
92 | 92 | 'audited' => false, |
93 | 93 | 'reportable' => false, |
94 | 94 | 'function' => |
95 | - array ( |
|
95 | + array( |
|
96 | 96 | 'name' => 'display_field_lines', |
97 | 97 | 'returns' => 'html', |
98 | 98 | 'include' => 'modules/AOR_Fields/fieldLines.php' |
99 | 99 | ), |
100 | 100 | ), |
101 | 101 | 'condition_lines' => |
102 | - array ( |
|
102 | + array( |
|
103 | 103 | 'required' => false, |
104 | 104 | 'name' => 'condition_lines', |
105 | 105 | 'vname' => 'LBL_CONDITION_LINES', |
@@ -112,14 +112,14 @@ discard block |
||
112 | 112 | 'audited' => false, |
113 | 113 | 'reportable' => false, |
114 | 114 | 'function' => |
115 | - array ( |
|
115 | + array( |
|
116 | 116 | 'name' => 'display_condition_lines', |
117 | 117 | 'returns' => 'html', |
118 | 118 | 'include' => 'modules/AOR_Conditions/conditionLines.php' |
119 | 119 | ), |
120 | 120 | ), |
121 | 121 | 'aor_fields' => |
122 | - array ( |
|
122 | + array( |
|
123 | 123 | 'name' => 'aor_fields', |
124 | 124 | 'type' => 'link', |
125 | 125 | 'relationship' => 'aor_reports_aor_fields', |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | 'id_name' => 'aor_report_id', |
130 | 130 | ), |
131 | 131 | 'aor_conditions' => |
132 | - array ( |
|
132 | + array( |
|
133 | 133 | 'name' => 'aor_conditions', |
134 | 134 | 'type' => 'link', |
135 | 135 | 'relationship' => 'aor_reports_aor_conditions', |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | 'source'=>'non-db', |
139 | 139 | ), |
140 | 140 | 'aor_charts' => |
141 | - array ( |
|
141 | + array( |
|
142 | 142 | 'name' => 'aor_charts', |
143 | 143 | 'type' => 'link', |
144 | 144 | 'relationship' => 'aor_charts_aor_reports', |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | 'vname' => 'LBL_AOR_CHARTS', |
148 | 148 | ), |
149 | 149 | 'aor_scheduled_reports' => |
150 | - array ( |
|
150 | + array( |
|
151 | 151 | 'name' => 'aor_scheduled_reports', |
152 | 152 | 'type' => 'link', |
153 | 153 | 'relationship' => 'aor_scheduled_reports_aor_reports', |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | ), |
158 | 158 | |
159 | 159 | ), |
160 | -'relationships'=>array ( |
|
160 | +'relationships'=>array( |
|
161 | 161 | 'aor_reports_aor_fields' => |
162 | 162 | array( |
163 | 163 | 'lhs_module'=> 'AOR_Reports', |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | 'rhs_key' => 'aor_report_id', |
179 | 179 | 'relationship_type'=>'one-to-many', |
180 | 180 | ), |
181 | - "aor_scheduled_reports_aor_reports" => array ( |
|
181 | + "aor_scheduled_reports_aor_reports" => array( |
|
182 | 182 | 'lhs_module'=> 'AOR_Reports', |
183 | 183 | 'lhs_table'=> 'aor_reports', |
184 | 184 | 'lhs_key' => 'id', |
@@ -192,8 +192,8 @@ discard block |
||
192 | 192 | 'unified_search'=>true, |
193 | 193 | ); |
194 | 194 | |
195 | -if (!class_exists('VardefManager')){ |
|
195 | +if (!class_exists('VardefManager')) { |
|
196 | 196 | require_once('include/SugarObjects/VardefManager.php'); |
197 | 197 | } |
198 | -VardefManager::createVardef('AOR_Reports','AOR_Report', array('basic','assignable','security_groups')); |
|
198 | +VardefManager::createVardef('AOR_Reports', 'AOR_Report', array('basic', 'assignable', 'security_groups')); |
|
199 | 199 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | * @author SalesAgility <[email protected]> |
23 | 23 | */ |
24 | 24 | |
25 | -$mod_strings = array ( |
|
25 | +$mod_strings = array( |
|
26 | 26 | 'LBL_ASSIGNED_TO_ID' => 'Assigned User Id', |
27 | 27 | 'LBL_ASSIGNED_TO_NAME' => 'Assigned to', |
28 | 28 | 'LBL_ID' => 'ID', |
@@ -23,21 +23,21 @@ discard block |
||
23 | 23 | */ |
24 | 24 | |
25 | 25 | $viewdefs ['AOR_Reports'] = |
26 | -array ( |
|
26 | +array( |
|
27 | 27 | 'EditView' => |
28 | - array ( |
|
28 | + array( |
|
29 | 29 | 'templateMeta' => |
30 | - array ( |
|
30 | + array( |
|
31 | 31 | 'maxColumns' => '2', |
32 | 32 | 'widths' => |
33 | - array ( |
|
33 | + array( |
|
34 | 34 | 0 => |
35 | - array ( |
|
35 | + array( |
|
36 | 36 | 'label' => '10', |
37 | 37 | 'field' => '30', |
38 | 38 | ), |
39 | 39 | 1 => |
40 | - array ( |
|
40 | + array( |
|
41 | 41 | 'label' => '10', |
42 | 42 | 'field' => '30', |
43 | 43 | ), |
@@ -49,18 +49,18 @@ discard block |
||
49 | 49 | ), |
50 | 50 | ), |
51 | 51 | 'panels' => |
52 | - array ( |
|
52 | + array( |
|
53 | 53 | 'default' => |
54 | - array ( |
|
54 | + array( |
|
55 | 55 | 0 => |
56 | - array ( |
|
56 | + array( |
|
57 | 57 | 0 => 'name', |
58 | 58 | 1 => 'assigned_user_name', |
59 | 59 | ), |
60 | 60 | 1 => |
61 | - array ( |
|
61 | + array( |
|
62 | 62 | 0 => |
63 | - array ( |
|
63 | + array( |
|
64 | 64 | 'name' => 'report_module', |
65 | 65 | 'studio' => 'visible', |
66 | 66 | 'label' => 'LBL_REPORT_MODULE', |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | 1 => '', |
69 | 69 | ), |
70 | 70 | 2 => |
71 | - array ( |
|
71 | + array( |
|
72 | 72 | 0 => |
73 | - array ( |
|
73 | + array( |
|
74 | 74 | 'name' => 'graphs_per_row', |
75 | 75 | 'label' => 'LBL_GRAPHS_PER_ROW', |
76 | 76 | ), |
@@ -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 | * Advanced OpenReports, SugarCRM Reporting. |
5 | 5 | * @package Advanced OpenReports for SugarCRM |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | 'whereClauses' => |
30 | 30 | array('name' => 'aor_reports.name', |
31 | 31 | ), |
32 | - 'searchInputs'=> array('aor_reports_number', 'name', 'priority','status'), |
|
32 | + 'searchInputs'=> array('aor_reports_number', 'name', 'priority', 'status'), |
|
33 | 33 | |
34 | 34 | ); |
35 | 35 | ?> |
@@ -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 | * Advanced OpenReports, SugarCRM Reporting. |
5 | 5 | * @package Advanced OpenReports for SugarCRM |
@@ -24,18 +24,18 @@ discard block |
||
24 | 24 | */ |
25 | 25 | |
26 | 26 | $searchFields['AOR_Reports'] = |
27 | - array ( |
|
28 | - 'name' => array( 'query_type'=>'default'), |
|
29 | - 'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
27 | + array( |
|
28 | + 'name' => array('query_type'=>'default'), |
|
29 | + 'current_user_only'=> array('query_type'=>'default', 'db_field'=>array('assigned_user_id'), 'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'), |
|
30 | 30 | 'assigned_user_id'=> array('query_type'=>'default'), |
31 | 31 | |
32 | 32 | //Range Search Support |
33 | - 'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
34 | - 'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
35 | - 'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
36 | - 'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
37 | - 'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
38 | - 'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
33 | + 'range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
34 | + 'start_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
35 | + 'end_range_date_entered' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
36 | + 'range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
37 | + 'start_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
38 | + 'end_range_date_modified' => array('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true), |
|
39 | 39 | //Range Search Support |
40 | 40 | ); |
41 | 41 | ?> |
@@ -29,13 +29,13 @@ discard block |
||
29 | 29 | 'EDIT', |
30 | 30 | 'DUPLICATE', |
31 | 31 | 'DELETE', |
32 | - array ( |
|
32 | + array( |
|
33 | 33 | 'customCode' => '<input type="button" class="button" id="download_csv_button_old" value="{$MOD.LBL_EXPORT}">', |
34 | 34 | ), |
35 | - array ( |
|
35 | + array( |
|
36 | 36 | 'customCode' => '<input type="button" class="button" id="download_pdf_button_old" value="{$MOD.LBL_DOWNLOAD_PDF}">', |
37 | 37 | ), |
38 | - array ( |
|
38 | + array( |
|
39 | 39 | 'customCode' => '<input type="button" class="button" onClick="openProspectPopup();" value="{$MOD.LBL_ADD_TO_PROSPECT_LIST}">', |
40 | 40 | ), |
41 | 41 | ), |
@@ -50,37 +50,37 @@ discard block |
||
50 | 50 | array('file'=>'modules/AOR_Reports/AOR_Report.js'), |
51 | 51 | ), |
52 | 52 | 'tabDefs' => |
53 | - array ( |
|
53 | + array( |
|
54 | 54 | 'DEFAULT' => |
55 | - array ( |
|
55 | + array( |
|
56 | 56 | 'newTab' => false, |
57 | 57 | 'panelDefault' => 'collapsed', |
58 | 58 | ), |
59 | 59 | ), |
60 | 60 | ), |
61 | 61 | |
62 | -'panels' =>array ( |
|
62 | +'panels' =>array( |
|
63 | 63 | 'default' => |
64 | - array ( |
|
65 | - array ( |
|
64 | + array( |
|
65 | + array( |
|
66 | 66 | 'name', |
67 | 67 | 'assigned_user_name', |
68 | 68 | ), |
69 | 69 | |
70 | - array ( |
|
71 | - array ( |
|
70 | + array( |
|
71 | + array( |
|
72 | 72 | 'name' => 'date_entered', |
73 | 73 | 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}', |
74 | 74 | 'label' => 'LBL_DATE_ENTERED', |
75 | 75 | ), |
76 | - array ( |
|
76 | + array( |
|
77 | 77 | 'name' => 'date_modified', |
78 | 78 | 'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}', |
79 | 79 | 'label' => 'LBL_DATE_MODIFIED', |
80 | 80 | ), |
81 | 81 | ), |
82 | 82 | |
83 | - array ( |
|
83 | + array( |
|
84 | 84 | 'description', |
85 | 85 | ), |
86 | 86 | ), |
@@ -31,11 +31,11 @@ |
||
31 | 31 | ), |
32 | 32 | |
33 | 33 | |
34 | - 'panels' =>array ( |
|
34 | + 'panels' =>array( |
|
35 | 35 | 'default' => |
36 | - array ( |
|
36 | + array( |
|
37 | 37 | |
38 | - array ( |
|
38 | + array( |
|
39 | 39 | 'name', |
40 | 40 | 'assigned_user_name', |
41 | 41 | ), |