Test Failed
Push — CI ( 785a66...02428e )
by Adam
54:23
created
modules/AOR_Reports/metadata/SearchFields.php 3 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 ?>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
Please login to merge, or discard this patch.
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,41 +1,41 @@
 block discarded – undo
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
 $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'),
30
-		'assigned_user_id'=> array('query_type'=>'default'),
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
+        'assigned_user_id'=> array('query_type'=>'default'),
31 31
 	    
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),	
39
-	    //Range Search Support 		
40
-	);
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),	
39
+        //Range Search Support 		
40
+    );
41 41
 ?>
Please login to merge, or discard this patch.
modules/AOR_Reports/metadata/detailviewdefs.php 2 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,26 +1,26 @@  discard block
 block discarded – undo
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']['DetailView'] = array(
26 26
 'templateMeta' => array(
@@ -62,27 +62,27 @@  discard block
 block discarded – undo
62 62
 'panels' =>array (
63 63
     'default' =>
64 64
     array (
65
-  array (
65
+    array (
66 66
     'name',
67 67
     'assigned_user_name',
68
-  ),
68
+    ),
69 69
 
70
-  array (
71
-	array (
72
-      'name' => 'date_entered',
73
-      'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
74
-      'label' => 'LBL_DATE_ENTERED',
70
+    array (
71
+    array (
72
+        'name' => 'date_entered',
73
+        'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
74
+        'label' => 'LBL_DATE_ENTERED',
75 75
     ),
76 76
     array (
77
-      'name' => 'date_modified',
78
-      'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
79
-      'label' => 'LBL_DATE_MODIFIED',
77
+        'name' => 'date_modified',
78
+        'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
79
+        'label' => 'LBL_DATE_MODIFIED',
80
+    ),
80 81
     ),
81
-  ),
82 82
 
83
-  array (
83
+    array (
84 84
     'description',
85
-  ),
85
+    ),
86 86
     ),
87 87
 )
88 88
 );
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     ),
Please login to merge, or discard this patch.
modules/AOR_Reports/metadata/quickcreatedefs.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,15 +31,15 @@
 block discarded – undo
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
                         
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@
 block discarded – undo
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
     ),
Please login to merge, or discard this patch.
modules/AOR_Reports/metadata/listviewdefs.php 3 patches
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,67 +1,67 @@
 block discarded – undo
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
 ?>
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
@@ -25,16 +25,16 @@  discard block
 block discarded – undo
25 25
 
26 26
 
27 27
 $listViewDefs ['AOR_Reports'] =
28
-array (
28
+array(
29 29
   'NAME' => 
30
-  array (
30
+  array(
31 31
     'width' => '15%',
32 32
     'label' => 'LBL_NAME',
33 33
     'default' => true,
34 34
     'link' => true,
35 35
   ),
36 36
   'REPORT_MODULE' => 
37
-  array (
37
+  array(
38 38
     'type' => 'enum',
39 39
     'default' => true,
40 40
     'studio' => 'visible',
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     'width' => '15%',
43 43
   ),
44 44
   'ASSIGNED_USER_NAME' => 
45
-  array (
45
+  array(
46 46
     'width' => '15%',
47 47
     'label' => 'LBL_ASSIGNED_TO_NAME',
48 48
     'module' => 'Employees',
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
     'default' => true,
51 51
   ),
52 52
   'DATE_ENTERED' => 
53
-  array (
53
+  array(
54 54
     'type' => 'datetime',
55 55
     'label' => 'LBL_DATE_ENTERED',
56 56
     'width' => '15%',
57 57
     'default' => true,
58 58
   ),
59 59
   'DATE_MODIFIED' => 
60
-  array (
60
+  array(
61 61
     'type' => 'datetime',
62 62
     'label' => 'LBL_DATE_MODIFIED',
63 63
     'width' => '15%',
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
Please login to merge, or discard this patch.
modules/AOR_Reports/views/view.edit.php 4 patches
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -38,17 +38,17 @@  discard block
 block discarded – undo
38 38
         //readfile('modules/AOR_Reports/css/edit.css');
39 39
         readfile('modules/AOR_Reports/js/jqtree/jqtree.css');
40 40
         echo "</style>";
41
-        if (!is_file('cache/jsLanguage/AOR_Fields/' . $GLOBALS['current_language'] . '.js')) {
41
+        if (!is_file('cache/jsLanguage/AOR_Fields/'.$GLOBALS['current_language'].'.js')) {
42 42
             require_once ('include/language/jsLanguage.php');
43 43
             jsLanguage::createModuleStringsCache('AOR_Fields', $GLOBALS['current_language']);
44 44
         }
45
-        echo '<script src="cache/jsLanguage/AOR_Fields/'. $GLOBALS['current_language'] . '.js"></script>';
45
+        echo '<script src="cache/jsLanguage/AOR_Fields/'.$GLOBALS['current_language'].'.js"></script>';
46 46
 
47
-        if (!is_file('cache/jsLanguage/AOR_Conditions/' . $GLOBALS['current_language'] . '.js')) {
47
+        if (!is_file('cache/jsLanguage/AOR_Conditions/'.$GLOBALS['current_language'].'.js')) {
48 48
             require_once ('include/language/jsLanguage.php');
49 49
             jsLanguage::createModuleStringsCache('AOR_Conditions', $GLOBALS['current_language']);
50 50
         }
51
-        echo '<script src="cache/jsLanguage/AOR_Conditions/'. $GLOBALS['current_language'] . '.js"></script>';
51
+        echo '<script src="cache/jsLanguage/AOR_Conditions/'.$GLOBALS['current_language'].'.js"></script>';
52 52
         echo '<script src="include/javascript/yui3/build/yui/yui-min.js"></script>';
53 53
 
54 54
         echo "<script>";
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
         parent::preDisplay();
70 70
     }
71 71
 
72
-    private function getConditionLines(){
73
-        if(!$this->bean->id){
72
+    private function getConditionLines() {
73
+        if (!$this->bean->id) {
74 74
             return array();
75 75
         }
76 76
         $sql = "SELECT id FROM aor_conditions WHERE aor_report_id = '".$this->bean->id."' AND deleted = 0 ORDER BY condition_order ASC";
@@ -79,20 +79,20 @@  discard block
 block discarded – undo
79 79
         while ($row = $this->bean->db->fetchByAssoc($result)) {
80 80
             $condition_name = new AOR_Condition();
81 81
             $condition_name->retrieve($row['id']);
82
-            if(!$condition_name->parenthesis) {
82
+            if (!$condition_name->parenthesis) {
83 83
                 $condition_name->module_path = implode(":", unserialize(base64_decode($condition_name->module_path)));
84 84
             }
85
-            if($condition_name->value_type == 'Date'){
85
+            if ($condition_name->value_type == 'Date') {
86 86
                 $condition_name->value = unserialize(base64_decode($condition_name->value));
87 87
             }
88 88
             $condition_item = $condition_name->toArray();
89 89
 
90
-            if(!$condition_name->parenthesis) {
90
+            if (!$condition_name->parenthesis) {
91 91
                 $display = getDisplayForField($condition_name->module_path, $condition_name->field, $this->bean->report_module);
92 92
                 $condition_item['module_path_display'] = $display['module'];
93 93
                 $condition_item['field_label'] = $display['field'];
94 94
             }
95
-            if(isset($conditions[$condition_item['condition_order']])) {
95
+            if (isset($conditions[$condition_item['condition_order']])) {
96 96
                 $conditions[] = $condition_item;
97 97
             }
98 98
             else {
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
         return $conditions;
103 103
     }
104 104
 
105
-    private function getFieldLines(){
106
-        if(!$this->bean->id){
105
+    private function getFieldLines() {
106
+        if (!$this->bean->id) {
107 107
             return array();
108 108
         }
109 109
         $sql = "SELECT id FROM aor_fields WHERE aor_report_id = '".$this->bean->id."' AND deleted = 0 ORDER BY field_order ASC";
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
         while ($row = $this->bean->db->fetchByAssoc($result)) {
114 114
             $field_name = new AOR_Field();
115 115
             $field_name->retrieve($row['id']);
116
-            $field_name->module_path = implode(":",unserialize(base64_decode($field_name->module_path)));
116
+            $field_name->module_path = implode(":", unserialize(base64_decode($field_name->module_path)));
117 117
             $arr = $field_name->toArray();
118 118
 
119
-            $arr['field_type'] = $this->getDisplayForField($field_name->module_path, $field_name->field  , $this->bean->report_module);
119
+            $arr['field_type'] = $this->getDisplayForField($field_name->module_path, $field_name->field, $this->bean->report_module);
120 120
 
121 121
             $display = getDisplayForField($field_name->module_path, $field_name->field, $this->bean->report_module);
122 122
 
@@ -127,42 +127,42 @@  discard block
 block discarded – undo
127 127
         return $fields;
128 128
     }
129 129
 
130
-    private function getChartLines(){
130
+    private function getChartLines() {
131 131
         $charts = array();
132
-        if(!$this->bean->id){
132
+        if (!$this->bean->id) {
133 133
             return array();
134 134
         }
135
-        foreach($this->bean->get_linked_beans('aor_charts','AOR_Charts') as $chart){
135
+        foreach ($this->bean->get_linked_beans('aor_charts', 'AOR_Charts') as $chart) {
136 136
             $charts[] = $chart->toArray();
137 137
         }
138 138
         return $charts;
139 139
     }
140 140
 
141
-    public function getDisplayForField($modulePath, $field, $reportModule){
141
+    public function getDisplayForField($modulePath, $field, $reportModule) {
142 142
         $modulePathDisplay = array();
143 143
         $currentBean = BeanFactory::getBean($reportModule);
144 144
         $modulePathDisplay[] = $currentBean->module_name;
145
-        if(is_array($modulePath)) {
145
+        if (is_array($modulePath)) {
146 146
             $split = $modulePath;
147
-        }else{
147
+        } else {
148 148
             $split = explode(':', $modulePath);
149 149
         }
150 150
         if ($split && $split[0] == $currentBean->module_dir) {
151 151
             array_shift($split);
152 152
         }
153
-        foreach($split as $relName){
154
-            if(empty($relName)){
153
+        foreach ($split as $relName) {
154
+            if (empty($relName)) {
155 155
                 continue;
156 156
             }
157
-            if(!empty($currentBean->field_name_map[$relName]['vname'])){
158
-                $moduleLabel = trim(translate($currentBean->field_name_map[$relName]['vname'],$currentBean->module_dir),':');
157
+            if (!empty($currentBean->field_name_map[$relName]['vname'])) {
158
+                $moduleLabel = trim(translate($currentBean->field_name_map[$relName]['vname'], $currentBean->module_dir), ':');
159 159
             }
160 160
             $thisModule = getRelatedModule($currentBean->module_dir, $relName);
161 161
             $currentBean = BeanFactory::getBean($thisModule);
162 162
 
163
-            if(!empty($moduleLabel)){
163
+            if (!empty($moduleLabel)) {
164 164
                 $modulePathDisplay[] = $moduleLabel;
165
-            }else {
165
+            } else {
166 166
                 $modulePathDisplay[] = $currentBean->module_name;
167 167
             }
168 168
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -94,8 +94,7 @@  discard block
 block discarded – undo
94 94
             }
95 95
             if(isset($conditions[$condition_item['condition_order']])) {
96 96
                 $conditions[] = $condition_item;
97
-            }
98
-            else {
97
+            } else {
99 98
                 $conditions[$condition_item['condition_order']] = $condition_item;
100 99
             }
101 100
         }
@@ -144,7 +143,7 @@  discard block
 block discarded – undo
144 143
         $modulePathDisplay[] = $currentBean->module_name;
145 144
         if(is_array($modulePath)) {
146 145
             $split = $modulePath;
147
-        }else{
146
+        } else{
148 147
             $split = explode(':', $modulePath);
149 148
         }
150 149
         if ($split && $split[0] == $currentBean->module_dir) {
@@ -162,7 +161,7 @@  discard block
 block discarded – undo
162 161
 
163 162
             if(!empty($moduleLabel)){
164 163
                 $modulePathDisplay[] = $moduleLabel;
165
-            }else {
164
+            } else {
166 165
                 $modulePathDisplay[] = $currentBean->module_name;
167 166
             }
168 167
         }
Please login to merge, or discard this patch.
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,27 +1,27 @@
 block discarded – undo
1 1
 <?php
2
- /**
3
- * 
4
- * 
5
- * @package 
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 Ltd <[email protected]>
24
- */
2
+    /**
3
+     * 
4
+     * 
5
+     * @package 
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 Ltd <[email protected]>
24
+     */
25 25
 require_once 'modules/InboundEmail/InboundEmail.php';
26 26
 require_once 'include/clean.php';
27 27
 class AOPInboundEmail extends InboundEmail {
Please login to merge, or discard this patch.
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -138,6 +138,10 @@
 block discarded – undo
138 138
         return $charts;
139 139
     }
140 140
 
141
+    /**
142
+     * @param string $modulePath
143
+     * @param string $field
144
+     */
141 145
     public function getDisplayForField($modulePath, $field, $reportModule){
142 146
         $modulePathDisplay = array();
143 147
         $currentBean = BeanFactory::getBean($reportModule);
Please login to merge, or discard this patch.
modules/AOR_Reports/views/view.detail.php 3 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -29,31 +29,31 @@  discard block
 block discarded – undo
29 29
     public function __construct() {
30 30
         parent::ViewDetail();
31 31
     }
32
-    private function getReportParameters(){
33
-        if(!$this->bean->id){
32
+    private function getReportParameters() {
33
+        if (!$this->bean->id) {
34 34
             return array();
35 35
         }
36
-        $conditions = $this->bean->get_linked_beans('aor_conditions','AOR_Conditions', 'condition_order');
36
+        $conditions = $this->bean->get_linked_beans('aor_conditions', 'AOR_Conditions', 'condition_order');
37 37
         $parameters = array();
38
-        foreach($conditions as $condition){
39
-            if(!$condition->parameter){
38
+        foreach ($conditions as $condition) {
39
+            if (!$condition->parameter) {
40 40
                 continue;
41 41
             }
42
-            $condition->module_path = implode(":",unserialize(base64_decode($condition->module_path)));
43
-            if($condition->value_type == 'Date'){
42
+            $condition->module_path = implode(":", unserialize(base64_decode($condition->module_path)));
43
+            if ($condition->value_type == 'Date') {
44 44
                 $condition->value = unserialize(base64_decode($condition->value));
45 45
             }
46 46
             $condition_item = $condition->toArray();
47 47
             $display = getDisplayForField($condition->module_path, $condition->field, $this->bean->report_module);
48 48
             $condition_item['module_path_display'] = $display['module'];
49 49
             $condition_item['field_label'] = $display['field'];
50
-            if(!empty($this->bean->user_parameters[$condition->id])){
50
+            if (!empty($this->bean->user_parameters[$condition->id])) {
51 51
                 $param = $this->bean->user_parameters[$condition->id];
52 52
                 $condition_item['operator'] = $param['operator'];
53 53
                 $condition_item['value_type'] = $param['type'];
54 54
                 $condition_item['value'] = $param['value'];
55 55
             }
56
-            if(isset($parameters[$condition_item['condition_order']])) {
56
+            if (isset($parameters[$condition_item['condition_order']])) {
57 57
                 $parameters[] = $condition_item;
58 58
             }
59 59
             else {
@@ -66,14 +66,14 @@  discard block
 block discarded – undo
66 66
     public function preDisplay() {
67 67
         global $app_list_strings;
68 68
         parent::preDisplay();
69
-        $this->ss->assign('report_module',$this->bean->report_module);
69
+        $this->ss->assign('report_module', $this->bean->report_module);
70 70
 
71 71
 
72 72
 
73 73
         $this->bean->user_parameters = requestToUserParameters();
74 74
 
75 75
         //$reportHTML = $this->bean->build_group_report(0,true);
76
-        $reportHTML = $this->bean->buildMultiGroupReport(0,true);
76
+        $reportHTML = $this->bean->buildMultiGroupReport(0, true);
77 77
 
78 78
         $chartsHTML = $this->bean->build_report_chart(null, AOR_Report::CHART_TYPE_RGRAPH);
79 79
 
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
         $this->ss->assign('report_content', $reportHTML);
85 85
 
86 86
         echo "<input type='hidden' name='report_module' id='report_module' value='{$this->bean->report_module}'>";
87
-        if (!is_file('cache/jsLanguage/AOR_Conditions/' . $GLOBALS['current_language'] . '.js')) {
87
+        if (!is_file('cache/jsLanguage/AOR_Conditions/'.$GLOBALS['current_language'].'.js')) {
88 88
             require_once ('include/language/jsLanguage.php');
89 89
             jsLanguage::createModuleStringsCache('AOR_Conditions', $GLOBALS['current_language']);
90 90
         }
91
-        echo '<script src="cache/jsLanguage/AOR_Conditions/'. $GLOBALS['current_language'] . '.js"></script>';
91
+        echo '<script src="cache/jsLanguage/AOR_Conditions/'.$GLOBALS['current_language'].'.js"></script>';
92 92
 
93 93
         $params = $this->getReportParameters();
94 94
         echo "<script>var reportParameters = ".json_encode($params).";</script>";
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
             }
56 56
             if(isset($parameters[$condition_item['condition_order']])) {
57 57
                 $parameters[] = $condition_item;
58
-            }
59
-            else {
58
+            } else {
60 59
                 $parameters[$condition_item['condition_order']] = $condition_item;
61 60
             }
62 61
         }
Please login to merge, or discard this patch.
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,27 +1,27 @@
 block discarded – undo
1 1
 <?php
2
- /**
3
- * 
4
- * 
5
- * @package 
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 Ltd <[email protected]>
24
- */
2
+    /**
3
+     * 
4
+     * 
5
+     * @package 
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 Ltd <[email protected]>
24
+     */
25 25
 require_once 'modules/InboundEmail/InboundEmail.php';
26 26
 require_once 'include/clean.php';
27 27
 class AOPInboundEmail extends InboundEmail {
Please login to merge, or discard this patch.
modules/AOR_Reports/controller.php 3 patches
Spacing   +147 added lines, -147 removed lines patch added patch discarded remove patch
@@ -31,19 +31,19 @@  discard block
 block discarded – undo
31 31
     protected function action_getModuleFields()
32 32
     {
33 33
         if (!empty($_REQUEST['aor_module']) && $_REQUEST['aor_module'] != '') {
34
-            if(isset($_REQUEST['rel_field']) &&  $_REQUEST['rel_field'] != ''){
35
-                $module = getRelatedModule($_REQUEST['aor_module'],$_REQUEST['rel_field']);
34
+            if (isset($_REQUEST['rel_field']) && $_REQUEST['rel_field'] != '') {
35
+                $module = getRelatedModule($_REQUEST['aor_module'], $_REQUEST['rel_field']);
36 36
             } else {
37 37
                 $module = $_REQUEST['aor_module'];
38 38
             }
39 39
             $val = !empty($_REQUEST['aor_value']) ? $_REQUEST['aor_value'] : '';
40
-            echo getModuleFields($module,$_REQUEST['view'],$val);
40
+            echo getModuleFields($module, $_REQUEST['view'], $val);
41 41
         }
42 42
         die;
43 43
 
44 44
     }
45
-    function action_getVarDefs(){
46
-        if($_REQUEST['aor_module']){
45
+    function action_getVarDefs() {
46
+        if ($_REQUEST['aor_module']) {
47 47
             $bean = BeanFactory::getBean($_REQUEST['aor_module']);
48 48
             echo json_encode((array)$bean->field_defs[$_REQUEST['aor_request']]);
49 49
             die();
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
         die;
70 70
     }
71 71
 
72
-    protected function action_changeReportPage(){
72
+    protected function action_changeReportPage() {
73 73
         $tableId = !empty($_REQUEST['table_id']) ? $_REQUEST['table_id'] : '';
74 74
         $group = !empty($_REQUEST['group']) ? $_REQUEST['group'] : '';
75 75
         $offset = !empty($_REQUEST['offset']) ? $_REQUEST['offset'] : 0;
76
-        if(!empty($this->bean->id)){
76
+        if (!empty($this->bean->id)) {
77 77
             $this->bean->user_parameters = requestToUserParameters();
78 78
             //echo $this->bean->build_report_html($offset, true,$group,$tableId);
79 79
             echo $this->bean->build_group_report($offset, true);
@@ -82,17 +82,17 @@  discard block
 block discarded – undo
82 82
         die();
83 83
     }
84 84
 
85
-    protected function action_getParametersForReport(){
86
-        if(empty($_REQUEST['record'])){
85
+    protected function action_getParametersForReport() {
86
+        if (empty($_REQUEST['record'])) {
87 87
             echo json_encode(array());
88 88
             return;
89 89
         }
90
-        $report = BeanFactory::getBean('AOR_Reports',$_REQUEST['record']);
91
-        if(!$report){
90
+        $report = BeanFactory::getBean('AOR_Reports', $_REQUEST['record']);
91
+        if (!$report) {
92 92
             echo json_encode(array());
93 93
             return;
94 94
         }
95
-        if(empty($report->id)) {
95
+        if (empty($report->id)) {
96 96
             echo json_encode(array());
97 97
             return;
98 98
         }
@@ -100,24 +100,24 @@  discard block
 block discarded – undo
100 100
         echo json_encode($conditions);
101 101
     }
102 102
 
103
-    protected function action_getChartsForReport(){
104
-        if(empty($_REQUEST['record'])){
103
+    protected function action_getChartsForReport() {
104
+        if (empty($_REQUEST['record'])) {
105 105
             echo json_encode(array());
106 106
             return;
107 107
         }
108
-        $report = BeanFactory::getBean('AOR_Reports',$_REQUEST['record']);
109
-        if(!$report){
108
+        $report = BeanFactory::getBean('AOR_Reports', $_REQUEST['record']);
109
+        if (!$report) {
110 110
             echo json_encode(array());
111 111
             return;
112 112
         }
113 113
         $charts = array();
114
-        foreach($report->get_linked_beans('aor_charts','AOR_Charts') as $chart){
114
+        foreach ($report->get_linked_beans('aor_charts', 'AOR_Charts') as $chart) {
115 115
             $charts[$chart->id] = $chart->name;
116 116
         }
117 117
         echo json_encode($charts);
118 118
     }
119 119
 
120
-    protected function action_addToProspectList(){
120
+    protected function action_addToProspectList() {
121 121
         global $beanList;
122 122
 
123 123
         require_once('modules/Relationships/Relationship.php');
@@ -135,13 +135,13 @@  discard block
 block discarded – undo
135 135
             $result = $this->bean->db->query($sql);
136 136
             $beans = array();
137 137
             while ($row = $this->bean->db->fetchByAssoc($result)) {
138
-                if (isset($row[$module->table_name.'_id'])){
138
+                if (isset($row[$module->table_name.'_id'])) {
139 139
                     $beans[] = $row[$module->table_name.'_id'];
140 140
                 }
141 141
             }
142
-            if(!empty($beans)){
143
-                foreach($prospectList->field_defs as $field=>$def){
144
-                    if($def['type'] == 'link' && !empty($def['relationship']) && $def['relationship'] == $key){
142
+            if (!empty($beans)) {
143
+                foreach ($prospectList->field_defs as $field=>$def) {
144
+                    if ($def['type'] == 'link' && !empty($def['relationship']) && $def['relationship'] == $key) {
145 145
                         $prospectList->load_relationship($field);
146 146
                         $prospectList->$field->add($beans);
147 147
                     }
@@ -170,41 +170,41 @@  discard block
 block discarded – undo
170 170
         error_reporting(0);
171 171
         require_once('modules/AOS_PDF_Templates/PDF_Lib/mpdf.php');
172 172
 
173
-        $d_image = explode('?',SugarThemeRegistry::current()->getImageURL('company_logo.png'));
173
+        $d_image = explode('?', SugarThemeRegistry::current()->getImageURL('company_logo.png'));
174 174
         $graphs = $_POST["graphsForPDF"];
175 175
         $graphHtml = "<div class='reportGraphs' style='width:100%; text-align:center;'>";
176 176
 
177 177
         $chartsPerRow = $this->bean->graphs_per_row;
178 178
         $countOfCharts = count($graphs);
179
-        if($countOfCharts > 0)
179
+        if ($countOfCharts > 0)
180 180
         {
181
-            $width = ((int)100/$chartsPerRow);
181
+            $width = ((int)100 / $chartsPerRow);
182 182
 
183 183
             $modulusRemainder = $countOfCharts % $chartsPerRow;
184 184
 
185
-            if($modulusRemainder > 0)
185
+            if ($modulusRemainder > 0)
186 186
             {
187
-                $modulusWidth = ((int)100/$modulusRemainder);
187
+                $modulusWidth = ((int)100 / $modulusRemainder);
188 188
                 $itemsWithModulus = $countOfCharts - $modulusRemainder;
189 189
             }
190 190
 
191 191
 
192
-            for($x =0; $x < $countOfCharts; $x++)
192
+            for ($x = 0; $x < $countOfCharts; $x++)
193 193
             {
194
-                if(is_null($itemsWithModulus) ||  $x < $itemsWithModulus)
195
-                    $graphHtml.="<img src='.$graphs[$x].' style='width:$width%;' />";
194
+                if (is_null($itemsWithModulus) || $x < $itemsWithModulus)
195
+                    $graphHtml .= "<img src='.$graphs[$x].' style='width:$width%;' />";
196 196
                 else
197
-                    $graphHtml.="<img src='.$graphs[$x].' style='width:$modulusWidth%;' />";
197
+                    $graphHtml .= "<img src='.$graphs[$x].' style='width:$modulusWidth%;' />";
198 198
             }
199 199
 
200 200
 /*            foreach($graphs as $g)
201 201
             {
202 202
                 $graphHtml.="<img src='.$g.' style='width:$width%;' />";
203 203
             }*/
204
-            $graphHtml.="</div>";
204
+            $graphHtml .= "</div>";
205 205
         }
206 206
 
207
-        $head =  '<table style="width: 100%; font-family: Arial; text-align: center;" border="0" cellpadding="2" cellspacing="2">
207
+        $head = '<table style="width: 100%; font-family: Arial; text-align: center;" border="0" cellpadding="2" cellspacing="2">
208 208
                 <tbody style="text-align: left;">
209 209
                 <tr style="text-align: left;">
210 210
                 <td style="text-align: left;">
@@ -229,26 +229,26 @@  discard block
 block discarded – undo
229 229
 
230 230
         $this->bean->user_parameters = requestToUserParameters();
231 231
 
232
-        $printable = $this->bean->build_group_report(-1,false);
232
+        $printable = $this->bean->build_group_report(-1, false);
233 233
         $stylesheet = file_get_contents('themes/Suite7/css/style.css');
234 234
 
235 235
         ob_clean();
236
-        try{
237
-            $pdf=new mPDF('en','A4','','DejaVuSansCondensed');
236
+        try {
237
+            $pdf = new mPDF('en', 'A4', '', 'DejaVuSansCondensed');
238 238
             $pdf->setAutoFont();
239
-            $pdf->WriteHTML($stylesheet,1);
240
-            $pdf->WriteHTML($head,2);
241
-            $pdf->WriteHTML($printable,3);
239
+            $pdf->WriteHTML($stylesheet, 1);
240
+            $pdf->WriteHTML($head, 2);
241
+            $pdf->WriteHTML($printable, 3);
242 242
             $pdf->Output($this->bean->name.'.pdf', "D");
243 243
 
244
-        }catch(mPDF_exception $e){
244
+        }catch (mPDF_exception $e) {
245 245
             echo $e;
246 246
         }
247 247
 
248 248
         die;
249 249
     }
250 250
 
251
-    protected function action_getModuleFunctionField(){
251
+    protected function action_getModuleFunctionField() {
252 252
         global $app_list_strings;
253 253
 
254 254
         $view = $_REQUEST['view'];
@@ -257,31 +257,31 @@  discard block
 block discarded – undo
257 257
         $fieldname = $_REQUEST['aor_fieldname'];
258 258
         $aor_field = $_REQUEST['aor_newfieldname'];
259 259
 
260
-        if($view == 'EditView'){
261
-            echo "<select type='text' style='width:100px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". get_select_options_with_id($app_list_strings['aor_function_list'], $value) ."</select>";
262
-        }else{
260
+        if ($view == 'EditView') {
261
+            echo "<select type='text' style='width:100px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>".get_select_options_with_id($app_list_strings['aor_function_list'], $value)."</select>";
262
+        } else {
263 263
             echo $app_list_strings['aor_function_list'][$value];
264 264
         }
265 265
         die;
266 266
     }
267 267
 
268 268
 
269
-    protected function action_getModuleOperatorField(){
269
+    protected function action_getModuleOperatorField() {
270 270
 
271 271
         global $app_list_strings, $beanFiles, $beanList;
272 272
 
273
-        if(isset($_REQUEST['rel_field']) &&  $_REQUEST['rel_field'] != ''){
274
-            $module = getRelatedModule($_REQUEST['aor_module'],$_REQUEST['rel_field']);
273
+        if (isset($_REQUEST['rel_field']) && $_REQUEST['rel_field'] != '') {
274
+            $module = getRelatedModule($_REQUEST['aor_module'], $_REQUEST['rel_field']);
275 275
         } else {
276 276
             $module = $_REQUEST['aor_module'];
277 277
         }
278 278
         $fieldname = $_REQUEST['aor_fieldname'];
279 279
         $aor_field = $_REQUEST['aor_newfieldname'];
280 280
 
281
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
282
-        else $view= 'EditView';
281
+        if (isset($_REQUEST['view'])) $view = $_REQUEST['view'];
282
+        else $view = 'EditView';
283 283
 
284
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
284
+        if (isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
285 285
         else $value = '';
286 286
 
287 287
 
@@ -289,12 +289,12 @@  discard block
 block discarded – undo
289 289
         $focus = new $beanList[$module];
290 290
         $vardef = $focus->getFieldDefinition($fieldname);
291 291
 
292
-        switch($vardef['type']) {
292
+        switch ($vardef['type']) {
293 293
             case 'double':
294 294
             case 'decimal':
295 295
             case 'float':
296 296
             case 'currency':
297
-                $valid_opp = array('Equal_To','Not_Equal_To','Greater_Than','Less_Than','Greater_Than_or_Equal_To','Less_Than_or_Equal_To');
297
+                $valid_opp = array('Equal_To', 'Not_Equal_To', 'Greater_Than', 'Less_Than', 'Greater_Than_or_Equal_To', 'Less_Than_or_Equal_To');
298 298
                 break;
299 299
             case 'uint':
300 300
             case 'ulong':
@@ -302,24 +302,24 @@  discard block
 block discarded – undo
302 302
             case 'short':
303 303
             case 'tinyint':
304 304
             case 'int':
305
-                $valid_opp = array('Equal_To','Not_Equal_To','Greater_Than','Less_Than','Greater_Than_or_Equal_To','Less_Than_or_Equal_To');
305
+                $valid_opp = array('Equal_To', 'Not_Equal_To', 'Greater_Than', 'Less_Than', 'Greater_Than_or_Equal_To', 'Less_Than_or_Equal_To');
306 306
                 break;
307 307
             case 'date':
308 308
             case 'datetime':
309 309
             case 'datetimecombo':
310
-                $valid_opp = array('Equal_To','Not_Equal_To','Greater_Than','Less_Than','Greater_Than_or_Equal_To','Less_Than_or_Equal_To');
310
+                $valid_opp = array('Equal_To', 'Not_Equal_To', 'Greater_Than', 'Less_Than', 'Greater_Than_or_Equal_To', 'Less_Than_or_Equal_To');
311 311
                 break;
312 312
             case 'enum':
313 313
             case 'multienum':
314
-                $valid_opp = array('Equal_To','Not_Equal_To');
314
+                $valid_opp = array('Equal_To', 'Not_Equal_To');
315 315
                 break;
316 316
             default:
317
-                $valid_opp = array('Equal_To','Not_Equal_To','Contains', 'Starts_With', 'Ends_With',);
317
+                $valid_opp = array('Equal_To', 'Not_Equal_To', 'Contains', 'Starts_With', 'Ends_With',);
318 318
                 break;
319 319
         }
320 320
 
321
-        foreach($app_list_strings['aor_operator_list'] as $key => $keyValue){
322
-            if(!in_array($key, $valid_opp)){
321
+        foreach ($app_list_strings['aor_operator_list'] as $key => $keyValue) {
322
+            if (!in_array($key, $valid_opp)) {
323 323
                 unset($app_list_strings['aor_operator_list'][$key]);
324 324
             }
325 325
         }
@@ -327,31 +327,31 @@  discard block
 block discarded – undo
327 327
 
328 328
 
329 329
         $app_list_strings['aor_operator_list'];
330
-        if($view == 'EditView'){
331
-            echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". get_select_options_with_id($app_list_strings['aor_operator_list'], $value) ."</select>";
332
-        }else{
330
+        if ($view == 'EditView') {
331
+            echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>".get_select_options_with_id($app_list_strings['aor_operator_list'], $value)."</select>";
332
+        } else {
333 333
             echo $app_list_strings['aor_operator_list'][$value];
334 334
         }
335 335
         die;
336 336
 
337 337
     }
338 338
 
339
-    protected function action_getFieldTypeOptions(){
339
+    protected function action_getFieldTypeOptions() {
340 340
 
341 341
         global $app_list_strings, $beanFiles, $beanList;
342 342
 
343
-        if(isset($_REQUEST['rel_field']) &&  $_REQUEST['rel_field'] != ''){
344
-            $module = getRelatedModule($_REQUEST['aor_module'],$_REQUEST['rel_field']);
343
+        if (isset($_REQUEST['rel_field']) && $_REQUEST['rel_field'] != '') {
344
+            $module = getRelatedModule($_REQUEST['aor_module'], $_REQUEST['rel_field']);
345 345
         } else {
346 346
             $module = $_REQUEST['aor_module'];
347 347
         }
348 348
         $fieldname = $_REQUEST['aor_fieldname'];
349 349
         $aor_field = $_REQUEST['aor_newfieldname'];
350 350
 
351
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
352
-        else $view= 'EditView';
351
+        if (isset($_REQUEST['view'])) $view = $_REQUEST['view'];
352
+        else $view = 'EditView';
353 353
 
354
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
354
+        if (isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
355 355
         else $value = '';
356 356
 
357 357
 
@@ -359,12 +359,12 @@  discard block
 block discarded – undo
359 359
         $focus = new $beanList[$module];
360 360
         $vardef = $focus->getFieldDefinition($fieldname);
361 361
 
362
-        switch($vardef['type']) {
362
+        switch ($vardef['type']) {
363 363
             case 'double':
364 364
             case 'decimal':
365 365
             case 'float':
366 366
             case 'currency':
367
-                $valid_opp = array('Value','Field');
367
+                $valid_opp = array('Value', 'Field');
368 368
                 break;
369 369
             case 'uint':
370 370
             case 'ulong':
@@ -372,50 +372,50 @@  discard block
 block discarded – undo
372 372
             case 'short':
373 373
             case 'tinyint':
374 374
             case 'int':
375
-                $valid_opp = array('Value','Field');
375
+                $valid_opp = array('Value', 'Field');
376 376
                 break;
377 377
             case 'date':
378 378
             case 'datetime':
379 379
             case 'datetimecombo':
380
-                $valid_opp = array('Value','Field', 'Date', 'Period');
380
+                $valid_opp = array('Value', 'Field', 'Date', 'Period');
381 381
                 break;
382 382
             case 'enum':
383 383
             case 'dynamicenum':
384 384
             case 'multienum':
385
-                $valid_opp = array('Value','Field', 'Multi');
385
+                $valid_opp = array('Value', 'Field', 'Multi');
386 386
                 break;
387 387
             default:
388 388
                 // Added to compare fields like assinged to with the current user
389
-                if( (isset($vardef['module']) && $vardef['module'] == "Users") || $vardef['name'] = 'id') {
390
-                    $valid_opp = array('Value','Field', 'CurrentUserID');
389
+                if ((isset($vardef['module']) && $vardef['module'] == "Users") || $vardef['name'] = 'id') {
390
+                    $valid_opp = array('Value', 'Field', 'CurrentUserID');
391 391
                 } else {
392
-                    $valid_opp = array('Value','Field');
392
+                    $valid_opp = array('Value', 'Field');
393 393
                 }
394 394
 
395 395
                 break;
396 396
         }
397 397
 
398
-        foreach($app_list_strings['aor_condition_type_list'] as $key => $keyValue){
399
-            if(!in_array($key, $valid_opp)){
398
+        foreach ($app_list_strings['aor_condition_type_list'] as $key => $keyValue) {
399
+            if (!in_array($key, $valid_opp)) {
400 400
                 unset($app_list_strings['aor_condition_type_list'][$key]);
401 401
             }
402 402
         }
403 403
 
404
-        if($view == 'EditView'){
405
-            echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". get_select_options_with_id($app_list_strings['aor_condition_type_list'], $value) ."</select>";
406
-        }else{
404
+        if ($view == 'EditView') {
405
+            echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>".get_select_options_with_id($app_list_strings['aor_condition_type_list'], $value)."</select>";
406
+        } else {
407 407
             echo $app_list_strings['aor_condition_type_list'][$value];
408 408
         }
409 409
         die;
410 410
 
411 411
     }
412 412
 
413
-    protected function action_getActionFieldTypeOptions(){
413
+    protected function action_getActionFieldTypeOptions() {
414 414
 
415 415
         global $app_list_strings, $beanFiles, $beanList;
416 416
 
417
-        if(isset($_REQUEST['rel_field']) &&  $_REQUEST['rel_field'] != ''){
418
-            $module = getRelatedModule($_REQUEST['aor_module'],$_REQUEST['rel_field']);
417
+        if (isset($_REQUEST['rel_field']) && $_REQUEST['rel_field'] != '') {
418
+            $module = getRelatedModule($_REQUEST['aor_module'], $_REQUEST['rel_field']);
419 419
         } else {
420 420
             $module = $_REQUEST['aor_module'];
421 421
         }
@@ -423,10 +423,10 @@  discard block
 block discarded – undo
423 423
         $fieldname = $_REQUEST['aor_fieldname'];
424 424
         $aor_field = $_REQUEST['aor_newfieldname'];
425 425
 
426
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
427
-        else $view= 'EditView';
426
+        if (isset($_REQUEST['view'])) $view = $_REQUEST['view'];
427
+        else $view = 'EditView';
428 428
 
429
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
429
+        if (isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
430 430
         else $value = '';
431 431
 
432 432
 
@@ -434,12 +434,12 @@  discard block
 block discarded – undo
434 434
         $focus = new $beanList[$module];
435 435
         $vardef = $focus->getFieldDefinition($fieldname);
436 436
 
437
-        switch($vardef['type']) {
437
+        switch ($vardef['type']) {
438 438
             case 'double':
439 439
             case 'decimal':
440 440
             case 'float':
441 441
             case 'currency':
442
-                $valid_opp = array('Value','Field');
442
+                $valid_opp = array('Value', 'Field');
443 443
                 break;
444 444
             case 'uint':
445 445
             case 'ulong':
@@ -447,35 +447,35 @@  discard block
 block discarded – undo
447 447
             case 'short':
448 448
             case 'tinyint':
449 449
             case 'int':
450
-                $valid_opp = array('Value','Field');
450
+                $valid_opp = array('Value', 'Field');
451 451
                 break;
452 452
             case 'date':
453 453
             case 'datetime':
454 454
             case 'datetimecombo':
455
-                $valid_opp = array('Value','Field', 'Date');
455
+                $valid_opp = array('Value', 'Field', 'Date');
456 456
                 break;
457 457
             case 'enum':
458 458
             case 'multienum':
459
-                $valid_opp = array('Value','Field');
459
+                $valid_opp = array('Value', 'Field');
460 460
                 break;
461 461
             case 'relate':
462
-                $valid_opp = array('Value','Field');
463
-                if($vardef['module'] == 'Users') $valid_opp = array('Value','Field','Round_Robin','Least_Busy','Random');
462
+                $valid_opp = array('Value', 'Field');
463
+                if ($vardef['module'] == 'Users') $valid_opp = array('Value', 'Field', 'Round_Robin', 'Least_Busy', 'Random');
464 464
                 break;
465 465
             default:
466
-                $valid_opp = array('Value','Field');
466
+                $valid_opp = array('Value', 'Field');
467 467
                 break;
468 468
         }
469 469
 
470
-        foreach($app_list_strings['aor_action_type_list'] as $key => $keyValue){
471
-            if(!in_array($key, $valid_opp)){
470
+        foreach ($app_list_strings['aor_action_type_list'] as $key => $keyValue) {
471
+            if (!in_array($key, $valid_opp)) {
472 472
                 unset($app_list_strings['aor_action_type_list'][$key]);
473 473
             }
474 474
         }
475 475
 
476
-        if($view == 'EditView'){
477
-            echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". get_select_options_with_id($app_list_strings['aor_action_type_list'], $value) ."</select>";
478
-        }else{
476
+        if ($view == 'EditView') {
477
+            echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>".get_select_options_with_id($app_list_strings['aor_action_type_list'], $value)."</select>";
478
+        } else {
479 479
             echo $app_list_strings['aor_action_type_list'][$value];
480 480
         }
481 481
         die;
@@ -484,8 +484,8 @@  discard block
 block discarded – undo
484 484
 
485 485
     protected function action_getModuleFieldType()
486 486
     {
487
-        if(isset($_REQUEST['rel_field']) &&  $_REQUEST['rel_field'] != ''){
488
-            $rel_module = getRelatedModule($_REQUEST['aor_module'],$_REQUEST['rel_field']);
487
+        if (isset($_REQUEST['rel_field']) && $_REQUEST['rel_field'] != '') {
488
+            $rel_module = getRelatedModule($_REQUEST['aor_module'], $_REQUEST['rel_field']);
489 489
         } else {
490 490
             $rel_module = $_REQUEST['aor_module'];
491 491
         }
@@ -494,18 +494,18 @@  discard block
 block discarded – undo
494 494
         $fieldname = $_REQUEST['aor_fieldname'];
495 495
         $aor_field = $_REQUEST['aor_newfieldname'];
496 496
 
497
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
498
-        else $view= 'EditView';
497
+        if (isset($_REQUEST['view'])) $view = $_REQUEST['view'];
498
+        else $view = 'EditView';
499 499
 
500
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
500
+        if (isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
501 501
         else $value = '';
502 502
 
503
-        switch($_REQUEST['aor_type']) {
503
+        switch ($_REQUEST['aor_type']) {
504 504
             case 'Field':
505
-                if(isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') $module = $_REQUEST['alt_module'];
506
-                if($view == 'EditView'){
507
-                    echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". getModuleFields($module, $view, $value) ."</select>";
508
-                }else{
505
+                if (isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') $module = $_REQUEST['alt_module'];
506
+                if ($view == 'EditView') {
507
+                    echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>".getModuleFields($module, $view, $value)."</select>";
508
+                } else {
509 509
                     echo getModuleFields($module, $view, $value);
510 510
                 }
511 511
                 break;
@@ -513,13 +513,13 @@  discard block
 block discarded – undo
513 513
                 echo getDateField($module, $aor_field, $view, $value, false);
514 514
                 break;
515 515
             case 'Multi':
516
-                echo getModuleField($rel_module,$fieldname, $aor_field, $view, $value,'multienum');
516
+                echo getModuleField($rel_module, $fieldname, $aor_field, $view, $value, 'multienum');
517 517
                 break;
518 518
             case 'Period':
519
-                if($view == 'EditView'){
520
-                    echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". getDropdownList('date_time_period_list',$_REQUEST['aor_value']) ."</select>";
521
-                }else{
522
-                    echo getDropdownList('date_time_period_list',$_REQUEST['aor_value']);
519
+                if ($view == 'EditView') {
520
+                    echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>".getDropdownList('date_time_period_list', $_REQUEST['aor_value'])."</select>";
521
+                } else {
522
+                    echo getDropdownList('date_time_period_list', $_REQUEST['aor_value']);
523 523
                 }
524 524
 
525 525
                 break;
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
                 break;
528 528
             case 'Value':
529 529
             default:
530
-                echo getModuleField($rel_module,$fieldname, $aor_field, $view, $value );
530
+                echo getModuleField($rel_module, $fieldname, $aor_field, $view, $value);
531 531
                 break;
532 532
         }
533 533
         die;
@@ -540,23 +540,23 @@  discard block
 block discarded – undo
540 540
         $fieldname = $_REQUEST['aor_fieldname'];
541 541
         $aor_field = $_REQUEST['aor_newfieldname'];
542 542
 
543
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
544
-        else $view= 'EditView';
543
+        if (isset($_REQUEST['view'])) $view = $_REQUEST['view'];
544
+        else $view = 'EditView';
545 545
 
546
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
546
+        if (isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
547 547
         else $value = '';
548 548
 
549
-        switch($_REQUEST['aor_type']) {
549
+        switch ($_REQUEST['aor_type']) {
550 550
             case 'Field':
551
-                if(isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') $module = $_REQUEST['alt_module'];
552
-                if($view == 'EditView'){
553
-                    echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". getModuleFields($module, $view, $value) ."</select>";
554
-                }else{
551
+                if (isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') $module = $_REQUEST['alt_module'];
552
+                if ($view == 'EditView') {
553
+                    echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>".getModuleFields($module, $view, $value)."</select>";
554
+                } else {
555 555
                     echo getModuleFields($module, $view, $value);
556 556
                 }
557 557
                 break;
558 558
             case 'Date':
559
-                if(isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') $module = $_REQUEST['alt_module'];
559
+                if (isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') $module = $_REQUEST['alt_module'];
560 560
                 echo getDateField($module, $aor_field, $view, $value);
561 561
                 break;
562 562
             Case 'Round_Robin';
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
                 break;
567 567
             case 'Value':
568 568
             default:
569
-                echo getModuleField($module,$fieldname, $aor_field, $view, $value );
569
+                echo getModuleField($module, $fieldname, $aor_field, $view, $value);
570 570
                 break;
571 571
         }
572 572
         die;
@@ -575,13 +575,13 @@  discard block
 block discarded – undo
575 575
 
576 576
     protected function action_getModuleField()
577 577
     {
578
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
579
-        else $view= 'EditView';
578
+        if (isset($_REQUEST['view'])) $view = $_REQUEST['view'];
579
+        else $view = 'EditView';
580 580
 
581
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
581
+        if (isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
582 582
         else $value = '';
583 583
 
584
-        echo getModuleField($_REQUEST['aor_module'],$_REQUEST['aor_fieldname'], $_REQUEST['aor_newfieldname'], $view, $value );
584
+        echo getModuleField($_REQUEST['aor_module'], $_REQUEST['aor_fieldname'], $_REQUEST['aor_newfieldname'], $view, $value);
585 585
         die;
586 586
     }
587 587
 
@@ -591,31 +591,31 @@  discard block
 block discarded – undo
591 591
         $fieldname = $_REQUEST['aor_fieldname'];
592 592
         $aor_field = $_REQUEST['aor_newfieldname'];
593 593
 
594
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
595
-        else $view= 'EditView';
594
+        if (isset($_REQUEST['view'])) $view = $_REQUEST['view'];
595
+        else $view = 'EditView';
596 596
 
597
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
597
+        if (isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
598 598
         else $value = '';
599 599
 
600
-        switch($_REQUEST['aor_type']) {
600
+        switch ($_REQUEST['aor_type']) {
601 601
             case 'Field':
602
-                if(isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') $module = $_REQUEST['alt_module'];
603
-                if($view == 'EditView'){
604
-                    echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". getModuleFields($module, $view, $value) ."</select>";
605
-                }else{
602
+                if (isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') $module = $_REQUEST['alt_module'];
603
+                if ($view == 'EditView') {
604
+                    echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>".getModuleFields($module, $view, $value)."</select>";
605
+                } else {
606 606
                     echo getModuleFields($module, $view, $value);
607 607
                 }
608 608
                 break;
609 609
             case 'Value':
610 610
             default:
611
-                echo getModuleField($module,$fieldname, $aor_field, $view, $value );
611
+                echo getModuleField($module, $fieldname, $aor_field, $view, $value);
612 612
                 break;
613 613
         }
614 614
         die;
615 615
 
616 616
     }
617 617
 
618
-    protected function action_getRelActionFieldTypeOptions(){
618
+    protected function action_getRelActionFieldTypeOptions() {
619 619
 
620 620
         global $app_list_strings, $beanFiles, $beanList;
621 621
 
@@ -624,10 +624,10 @@  discard block
 block discarded – undo
624 624
         $fieldname = $_REQUEST['aor_fieldname'];
625 625
         $aor_field = $_REQUEST['aor_newfieldname'];
626 626
 
627
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
628
-        else $view= 'EditView';
627
+        if (isset($_REQUEST['view'])) $view = $_REQUEST['view'];
628
+        else $view = 'EditView';
629 629
 
630
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
630
+        if (isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
631 631
         else $value = '';
632 632
 
633 633
 
@@ -644,15 +644,15 @@  discard block
 block discarded – undo
644 644
         }*/
645 645
         $valid_opp = array('Value');
646 646
 
647
-        foreach($app_list_strings['aor_rel_action_type_list'] as $key => $keyValue){
648
-            if(!in_array($key, $valid_opp)){
647
+        foreach ($app_list_strings['aor_rel_action_type_list'] as $key => $keyValue) {
648
+            if (!in_array($key, $valid_opp)) {
649 649
                 unset($app_list_strings['aor_rel_action_type_list'][$key]);
650 650
             }
651 651
         }
652 652
 
653
-        if($view == 'EditView'){
654
-            echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". get_select_options_with_id($app_list_strings['aor_rel_action_type_list'], $value) ."</select>";
655
-        }else{
653
+        if ($view == 'EditView') {
654
+            echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>".get_select_options_with_id($app_list_strings['aor_rel_action_type_list'], $value)."</select>";
655
+        } else {
656 656
             echo $app_list_strings['aor_rel_action_type_list'][$value];
657 657
         }
658 658
         die;
Please login to merge, or discard this patch.
Braces   +110 added lines, -51 removed lines patch added patch discarded remove patch
@@ -191,10 +191,11 @@  discard block
 block discarded – undo
191 191
 
192 192
             for($x =0; $x < $countOfCharts; $x++)
193 193
             {
194
-                if(is_null($itemsWithModulus) ||  $x < $itemsWithModulus)
195
-                    $graphHtml.="<img src='.$graphs[$x].' style='width:$width%;' />";
196
-                else
197
-                    $graphHtml.="<img src='.$graphs[$x].' style='width:$modulusWidth%;' />";
194
+                if(is_null($itemsWithModulus) ||  $x < $itemsWithModulus) {
195
+                                    $graphHtml.="<img src='.$graphs[$x].' style='width:$width%;' />";
196
+                } else {
197
+                                    $graphHtml.="<img src='.$graphs[$x].' style='width:$modulusWidth%;' />";
198
+                }
198 199
             }
199 200
 
200 201
 /*            foreach($graphs as $g)
@@ -241,7 +242,7 @@  discard block
 block discarded – undo
241 242
             $pdf->WriteHTML($printable,3);
242 243
             $pdf->Output($this->bean->name.'.pdf', "D");
243 244
 
244
-        }catch(mPDF_exception $e){
245
+        } catch(mPDF_exception $e){
245 246
             echo $e;
246 247
         }
247 248
 
@@ -259,7 +260,7 @@  discard block
 block discarded – undo
259 260
 
260 261
         if($view == 'EditView'){
261 262
             echo "<select type='text' style='width:100px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". get_select_options_with_id($app_list_strings['aor_function_list'], $value) ."</select>";
262
-        }else{
263
+        } else{
263 264
             echo $app_list_strings['aor_function_list'][$value];
264 265
         }
265 266
         die;
@@ -278,11 +279,17 @@  discard block
 block discarded – undo
278 279
         $fieldname = $_REQUEST['aor_fieldname'];
279 280
         $aor_field = $_REQUEST['aor_newfieldname'];
280 281
 
281
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
282
-        else $view= 'EditView';
282
+        if(isset($_REQUEST['view'])) {
283
+            $view = $_REQUEST['view'];
284
+        } else {
285
+            $view= 'EditView';
286
+        }
283 287
 
284
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
285
-        else $value = '';
288
+        if(isset($_REQUEST['aor_value'])) {
289
+            $value = $_REQUEST['aor_value'];
290
+        } else {
291
+            $value = '';
292
+        }
286 293
 
287 294
 
288 295
         require_once($beanFiles[$beanList[$module]]);
@@ -329,7 +336,7 @@  discard block
 block discarded – undo
329 336
         $app_list_strings['aor_operator_list'];
330 337
         if($view == 'EditView'){
331 338
             echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". get_select_options_with_id($app_list_strings['aor_operator_list'], $value) ."</select>";
332
-        }else{
339
+        } else{
333 340
             echo $app_list_strings['aor_operator_list'][$value];
334 341
         }
335 342
         die;
@@ -348,11 +355,17 @@  discard block
 block discarded – undo
348 355
         $fieldname = $_REQUEST['aor_fieldname'];
349 356
         $aor_field = $_REQUEST['aor_newfieldname'];
350 357
 
351
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
352
-        else $view= 'EditView';
358
+        if(isset($_REQUEST['view'])) {
359
+            $view = $_REQUEST['view'];
360
+        } else {
361
+            $view= 'EditView';
362
+        }
353 363
 
354
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
355
-        else $value = '';
364
+        if(isset($_REQUEST['aor_value'])) {
365
+            $value = $_REQUEST['aor_value'];
366
+        } else {
367
+            $value = '';
368
+        }
356 369
 
357 370
 
358 371
         require_once($beanFiles[$beanList[$module]]);
@@ -403,7 +416,7 @@  discard block
 block discarded – undo
403 416
 
404 417
         if($view == 'EditView'){
405 418
             echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". get_select_options_with_id($app_list_strings['aor_condition_type_list'], $value) ."</select>";
406
-        }else{
419
+        } else{
407 420
             echo $app_list_strings['aor_condition_type_list'][$value];
408 421
         }
409 422
         die;
@@ -423,11 +436,17 @@  discard block
 block discarded – undo
423 436
         $fieldname = $_REQUEST['aor_fieldname'];
424 437
         $aor_field = $_REQUEST['aor_newfieldname'];
425 438
 
426
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
427
-        else $view= 'EditView';
439
+        if(isset($_REQUEST['view'])) {
440
+            $view = $_REQUEST['view'];
441
+        } else {
442
+            $view= 'EditView';
443
+        }
428 444
 
429
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
430
-        else $value = '';
445
+        if(isset($_REQUEST['aor_value'])) {
446
+            $value = $_REQUEST['aor_value'];
447
+        } else {
448
+            $value = '';
449
+        }
431 450
 
432 451
 
433 452
         require_once($beanFiles[$beanList[$module]]);
@@ -460,7 +479,9 @@  discard block
 block discarded – undo
460 479
                 break;
461 480
             case 'relate':
462 481
                 $valid_opp = array('Value','Field');
463
-                if($vardef['module'] == 'Users') $valid_opp = array('Value','Field','Round_Robin','Least_Busy','Random');
482
+                if($vardef['module'] == 'Users') {
483
+                    $valid_opp = array('Value','Field','Round_Robin','Least_Busy','Random');
484
+                }
464 485
                 break;
465 486
             default:
466 487
                 $valid_opp = array('Value','Field');
@@ -475,7 +496,7 @@  discard block
 block discarded – undo
475 496
 
476 497
         if($view == 'EditView'){
477 498
             echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". get_select_options_with_id($app_list_strings['aor_action_type_list'], $value) ."</select>";
478
-        }else{
499
+        } else{
479 500
             echo $app_list_strings['aor_action_type_list'][$value];
480 501
         }
481 502
         die;
@@ -494,18 +515,26 @@  discard block
 block discarded – undo
494 515
         $fieldname = $_REQUEST['aor_fieldname'];
495 516
         $aor_field = $_REQUEST['aor_newfieldname'];
496 517
 
497
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
498
-        else $view= 'EditView';
518
+        if(isset($_REQUEST['view'])) {
519
+            $view = $_REQUEST['view'];
520
+        } else {
521
+            $view= 'EditView';
522
+        }
499 523
 
500
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
501
-        else $value = '';
524
+        if(isset($_REQUEST['aor_value'])) {
525
+            $value = $_REQUEST['aor_value'];
526
+        } else {
527
+            $value = '';
528
+        }
502 529
 
503 530
         switch($_REQUEST['aor_type']) {
504 531
             case 'Field':
505
-                if(isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') $module = $_REQUEST['alt_module'];
532
+                if(isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') {
533
+                    $module = $_REQUEST['alt_module'];
534
+                }
506 535
                 if($view == 'EditView'){
507 536
                     echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". getModuleFields($module, $view, $value) ."</select>";
508
-                }else{
537
+                } else{
509 538
                     echo getModuleFields($module, $view, $value);
510 539
                 }
511 540
                 break;
@@ -518,7 +547,7 @@  discard block
 block discarded – undo
518 547
             case 'Period':
519 548
                 if($view == 'EditView'){
520 549
                     echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". getDropdownList('date_time_period_list',$_REQUEST['aor_value']) ."</select>";
521
-                }else{
550
+                } else{
522 551
                     echo getDropdownList('date_time_period_list',$_REQUEST['aor_value']);
523 552
                 }
524 553
 
@@ -540,23 +569,33 @@  discard block
 block discarded – undo
540 569
         $fieldname = $_REQUEST['aor_fieldname'];
541 570
         $aor_field = $_REQUEST['aor_newfieldname'];
542 571
 
543
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
544
-        else $view= 'EditView';
572
+        if(isset($_REQUEST['view'])) {
573
+            $view = $_REQUEST['view'];
574
+        } else {
575
+            $view= 'EditView';
576
+        }
545 577
 
546
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
547
-        else $value = '';
578
+        if(isset($_REQUEST['aor_value'])) {
579
+            $value = $_REQUEST['aor_value'];
580
+        } else {
581
+            $value = '';
582
+        }
548 583
 
549 584
         switch($_REQUEST['aor_type']) {
550 585
             case 'Field':
551
-                if(isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') $module = $_REQUEST['alt_module'];
586
+                if(isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') {
587
+                    $module = $_REQUEST['alt_module'];
588
+                }
552 589
                 if($view == 'EditView'){
553 590
                     echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". getModuleFields($module, $view, $value) ."</select>";
554
-                }else{
591
+                } else{
555 592
                     echo getModuleFields($module, $view, $value);
556 593
                 }
557 594
                 break;
558 595
             case 'Date':
559
-                if(isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') $module = $_REQUEST['alt_module'];
596
+                if(isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') {
597
+                    $module = $_REQUEST['alt_module'];
598
+                }
560 599
                 echo getDateField($module, $aor_field, $view, $value);
561 600
                 break;
562 601
             Case 'Round_Robin';
@@ -575,11 +614,17 @@  discard block
 block discarded – undo
575 614
 
576 615
     protected function action_getModuleField()
577 616
     {
578
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
579
-        else $view= 'EditView';
617
+        if(isset($_REQUEST['view'])) {
618
+            $view = $_REQUEST['view'];
619
+        } else {
620
+            $view= 'EditView';
621
+        }
580 622
 
581
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
582
-        else $value = '';
623
+        if(isset($_REQUEST['aor_value'])) {
624
+            $value = $_REQUEST['aor_value'];
625
+        } else {
626
+            $value = '';
627
+        }
583 628
 
584 629
         echo getModuleField($_REQUEST['aor_module'],$_REQUEST['aor_fieldname'], $_REQUEST['aor_newfieldname'], $view, $value );
585 630
         die;
@@ -591,18 +636,26 @@  discard block
 block discarded – undo
591 636
         $fieldname = $_REQUEST['aor_fieldname'];
592 637
         $aor_field = $_REQUEST['aor_newfieldname'];
593 638
 
594
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
595
-        else $view= 'EditView';
639
+        if(isset($_REQUEST['view'])) {
640
+            $view = $_REQUEST['view'];
641
+        } else {
642
+            $view= 'EditView';
643
+        }
596 644
 
597
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
598
-        else $value = '';
645
+        if(isset($_REQUEST['aor_value'])) {
646
+            $value = $_REQUEST['aor_value'];
647
+        } else {
648
+            $value = '';
649
+        }
599 650
 
600 651
         switch($_REQUEST['aor_type']) {
601 652
             case 'Field':
602
-                if(isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') $module = $_REQUEST['alt_module'];
653
+                if(isset($_REQUEST['alt_module']) && $_REQUEST['alt_module'] != '') {
654
+                    $module = $_REQUEST['alt_module'];
655
+                }
603 656
                 if($view == 'EditView'){
604 657
                     echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". getModuleFields($module, $view, $value) ."</select>";
605
-                }else{
658
+                } else{
606 659
                     echo getModuleFields($module, $view, $value);
607 660
                 }
608 661
                 break;
@@ -624,11 +677,17 @@  discard block
 block discarded – undo
624 677
         $fieldname = $_REQUEST['aor_fieldname'];
625 678
         $aor_field = $_REQUEST['aor_newfieldname'];
626 679
 
627
-        if(isset($_REQUEST['view'])) $view = $_REQUEST['view'];
628
-        else $view= 'EditView';
680
+        if(isset($_REQUEST['view'])) {
681
+            $view = $_REQUEST['view'];
682
+        } else {
683
+            $view= 'EditView';
684
+        }
629 685
 
630
-        if(isset($_REQUEST['aor_value'])) $value = $_REQUEST['aor_value'];
631
-        else $value = '';
686
+        if(isset($_REQUEST['aor_value'])) {
687
+            $value = $_REQUEST['aor_value'];
688
+        } else {
689
+            $value = '';
690
+        }
632 691
 
633 692
 
634 693
         require_once($beanFiles[$beanList[$module]]);
@@ -652,7 +711,7 @@  discard block
 block discarded – undo
652 711
 
653 712
         if($view == 'EditView'){
654 713
             echo "<select type='text' style='width:178px;' name='$aor_field' id='$aor_field' title='' tabindex='116'>". get_select_options_with_id($app_list_strings['aor_rel_action_type_list'], $value) ."</select>";
655
-        }else{
714
+        } else{
656 715
             echo $app_list_strings['aor_rel_action_type_list'][$value];
657 716
         }
658 717
         die;
Please login to merge, or discard this patch.
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,26 +1,26 @@
 block discarded – undo
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
 /**
26 26
  * This file adds support for studio
Please login to merge, or discard this patch.
modules/AOR_Reports/Dashlets/AORReportsDashlet/AORReportsDashlet.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
68 68
         }
69 69
     }
70 70
 
71
-	function process() {
71
+    function process() {
72 72
     }
73 73
 
74 74
     public function displayOptions() {
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 
5 5
 require_once('include/Dashlets/Dashlet.php');
@@ -17,14 +17,14 @@  discard block
 block discarded – undo
17 17
         parent::Dashlet($id);
18 18
         $this->isConfigurable = true;
19 19
         $this->def = $def;
20
-        if(empty($def['dashletTitle'])) {
20
+        if (empty($def['dashletTitle'])) {
21 21
             $this->title = translate('LBL_AOR_REPORTS_DASHLET', 'AOR_Reports');
22
-        } else{
22
+        } else {
23 23
             $this->title = $def['dashletTitle'];
24 24
         }
25 25
 
26 26
         $this->params = array();
27
-        if(!empty($def['parameter_id'])) {
27
+        if (!empty($def['parameter_id'])) {
28 28
             foreach ($def['parameter_id'] as $key => $parameterId) {
29 29
                 $this->params[$parameterId] = array(
30 30
                     'id' => $parameterId,
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
                     'value' => $def['parameter_value'][$key]);
34 34
             }
35 35
         }
36
-        if(!empty($def['aor_report_id'])) {
36
+        if (!empty($def['aor_report_id'])) {
37 37
             $this->report = BeanFactory::getBean('AOR_Reports', $def['aor_report_id']);
38 38
             $this->report->user_parameters = $this->params;
39 39
         }
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
         $mod_strings = return_module_language($current_language, 'AOR_Reports');
47 47
         $dashletSmarty = new Sugar_Smarty();
48 48
         $dashletTemplate = get_custom_file_if_exists('modules/AOR_Reports/Dashlets/AORReportsDashlet/dashlet.tpl');
49
-        $dashletSmarty->assign('MOD',$mod_strings);
50
-        $dashletSmarty->assign('dashlet_id',$this->id);
51
-        $dashletSmarty->assign('report_id',$this->report->id);
52
-        $dashletSmarty->assign('chartHTML',$this->getChartHTML());
49
+        $dashletSmarty->assign('MOD', $mod_strings);
50
+        $dashletSmarty->assign('dashlet_id', $this->id);
51
+        $dashletSmarty->assign('report_id', $this->report->id);
52
+        $dashletSmarty->assign('chartHTML', $this->getChartHTML());
53 53
         $dashletSmarty->assign('onlyCharts', $this->onlyCharts);
54
-        $dashletSmarty->assign('parameters',json_encode(array(
54
+        $dashletSmarty->assign('parameters', json_encode(array(
55 55
                                             'ids' => $this->def['parameter_id'],
56 56
                                             'operators' => $this->def['parameter_operator'],
57 57
                                             'types' => $this->def['parameter_type'],
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
         return $dashletSmarty->fetch($dashletTemplate);
60 60
     }
61 61
 
62
-    function getChartHTML(){
63
-        if(!empty($this->report->id)) {
62
+    function getChartHTML() {
63
+        if (!empty($this->report->id)) {
64 64
             //return $this->report->build_report_chart($this->charts, AOR_Report::CHART_TYPE_CHARTJS);
65 65
             return $this->report->build_report_chart($this->charts, AOR_Report::CHART_TYPE_RGRAPH);
66
-        }else{
66
+        } else {
67 67
             return '';
68 68
         }
69 69
     }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         global $current_language, $app_list_strings, $datetime;
77 77
         $mod_strings = return_module_language($current_language, 'AOR_Reports');
78 78
         $optionsSmarty = new Sugar_Smarty();
79
-        $optionsSmarty->assign('MOD',$mod_strings);
79
+        $optionsSmarty->assign('MOD', $mod_strings);
80 80
         $optionsSmarty->assign('id', $this->id);
81 81
         $optionsSmarty->assign('dashletTitle', $this->title);
82 82
         $optionsSmarty->assign('aor_report_id', $this->report->id);
@@ -89,16 +89,16 @@  discard block
 block discarded – undo
89 89
         $optionsSmarty->assign('date_time_period_list', $app_list_strings['date_time_period_list']);
90 90
 
91 91
         $charts = array();
92
-        if(!empty($this->report->id)){
93
-            foreach($this->report->get_linked_beans('aor_charts','AOR_Charts') as $chart){
92
+        if (!empty($this->report->id)) {
93
+            foreach ($this->report->get_linked_beans('aor_charts', 'AOR_Charts') as $chart) {
94 94
                 $charts[$chart->id] = $chart->name;
95 95
             }
96 96
         }
97 97
         $conditions = getConditionsAsParameters($this->report, $this->params);
98 98
         $i = 0;
99
-        foreach($conditions as $condition) {
100
-            if($condition["value_type"] == "Date"){
101
-                if($condition["additionalConditions"][0] == "now") {
99
+        foreach ($conditions as $condition) {
100
+            if ($condition["value_type"] == "Date") {
101
+                if ($condition["additionalConditions"][0] == "now") {
102 102
                     $conditions[$i]["value"] = date("d/m/Y");
103 103
                 }
104 104
             }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             $i++;
107 107
         }
108 108
         $optionsSmarty->assign('parameters', $conditions);
109
-        $chartOptions = get_select_options_with_id($charts,$this->charts);
109
+        $chartOptions = get_select_options_with_id($charts, $this->charts);
110 110
         $optionsSmarty->assign('chartOptions', $chartOptions);
111 111
         $optionsTemplate = get_custom_file_if_exists('modules/AOR_Reports/Dashlets/AORReportsDashlet/dashletConfigure.tpl');
112 112
         ob_clean();
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
 //            $req['parameter_value'][0] = $secondValue;
120 120
 //            $req['parameter_value'][1] = $firstValue;
121 121
 //        }
122
-        $allowedKeys = array_flip(array('aor_report_id','dashletTitle','charts','onlyCharts','parameter_id','parameter_value','parameter_type','parameter_operator'));
123
-        $intersected = array_intersect_key($req,$allowedKeys);
122
+        $allowedKeys = array_flip(array('aor_report_id', 'dashletTitle', 'charts', 'onlyCharts', 'parameter_id', 'parameter_value', 'parameter_type', 'parameter_operator'));
123
+        $intersected = array_intersect_key($req, $allowedKeys);
124 124
         return $intersected;
125 125
     }
126 126
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 
4 6
 
5 7
 require_once('include/Dashlets/Dashlet.php');
@@ -63,7 +65,7 @@  discard block
 block discarded – undo
63 65
         if(!empty($this->report->id)) {
64 66
             //return $this->report->build_report_chart($this->charts, AOR_Report::CHART_TYPE_CHARTJS);
65 67
             return $this->report->build_report_chart($this->charts, AOR_Report::CHART_TYPE_RGRAPH);
66
-        }else{
68
+        } else{
67 69
             return '';
68 70
         }
69 71
     }
Please login to merge, or discard this patch.
modules/AOR_Reports/Dashlets/AORReportsDashlet/AORReportsDashlet.meta.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
Please login to merge, or discard this patch.