Passed
Push — scrutinizer-code-quality ( 27193c...09f5a1 )
by Adam
51:28
created
modules/AOS_Products/metadata/metafiles.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
  */
33 33
 $module_name = 'AOS_Products';
34 34
  $metafiles[$module_name] = array(
35
-	'detailviewdefs'  => 	'modules/' . $module_name . '/metadata/detailviewdefs.php', 	
36
-	'editviewdefs'    => 	'modules/' . $module_name . '/metadata/editviewdefs.php',
37
- 	'listviewdefs'    => 	'modules/' . $module_name . '/metadata/listviewdefs.php',
38
- 	'searchdefs'      =>    'modules/' . $module_name . '/metadata/searchdefs.php',
39
- 	'popupdefs'	      =>    'modules/' . $module_name . '/metadata/popupdefs.php',
40
- 	'searchfields'	  =>    'modules/' . $module_name . '/metadata/SearchFields.php',
35
+	'detailviewdefs'  => 	'modules/'.$module_name.'/metadata/detailviewdefs.php', 	
36
+	'editviewdefs'    => 	'modules/'.$module_name.'/metadata/editviewdefs.php',
37
+ 	'listviewdefs'    => 	'modules/'.$module_name.'/metadata/listviewdefs.php',
38
+ 	'searchdefs'      =>    'modules/'.$module_name.'/metadata/searchdefs.php',
39
+ 	'popupdefs'	      =>    'modules/'.$module_name.'/metadata/popupdefs.php',
40
+ 	'searchfields'	  =>    'modules/'.$module_name.'/metadata/SearchFields.php',
41 41
  );
42 42
 ?>
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@
 block discarded – undo
31 31
  * Window - Preferences - PHPeclipse - PHP - Code Templates
32 32
  */
33 33
 $module_name = 'AOS_Products';
34
- $metafiles[$module_name] = array(
35
-	'detailviewdefs'  => 	'modules/' . $module_name . '/metadata/detailviewdefs.php', 	
36
-	'editviewdefs'    => 	'modules/' . $module_name . '/metadata/editviewdefs.php',
37
- 	'listviewdefs'    => 	'modules/' . $module_name . '/metadata/listviewdefs.php',
38
- 	'searchdefs'      =>    'modules/' . $module_name . '/metadata/searchdefs.php',
39
- 	'popupdefs'	      =>    'modules/' . $module_name . '/metadata/popupdefs.php',
40
- 	'searchfields'	  =>    'modules/' . $module_name . '/metadata/SearchFields.php',
41
- );
34
+    $metafiles[$module_name] = array(
35
+    'detailviewdefs'  => 	'modules/' . $module_name . '/metadata/detailviewdefs.php', 	
36
+    'editviewdefs'    => 	'modules/' . $module_name . '/metadata/editviewdefs.php',
37
+        'listviewdefs'    => 	'modules/' . $module_name . '/metadata/listviewdefs.php',
38
+        'searchdefs'      =>    'modules/' . $module_name . '/metadata/searchdefs.php',
39
+        'popupdefs'	      =>    'modules/' . $module_name . '/metadata/popupdefs.php',
40
+        'searchfields'	  =>    'modules/' . $module_name . '/metadata/SearchFields.php',
41
+    );
42 42
 ?>
Please login to merge, or discard this patch.
modules/AOS_Products/metadata/listviewdefs.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $listViewDefs ['AOS_Products'] = 
3 3
 array (
4
-  'NAME' => 
5
-  array (
4
+    'NAME' => 
5
+    array (
6 6
     'width' => '15%',
7 7
     'label' => 'LBL_NAME',
8 8
     'default' => true,
9 9
     'link' => true,
10
-  ),
11
-  'PART_NUMBER' => 
12
-  array (
10
+    ),
11
+    'PART_NUMBER' => 
12
+    array (
13 13
     'width' => '10%',
14 14
     'label' => 'LBL_PART_NUMBER',
15 15
     'default' => true,
16
-  ),
17
-  'COST' => 
18
-  array (
16
+    ),
17
+    'COST' => 
18
+    array (
19 19
     'width' => '10%',
20 20
     'label' => 'LBL_COST',
21 21
     'currency_format' => true,
22 22
     'default' => true,
23
-  ),
24
-  'PRICE' => 
25
-  array (
23
+    ),
24
+    'PRICE' => 
25
+    array (
26 26
     'width' => '10%',
27 27
     'label' => 'LBL_PRICE',
28 28
     'currency_format' => true,
29 29
     'default' => true,
30
-  ),
31
-  'AOS_PRODUCT_CATEGORY_NAME' => 
32
-  array (
30
+    ),
31
+    'AOS_PRODUCT_CATEGORY_NAME' => 
32
+    array (
33 33
     'type' => 'relate',
34 34
     'studio' => 'visible',
35 35
     'label' => 'LBL_AOS_PRODUCT_CATEGORYS_NAME',
@@ -38,24 +38,24 @@  discard block
 block discarded – undo
38 38
     'width' => '10%',
39 39
     'default' => true,
40 40
     'related_fields' =>
41
-      array (
42
-          'aos_product_category_id',
43
-      ),
44
-  ),
45
-  'CREATED_BY_NAME' => 
46
-  array (
41
+        array (
42
+            'aos_product_category_id',
43
+        ),
44
+    ),
45
+    'CREATED_BY_NAME' => 
46
+    array (
47 47
     'width' => '10%',
48 48
     'label' => 'LBL_CREATED',
49 49
     'default' => true,
50 50
     'module' => 'Users',
51 51
     'link' => true,
52 52
     'id' => 'CREATED_BY',
53
-  ),
54
-  'DATE_ENTERED' => 
55
-  array (
53
+    ),
54
+    'DATE_ENTERED' => 
55
+    array (
56 56
     'width' => '5%',
57 57
     'label' => 'LBL_DATE_ENTERED',
58 58
     'default' => true,
59
-  ),
59
+    ),
60 60
 );
61 61
 ?>
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $listViewDefs ['AOS_Products'] = 
3
-array (
3
+array(
4 4
   'NAME' => 
5
-  array (
5
+  array(
6 6
     'width' => '15%',
7 7
     'label' => 'LBL_NAME',
8 8
     'default' => true,
9 9
     'link' => true,
10 10
   ),
11 11
   'PART_NUMBER' => 
12
-  array (
12
+  array(
13 13
     'width' => '10%',
14 14
     'label' => 'LBL_PART_NUMBER',
15 15
     'default' => true,
16 16
   ),
17 17
   'COST' => 
18
-  array (
18
+  array(
19 19
     'width' => '10%',
20 20
     'label' => 'LBL_COST',
21 21
     'currency_format' => true,
22 22
     'default' => true,
23 23
   ),
24 24
   'PRICE' => 
25
-  array (
25
+  array(
26 26
     'width' => '10%',
27 27
     'label' => 'LBL_PRICE',
28 28
     'currency_format' => true,
29 29
     'default' => true,
30 30
   ),
31 31
   'AOS_PRODUCT_CATEGORY_NAME' => 
32
-  array (
32
+  array(
33 33
     'type' => 'relate',
34 34
     'studio' => 'visible',
35 35
     'label' => 'LBL_AOS_PRODUCT_CATEGORYS_NAME',
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
     'width' => '10%',
39 39
     'default' => true,
40 40
     'related_fields' =>
41
-      array (
41
+      array(
42 42
           'aos_product_category_id',
43 43
       ),
44 44
   ),
45 45
   'CREATED_BY_NAME' => 
46
-  array (
46
+  array(
47 47
     'width' => '10%',
48 48
     'label' => 'LBL_CREATED',
49 49
     'default' => true,
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     'id' => 'CREATED_BY',
53 53
   ),
54 54
   'DATE_ENTERED' => 
55
-  array (
55
+  array(
56 56
     'width' => '5%',
57 57
     'label' => 'LBL_DATE_ENTERED',
58 58
     'default' => true,
Please login to merge, or discard this patch.
modules/AOS_Products/metadata/sidecreateviewdefs.php 3 patches
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
  * Products, Quotations & Invoices modules.
5 5
  * Extensions to SugarCRM
@@ -40,16 +40,16 @@  discard block
 block discarded – undo
40 40
                                             array('label' => '10', 'field' => '30'),
41 41
                                          ),
42 42
                         ),
43
- 'panels' =>array (
43
+ 'panels' =>array(
44 44
   'DEFAULT' =>
45
-  array (
45
+  array(
46 46
     array(
47
-      array('name'=>'name', 'displayParams'=>array('required'=>true,'size'=>20)),
47
+      array('name'=>'name', 'displayParams'=>array('required'=>true, 'size'=>20)),
48 48
     ),
49
-    array (
50
-      array('name'=>'description','displayParams'=>array('rows'=>3, 'cols'=>20)),
49
+    array(
50
+      array('name'=>'description', 'displayParams'=>array('rows'=>3, 'cols'=>20)),
51 51
     ),
52
-    array (
52
+    array(
53 53
       array('name'=>'assigned_user_name', 'displayParams'=>array('required'=>true, 'size'=>11, 'selectOnly'=>true)),
54 54
     ),
55 55
   ),
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -29,32 +29,32 @@
 block discarded – undo
29 29
 $module_name = 'AOS_Products';
30 30
 $viewdefs[$module_name]['SideQuickCreate'] = array(
31 31
     'templateMeta' => array('form'=>array('buttons'=>array('SAVE'),
32
-    								      'button_location'=>'bottom',
33
-                                          'headerTpl'=>'include/EditView/header.tpl',
34
-                                          'footerTpl'=>'include/EditView/footer.tpl',
35
-                                          ),
36
-							'maxColumns' => '1',
37
-							'panelClass'=>'none',
38
-							'labelsOnTop'=>true,
32
+                                            'button_location'=>'bottom',
33
+                                            'headerTpl'=>'include/EditView/header.tpl',
34
+                                            'footerTpl'=>'include/EditView/footer.tpl',
35
+                                            ),
36
+                            'maxColumns' => '1',
37
+                            'panelClass'=>'none',
38
+                            'labelsOnTop'=>true,
39 39
                             'widths' => array(
40 40
                                             array('label' => '10', 'field' => '30'),
41
-                                         ),
41
+                                            ),
42 42
                         ),
43
- 'panels' =>array (
44
-  'DEFAULT' =>
45
-  array (
43
+    'panels' =>array (
44
+    'DEFAULT' =>
45
+    array (
46 46
     array(
47
-      array('name'=>'name', 'displayParams'=>array('required'=>true,'size'=>20)),
47
+        array('name'=>'name', 'displayParams'=>array('required'=>true,'size'=>20)),
48 48
     ),
49 49
     array (
50
-      array('name'=>'description','displayParams'=>array('rows'=>3, 'cols'=>20)),
50
+        array('name'=>'description','displayParams'=>array('rows'=>3, 'cols'=>20)),
51 51
     ),
52 52
     array (
53
-      array('name'=>'assigned_user_name', 'displayParams'=>array('required'=>true, 'size'=>11, 'selectOnly'=>true)),
53
+        array('name'=>'assigned_user_name', 'displayParams'=>array('required'=>true, 'size'=>11, 'selectOnly'=>true)),
54
+    ),
54 55
     ),
55
-  ),
56 56
 
57
- )
57
+    )
58 58
 
59 59
 
60 60
 );
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/TableDictionary.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,6 +125,6 @@
 block discarded – undo
125 125
 include('metadata/securitygroups_usersMetaData.php');
126 126
 
127 127
 if(file_exists('custom/application/Ext/TableDictionary/tabledictionary.ext.php')){
128
-	include('custom/application/Ext/TableDictionary/tabledictionary.ext.php');
128
+    include('custom/application/Ext/TableDictionary/tabledictionary.ext.php');
129 129
 }
130 130
 ?>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 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
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 include('metadata/securitygroups_recordsMetaData.php');
125 125
 include('metadata/securitygroups_usersMetaData.php');
126 126
 
127
-if(file_exists('custom/application/Ext/TableDictionary/tabledictionary.ext.php')){
127
+if (file_exists('custom/application/Ext/TableDictionary/tabledictionary.ext.php')) {
128 128
 	include('custom/application/Ext/TableDictionary/tabledictionary.ext.php');
129 129
 }
130 130
 ?>
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_Charts/AOR_Chart.php 4 patches
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $img = ob_get_clean();
212 212
         if($asDataURI){
213 213
             return 'data:image/png;base64,'.base64_encode($img);
214
-        }else{
214
+        } else{
215 215
             return $img;
216 216
         }
217 217
     }
@@ -356,8 +356,9 @@  discard block
 block discarded – undo
356 356
 
357 357
         $dataArray = json_decode($chartDataValues);
358 358
         $grouping = 'grouped'; //$mainGroupField->label; //'grouped';
359
-        if(!$grouped)
360
-            $grouping='stacked';
359
+        if(!$grouped) {
360
+                    $grouping='stacked';
361
+        }
361 362
         if(!is_array($dataArray)||count($dataArray) < 1)
362 363
         {
363 364
             return "<h3>$this->noDataMessage</h3>";
@@ -631,9 +632,9 @@  discard block
 block discarded – undo
631 632
         if(strlen($label) > $maxLabelSize)
632 633
         {
633 634
             return substr($label,0,$maxLabelSize).'...';
635
+        } else {
636
+                    return $label;
634 637
         }
635
-        else
636
-            return $label;
637 638
     }
638 639
 
639 640
 
Please login to merge, or discard this patch.
Doc Comments   +73 added lines patch added patch discarded remove patch
@@ -56,6 +56,9 @@  discard block
 block discarded – undo
56 56
 		parent::Basic();
57 57
 	}
58 58
 
59
+    /**
60
+     * @param string $postKey
61
+     */
59 62
     function save_lines(array $post,AOR_Report $bean,$postKey){
60 63
         $seenIds = array();
61 64
         if(isset($post[$postKey.'id'])) {
@@ -105,12 +108,23 @@  discard block
 block discarded – undo
105 108
         return array('main'=>$main,'highlight'=>$highlight);
106 109
     }
107 110
 
111
+    /**
112
+     * @param pImage $chartPicture
113
+     */
108 114
     function buildChartImageBar($chartPicture,$recordImageMap = false){
109 115
         $scaleSettings = array("DrawSubTicks" => false, "LabelRotation" => 30, 'MinDivHeight' => 50);
110 116
         $chartPicture->drawScale($scaleSettings);
111 117
         $chartPicture->drawBarChart(array("RecordImageMap"=>$recordImageMap));
112 118
     }
113 119
 
120
+    /**
121
+     * @param pImage $chartPicture
122
+     * @param pData $chartData
123
+     * @param integer $imageHeight
124
+     * @param integer $imageWidth
125
+     * @param string $xName
126
+     * @param boolean $recordImageMap
127
+     */
114 128
     function buildChartImagePie($chartPicture,$chartData, $reportData,$imageHeight, $imageWidth, $xName,$recordImageMap){
115 129
         $PieChart = new pPie($chartPicture,$chartData);
116 130
         $x = 0;
@@ -122,12 +136,20 @@  discard block
 block discarded – undo
122 136
         $PieChart->drawPieLegend($imageWidth*0.7,$imageHeight/3, array('FontSize'=>10,"FontName"=>"modules/AOR_Charts/lib/pChart/fonts/verdana.ttf",'BoxSize'=>14));
123 137
     }
124 138
 
139
+    /**
140
+     * @param pImage $chartPicture
141
+     */
125 142
     function buildChartImageLine($chartPicture, $recordImageMap = false){
126 143
         $scaleSettings = array("XMargin"=>10,"YMargin"=>10,"GridR"=>200,"GridG"=>200,"GridB"=>200,'MinDivHeight' => 50,"LabelRotation" => 30);
127 144
         $chartPicture->drawScale($scaleSettings);
128 145
         $chartPicture->drawLineChart(array("RecordImageMap"=>$recordImageMap));
129 146
     }
130 147
 
148
+    /**
149
+     * @param pImage $chartPicture
150
+     * @param pData $chartData
151
+     * @param boolean $recordImageMap
152
+     */
131 153
     function buildChartImageRadar($chartPicture, $chartData,$recordImageMap){
132 154
         $SplitChart = new pRadar();
133 155
         $Options = array("LabelPos"=>RADAR_LABELS_HORIZONTAL,"RecordImageMap"=>$recordImageMap);
@@ -303,6 +325,11 @@  discard block
 block discarded – undo
303 325
         return $chart;
304 326
     }
305 327
 
328
+    /**
329
+     * @param string $chartDataValues
330
+     * @param string $chartLabelValues
331
+     * @param string $chartTooltips
332
+     */
306 333
     private function getRGraphRoseChart($chartDataValues, $chartLabelValues,$chartTooltips, $chartName= '', $chartId, $chartHeight = 400, $chartWidth = 400)
307 334
     {
308 335
         $dataArray = json_decode($chartDataValues);
@@ -340,6 +367,12 @@  discard block
 block discarded – undo
340 367
     //I have not used a parameter for getRGraphBarChart to say whether to group etc, as the future development could be quite different
341 368
     //for both, hence the separate methods.  However, the $grouped parameter allows us to specify whether the chart is grouped (true)
342 369
     //or stacked (false)
370
+
371
+    /**
372
+     * @param string $chartDataValues
373
+     * @param string $chartLabelValues
374
+     * @param string $chartTooltips
375
+     */
343 376
     private function getRGraphGroupedBarChart($chartDataValues, $chartLabelValues,$chartTooltips, $chartName= '', $chartId, $chartHeight = 400, $chartWidth = 400, $grouped = false)
344 377
     {
345 378
         //$keys = array_keys($chartTooltips);
@@ -398,6 +431,11 @@  discard block
 block discarded – undo
398 431
 
399 432
 
400 433
 
434
+    /**
435
+     * @param string $chartDataValues
436
+     * @param string $chartLabelValues
437
+     * @param string $chartTooltips
438
+     */
401 439
     private function getRGraphBarChart($chartDataValues, $chartLabelValues,$chartTooltips, $chartName= '', $chartId, $chartHeight = 400, $chartWidth = 400)
402 440
     {
403 441
         $dataArray = json_decode($chartDataValues);
@@ -437,6 +475,11 @@  discard block
 block discarded – undo
437 475
         return $html;
438 476
     }
439 477
 
478
+    /**
479
+     * @param string $chartDataValues
480
+     * @param string $chartLabelValues
481
+     * @param string $chartTooltips
482
+     */
440 483
     private function getRGraphRadarChart($chartDataValues, $chartLabelValues,$chartTooltips, $chartName= '', $chartId, $chartHeight = 400, $chartWidth = 400)
441 484
     {
442 485
         $dataArray = json_decode($chartDataValues);
@@ -469,6 +512,11 @@  discard block
 block discarded – undo
469 512
         return $html;
470 513
     }
471 514
 
515
+    /**
516
+     * @param string $chartDataValues
517
+     * @param string $chartLabelValues
518
+     * @param string $chartTooltips
519
+     */
472 520
     private function getRGraphPieChart($chartDataValues, $chartLabelValues,$chartTooltips, $chartName= '', $chartId, $chartHeight = 400, $chartWidth = 400)
473 521
     {
474 522
         $dataArray = json_decode($chartDataValues);
@@ -505,6 +553,11 @@  discard block
 block discarded – undo
505 553
         return $html;
506 554
     }
507 555
 
556
+    /**
557
+     * @param string $chartDataValues
558
+     * @param string $chartLabelValues
559
+     * @param string $chartTooltips
560
+     */
508 561
     private function getRGraphLineChart($chartDataValues, $chartLabelValues,$chartTooltips, $chartName= '', $chartId, $chartHeight = 400, $chartWidth = 400)
509 562
     {
510 563
         $dataArray = json_decode($chartDataValues);
@@ -637,6 +690,10 @@  discard block
 block discarded – undo
637 690
     }
638 691
 
639 692
 
693
+    /**
694
+     * @param string $xName
695
+     * @param string $yName
696
+     */
640 697
     private function getRGraphGroupedBarChartData($reportData, $xName,$yName, AOR_Field $mainGroupField){
641 698
 
642 699
 
@@ -706,6 +763,10 @@  discard block
 block discarded – undo
706 763
 
707 764
     }
708 765
 
766
+    /**
767
+     * @param string $xName
768
+     * @param string $yName
769
+     */
709 770
     private function getRGraphBarChartData($reportData, $xName,$yName){
710 771
         $chart['labels']=array();
711 772
         $chart['data']=array();
@@ -753,6 +814,10 @@  discard block
 block discarded – undo
753 814
         return '';
754 815
     }
755 816
 
817
+    /**
818
+     * @param string $xName
819
+     * @param string $yName
820
+     */
756 821
     private function getLineChartData($reportData, $xName,$yName){
757 822
         return $this->getBarChartData($reportData, $xName,$yName);
758 823
     }
@@ -778,10 +843,18 @@  discard block
 block discarded – undo
778 843
         return $this->getBarChartConfig();
779 844
     }
780 845
 
846
+    /**
847
+     * @param string $xName
848
+     * @param string $yName
849
+     */
781 850
     private function getRadarChartData($reportData, $xName,$yName){
782 851
         return $this->getBarChartData($reportData, $xName,$yName);
783 852
     }
784 853
 
854
+    /**
855
+     * @param string $xName
856
+     * @param string $yName
857
+     */
785 858
     private function getPolarChartData($reportData, $xName,$yName){
786 859
         return $this->getPieChartData($reportData, $xName,$yName);
787 860
     }
Please login to merge, or discard this patch.
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -25,25 +25,25 @@  discard block
 block discarded – undo
25 25
 class AOR_Chart extends Basic {
26 26
 
27 27
     var $colours = "['#1f78b4','#a6cee3','#b2df8a','#33a02c','#fb9a99','#e31a1c','#fdbf6f','#ff7f00','#cab2d6','#6a3d9a','#ffff99','#b15928','#144c73','#6caed1','#8acf4e','#20641c','#f8514f','#9e1214','#fc9d24','#b35900','#a880bb','#442763','#ffff4d','#733a1a']";
28
-	var $new_schema = true;
29
-	var $module_dir = 'AOR_Charts';
30
-	var $object_name = 'AOR_Chart';
31
-	var $table_name = 'aor_charts';
32
-	var $importable = true;
33
-	var $disable_row_level_security = true ;
34
-
35
-	var $id;
36
-	var $name;
37
-	var $date_entered;
38
-	var $date_modified;
39
-	var $modified_user_id;
40
-	var $modified_by_name;
41
-	var $created_by;
42
-	var $created_by_name;
43
-	var $description;
44
-	var $deleted;
45
-	var $created_by_link;
46
-	var $modified_user_link;
28
+    var $new_schema = true;
29
+    var $module_dir = 'AOR_Charts';
30
+    var $object_name = 'AOR_Chart';
31
+    var $table_name = 'aor_charts';
32
+    var $importable = true;
33
+    var $disable_row_level_security = true ;
34
+
35
+    var $id;
36
+    var $name;
37
+    var $date_entered;
38
+    var $date_modified;
39
+    var $modified_user_id;
40
+    var $modified_by_name;
41
+    var $created_by;
42
+    var $created_by_name;
43
+    var $description;
44
+    var $deleted;
45
+    var $created_by_link;
46
+    var $modified_user_link;
47 47
 
48 48
     var $type;
49 49
     var $x_field;
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 
53 53
 
54 54
 
55
-	public function __construct(){
56
-		parent::__construct();
57
-	}
55
+    public function __construct(){
56
+        parent::__construct();
57
+    }
58 58
 
59 59
     function save_lines(array $post,AOR_Report $bean,$postKey){
60 60
         $seenIds = array();
Please login to merge, or discard this patch.
Spacing   +144 added lines, -144 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	var $object_name = 'AOR_Chart';
31 31
 	var $table_name = 'aor_charts';
32 32
 	var $importable = true;
33
-	var $disable_row_level_security = true ;
33
+	var $disable_row_level_security = true;
34 34
 
35 35
 	var $id;
36 36
 	var $name;
@@ -52,148 +52,148 @@  discard block
 block discarded – undo
52 52
 
53 53
 
54 54
 
55
-	public function __construct(){
55
+	public function __construct() {
56 56
 		parent::__construct();
57 57
 	}
58 58
 
59
-    function save_lines(array $post,AOR_Report $bean,$postKey){
59
+    function save_lines(array $post, AOR_Report $bean, $postKey) {
60 60
         $seenIds = array();
61
-        if(isset($post[$postKey.'id'])) {
62
-            foreach ($post[$postKey . 'id'] as $key => $id) {
61
+        if (isset($post[$postKey.'id'])) {
62
+            foreach ($post[$postKey.'id'] as $key => $id) {
63 63
                 if ($id) {
64 64
                     $aorChart = BeanFactory::getBean('AOR_Charts', $id);
65 65
                 } else {
66 66
                     $aorChart = BeanFactory::newBean('AOR_Charts');
67 67
                 }
68
-                $aorChart->name = $post[$postKey . 'title'][$key];
69
-                $aorChart->type = $post[$postKey . 'type'][$key];
70
-                $aorChart->x_field = $post[$postKey . 'x_field'][$key];
71
-                $aorChart->y_field = $post[$postKey . 'y_field'][$key];
68
+                $aorChart->name = $post[$postKey.'title'][$key];
69
+                $aorChart->type = $post[$postKey.'type'][$key];
70
+                $aorChart->x_field = $post[$postKey.'x_field'][$key];
71
+                $aorChart->y_field = $post[$postKey.'y_field'][$key];
72 72
                 $aorChart->aor_report_id = $bean->id;
73 73
                 $aorChart->save();
74 74
                 $seenIds[] = $aorChart->id;
75 75
             }
76 76
         }
77 77
         //Any beans that exist but aren't in $seenIds must have been removed.
78
-        foreach($bean->get_linked_beans('aor_charts','AOR_Charts') as $chart){
79
-            if(!in_array($chart->id,$seenIds)){
78
+        foreach ($bean->get_linked_beans('aor_charts', 'AOR_Charts') as $chart) {
79
+            if (!in_array($chart->id, $seenIds)) {
80 80
                 $chart->mark_deleted($chart->id);
81 81
             }
82 82
         }
83 83
     }
84 84
 
85
-    private function getValidChartTypes(){
86
-        return array('bar','line','pie','radar','rose', 'grouped_bar', 'stacked_bar');
85
+    private function getValidChartTypes() {
86
+        return array('bar', 'line', 'pie', 'radar', 'rose', 'grouped_bar', 'stacked_bar');
87 87
     }
88 88
 
89 89
 
90
-    private function getColour($seed,$rgbArray = false){
90
+    private function getColour($seed, $rgbArray = false) {
91 91
         $hash = md5($seed);
92 92
         $r = hexdec(substr($hash, 0, 2));
93 93
         $g = hexdec(substr($hash, 2, 2));
94 94
         $b = hexdec(substr($hash, 4, 2));
95
-        if($rgbArray){
96
-            return array('R'=>$r,'G'=>$g,'B'=>$b);
95
+        if ($rgbArray) {
96
+            return array('R'=>$r, 'G'=>$g, 'B'=>$b);
97 97
         }
98 98
         $highR = $r + 10;
99 99
         $highG = $g + 10;
100 100
         $highB = $b + 10;
101
-        $main = '#'.str_pad(dechex($r),2,'0',STR_PAD_LEFT)
102
-            .str_pad(dechex($g),2,'0',STR_PAD_LEFT)
103
-            .str_pad(dechex($b),2,'0',STR_PAD_LEFT);
101
+        $main = '#'.str_pad(dechex($r), 2, '0', STR_PAD_LEFT)
102
+            .str_pad(dechex($g), 2, '0', STR_PAD_LEFT)
103
+            .str_pad(dechex($b), 2, '0', STR_PAD_LEFT);
104 104
         $highlight = '#'.dechex($highR).dechex($highG).dechex($highB);
105
-        return array('main'=>$main,'highlight'=>$highlight);
105
+        return array('main'=>$main, 'highlight'=>$highlight);
106 106
     }
107 107
 
108
-    function buildChartImageBar($chartPicture,$recordImageMap = false){
108
+    function buildChartImageBar($chartPicture, $recordImageMap = false) {
109 109
         $scaleSettings = array("DrawSubTicks" => false, "LabelRotation" => 30, 'MinDivHeight' => 50);
110 110
         $chartPicture->drawScale($scaleSettings);
111 111
         $chartPicture->drawBarChart(array("RecordImageMap"=>$recordImageMap));
112 112
     }
113 113
 
114
-    function buildChartImagePie($chartPicture,$chartData, $reportData,$imageHeight, $imageWidth, $xName,$recordImageMap){
115
-        $PieChart = new pPie($chartPicture,$chartData);
114
+    function buildChartImagePie($chartPicture, $chartData, $reportData, $imageHeight, $imageWidth, $xName, $recordImageMap) {
115
+        $PieChart = new pPie($chartPicture, $chartData);
116 116
         $x = 0;
117
-        foreach($reportData as $row){
118
-            $PieChart->setSliceColor($x,$this->getColour($row[$xName],true));
117
+        foreach ($reportData as $row) {
118
+            $PieChart->setSliceColor($x, $this->getColour($row[$xName], true));
119 119
             $x++;
120 120
         }
121
-        $PieChart->draw2DPie($imageWidth/3,$imageHeight/2,array("Border"=>TRUE,'Radius'=>200,''=>true,"RecordImageMap"=>$recordImageMap));
122
-        $PieChart->drawPieLegend($imageWidth*0.7,$imageHeight/3, array('FontSize'=>10,"FontName"=>"modules/AOR_Charts/lib/pChart/fonts/verdana.ttf",'BoxSize'=>14));
121
+        $PieChart->draw2DPie($imageWidth / 3, $imageHeight / 2, array("Border"=>TRUE, 'Radius'=>200, ''=>true, "RecordImageMap"=>$recordImageMap));
122
+        $PieChart->drawPieLegend($imageWidth * 0.7, $imageHeight / 3, array('FontSize'=>10, "FontName"=>"modules/AOR_Charts/lib/pChart/fonts/verdana.ttf", 'BoxSize'=>14));
123 123
     }
124 124
 
125
-    function buildChartImageLine($chartPicture, $recordImageMap = false){
126
-        $scaleSettings = array("XMargin"=>10,"YMargin"=>10,"GridR"=>200,"GridG"=>200,"GridB"=>200,'MinDivHeight' => 50,"LabelRotation" => 30);
125
+    function buildChartImageLine($chartPicture, $recordImageMap = false) {
126
+        $scaleSettings = array("XMargin"=>10, "YMargin"=>10, "GridR"=>200, "GridG"=>200, "GridB"=>200, 'MinDivHeight' => 50, "LabelRotation" => 30);
127 127
         $chartPicture->drawScale($scaleSettings);
128 128
         $chartPicture->drawLineChart(array("RecordImageMap"=>$recordImageMap));
129 129
     }
130 130
 
131
-    function buildChartImageRadar($chartPicture, $chartData,$recordImageMap){
131
+    function buildChartImageRadar($chartPicture, $chartData, $recordImageMap) {
132 132
         $SplitChart = new pRadar();
133
-        $Options = array("LabelPos"=>RADAR_LABELS_HORIZONTAL,"RecordImageMap"=>$recordImageMap);
134
-        $SplitChart->drawRadar($chartPicture,$chartData,$Options);
133
+        $Options = array("LabelPos"=>RADAR_LABELS_HORIZONTAL, "RecordImageMap"=>$recordImageMap);
134
+        $SplitChart->drawRadar($chartPicture, $chartData, $Options);
135 135
 
136 136
     }
137 137
 
138
-    public function buildChartImage(array $reportData, array $fields,$asDataURI = true, $generateImageMapId = false){
138
+    public function buildChartImage(array $reportData, array $fields, $asDataURI = true, $generateImageMapId = false) {
139 139
         global $current_user;
140 140
         require_once 'modules/AOR_Charts/lib/pChart/pChart.php';
141 141
 
142
-        if($generateImageMapId !== false){
142
+        if ($generateImageMapId !== false) {
143 143
             $generateImageMapId = $current_user->id."-".$generateImageMapId;
144 144
         }
145 145
 
146 146
         $html = '';
147
-        if(!in_array($this->type, $this->getValidChartTypes())){
147
+        if (!in_array($this->type, $this->getValidChartTypes())) {
148 148
             return $html;
149 149
         }
150 150
         $x = $fields[$this->x_field];
151 151
         $y = $fields[$this->y_field];
152
-        if(!$x || !$y){
152
+        if (!$x || !$y) {
153 153
             //Malformed chart object - missing an axis field
154 154
             return '';
155 155
         }
156
-        $xName = str_replace(' ','_',$x->label) . $this->x_field;
157
-        $yName = str_replace(' ','_',$y->label) . $this->y_field;
156
+        $xName = str_replace(' ', '_', $x->label).$this->x_field;
157
+        $yName = str_replace(' ', '_', $y->label).$this->y_field;
158 158
 
159 159
         $chartData = new pData();
160 160
         $chartData->loadPalette("modules/AOR_Charts/lib/pChart/palettes/navy.color", TRUE);
161 161
         $labels = array();
162
-        foreach($reportData as $row){
163
-            $chartData->addPoints($row[$yName],'data');
164
-            $chartData->addPoints($row[$xName],'Labels');
162
+        foreach ($reportData as $row) {
163
+            $chartData->addPoints($row[$yName], 'data');
164
+            $chartData->addPoints($row[$xName], 'Labels');
165 165
             $labels[] = $row[$xName];
166 166
         }
167 167
 
168
-        $chartData->setSerieDescription("Months","Month");
168
+        $chartData->setSerieDescription("Months", "Month");
169 169
         $chartData->setAbscissa("Labels");
170 170
 
171 171
         $imageHeight = 700;
172 172
         $imageWidth = 700;
173 173
 
174
-        $chartPicture = new pImage($imageWidth,$imageHeight,$chartData);
175
-        if($generateImageMapId){
174
+        $chartPicture = new pImage($imageWidth, $imageHeight, $chartData);
175
+        if ($generateImageMapId) {
176 176
             $imageMapDir = create_cache_directory('modules/AOR_Charts/ImageMap/'.$current_user->id.'/');
177
-            $chartPicture->initialiseImageMap($generateImageMapId,IMAGE_MAP_STORAGE_FILE,$generateImageMapId,$imageMapDir);
177
+            $chartPicture->initialiseImageMap($generateImageMapId, IMAGE_MAP_STORAGE_FILE, $generateImageMapId, $imageMapDir);
178 178
         }
179 179
 
180 180
         $chartPicture->Antialias = True;
181 181
 
182
-        $chartPicture->drawFilledRectangle(0,0,$imageWidth-1,$imageHeight-1,array("R"=>240,"G"=>240,"B"=>240,"BorderR"=>0,"BorderG"=>0,"BorderB"=>0,));
182
+        $chartPicture->drawFilledRectangle(0, 0, $imageWidth - 1, $imageHeight - 1, array("R"=>240, "G"=>240, "B"=>240, "BorderR"=>0, "BorderG"=>0, "BorderB"=>0,));
183 183
 
184
-        $chartPicture->setFontProperties(array("FontName"=>"modules/AOR_Charts/lib/pChart/fonts/verdana.ttf","FontSize"=>14));
184
+        $chartPicture->setFontProperties(array("FontName"=>"modules/AOR_Charts/lib/pChart/fonts/verdana.ttf", "FontSize"=>14));
185 185
 
186
-        $chartPicture->drawText($imageWidth/2,20,$this->name,array("R"=>0,"G"=>0,"B"=>0,'Align'=>TEXT_ALIGN_TOPMIDDLE));
187
-        $chartPicture->setFontProperties(array("FontName"=>"modules/AOR_Charts/lib/pChart/fonts/verdana.ttf","FontSize"=>6));
186
+        $chartPicture->drawText($imageWidth / 2, 20, $this->name, array("R"=>0, "G"=>0, "B"=>0, 'Align'=>TEXT_ALIGN_TOPMIDDLE));
187
+        $chartPicture->setFontProperties(array("FontName"=>"modules/AOR_Charts/lib/pChart/fonts/verdana.ttf", "FontSize"=>6));
188 188
 
189
-        $chartPicture->setGraphArea(60,60,$imageWidth-60,$imageHeight-100);
189
+        $chartPicture->setGraphArea(60, 60, $imageWidth - 60, $imageHeight - 100);
190 190
 
191
-        switch($this->type){
191
+        switch ($this->type) {
192 192
             case 'radar':
193 193
                 $this->buildChartImageRadar($chartPicture, $chartData, !empty($generateImageMapId));
194 194
                 break;
195 195
             case 'pie':
196
-                $this->buildChartImagePie($chartPicture,$chartData, $reportData,$imageHeight, $imageWidth, $xName, !empty($generateImageMapId));
196
+                $this->buildChartImagePie($chartPicture, $chartData, $reportData, $imageHeight, $imageWidth, $xName, !empty($generateImageMapId));
197 197
                 break;
198 198
             case 'line':
199 199
                 $this->buildChartImageLine($chartPicture, !empty($generateImageMapId));
@@ -203,50 +203,50 @@  discard block
 block discarded – undo
203 203
                 $this->buildChartImageBar($chartPicture, !empty($generateImageMapId));
204 204
                 break;
205 205
         }
206
-        if($generateImageMapId) {
206
+        if ($generateImageMapId) {
207 207
             $chartPicture->replaceImageMapTitle("data", $labels);
208 208
         }
209 209
         ob_start();
210 210
         $chartPicture->render('');
211 211
         $img = ob_get_clean();
212
-        if($asDataURI){
212
+        if ($asDataURI) {
213 213
             return 'data:image/png;base64,'.base64_encode($img);
214
-        }else{
214
+        } else {
215 215
             return $img;
216 216
         }
217 217
     }
218 218
 
219
-    public function buildChartHTML(array $reportData, array $fields,$index = 0, $chartType = AOR_Report::CHART_TYPE_PCHART, AOR_Field $mainGroupField = null){
220
-        switch($chartType){
219
+    public function buildChartHTML(array $reportData, array $fields, $index = 0, $chartType = AOR_Report::CHART_TYPE_PCHART, AOR_Field $mainGroupField = null) {
220
+        switch ($chartType) {
221 221
             case AOR_Report::CHART_TYPE_PCHART:
222
-                return $this->buildChartHTMLPChart($reportData,$fields,$index);
222
+                return $this->buildChartHTMLPChart($reportData, $fields, $index);
223 223
             case AOR_Report::CHART_TYPE_CHARTJS:
224
-                return $this->buildChartHTMLChartJS($reportData,$fields);
224
+                return $this->buildChartHTMLChartJS($reportData, $fields);
225 225
             case AOR_Report::CHART_TYPE_RGRAPH:
226
-                return $this->buildChartHTMLRGraph($reportData,$fields, $mainGroupField);
226
+                return $this->buildChartHTMLRGraph($reportData, $fields, $mainGroupField);
227 227
         }
228 228
         return '';
229 229
     }
230 230
 
231 231
 
232
-    private function buildChartHTMLRGraph(array $reportData, array $fields, AOR_Field $mainGroupField = null){
232
+    private function buildChartHTMLRGraph(array $reportData, array $fields, AOR_Field $mainGroupField = null) {
233 233
         $html = '';
234
-        if(!in_array($this->type, $this->getValidChartTypes())){
234
+        if (!in_array($this->type, $this->getValidChartTypes())) {
235 235
             return $html;
236 236
         }
237 237
         $x = $fields[$this->x_field];
238 238
         $y = $fields[$this->y_field];
239
-        if(!$x || !$y){
239
+        if (!$x || !$y) {
240 240
             //Malformed chart object - missing an axis field
241 241
             return '';
242 242
         }
243
-        $xName = str_replace(' ','_',$x->label) . $this->x_field;
244
-        $yName = str_replace(' ','_',$y->label) . $this->y_field;
243
+        $xName = str_replace(' ', '_', $x->label).$this->x_field;
244
+        $yName = str_replace(' ', '_', $y->label).$this->y_field;
245 245
 
246 246
         $defaultHeight = 500;
247 247
         $defaultWidth = 900;
248 248
 
249
-        switch($this->type){
249
+        switch ($this->type) {
250 250
             /*
251 251
              //Polar was not implemented for the previous library (it is not in the getValidChartTypes method)
252 252
             case 'polar':
@@ -257,56 +257,56 @@  discard block
 block discarded – undo
257 257
             */
258 258
             case 'radar':
259 259
                 $chartFunction = 'Radar';
260
-                $data = $this->getRGraphBarChartData($reportData, $xName,$yName);
260
+                $data = $this->getRGraphBarChartData($reportData, $xName, $yName);
261 261
                 $config = $this->getRadarChartConfig();
262
-                $chart = $this->getRGraphRadarChart(json_encode($data['data']), json_encode($data['labels']),json_encode($data['tooltips']), $this->name, $this->id, $defaultHeight,$defaultWidth);
262
+                $chart = $this->getRGraphRadarChart(json_encode($data['data']), json_encode($data['labels']), json_encode($data['tooltips']), $this->name, $this->id, $defaultHeight, $defaultWidth);
263 263
                 break;
264 264
             case 'pie':
265 265
                 $chartFunction = 'Pie';
266
-                $data = $this->getRGraphBarChartData($reportData, $xName,$yName);
266
+                $data = $this->getRGraphBarChartData($reportData, $xName, $yName);
267 267
                 $config = $this->getPieChartConfig();
268
-                $chart = $this->getRGraphPieChart(json_encode($data['data']), json_encode($data['labels']),json_encode($data['tooltips']), $this->name, $this->id,  $defaultHeight,$defaultWidth);
268
+                $chart = $this->getRGraphPieChart(json_encode($data['data']), json_encode($data['labels']), json_encode($data['tooltips']), $this->name, $this->id, $defaultHeight, $defaultWidth);
269 269
                 break;
270 270
             case 'line':
271 271
                 $chartFunction = 'Line';
272
-                $data = $this->getRGraphBarChartData($reportData, $xName,$yName);
272
+                $data = $this->getRGraphBarChartData($reportData, $xName, $yName);
273 273
                 $config = $this->getLineChartConfig();
274
-                $chart = $this->getRGraphLineChart(json_encode($data['data']), json_encode($data['labels']),json_encode($data['tooltips']), $this->name, $this->id,  $defaultHeight,$defaultWidth);
274
+                $chart = $this->getRGraphLineChart(json_encode($data['data']), json_encode($data['labels']), json_encode($data['tooltips']), $this->name, $this->id, $defaultHeight, $defaultWidth);
275 275
                 break;
276 276
             case 'rose':
277 277
                 $chartFunction = 'Rose';
278
-                $data = $this->getRGraphBarChartData($reportData, $xName,$yName);
278
+                $data = $this->getRGraphBarChartData($reportData, $xName, $yName);
279 279
                 $config = $this->getRoseChartConfig();
280
-                $chart = $this->getRGraphRoseChart(json_encode($data['data']), json_encode($data['labels']),json_encode($data['tooltips']), $this->name, $this->id,  $defaultHeight,$defaultWidth);
280
+                $chart = $this->getRGraphRoseChart(json_encode($data['data']), json_encode($data['labels']), json_encode($data['tooltips']), $this->name, $this->id, $defaultHeight, $defaultWidth);
281 281
                 break;
282 282
             case 'grouped_bar':
283 283
                 $chartFunction = 'Grouped bar';
284
-                $data = $this->getRGraphGroupedBarChartData($reportData, $xName,$yName, $mainGroupField);
284
+                $data = $this->getRGraphGroupedBarChartData($reportData, $xName, $yName, $mainGroupField);
285 285
                 $config = $this->getGroupedBarChartConfig();
286
-                $chart = $this->getRGraphGroupedBarChart(json_encode($data['data']), json_encode($data['labels']), json_encode($data['tooltips']), $this->name, $this->id,  $defaultHeight,$defaultWidth, true);
286
+                $chart = $this->getRGraphGroupedBarChart(json_encode($data['data']), json_encode($data['labels']), json_encode($data['tooltips']), $this->name, $this->id, $defaultHeight, $defaultWidth, true);
287 287
                 break;
288 288
             case 'stacked_bar':
289 289
                 $chartFunction = 'Stacked bar';
290
-                $data = $this->getRGraphGroupedBarChartData($reportData, $xName,$yName, $mainGroupField);
290
+                $data = $this->getRGraphGroupedBarChartData($reportData, $xName, $yName, $mainGroupField);
291 291
                 $config = $this->getStackedBarChartConfig();
292
-                $chart = $this->getRGraphGroupedBarChart(json_encode($data['data']), json_encode($data['labels']), json_encode($data['tooltips']), $this->name, $this->id,  $defaultHeight,$defaultWidth, false);
292
+                $chart = $this->getRGraphGroupedBarChart(json_encode($data['data']), json_encode($data['labels']), json_encode($data['tooltips']), $this->name, $this->id, $defaultHeight, $defaultWidth, false);
293 293
                 break;
294 294
             case 'bar':
295 295
             default:
296 296
                 $chartFunction = 'Bar';
297
-                $data = $this->getRGraphBarChartData($reportData, $xName,$yName);
297
+                $data = $this->getRGraphBarChartData($reportData, $xName, $yName);
298 298
                 $config = $this->getBarChartConfig();
299
-                $chart = $this->getRGraphBarChart(json_encode($data['data']), json_encode($data['labels']), json_encode($data['tooltips']), $this->name, $this->id,  $defaultHeight,$defaultWidth);
299
+                $chart = $this->getRGraphBarChart(json_encode($data['data']), json_encode($data['labels']), json_encode($data['tooltips']), $this->name, $this->id, $defaultHeight, $defaultWidth);
300 300
                 break;
301 301
         }
302 302
 
303 303
         return $chart;
304 304
     }
305 305
 
306
-    private function getRGraphRoseChart($chartDataValues, $chartLabelValues,$chartTooltips, $chartName, $chartId, $chartHeight = 400, $chartWidth = 400)
306
+    private function getRGraphRoseChart($chartDataValues, $chartLabelValues, $chartTooltips, $chartName, $chartId, $chartHeight = 400, $chartWidth = 400)
307 307
     {
308 308
         $dataArray = json_decode($chartDataValues);
309
-        if(!is_array($dataArray)||count($dataArray) < 1)
309
+        if (!is_array($dataArray) || count($dataArray) < 1)
310 310
         {
311 311
             return "<h3>$this->noDataMessage</h3>";
312 312
         }
@@ -340,13 +340,13 @@  discard block
 block discarded – undo
340 340
     //I have not used a parameter for getRGraphBarChart to say whether to group etc, as the future development could be quite different
341 341
     //for both, hence the separate methods.  However, the $grouped parameter allows us to specify whether the chart is grouped (true)
342 342
     //or stacked (false)
343
-    private function getRGraphGroupedBarChart($chartDataValues, $chartLabelValues,$chartTooltips, $chartName, $chartId, $chartHeight = 400, $chartWidth = 400, $grouped = false)
343
+    private function getRGraphGroupedBarChart($chartDataValues, $chartLabelValues, $chartTooltips, $chartName, $chartId, $chartHeight = 400, $chartWidth = 400, $grouped = false)
344 344
     {
345 345
         $dataArray = json_decode($chartDataValues);
346 346
         $grouping = 'grouped'; //$mainGroupField->label; //'grouped';
347
-        if(!$grouped)
348
-            $grouping='stacked';
349
-        if(!is_array($dataArray)||count($dataArray) < 1)
347
+        if (!$grouped)
348
+            $grouping = 'stacked';
349
+        if (!is_array($dataArray) || count($dataArray) < 1)
350 350
         {
351 351
             return "<h3>$this->noDataMessage</h3>";
352 352
         }
@@ -387,10 +387,10 @@  discard block
 block discarded – undo
387 387
 
388 388
 
389 389
 
390
-    private function getRGraphBarChart($chartDataValues, $chartLabelValues,$chartTooltips, $chartName, $chartId, $chartHeight = 400, $chartWidth = 400)
390
+    private function getRGraphBarChart($chartDataValues, $chartLabelValues, $chartTooltips, $chartName, $chartId, $chartHeight = 400, $chartWidth = 400)
391 391
     {
392 392
         $dataArray = json_decode($chartDataValues);
393
-        if(!is_array($dataArray)||count($dataArray) < 1)
393
+        if (!is_array($dataArray) || count($dataArray) < 1)
394 394
         {
395 395
             return "<h3>$this->noDataMessage</h3>";
396 396
         }
@@ -427,10 +427,10 @@  discard block
 block discarded – undo
427 427
         return $html;
428 428
     }
429 429
 
430
-    private function getRGraphRadarChart($chartDataValues, $chartLabelValues,$chartTooltips, $chartName, $chartId, $chartHeight = 400, $chartWidth = 400)
430
+    private function getRGraphRadarChart($chartDataValues, $chartLabelValues, $chartTooltips, $chartName, $chartId, $chartHeight = 400, $chartWidth = 400)
431 431
     {
432 432
         $dataArray = json_decode($chartDataValues);
433
-        if(!is_array($dataArray)||count($dataArray) < 1)
433
+        if (!is_array($dataArray) || count($dataArray) < 1)
434 434
         {
435 435
             return "<h3>$this->noDataMessage</h3>";
436 436
         }
@@ -460,10 +460,10 @@  discard block
 block discarded – undo
460 460
         return $html;
461 461
     }
462 462
 
463
-    private function getRGraphPieChart($chartDataValues, $chartLabelValues,$chartTooltips, $chartName, $chartId, $chartHeight = 400, $chartWidth = 400)
463
+    private function getRGraphPieChart($chartDataValues, $chartLabelValues, $chartTooltips, $chartName, $chartId, $chartHeight = 400, $chartWidth = 400)
464 464
     {
465 465
         $dataArray = json_decode($chartDataValues);
466
-        if(!is_array($dataArray)||count($dataArray) < 1)
466
+        if (!is_array($dataArray) || count($dataArray) < 1)
467 467
         {
468 468
             return "<h3>$this->noDataMessage</h3>";
469 469
         }
@@ -496,10 +496,10 @@  discard block
 block discarded – undo
496 496
         return $html;
497 497
     }
498 498
 
499
-    private function getRGraphLineChart($chartDataValues, $chartLabelValues,$chartTooltips, $chartName, $chartId, $chartHeight = 400, $chartWidth = 400)
499
+    private function getRGraphLineChart($chartDataValues, $chartLabelValues, $chartTooltips, $chartName, $chartId, $chartHeight = 400, $chartWidth = 400)
500 500
     {
501 501
         $dataArray = json_decode($chartDataValues);
502
-        if(!is_array($dataArray)||count($dataArray) < 1)
502
+        if (!is_array($dataArray) || count($dataArray) < 1)
503 503
         {
504 504
             return "<h3>$this->noDataMessage</h3>";
505 505
         }
@@ -539,45 +539,45 @@  discard block
 block discarded – undo
539 539
         return $html;
540 540
     }
541 541
 
542
-    private function buildChartHTMLChartJS(array $reportData, array $fields){
542
+    private function buildChartHTMLChartJS(array $reportData, array $fields) {
543 543
         $html = '';
544
-        if(!in_array($this->type, $this->getValidChartTypes())){
544
+        if (!in_array($this->type, $this->getValidChartTypes())) {
545 545
             return $html;
546 546
         }
547 547
         $x = $fields[$this->x_field];
548 548
         $y = $fields[$this->y_field];
549
-        if(!$x || !$y){
549
+        if (!$x || !$y) {
550 550
             //Malformed chart object - missing an axis field
551 551
             return '';
552 552
         }
553
-        $xName = str_replace(' ','_',$x->label) . $this->x_field;
554
-        $yName = str_replace(' ','_',$y->label) . $this->y_field;
553
+        $xName = str_replace(' ', '_', $x->label).$this->x_field;
554
+        $yName = str_replace(' ', '_', $y->label).$this->y_field;
555 555
 
556
-        switch($this->type){
556
+        switch ($this->type) {
557 557
             case 'polar':
558 558
                 $chartFunction = 'PolarArea';
559
-                $data = $this->getPolarChartData($reportData, $xName,$yName);
559
+                $data = $this->getPolarChartData($reportData, $xName, $yName);
560 560
                 $config = $this->getPolarChartConfig();
561 561
                 break;
562 562
             case 'radar':
563 563
                 $chartFunction = 'Radar';
564
-                $data = $this->getRadarChartData($reportData, $xName,$yName);
564
+                $data = $this->getRadarChartData($reportData, $xName, $yName);
565 565
                 $config = $this->getRadarChartConfig();
566 566
                 break;
567 567
             case 'pie':
568 568
                 $chartFunction = 'Pie';
569
-                $data = $this->getPieChartData($reportData, $xName,$yName);
569
+                $data = $this->getPieChartData($reportData, $xName, $yName);
570 570
                 $config = $this->getPieChartConfig();
571 571
                 break;
572 572
             case 'line':
573 573
                 $chartFunction = 'Line';
574
-                $data = $this->getLineChartData($reportData, $xName,$yName);
574
+                $data = $this->getLineChartData($reportData, $xName, $yName);
575 575
                 $config = $this->getLineChartConfig();
576 576
                 break;
577 577
             case 'bar':
578 578
             default:
579 579
                 $chartFunction = 'Bar';
580
-                $data = $this->getBarChartData($reportData, $xName,$yName);
580
+                $data = $this->getBarChartData($reportData, $xName, $yName);
581 581
                 $config = $this->getBarChartConfig();
582 582
                 break;
583 583
         }
@@ -604,9 +604,9 @@  discard block
 block discarded – undo
604 604
         return $html;
605 605
     }
606 606
 
607
-    private function buildChartHTMLPChart(array $reportData, array $fields,$index = 0){
607
+    private function buildChartHTMLPChart(array $reportData, array $fields, $index = 0) {
608 608
         $html = '';
609
-        $imgUri = $this->buildChartImage($reportData,$fields,true,$index);
609
+        $imgUri = $this->buildChartImage($reportData, $fields, true, $index);
610 610
         $img = "<img id='{$this->id}_img' src='{$imgUri}'>";
611 611
         $html .= $img;
612 612
         $html .= <<<EOF
@@ -621,24 +621,24 @@  discard block
 block discarded – undo
621 621
 
622 622
     private function getShortenedLabel($label, $maxLabelSize = 20)
623 623
     {
624
-        if(strlen($label) > $maxLabelSize)
624
+        if (strlen($label) > $maxLabelSize)
625 625
         {
626
-            return substr($label,0,$maxLabelSize).'...';
626
+            return substr($label, 0, $maxLabelSize).'...';
627 627
         }
628 628
         else
629 629
             return $label;
630 630
     }
631 631
 
632 632
 
633
-    private function getRGraphGroupedBarChartData($reportData, $xName,$yName, AOR_Field $mainGroupField = null){
633
+    private function getRGraphGroupedBarChartData($reportData, $xName, $yName, AOR_Field $mainGroupField = null) {
634 634
 
635 635
 
636 636
         // get z-axis name
637 637
 
638 638
         $zName = null;
639
-        foreach($reportData[0] as $key => $value) {
639
+        foreach ($reportData[0] as $key => $value) {
640 640
             $field = str_replace(' ', '_', is_null($mainGroupField) ? 'no data' : $mainGroupField->label);
641
-            if (preg_match('/^' . $field . '[0-9]+/', $key)) {
641
+            if (preg_match('/^'.$field.'[0-9]+/', $key)) {
642 642
                 $zName = $key;
643 643
                 break;
644 644
             }
@@ -652,20 +652,20 @@  discard block
 block discarded – undo
652 652
         $tooltips = array();
653 653
 
654 654
         $usedKeys = array();
655
-        foreach($reportData as $key => $row) {
655
+        foreach ($reportData as $key => $row) {
656 656
             $filter = $row[$xName];
657
-            foreach($reportData as $key2 => $row2) {
658
-                if($row2[$xName] == $filter && !in_array($key, $usedKeys)) {
659
-                    $data      [ $row[$xName]  ]   [] = (float) $row[$yName];
660
-                    $tooltips  [ $row[$xName]  ]   [] = isset($row[$zName]) ? $row[$zName] : null;
657
+            foreach ($reportData as $key2 => $row2) {
658
+                if ($row2[$xName] == $filter && !in_array($key, $usedKeys)) {
659
+                    $data      [$row[$xName]]   [] = (float)$row[$yName];
660
+                    $tooltips  [$row[$xName]]   [] = isset($row[$zName]) ? $row[$zName] : null;
661 661
                     $usedKeys[] = $key;
662 662
                 }
663 663
             }
664 664
         }
665 665
 
666 666
         $_data = array();
667
-        foreach($data as $label => $values) {
668
-            foreach($values as $key => $value) {
667
+        foreach ($data as $label => $values) {
668
+            foreach ($values as $key => $value) {
669 669
                 $_data[$label][$tooltips[$label][$key]] = $value;
670 670
             }
671 671
         }
@@ -677,11 +677,11 @@  discard block
 block discarded – undo
677 677
         $_data = array();
678 678
         $_labels = array();
679 679
         $_tooltips = array();
680
-        foreach($data as $label => $values) {
680
+        foreach ($data as $label => $values) {
681 681
             $_labels[] = $this->getShortenedLabel($label);
682 682
             $_values = array();
683
-            foreach($values as $tooltip => $value) {
684
-                $_tooltips[] = $tooltip . " ($value)";
683
+            foreach ($values as $tooltip => $value) {
684
+                $_tooltips[] = $tooltip." ($value)";
685 685
                 $_values[] = $value;
686 686
             }
687 687
             $_data[] = $_values;
@@ -699,11 +699,11 @@  discard block
 block discarded – undo
699 699
 
700 700
     }
701 701
 
702
-    private function getRGraphBarChartData($reportData, $xName,$yName){
703
-        $chart['labels']=array();
704
-        $chart['data']=array();
705
-        $chart['tooltips']=array();
706
-        foreach($reportData as $row){
702
+    private function getRGraphBarChartData($reportData, $xName, $yName) {
703
+        $chart['labels'] = array();
704
+        $chart['data'] = array();
705
+        $chart['tooltips'] = array();
706
+        foreach ($reportData as $row) {
707 707
             $chart['labels'][] = $this->getShortenedLabel($row[$xName]);
708 708
             $chart['tooltips'][] = $row[$xName];
709 709
             $chart['data'][] = (float)$row[$yName];
@@ -713,11 +713,11 @@  discard block
 block discarded – undo
713 713
     }
714 714
 
715 715
 
716
-    private function getBarChartData($reportData, $xName,$yName){
716
+    private function getBarChartData($reportData, $xName, $yName) {
717 717
         $data = array();
718 718
         $data['labels'] = array();
719 719
         $datasetData = array();
720
-        foreach($reportData as $row){
720
+        foreach ($reportData as $row) {
721 721
             $data['labels'][] = $row[$xName];
722 722
             $datasetData[] = $row[$yName];
723 723
         }
@@ -734,14 +734,14 @@  discard block
 block discarded – undo
734 734
         return $data;
735 735
     }
736 736
 
737
-    private function getLineChartData($reportData, $xName,$yName){
738
-        return $this->getBarChartData($reportData, $xName,$yName);
737
+    private function getLineChartData($reportData, $xName, $yName) {
738
+        return $this->getBarChartData($reportData, $xName, $yName);
739 739
     }
740 740
 
741
-    private function getBarChartConfig(){
741
+    private function getBarChartConfig() {
742 742
         return array();
743 743
     }
744
-    private function getLineChartConfig(){
744
+    private function getLineChartConfig() {
745 745
         return $this->getBarChartConfig();
746 746
     }
747 747
 
@@ -755,36 +755,36 @@  discard block
 block discarded – undo
755 755
         return $this->getBarChartConfig();
756 756
     }
757 757
 
758
-    private function getRoseChartConfig(){
758
+    private function getRoseChartConfig() {
759 759
         return $this->getBarChartConfig();
760 760
     }
761 761
 
762
-    private function getRadarChartData($reportData, $xName,$yName){
763
-        return $this->getBarChartData($reportData, $xName,$yName);
762
+    private function getRadarChartData($reportData, $xName, $yName) {
763
+        return $this->getBarChartData($reportData, $xName, $yName);
764 764
     }
765 765
 
766
-    private function getPolarChartData($reportData, $xName,$yName){
767
-        return $this->getPieChartData($reportData, $xName,$yName);
766
+    private function getPolarChartData($reportData, $xName, $yName) {
767
+        return $this->getPieChartData($reportData, $xName, $yName);
768 768
     }
769 769
 
770
-    private function getRadarChartConfig(){
770
+    private function getRadarChartConfig() {
771 771
         return array();
772 772
     }
773 773
 
774
-    private function getPolarChartConfig(){
774
+    private function getPolarChartConfig() {
775 775
         return $this->getPieChartConfig();
776 776
     }
777
-    private function getPieChartConfig(){
777
+    private function getPieChartConfig() {
778 778
         $config = array();
779 779
         $config['legendTemplate'] = "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\">&nbsp;&nbsp;&nbsp;&nbsp;</span>&nbsp;<%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>";
780 780
         return $config;
781 781
     }
782 782
 
783
-    private function getPieChartData($reportData, $xName,$yName){
783
+    private function getPieChartData($reportData, $xName, $yName) {
784 784
         $data = array();
785 785
 
786
-        foreach($reportData as $row){
787
-            if(!$row[$yName]){
786
+        foreach ($reportData as $row) {
787
+            if (!$row[$yName]) {
788 788
                 continue;
789 789
             }
790 790
             $colour = $this->getColour($row[$xName]);
Please login to merge, or discard this patch.
modules/AOS_Products_Quotes/Line_Items.php 3 patches
Braces   +9 added lines, -8 removed lines patch added patch discarded remove patch
@@ -84,8 +84,7 @@  discard block
 block discarded – undo
84 84
             $html .= '<script>insertGroup();</script>';
85 85
         }
86 86
 
87
-    }
88
-    else if($view == 'DetailView'){
87
+    } else if($view == 'DetailView'){
89 88
         $params = array('currency_id' => $focus->currency_id);
90 89
 
91 90
         $sql = "SELECT pg.id, pg.group_id FROM aos_products_quotes pg LEFT JOIN aos_line_item_groups lig ON pg.group_id = lig.id WHERE pg.parent_type = '".$focus->object_name."' AND pg.parent_id = '".$focus->id."' AND pg.deleted = 0 ORDER BY lig.number ASC, pg.number ASC";
@@ -111,7 +110,9 @@  discard block
 block discarded – undo
111 110
 
112 111
             if($enable_groups && ($group_id != $row['group_id'] || $i == 0)){
113 112
                 $html .= $groupStart.$product.$service.$groupEnd;
114
-                if($i != 0)$html .= "<tr><td colspan='9' nowrap='nowrap'><br></td></tr>";
113
+                if($i != 0) {
114
+                    $html .= "<tr><td colspan='9' nowrap='nowrap'><br></td></tr>";
115
+                }
115 116
                 $groupStart = '';
116 117
                 $groupEnd = '';
117 118
                 $product = '';
@@ -229,15 +230,13 @@  discard block
 block discarded – undo
229 230
         if($type == 'Amount')
230 231
         {
231 232
             return currency_format_number($amount,$params )."</td>";
232
-        }
233
-        else if($locale->getPrecision())
233
+        } else if($locale->getPrecision())
234 234
         {
235 235
             return rtrim(rtrim(format_number($amount), '0'),$sep[1])."%";
236 236
         } else{
237 237
             return format_number($amount)."%";
238 238
         }
239
-    }
240
-    else
239
+    } else
241 240
     {
242 241
         return "-";
243 242
     }
@@ -248,7 +247,9 @@  discard block
 block discarded – undo
248 247
     if($view == 'EditView'){
249 248
         global $app_list_strings;
250 249
 
251
-        if($value != '') $value = format_number($value);
250
+        if($value != '') {
251
+            $value = format_number($value);
252
+        }
252 253
 
253 254
         $html = "<input id='shipping_tax_amt' type='text' tabindex='0' title='' value='".$value."' maxlength='26,6' size='22' name='shipping_tax_amt' onblur='calculateTotal(\"lineItems\");'>";
254 255
         $html .= "<select name='shipping_tax' id='shipping_tax' onchange='calculateTotal(\"lineItems\");' >".get_select_options_with_id($app_list_strings['vat_list'], (isset($focus->shipping_tax) ? $focus->shipping_tax : ''))."</select>";
Please login to merge, or discard this patch.
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * @author SalesAgility <[email protected]>
23 23
  */
24 24
 
25
-function display_lines($focus, $field, $value, $view){
25
+function display_lines($focus, $field, $value, $view) {
26 26
 
27 27
     global $sugar_config, $locale, $app_list_strings, $mod_strings;
28 28
 
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
 
32 32
     $html = '';
33 33
 
34
-    if($view == 'EditView'){
34
+    if ($view == 'EditView') {
35 35
 
36 36
         $html .= '<script src="modules/AOS_Products_Quotes/line_items.js"></script>';
37
-        if(file_exists('custom/modules/AOS_Products_Quotes/line_items.js')){
37
+        if (file_exists('custom/modules/AOS_Products_Quotes/line_items.js')) {
38 38
             $html .= '<script src="custom/modules/AOS_Products_Quotes/line_items.js"></script>';
39 39
         }
40 40
         $html .= '<script language="javascript">var sig_digits = '.$locale->getPrecision().';';
@@ -45,18 +45,18 @@  discard block
 block discarded – undo
45 45
 
46 46
         $html .= "<table border='0' cellspacing='4' width='37.5%' id='lineItems'></table>";
47 47
 
48
-        if($enable_groups){
48
+        if ($enable_groups) {
49 49
             $html .= "<div style='padding-top: 10px; padding-bottom:10px;'>";
50 50
             $html .= "<input type=\"button\" tabindex=\"116\" class=\"button\" value=\"".$mod_strings['LBL_ADD_GROUP']."\" id=\"addGroup\" onclick=\"insertGroup(0)\" />";
51 51
             $html .= "</div>";
52 52
         }
53 53
         $html .= '<input type="hidden" name="vathidden" id="vathidden" value="'.get_select_options_with_id($app_list_strings['vat_list'], '').'">
54 54
 				  <input type="hidden" name="discounthidden" id="discounthidden" value="'.get_select_options_with_id($app_list_strings['discount_list'], '').'">';
55
-        if($focus->id != '') {
55
+        if ($focus->id != '') {
56 56
             require_once('modules/AOS_Products_Quotes/AOS_Products_Quotes.php');
57 57
             require_once('modules/AOS_Line_Item_Groups/AOS_Line_Item_Groups.php');
58 58
 
59
-            $sql = "SELECT pg.id, pg.group_id FROM aos_products_quotes pg LEFT JOIN aos_line_item_groups lig ON pg.group_id = lig.id WHERE pg.parent_type = '" . $focus->object_name . "' AND pg.parent_id = '" . $focus->id . "' AND pg.deleted = 0 ORDER BY lig.number ASC, pg.number ASC";
59
+            $sql = "SELECT pg.id, pg.group_id FROM aos_products_quotes pg LEFT JOIN aos_line_item_groups lig ON pg.group_id = lig.id WHERE pg.parent_type = '".$focus->object_name."' AND pg.parent_id = '".$focus->id."' AND pg.deleted = 0 ORDER BY lig.number ASC, pg.number ASC";
60 60
 
61 61
             $result = $focus->db->query($sql);
62 62
             $html .= "<script>
@@ -75,17 +75,17 @@  discard block
 block discarded – undo
75 75
                     $group_item = json_encode($group_item->toArray());
76 76
                 }
77 77
                 $html .= "<script>
78
-                        insertLineItems(" . $line_item . "," . $group_item . ");
78
+                        insertLineItems(" . $line_item.",".$group_item.");
79 79
                     </script>";
80 80
 
81 81
             }
82 82
         }
83
-        if(!$enable_groups){
83
+        if (!$enable_groups) {
84 84
             $html .= '<script>insertGroup();</script>';
85 85
         }
86 86
 
87 87
     }
88
-    else if($view == 'DetailView'){
88
+    else if ($view == 'DetailView') {
89 89
         $params = array('currency_id' => $focus->currency_id);
90 90
 
91 91
         $sql = "SELECT pg.id, pg.group_id FROM aos_products_quotes pg LEFT JOIN aos_line_item_groups lig ON pg.group_id = lig.id WHERE pg.parent_type = '".$focus->object_name."' AND pg.parent_id = '".$focus->id."' AND pg.deleted = 0 ORDER BY lig.number ASC, pg.number ASC";
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
             $line_item->retrieve($row['id']);
110 110
 
111 111
 
112
-            if($enable_groups && ($group_id != $row['group_id'] || $i == 0)){
112
+            if ($enable_groups && ($group_id != $row['group_id'] || $i == 0)) {
113 113
                 $html .= $groupStart.$product.$service.$groupEnd;
114
-                if($i != 0)$html .= "<tr><td colspan='9' nowrap='nowrap'><br></td></tr>";
114
+                if ($i != 0)$html .= "<tr><td colspan='9' nowrap='nowrap'><br></td></tr>";
115 115
                 $groupStart = '';
116 116
                 $groupEnd = '';
117 117
                 $product = '';
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
                 $groupEnd .= "<td class='tabDetailViewDL' style='text-align: right;padding:2px;'>".currency_format_number($group_item->total_amount, $params)."</td>";
153 153
                 $groupEnd .= "</tr>";
154 154
             }
155
-            if($line_item->product_id != '0' && $line_item->product_id != null){
156
-                if($productCount == 0)
155
+            if ($line_item->product_id != '0' && $line_item->product_id != null) {
156
+                if ($productCount == 0)
157 157
                 {
158 158
                     $product .= "<tr>";
159 159
                     $product .= "<td width='5%' class='tabDetailViewDL' style='text-align: left;padding:2px;' scope='row'>&nbsp;</td>";
@@ -169,26 +169,26 @@  discard block
 block discarded – undo
169 169
                 }
170 170
 
171 171
                 $product .= "<tr>";
172
-                $product_note = wordwrap($line_item->description,40,"<br />\n");
172
+                $product_note = wordwrap($line_item->description, 40, "<br />\n");
173 173
                 $product .= "<td class='tabDetailViewDF' style='text-align: left; padding:2px;'>".++$productCount."</td>";
174
-                $product .= "<td class='tabDetailViewDF' style='padding:2px;'>".stripDecimalPointsAndTrailingZeroes(format_number($line_item->product_qty),$sep[1])."</td>";
174
+                $product .= "<td class='tabDetailViewDF' style='padding:2px;'>".stripDecimalPointsAndTrailingZeroes(format_number($line_item->product_qty), $sep[1])."</td>";
175 175
 
176 176
                 $product .= "<td class='tabDetailViewDF' style='padding:2px;'><a href='index.php?module=AOS_Products&action=DetailView&record=".$line_item->product_id."' class='tabDetailViewDFLink'>".$line_item->name."</a><br />".$product_note."</td>";
177
-                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_list_price,$params)."</td>";
177
+                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_list_price, $params)."</td>";
178 178
 
179 179
                 $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".get_discount_string($line_item->discount, $line_item->product_discount, $params, $locale, $sep)."</td>";
180 180
 
181
-                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_unit_price,$params )."</td>";
182
-                if($locale->getPrecision()){
183
-                    $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".rtrim(rtrim(format_number($line_item->vat), '0'),$sep[1])."%</td>";
181
+                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_unit_price, $params)."</td>";
182
+                if ($locale->getPrecision()) {
183
+                    $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".rtrim(rtrim(format_number($line_item->vat), '0'), $sep[1])."%</td>";
184 184
                 } else {
185 185
                     $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".format_number($line_item->vat)."%</td>";
186 186
                 }
187
-                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->vat_amt,$params )."</td>";
188
-                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_total_price,$params )."</td>";
187
+                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->vat_amt, $params)."</td>";
188
+                $product .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_total_price, $params)."</td>";
189 189
                 $product .= "</tr>";
190 190
             } else {
191
-                if($serviceCount == 0)
191
+                if ($serviceCount == 0)
192 192
                 {
193 193
                     $service .= "<tr>";
194 194
                     $service .= "<td width='5%' class='tabDetailViewDL' style='text-align: left;padding:2px;' scope='row'>&nbsp;</td>";
@@ -205,15 +205,15 @@  discard block
 block discarded – undo
205 205
                 $service .= "<tr>";
206 206
                 $service .= "<td class='tabDetailViewDF' style='text-align: left; padding:2px;'>".++$serviceCount."</td>";
207 207
                 $service .= "<td class='tabDetailViewDF' style='padding:2px;' colspan='2'>".$line_item->name."</td>";
208
-                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_list_price,$params)."</td>";
208
+                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_list_price, $params)."</td>";
209 209
 
210 210
                 $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".get_discount_string($line_item->discount, $line_item->product_discount, $params, $locale, $sep)."</td>";
211 211
 
212 212
 
213
-                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_unit_price,$params)."</td>";
213
+                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_unit_price, $params)."</td>";
214 214
                 $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".rtrim(rtrim(format_number($line_item->vat), '0'), $sep[1])."%</td>";
215
-                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->vat_amt,$params )."</td>";
216
-                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_total_price,$params )."</td>";
215
+                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->vat_amt, $params)."</td>";
216
+                $service .= "<td class='tabDetailViewDF' style='text-align: right; padding:2px;'>".currency_format_number($line_item->product_total_price, $params)."</td>";
217 217
                 $service .= "</tr>";
218 218
 
219 219
             }
@@ -230,22 +230,22 @@  discard block
 block discarded – undo
230 230
 //field was 0.
231 231
 //The approach below will strip off the fractional part if it is only zeroes (and in this case the decimal separator
232 232
 //will also be stripped off) The custom decimal separator is passed in to the function from the locale settings
233
-function stripDecimalPointsAndTrailingZeroes($inputString,$decimalSeparator)
233
+function stripDecimalPointsAndTrailingZeroes($inputString, $decimalSeparator)
234 234
 {
235
-    return preg_replace('/'.preg_quote($decimalSeparator).'[0]+$/','',$inputString);
235
+    return preg_replace('/'.preg_quote($decimalSeparator).'[0]+$/', '', $inputString);
236 236
 }
237 237
 
238
-function get_discount_string($type, $amount, $params, $locale, $sep){
239
-    if($amount != '' && $amount != '0.00')
238
+function get_discount_string($type, $amount, $params, $locale, $sep) {
239
+    if ($amount != '' && $amount != '0.00')
240 240
     {
241
-        if($type == 'Amount')
241
+        if ($type == 'Amount')
242 242
         {
243
-            return currency_format_number($amount,$params )."</td>";
243
+            return currency_format_number($amount, $params)."</td>";
244 244
         }
245
-        else if($locale->getPrecision())
245
+        else if ($locale->getPrecision())
246 246
         {
247
-            return rtrim(rtrim(format_number($amount), '0'),$sep[1])."%";
248
-        } else{
247
+            return rtrim(rtrim(format_number($amount), '0'), $sep[1])."%";
248
+        } else {
249 249
             return format_number($amount)."%";
250 250
         }
251 251
     }
@@ -255,12 +255,12 @@  discard block
 block discarded – undo
255 255
     }
256 256
 }
257 257
 
258
-function display_shipping_vat($focus, $field, $value, $view){
258
+function display_shipping_vat($focus, $field, $value, $view) {
259 259
 
260
-    if($view == 'EditView'){
260
+    if ($view == 'EditView') {
261 261
         global $app_list_strings;
262 262
 
263
-        if($value != '') $value = format_number($value);
263
+        if ($value != '') $value = format_number($value);
264 264
 
265 265
         $html = "<input id='shipping_tax_amt' type='text' tabindex='0' title='' value='".$value."' maxlength='26,6' size='22' name='shipping_tax_amt' onblur='calculateTotal(\"lineItems\");'>";
266 266
         $html .= "<select name='shipping_tax' id='shipping_tax' onchange='calculateTotal(\"lineItems\");' >".get_select_options_with_id($app_list_strings['vat_list'], (isset($focus->shipping_tax) ? $focus->shipping_tax : ''))."</select>";
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -230,6 +230,9 @@
 block discarded – undo
230 230
 //field was 0.
231 231
 //The approach below will strip off the fractional part if it is only zeroes (and in this case the decimal separator
232 232
 //will also be stripped off) The custom decimal separator is passed in to the function from the locale settings
233
+/**
234
+ * @param string $inputString
235
+ */
233 236
 function stripDecimalPointsAndTrailingZeroes($inputString,$decimalSeparator)
234 237
 {
235 238
     return preg_replace('/'.preg_quote($decimalSeparator).'[0]+$/','',$inputString);
Please login to merge, or discard this patch.
modules/AOS_Products_Quotes/vardefs.php 2 patches
Indentation   +98 added lines, -98 removed lines patch added patch discarded remove patch
@@ -23,43 +23,43 @@  discard block
 block discarded – undo
23 23
  */
24 24
 
25 25
 $dictionary['AOS_Products_Quotes'] = array(
26
-	'table'=>'aos_products_quotes',
27
-	'audited'=>true,
28
-	'fields'=>array (
29
-  'name' => 
26
+    'table'=>'aos_products_quotes',
27
+    'audited'=>true,
28
+    'fields'=>array (
29
+    'name' => 
30 30
     array (
31
-      'name' => 'name',
32
-      'vname' => 'LBL_NAME',
33
-      'type' => 'text',
34
-      'link' => true,
35
-      'unified_search' => true,
36
-      'required' => true,
37
-      'importable' => 'required',
31
+        'name' => 'name',
32
+        'vname' => 'LBL_NAME',
33
+        'type' => 'text',
34
+        'link' => true,
35
+        'unified_search' => true,
36
+        'required' => true,
37
+        'importable' => 'required',
38 38
     ),
39 39
     'currency_id' =>
40
-     array (
41
-      'required' => false,
42
-      'name' => 'currency_id',
43
-      'vname' => 'LBL_CURRENCY',
44
-      'type' => 'id',
45
-      'massupdate' => 0,
46
-      'comments' => '',
47
-      'help' => '',
48
-      'importable' => 'true',
49
-      'duplicate_merge' => 'disabled',
50
-      'duplicate_merge_dom_value' => 0,
51
-      'audited' => false,
52
-      'reportable' => false,
53
-      'len' => 36,
54
-      'size' => '20',
55
-      'studio' => 'visible',
56
-      'function' =>
40
+        array (
41
+        'required' => false,
42
+        'name' => 'currency_id',
43
+        'vname' => 'LBL_CURRENCY',
44
+        'type' => 'id',
45
+        'massupdate' => 0,
46
+        'comments' => '',
47
+        'help' => '',
48
+        'importable' => 'true',
49
+        'duplicate_merge' => 'disabled',
50
+        'duplicate_merge_dom_value' => 0,
51
+        'audited' => false,
52
+        'reportable' => false,
53
+        'len' => 36,
54
+        'size' => '20',
55
+        'studio' => 'visible',
56
+        'function' =>
57 57
         array (
58 58
             'name' => 'getCurrencyDropDown',
59 59
             'returns' => 'html',
60 60
         ),
61 61
     ),
62
-  'part_number' =>
62
+    'part_number' =>
63 63
     array (
64 64
         'required' => false,
65 65
         'name' => 'part_number',
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
             'rows' => 6,
91 91
             'cols' => 80,
92 92
         ),
93
-  'number' => 
94
-  array (
93
+    'number' => 
94
+    array (
95 95
     'required' => false,
96 96
     'name' => 'number',
97 97
     'vname' => 'LBL_LIST_NUM',
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
     'reportable' => true,
107 107
     'len' => '11',
108 108
     'disable_num_format' => '',
109
-  ),
110
-  'product_qty' => 
111
-  array (
109
+    ),
110
+    'product_qty' => 
111
+    array (
112 112
     'required' => false,
113 113
     'name' => 'product_qty',
114 114
     'vname' => 'LBL_PRODUCT_QTY',
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
     'size' => '20',
126 126
     'enable_range_search' => false,
127 127
     'precision' => '4',
128
-  ),
129
-  'product_cost_price' => 
130
-  array (
128
+    ),
129
+    'product_cost_price' => 
130
+    array (
131 131
     'required' => false,
132 132
     'name' => 'product_cost_price',
133 133
     'vname' => 'LBL_PRODUCT_COST_PRICE',
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     'audited' => 0,
142 142
     'reportable' => true,
143 143
     'len' => '26,6',
144
-  ),
144
+    ),
145 145
         'product_cost_price_usdollar' =>
146 146
             array (
147 147
                 'name' => 'product_cost_price_usdollar',
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
                 ),
160 160
                 'len' => '26,6',
161 161
             ),
162
-  'product_list_price' => 
163
-  array (
162
+    'product_list_price' => 
163
+    array (
164 164
     'required' => false,
165 165
     'name' => 'product_list_price',
166 166
     'vname' => 'LBL_PRODUCT_LIST_PRICE',
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     'audited' => 1,
175 175
     'reportable' => true,
176 176
     'len' => '26,6',
177
-  ),
177
+    ),
178 178
         'product_list_price_usdollar' =>
179 179
             array (
180 180
                 'name' => 'product_list_price_usdollar',
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
                 ),
193 193
                 'len' => '26,6',
194 194
             ),
195
-  'product_discount' => 
196
-  array (
195
+    'product_discount' => 
196
+    array (
197 197
     'required' => false,
198 198
     'name' => 'product_discount',
199 199
     'vname' => 'LBL_PRODUCT_DISCOUNT',
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     'audited' => 1,
208 208
     'reportable' => true,
209 209
     'len' => '26,6',
210
-  ),
210
+    ),
211 211
         'product_discount_usdollar' =>
212 212
             array (
213 213
                 'name' => 'product_discount_usdollar',
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
                 ),
226 226
                 'len' => '26,6',
227 227
             ),
228
-  'product_discount_amount' => 
229
-  array (
228
+    'product_discount_amount' => 
229
+    array (
230 230
     'required' => false,
231 231
     'name' => 'product_discount_amount',
232 232
     'vname' => 'LBL_PRODUCT_DISCOUNT_AMOUNT',
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
     'audited' => 1,
241 241
     'reportable' => true,
242 242
     'len' => '26,6',
243
-  ),
243
+    ),
244 244
         'product_discount_amount_usdollar' =>
245 245
             array (
246 246
                 'name' => 'product_discount_amount_usdollar',
@@ -258,8 +258,8 @@  discard block
 block discarded – undo
258 258
                 ),
259 259
                 'len' => '26,6',
260 260
             ),
261
-  'discount' => 
262
-  array (
261
+    'discount' => 
262
+    array (
263 263
     'required' => false,
264 264
     'name' => 'discount',
265 265
     'vname' => 'LBL_DISCOUNT',
@@ -276,10 +276,10 @@  discard block
 block discarded – undo
276 276
     'len' => 255,
277 277
     'options' => 'discount_list',
278 278
     'studio' => 'visible',
279
-  ),
279
+    ),
280 280
 
281
-  'product_unit_price' => 
282
-  array (
281
+    'product_unit_price' => 
282
+    array (
283 283
     'required' => '1',
284 284
     'name' => 'product_unit_price',
285 285
     'vname' => 'LBL_PRODUCT_UNIT_PRICE',
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
     'audited' => 1,
294 294
     'reportable' => true,
295 295
     'len' => '26,6',
296
-  ),
296
+    ),
297 297
         'product_unit_price_usdollar' =>
298 298
             array (
299 299
                 'name' => 'product_unit_price_usdollar',
@@ -311,8 +311,8 @@  discard block
 block discarded – undo
311 311
                 ),
312 312
                 'len' => '26,6',
313 313
             ),
314
-  'vat_amt' => 
315
-  array (
314
+    'vat_amt' => 
315
+    array (
316 316
     'required' => '1',
317 317
     'name' => 'vat_amt',
318 318
     'vname' => 'LBL_VAT_AMT',
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
     'audited' => 1,
327 327
     'reportable' => true,
328 328
     'len' => '26,6',
329
-  ),
329
+    ),
330 330
         'vat_amt_usdollar' =>
331 331
             array (
332 332
                 'name' => 'vat_amt_usdollar',
@@ -344,8 +344,8 @@  discard block
 block discarded – undo
344 344
                 ),
345 345
                 'len' => '26,6',
346 346
             ),
347
-  'product_total_price' => 
348
-  array (
347
+    'product_total_price' => 
348
+    array (
349 349
     'required' => '1',
350 350
     'name' => 'product_total_price',
351 351
     'vname' => 'LBL_PRODUCT_TOTAL_PRICE',
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
     'audited' => 1,
360 360
     'reportable' => true,
361 361
     'len' => '26,6',
362
-  ),
362
+    ),
363 363
         'product_total_price_usdollar' =>
364 364
             array (
365 365
                 'name' => 'product_total_price_usdollar',
@@ -377,8 +377,8 @@  discard block
 block discarded – undo
377 377
                 ),
378 378
                 'len' => '26,6',
379 379
             ),
380
-  'vat' => 
381
-  array (
380
+    'vat' => 
381
+    array (
382 382
     'required' => false,
383 383
     'name' => 'vat',
384 384
     'vname' => 'LBL_VAT',
@@ -395,9 +395,9 @@  discard block
 block discarded – undo
395 395
     'len' => 100,
396 396
     'options' => 'vat_list',
397 397
     'studio' => 'visible',
398
-  ),
399
-  'parent_name' => 
400
-  array (
398
+    ),
399
+    'parent_name' => 
400
+    array (
401 401
     'required' => false,
402 402
     'source' => 'non-db',
403 403
     'name' => 'parent_name',
@@ -417,9 +417,9 @@  discard block
 block discarded – undo
417 417
     'type_name' => 'parent_type',
418 418
     'id_name' => 'parent_id',
419 419
     'parent_type' => 'record_type_display',
420
-  ),
421
-  'parent_type' => 
422
-  array (
420
+    ),
421
+    'parent_type' => 
422
+    array (
423 423
     'required' => false,
424 424
     'name' => 'parent_type',
425 425
     'vname' => 'LBL_PARENT_TYPE',
@@ -435,9 +435,9 @@  discard block
 block discarded – undo
435 435
     'len' => 100,
436 436
     'dbType' => 'varchar',
437 437
     'studio' => 'hidden',
438
-  ),
439
-  'parent_id' => 
440
-  array (
438
+    ),
439
+    'parent_id' => 
440
+    array (
441 441
     'required' => false,
442 442
     'name' => 'parent_id',
443 443
     'vname' => 'LBL_PARENT_ID',
@@ -451,9 +451,9 @@  discard block
 block discarded – undo
451 451
     'audited' => 0,
452 452
     'reportable' => 0,
453 453
     'len' => 36,
454
-  ),
455
-  'product_id' => 
456
-  array (
454
+    ),
455
+    'product_id' => 
456
+    array (
457 457
     'required' => false,
458 458
     'name' => 'product_id',
459 459
     'vname' => '',
@@ -467,9 +467,9 @@  discard block
 block discarded – undo
467 467
     'audited' => 0,
468 468
     'reportable' => 0,
469 469
     'len' => 36,
470
-  ),
471
-  'group_name' =>
472
-  array(
470
+    ),
471
+    'group_name' =>
472
+    array(
473 473
     'name'=>'group_name',
474 474
     'rname'=>'name',
475 475
     'vname' => 'LBL_GROUP_NAME',
@@ -480,9 +480,9 @@  discard block
 block discarded – undo
480 480
     'id_name' => 'group_id',
481 481
     'module'=>'AOS_Line_Item_Groups',
482 482
     'duplicate_merge'=>'disabled',
483
-  ),
484
-  'group_id' => 
485
-  array (
483
+    ),
484
+    'group_id' => 
485
+    array (
486 486
     'required' => false,
487 487
     'name' => 'group_id',
488 488
     'vname' => '',
@@ -496,37 +496,37 @@  discard block
 block discarded – undo
496 496
     'audited' => 0,
497 497
     'reportable' => 0,
498 498
     'len' => 36,
499
-  ),
500
-   'aos_products' =>
501
-  array (
502
-  'name' => 'aos_products',
499
+    ),
500
+    'aos_products' =>
501
+    array (
502
+    'name' => 'aos_products',
503 503
     'type' => 'link',
504 504
     'relationship' => 'aos_product_quotes_aos_products',
505 505
     'module'=>'AOS_Products',
506 506
     'bean_name'=>'AOS_Products',
507 507
     'source'=>'non-db',
508
- ),
508
+    ),
509 509
 ),
510 510
 'indices' => array (
511 511
     array (
512
-    	'name' => 'idx_aospq_par_del',
513
-    	'type' => 'index',
514
-    	'fields' => array('parent_id','parent_type','deleted')
512
+        'name' => 'idx_aospq_par_del',
513
+        'type' => 'index',
514
+        'fields' => array('parent_id','parent_type','deleted')
515 515
     )
516 516
 ),
517 517
 'relationships'=>array (
518
-	'aos_product_quotes_aos_products' =>
519
-	array (
520
-	'lhs_module'=> 'AOS_Products', 
521
-	'lhs_table'=> 'aos_products', 
522
-	'lhs_key' => 'id',
523
-	'rhs_module'=> 'AOS_Products_Quotes', 
524
-	'rhs_table'=> 'aos_products_quotes', 
525
-	'rhs_key' => 'product_id',
526
-	'relationship_type'=>'one-to-many',
527
-	),
518
+    'aos_product_quotes_aos_products' =>
519
+    array (
520
+    'lhs_module'=> 'AOS_Products', 
521
+    'lhs_table'=> 'aos_products', 
522
+    'lhs_key' => 'id',
523
+    'rhs_module'=> 'AOS_Products_Quotes', 
524
+    'rhs_table'=> 'aos_products_quotes', 
525
+    'rhs_key' => 'product_id',
526
+    'relationship_type'=>'one-to-many',
527
+    ),
528 528
 ),
529
-	'optimistic_lock'=>true,
529
+    'optimistic_lock'=>true,
530 530
 );
531 531
 require_once('include/SugarObjects/VardefManager.php');
532 532
 VardefManager::createVardef('AOS_Products_Quotes','AOS_Products_Quotes', array('basic','assignable'));
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 $dictionary['AOS_Products_Quotes'] = array(
26 26
 	'table'=>'aos_products_quotes',
27 27
 	'audited'=>true,
28
-	'fields'=>array (
28
+	'fields'=>array(
29 29
   'name' => 
30
-    array (
30
+    array(
31 31
       'name' => 'name',
32 32
       'vname' => 'LBL_NAME',
33 33
       'type' => 'text',
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
       'importable' => 'required',
38 38
     ),
39 39
     'currency_id' =>
40
-     array (
40
+     array(
41 41
       'required' => false,
42 42
       'name' => 'currency_id',
43 43
       'vname' => 'LBL_CURRENCY',
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
       'size' => '20',
55 55
       'studio' => 'visible',
56 56
       'function' =>
57
-        array (
57
+        array(
58 58
             'name' => 'getCurrencyDropDown',
59 59
             'returns' => 'html',
60 60
         ),
61 61
     ),
62 62
   'part_number' =>
63
-    array (
63
+    array(
64 64
         'required' => false,
65 65
         'name' => 'part_number',
66 66
         'vname' => 'LBL_PART_NUMBER',
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         'id' => 'AOS_Products_Quotespart_number',
83 83
     ),
84 84
     'item_description' =>
85
-        array (
85
+        array(
86 86
             'name' => 'item_description',
87 87
             'vname' => 'LBL_PRODUCT_DESCRIPTION',
88 88
             'type' => 'text',
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             'cols' => 80,
92 92
         ),
93 93
   'number' => 
94
-  array (
94
+  array(
95 95
     'required' => false,
96 96
     'name' => 'number',
97 97
     'vname' => 'LBL_LIST_NUM',
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     'disable_num_format' => '',
109 109
   ),
110 110
   'product_qty' => 
111
-  array (
111
+  array(
112 112
     'required' => false,
113 113
     'name' => 'product_qty',
114 114
     'vname' => 'LBL_PRODUCT_QTY',
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     'precision' => '4',
128 128
   ),
129 129
   'product_cost_price' => 
130
-  array (
130
+  array(
131 131
     'required' => false,
132 132
     'name' => 'product_cost_price',
133 133
     'vname' => 'LBL_PRODUCT_COST_PRICE',
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     'len' => '26,6',
144 144
   ),
145 145
         'product_cost_price_usdollar' =>
146
-            array (
146
+            array(
147 147
                 'name' => 'product_cost_price_usdollar',
148 148
                 'vname' => 'LBL_PRODUCT_COST_PRICE_USDOLLAR',
149 149
                 'type' => 'currency',
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                 'len' => '26,6',
161 161
             ),
162 162
   'product_list_price' => 
163
-  array (
163
+  array(
164 164
     'required' => false,
165 165
     'name' => 'product_list_price',
166 166
     'vname' => 'LBL_PRODUCT_LIST_PRICE',
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     'len' => '26,6',
177 177
   ),
178 178
         'product_list_price_usdollar' =>
179
-            array (
179
+            array(
180 180
                 'name' => 'product_list_price_usdollar',
181 181
                 'vname' => 'LBL_PRODUCT_LIST_PRICE_USDOLLAR',
182 182
                 'type' => 'currency',
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                 'len' => '26,6',
194 194
             ),
195 195
   'product_discount' => 
196
-  array (
196
+  array(
197 197
     'required' => false,
198 198
     'name' => 'product_discount',
199 199
     'vname' => 'LBL_PRODUCT_DISCOUNT',
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
     'len' => '26,6',
210 210
   ),
211 211
         'product_discount_usdollar' =>
212
-            array (
212
+            array(
213 213
                 'name' => 'product_discount_usdollar',
214 214
                 'vname' => 'LBL_PRODUCT_DISCOUNT_USDOLLAR',
215 215
                 'type' => 'currency',
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
                 'len' => '26,6',
227 227
             ),
228 228
   'product_discount_amount' => 
229
-  array (
229
+  array(
230 230
     'required' => false,
231 231
     'name' => 'product_discount_amount',
232 232
     'vname' => 'LBL_PRODUCT_DISCOUNT_AMOUNT',
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
     'len' => '26,6',
243 243
   ),
244 244
         'product_discount_amount_usdollar' =>
245
-            array (
245
+            array(
246 246
                 'name' => 'product_discount_amount_usdollar',
247 247
                 'vname' => 'LBL_PRODUCT_DISCOUNT_AMOUNT_USDOLLAR',
248 248
                 'type' => 'currency',
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
                 'len' => '26,6',
260 260
             ),
261 261
   'discount' => 
262
-  array (
262
+  array(
263 263
     'required' => false,
264 264
     'name' => 'discount',
265 265
     'vname' => 'LBL_DISCOUNT',
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
   ),
280 280
 
281 281
   'product_unit_price' => 
282
-  array (
282
+  array(
283 283
     'required' => '1',
284 284
     'name' => 'product_unit_price',
285 285
     'vname' => 'LBL_PRODUCT_UNIT_PRICE',
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
     'len' => '26,6',
296 296
   ),
297 297
         'product_unit_price_usdollar' =>
298
-            array (
298
+            array(
299 299
                 'name' => 'product_unit_price_usdollar',
300 300
                 'vname' => 'LBL_PRODUCT_UNIT_PRICE_USDOLLAR',
301 301
                 'type' => 'currency',
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
                 'len' => '26,6',
313 313
             ),
314 314
   'vat_amt' => 
315
-  array (
315
+  array(
316 316
     'required' => '1',
317 317
     'name' => 'vat_amt',
318 318
     'vname' => 'LBL_VAT_AMT',
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
     'len' => '26,6',
329 329
   ),
330 330
         'vat_amt_usdollar' =>
331
-            array (
331
+            array(
332 332
                 'name' => 'vat_amt_usdollar',
333 333
                 'vname' => 'LBL_VAT_AMT_USDOLLAR',
334 334
                 'type' => 'currency',
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
                 'len' => '26,6',
346 346
             ),
347 347
   'product_total_price' => 
348
-  array (
348
+  array(
349 349
     'required' => '1',
350 350
     'name' => 'product_total_price',
351 351
     'vname' => 'LBL_PRODUCT_TOTAL_PRICE',
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
     'len' => '26,6',
362 362
   ),
363 363
         'product_total_price_usdollar' =>
364
-            array (
364
+            array(
365 365
                 'name' => 'product_total_price_usdollar',
366 366
                 'vname' => 'LBL_PRODUCT_TOTAL_PRICE_USDOLLAR',
367 367
                 'type' => 'currency',
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
                 'len' => '26,6',
379 379
             ),
380 380
   'vat' => 
381
-  array (
381
+  array(
382 382
     'required' => false,
383 383
     'name' => 'vat',
384 384
     'vname' => 'LBL_VAT',
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
     'studio' => 'visible',
398 398
   ),
399 399
   'parent_name' => 
400
-  array (
400
+  array(
401 401
     'required' => false,
402 402
     'source' => 'non-db',
403 403
     'name' => 'parent_name',
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
     'parent_type' => 'record_type_display',
420 420
   ),
421 421
   'parent_type' => 
422
-  array (
422
+  array(
423 423
     'required' => false,
424 424
     'name' => 'parent_type',
425 425
     'vname' => 'LBL_PARENT_TYPE',
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
     'studio' => 'hidden',
438 438
   ),
439 439
   'parent_id' => 
440
-  array (
440
+  array(
441 441
     'required' => false,
442 442
     'name' => 'parent_id',
443 443
     'vname' => 'LBL_PARENT_ID',
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
     'len' => 36,
454 454
   ),
455 455
   'product_id' => 
456
-  array (
456
+  array(
457 457
     'required' => false,
458 458
     'name' => 'product_id',
459 459
     'vname' => '',
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
     'duplicate_merge'=>'disabled',
483 483
   ),
484 484
   'group_id' => 
485
-  array (
485
+  array(
486 486
     'required' => false,
487 487
     'name' => 'group_id',
488 488
     'vname' => '',
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
     'len' => 36,
499 499
   ),
500 500
    'aos_products' =>
501
-  array (
501
+  array(
502 502
   'name' => 'aos_products',
503 503
     'type' => 'link',
504 504
     'relationship' => 'aos_product_quotes_aos_products',
@@ -507,16 +507,16 @@  discard block
 block discarded – undo
507 507
     'source'=>'non-db',
508 508
  ),
509 509
 ),
510
-'indices' => array (
511
-    array (
510
+'indices' => array(
511
+    array(
512 512
     	'name' => 'idx_aospq_par_del',
513 513
     	'type' => 'index',
514
-    	'fields' => array('parent_id','parent_type','deleted')
514
+    	'fields' => array('parent_id', 'parent_type', 'deleted')
515 515
     )
516 516
 ),
517
-'relationships'=>array (
517
+'relationships'=>array(
518 518
 	'aos_product_quotes_aos_products' =>
519
-	array (
519
+	array(
520 520
 	'lhs_module'=> 'AOS_Products', 
521 521
 	'lhs_table'=> 'aos_products', 
522 522
 	'lhs_key' => 'id',
@@ -529,4 +529,4 @@  discard block
 block discarded – undo
529 529
 	'optimistic_lock'=>true,
530 530
 );
531 531
 require_once('include/SugarObjects/VardefManager.php');
532
-VardefManager::createVardef('AOS_Products_Quotes','AOS_Products_Quotes', array('basic','assignable'));
532
+VardefManager::createVardef('AOS_Products_Quotes', 'AOS_Products_Quotes', array('basic', 'assignable'));
Please login to merge, or discard this patch.
modules/Home/About.php 2 patches
Spacing   +5 added lines, -5 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
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
 <br>
53 53
 <b>
54 54
     <?php echo $mod_strings['LBL_VERSION']." ".$suitecrm_version;
55
-    if( is_file( "custom_version.php" ) ){
56
-        include( "custom_version.php" );
57
-        print( "&nbsp;&nbsp;&nbsp;" . $custom_version );
55
+    if (is_file("custom_version.php")) {
56
+        include("custom_version.php");
57
+        print("&nbsp;&nbsp;&nbsp;".$custom_version);
58 58
     }?>
59 59
 </b>
60
-<p>Sugar <?php echo $mod_strings['LBL_VERSION']." ".$sugar_version." (".$mod_strings['LBL_BUILD']." ".$sugar_build.")";?></p>
60
+<p>Sugar <?php echo $mod_strings['LBL_VERSION']." ".$sugar_version." (".$mod_strings['LBL_BUILD']." ".$sugar_build.")"; ?></p>
61 61
 <br>
62 62
 <h1><?php echo $mod_strings['LBL_CONTRIBUTOR_SUITECRM']; ?></h1>
63 63
 <table id="about_table" class="contentBox">
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/Home/language/en_us.lang.php 3 patches
Indentation   +133 added lines, -133 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     'LBL_EMAIL_ADDRESS' => 'Email Address:',
56 56
     'LBL_MY_PIPELINE_FORM_TITLE' => 'My Pipeline',
57 57
     'LBL_PIPELINE_FORM_TITLE' => 'Pipeline By Sales Stage',
58
-		'LBL_RGraph_PIPELINE_FORM_TITLE' => 'Pipeline By Sales Stage',
58
+        'LBL_RGraph_PIPELINE_FORM_TITLE' => 'Pipeline By Sales Stage',
59 59
     'LBL_CAMPAIGN_ROI_FORM_TITLE' => 'Campaign ROI',
60 60
     'LBL_MY_CLOSED_OPPORTUNITIES_GAUGE' => 'My Closed Won Opportunities Gauge',
61 61
     'LNK_NEW_CONTACT' => 'Create Contact',
@@ -80,35 +80,35 @@  discard block
 block discarded – undo
80 80
     'LBL_NO_RESULTS' => '<h2>There were no results found. Please search again.</h2><br>',
81 81
     'LBL_NO_RESULTS_TIPS' => '<h3>Search Tips:</h3><ul><li>Make sure you have the proper categories selected above.</li><li>Broaden your search criteria.</li><li>If you still cannot find any results try the advanced search option.</li></ul>',
82 82
 
83
-  'LBL_RELOAD_PAGE' => 'Please <a href="javascript: window.location.reload()">reload the window</a> to use this SuiteCRM Dashlet.',
84
-  'LBL_ADD_DASHLETS' => 'Add SuiteCRM Dashlets',
85
-  'LBL_ADD_PAGE' => 'Add Page',
86
-  'LBL_DEL_PAGE' => 'Delete Page',
87
-  'LBL_WEBSITE_TITLE' => 'Website',
88
-  'LBL_RSS_TITLE' => 'News Feed',
89
-  'LBL_DELETE_PAGE' => 'Delete Page',
90
-  'LBL_CHANGE_LAYOUT' => 'Change Layout',
91
-  'LBL_RENAME_PAGE' => 'Rename Page',
92
-  'LBL_CLOSE_DASHLETS' => 'Close',
93
-  'LBL_OPTIONS' => 'Options',
94
-  // dashlet search fields
95
-  'LBL_TODAY'=>'Today',
96
-  'LBL_YESTERDAY' => 'Yesterday',
97
-  'LBL_TOMORROW'=>'Tomorrow',
98
-  'LBL_LAST_WEEK'=>'Last Week',
99
-  'LBL_NEXT_WEEK'=>'Next Week',
100
-  'LBL_LAST_7_DAYS'=>'Last 7 Days',
101
-  'LBL_NEXT_7_DAYS'=>'Next 7 Days',
102
-  'LBL_LAST_MONTH'=>'Last Month',
103
-  'LBL_NEXT_MONTH'=>'Next Month',
104
-  'LBL_LAST_QUARTER'=>'Last Quarter',
105
-  'LBL_THIS_QUARTER'=>'This Quarter',
106
-  'LBL_LAST_YEAR'=>'Last Year',
107
-  'LBL_NEXT_YEAR'=>'Next Year',
108
-  'LBL_LAST_30_DAYS' => 'Last 30 Days',
109
-  'LBL_NEXT_30_DAYS' => 'Next 30 Days',
110
-  'LBL_THIS_MONTH' => 'This Month',
111
-  'LBL_THIS_YEAR' => 'This Year',
83
+    'LBL_RELOAD_PAGE' => 'Please <a href="javascript: window.location.reload()">reload the window</a> to use this SuiteCRM Dashlet.',
84
+    'LBL_ADD_DASHLETS' => 'Add SuiteCRM Dashlets',
85
+    'LBL_ADD_PAGE' => 'Add Page',
86
+    'LBL_DEL_PAGE' => 'Delete Page',
87
+    'LBL_WEBSITE_TITLE' => 'Website',
88
+    'LBL_RSS_TITLE' => 'News Feed',
89
+    'LBL_DELETE_PAGE' => 'Delete Page',
90
+    'LBL_CHANGE_LAYOUT' => 'Change Layout',
91
+    'LBL_RENAME_PAGE' => 'Rename Page',
92
+    'LBL_CLOSE_DASHLETS' => 'Close',
93
+    'LBL_OPTIONS' => 'Options',
94
+    // dashlet search fields
95
+    'LBL_TODAY'=>'Today',
96
+    'LBL_YESTERDAY' => 'Yesterday',
97
+    'LBL_TOMORROW'=>'Tomorrow',
98
+    'LBL_LAST_WEEK'=>'Last Week',
99
+    'LBL_NEXT_WEEK'=>'Next Week',
100
+    'LBL_LAST_7_DAYS'=>'Last 7 Days',
101
+    'LBL_NEXT_7_DAYS'=>'Next 7 Days',
102
+    'LBL_LAST_MONTH'=>'Last Month',
103
+    'LBL_NEXT_MONTH'=>'Next Month',
104
+    'LBL_LAST_QUARTER'=>'Last Quarter',
105
+    'LBL_THIS_QUARTER'=>'This Quarter',
106
+    'LBL_LAST_YEAR'=>'Last Year',
107
+    'LBL_NEXT_YEAR'=>'Next Year',
108
+    'LBL_LAST_30_DAYS' => 'Last 30 Days',
109
+    'LBL_NEXT_30_DAYS' => 'Next 30 Days',
110
+    'LBL_THIS_MONTH' => 'This Month',
111
+    'LBL_THIS_YEAR' => 'This Year',
112 112
 
113 113
     'LBL_MODULES' => 'Modules',
114 114
     'LBL_CHARTS' => 'Charts',
@@ -116,44 +116,44 @@  discard block
 block discarded – undo
116 116
     'LBL_WEB' => 'Web',
117 117
     'LBL_SEARCH_RESULTS' => 'Search Result',
118 118
 
119
-  // Dashlet Categories
120
-  'dashlet_categories_dom' => array(
121
-      'Module Views' => 'Module Views',
122
-      'Portal' => 'Portal',
123
-      'Charts' => 'Charts',
124
-      'Tools' => 'Tools',
125
-      'Miscellaneous' => 'Miscellaneous'),
126
-  'LBL_MAX_DASHLETS_REACHED' => 'You have reached the maximum number of SuiteCRM Dashlets your administrator has set. Please remove a SuiteCRM Dashlet to add a new one.',
127
-  'LBL_ADDING_DASHLET' => 'Adding SuiteCRM Dashlet ...',
128
-  'LBL_ADDED_DASHLET' => 'SuiteCRM Dashlet Added',
129
-  'LBL_REMOVE_DASHLET_CONFIRM' => 'Are you sure you want to remove this SuiteCRM Dashlet?',
130
-  'LBL_REMOVING_DASHLET' => 'Removing SuiteCRM Dashlet ...',
131
-  'LBL_REMOVED_DASHLET' => 'SuiteCRM Dashlet Removed',
132
-  'LBL_DASHLET_CONFIGURE_GENERAL' => 'General',
133
-  'LBL_DASHLET_CONFIGURE_FILTERS' => 'Filters',
134
-  'LBL_DASHLET_CONFIGURE_MY_ITEMS_ONLY' => 'Only My Items',
135
-  'LBL_DASHLET_CONFIGURE_TITLE' => 'Title',
136
-  'LBL_DASHLET_CONFIGURE_DISPLAY_ROWS' => 'Display Rows',
119
+    // Dashlet Categories
120
+    'dashlet_categories_dom' => array(
121
+        'Module Views' => 'Module Views',
122
+        'Portal' => 'Portal',
123
+        'Charts' => 'Charts',
124
+        'Tools' => 'Tools',
125
+        'Miscellaneous' => 'Miscellaneous'),
126
+    'LBL_MAX_DASHLETS_REACHED' => 'You have reached the maximum number of SuiteCRM Dashlets your administrator has set. Please remove a SuiteCRM Dashlet to add a new one.',
127
+    'LBL_ADDING_DASHLET' => 'Adding SuiteCRM Dashlet ...',
128
+    'LBL_ADDED_DASHLET' => 'SuiteCRM Dashlet Added',
129
+    'LBL_REMOVE_DASHLET_CONFIRM' => 'Are you sure you want to remove this SuiteCRM Dashlet?',
130
+    'LBL_REMOVING_DASHLET' => 'Removing SuiteCRM Dashlet ...',
131
+    'LBL_REMOVED_DASHLET' => 'SuiteCRM Dashlet Removed',
132
+    'LBL_DASHLET_CONFIGURE_GENERAL' => 'General',
133
+    'LBL_DASHLET_CONFIGURE_FILTERS' => 'Filters',
134
+    'LBL_DASHLET_CONFIGURE_MY_ITEMS_ONLY' => 'Only My Items',
135
+    'LBL_DASHLET_CONFIGURE_TITLE' => 'Title',
136
+    'LBL_DASHLET_CONFIGURE_DISPLAY_ROWS' => 'Display Rows',
137 137
 
138
-  'LBL_DASHLET_DELETE' => 'Delete SuiteCRM Dashlet',
139
-  'LBL_DASHLET_REFRESH' => 'Refresh SuiteCRM Dashlet',
140
-  'LBL_DASHLET_EDIT' => 'Edit SuiteCRM Dashlet',
138
+    'LBL_DASHLET_DELETE' => 'Delete SuiteCRM Dashlet',
139
+    'LBL_DASHLET_REFRESH' => 'Refresh SuiteCRM Dashlet',
140
+    'LBL_DASHLET_EDIT' => 'Edit SuiteCRM Dashlet',
141 141
 
142 142
     'LBL_TRAINING_TITLE' => 'Training',
143 143
 
144
-  'LBL_CREATING_NEW_PAGE' => 'Creating New Page...',
145
-  'LBL_NEW_PAGE_FEEDBACK' => 'You have created a new page. You can add new content with the Add SuiteCRM Dashlets option.',
146
-  'LBL_DELETE_PAGE_CONFIRM' => 'Are you sure you want to delete this page?',
147
-  'LBL_SAVING_PAGE_TITLE' => 'Saving Page Title...',
148
-  'LBL_RETRIEVING_PAGE' => 'Retrieving Page...',
144
+    'LBL_CREATING_NEW_PAGE' => 'Creating New Page...',
145
+    'LBL_NEW_PAGE_FEEDBACK' => 'You have created a new page. You can add new content with the Add SuiteCRM Dashlets option.',
146
+    'LBL_DELETE_PAGE_CONFIRM' => 'Are you sure you want to delete this page?',
147
+    'LBL_SAVING_PAGE_TITLE' => 'Saving Page Title...',
148
+    'LBL_RETRIEVING_PAGE' => 'Retrieving Page...',
149 149
 
150
-  // Default out-of-box names for tabs
151
-  'LBL_HOME_PAGE_1_NAME' => 'My SuiteCRM',
152
-  'LBL_HOME_PAGE_2_NAME' => 'Sales',
153
-  'LBL_HOME_PAGE_3_NAME' => 'Support',
154
-  'LBL_HOME_PAGE_6_NAME' => 'Marketing',//bug 16510, separate the support and marketing page from each other
155
-  'LBL_HOME_PAGE_4_NAME' => 'Tracker',
156
-  'LBL_CLOSE_SITEMAP' => 'Close',
150
+    // Default out-of-box names for tabs
151
+    'LBL_HOME_PAGE_1_NAME' => 'My SuiteCRM',
152
+    'LBL_HOME_PAGE_2_NAME' => 'Sales',
153
+    'LBL_HOME_PAGE_3_NAME' => 'Support',
154
+    'LBL_HOME_PAGE_6_NAME' => 'Marketing',//bug 16510, separate the support and marketing page from each other
155
+    'LBL_HOME_PAGE_4_NAME' => 'Tracker',
156
+    'LBL_CLOSE_SITEMAP' => 'Close',
157 157
 
158 158
     'LBL_SEARCH' => 'Search',
159 159
     'LBL_CLEAR' => 'Clear',
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     'LBL_MY_TEAM_REPORT_CHARTS' => 'My Team Reports',
167 167
     'LBL_MY_SAVED_REPORT_CHARTS' => 'My Saved Reports',
168 168
 
169
-  'LBL_DASHLET_SEARCH' => 'Find SuiteCRM Dashlet',
169
+    'LBL_DASHLET_SEARCH' => 'Find SuiteCRM Dashlet',
170 170
 
171 171
 //ABOUT page
172 172
     'LBL_VERSION' => 'Version',
@@ -177,77 +177,77 @@  discard block
 block discarded – undo
177 177
     'LBL_ADD_TERM_COM' => '<P>The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License version 3. In accordance with Section 7(b) of the GNU General Public License version 3, these Appropriate Legal Notices must retain the display of the &quot;Powered by SugarCRM&quot; logo. If the display of the logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices must display the words &quot;Powered by SugarCRM&quot;.</P>',
178 178
 
179 179
 
180
-  'LBL_SUGAR_COMMUNITY_EDITION' => 'Sugar Community Edition',
181
-  'LBL_AND' => "and",
182
-  'LBL_ARE' => "are",
183
-  'LBL_TRADEMARKS' => 'trademarks',
184
-  'LBL_OF' => 'of',
185
-  'LBL_FOUNDERS' => 'Founders',
186
-  'LBL_JOIN_SUGAR_COMMUNITY' => 'Join the SuiteCRM Community',
187
-  'LBL_DETAILS_SUGARFORGE' => 'Collaborate and develop SuiteCRM extensions',
188
-  'LBL_DETAILS_SUGAREXCHANGE' => 'Buy and sell certified SuiteCRM extensions',
189
-  'LBL_TRAINING' => 'Training',
190
-  'LBL_DETAILS_TRAINING' => 'Learn about SuiteCRM using online and interactive learning content',
191
-  'LBL_FORUMS' => 'Forums',
192
-  'LBL_DETAILS_FORUMS' => 'Discuss SuiteCRM with expert community users and developers',
193
-  'LBL_WIKI' => 'Wiki',
194
-  'LBL_DETAILS_WIKI' => 'Search the knowledge base of user and developer topics',
195
-  'LBL_DEVSITE' => 'Developer Site',
196
-  'LBL_DETAILS_DEVSITE' => 'Discover resources, tutorials, and helpful links to get you up to speed on SuiteCRM development',
197
- 'LBL_GET_SUGARCRM_RSS' => 'Get SuiteCRM RSS',
198
-  'LBL_SUGARCRM_NEWS' => 'SuiteCRM News',
199
-  'LBL_SUGARCRM_TRAINING_NEWS' => 'SuiteCRM Training News',
200
-  'LBL_SUGARCRM_FORUMS' => 'SuiteCRM Forums',
201
-  'LBL_SUGARFORGE_NEWS' => 'SuiteCRM News',
202
-  'LBL_ALL_NEWS' => 'All News',
203
-  'LBL_SOURCE_CODE' => 'Source Code',
180
+    'LBL_SUGAR_COMMUNITY_EDITION' => 'Sugar Community Edition',
181
+    'LBL_AND' => "and",
182
+    'LBL_ARE' => "are",
183
+    'LBL_TRADEMARKS' => 'trademarks',
184
+    'LBL_OF' => 'of',
185
+    'LBL_FOUNDERS' => 'Founders',
186
+    'LBL_JOIN_SUGAR_COMMUNITY' => 'Join the SuiteCRM Community',
187
+    'LBL_DETAILS_SUGARFORGE' => 'Collaborate and develop SuiteCRM extensions',
188
+    'LBL_DETAILS_SUGAREXCHANGE' => 'Buy and sell certified SuiteCRM extensions',
189
+    'LBL_TRAINING' => 'Training',
190
+    'LBL_DETAILS_TRAINING' => 'Learn about SuiteCRM using online and interactive learning content',
191
+    'LBL_FORUMS' => 'Forums',
192
+    'LBL_DETAILS_FORUMS' => 'Discuss SuiteCRM with expert community users and developers',
193
+    'LBL_WIKI' => 'Wiki',
194
+    'LBL_DETAILS_WIKI' => 'Search the knowledge base of user and developer topics',
195
+    'LBL_DEVSITE' => 'Developer Site',
196
+    'LBL_DETAILS_DEVSITE' => 'Discover resources, tutorials, and helpful links to get you up to speed on SuiteCRM development',
197
+    'LBL_GET_SUGARCRM_RSS' => 'Get SuiteCRM RSS',
198
+    'LBL_SUGARCRM_NEWS' => 'SuiteCRM News',
199
+    'LBL_SUGARCRM_TRAINING_NEWS' => 'SuiteCRM Training News',
200
+    'LBL_SUGARCRM_FORUMS' => 'SuiteCRM Forums',
201
+    'LBL_SUGARFORGE_NEWS' => 'SuiteCRM News',
202
+    'LBL_ALL_NEWS' => 'All News',
203
+    'LBL_SOURCE_CODE' => 'Source Code',
204 204
     'LBL_SOURCE_SUGAR' => 'SugarCRM Inc - providers of CE framework',
205
-  'LBL_SOURCE_XTEMPLATE' => 'XTemplate - A template engine for PHP created by Barnabás Debreceni',
206
-  'LBL_SOURCE_NUSOAP' => 'NuSOAP - A set of PHP classes that allow developers to create and consume web services created by NuSphere Corporation and Dietrich Ayala',
207
-  'LBL_SOURCE_JSCALENDAR' => 'JS Calendar - A calendar for entering dates created by Mihai Bazon',
208
-  'LBL_SOURCE_PHPPDF' => 'PHP PDF - A library for creating PDF documents created by Wayne Munro',
209
-  'LBL_SOURCE_HTTP_WEBDAV_SERVER' => 'HTTP_WebDAV_Server - A WebDAV Server Implementation in PHP.',
210
-  'LBL_SOURCE_PCLZIP' => 'PclZip - library offers compression and extraction functions for Zip formatted archives by Vincent Blavet',
211
-  'LBL_SOURCE_SMARTY' => 'Smarty - A template engine for PHP.',
212
-  'LBL_SOURCE_YAHOO_UI_LIB' => 'Yahoo! User Interface Library - The UI Library Utilities facilitate the implementation of rich client-side features.',
213
-  'LBL_SOURCE_PHPMAILER' => 'PHPMailer - A full featured email transfer class for PHP',
214
-  'LBL_SOURCE_JSHRINK' => 'JShrink - A Javascript minifier written in PHP',
215
-  'LBL_SOURCE_CRYPT_BLOWFISH' => 'Crypt_Blowfish - Allows for quick two-way blowfish encryption without requiring the MCrypt PHP extension.',
216
-  'LBL_SOURCE_XML_HTMLSAX3' => 'XML_HTMLSax3 - A SAX parser for HTML and other badly formed XML documents',
217
-  'LBL_SOURCE_YAHOO_UI_LIB_EXT' => 'Yahoo! UI Extensions Library - Extensions to the Yahoo! User Interface Library by Jack Slocum',
218
-  'LBL_SOURCE_SWFOBJECT' => 'SWFObject - Javascript Flash Player detection and embed script.',
219
-  'LBL_SOURCE_TINYMCE' => 'TinyMCE - A WYSIWYG editor control for web browsers that enables the user to edit HTML contents',
220
-  'LBL_SOURCE_EXT' => 'Ext - A client-side JavaScript framework for building web applications.',
221
-  'LBL_SOURCE_RECAPTCHA' => 'reCAPTCHA - A free CAPTCHA service that helps to digitize books, newspapers and old time radio shows.',
222
-  'LBL_SOURCE_TCPDF' => 'TCPDF - A PHP class for generating PDF documents.',
223
-  'LBL_SOURCE_CSSMIN' => 'CssMin - A css parser and minifier.',
224
-  'LBL_SOURCE_PHPSAML' => 'PHP-SAML - A simple SAML toolkit for PHP.',
225
-  'LBL_SOURCE_ISCROLL' => 'iScroll - The overflow:scroll for mobile webkit.  Native scrolling inside a fixed width/height element.',
226
-  'LBL_SOURCE_FLASHCANVAS' => 'FlashCanvas - FlashCanvas is a JavaScript library which adds the HTML5 Canvas support to Internet Explorer. It renders shapes and images via Flash drawing API. It supports almost all Canvas APIs and, in many cases, runs faster than other similar libraries which use VML or Silverlight.',
227
-  'LBL_SOURCE_JIT' => 'JavaScript InfoVis Toolkit - The JavaScript InfoVis Toolkit provides tools for creating Interactive Data Visualizations for the Web.',
228
-  'LBL_SOURCE_ZEND' => 'Zend Framework - An open source, object oriented web application framework for PHP5.',
229
-  'LBL_SOURCE_PARSECSV' => 'parseCSV - CSV data parser for PHP',
230
-  'LBL_SOURCE_PHPJS' => 'php.js - Use PHP functions in JavaScript',
231
-  'LBL_SOURCE_PHPSQL' => 'PHP SQL Parser',
232
-  'LBL_SOURCE_HTMLPURIFIER' => 'HTML Purifier - A standards-compliant HTML filtering library.',
233
-  'LBL_SOURCE_XHPROF' => 'XHProf - A function-level hierarchical profiler for PHP.',
234
-  'LBL_SOURCE_ELASTICA' => 'Elastica - PHP client for the distributed search engine elasticsearch ',
235
-  'LBL_SOURCE_FACEBOOKSDK' => 'Facebook PHP SDK',
236
-  'LBL_SOURCE_JQUERY' => 'jQuery - jQuery is a fast, small, and feature-rich JavaScript library.',
237
-  'LBL_SOURCE_JQUERY_UI' => 'jQuery UI - jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.',
238
-  'LBL_SOURCE_OVERLIB' => 'OverlibMWS - The overlibmws library uses javascript for DHTML popups that serve as informational and navigational aids for websites.',
205
+    'LBL_SOURCE_XTEMPLATE' => 'XTemplate - A template engine for PHP created by Barnabás Debreceni',
206
+    'LBL_SOURCE_NUSOAP' => 'NuSOAP - A set of PHP classes that allow developers to create and consume web services created by NuSphere Corporation and Dietrich Ayala',
207
+    'LBL_SOURCE_JSCALENDAR' => 'JS Calendar - A calendar for entering dates created by Mihai Bazon',
208
+    'LBL_SOURCE_PHPPDF' => 'PHP PDF - A library for creating PDF documents created by Wayne Munro',
209
+    'LBL_SOURCE_HTTP_WEBDAV_SERVER' => 'HTTP_WebDAV_Server - A WebDAV Server Implementation in PHP.',
210
+    'LBL_SOURCE_PCLZIP' => 'PclZip - library offers compression and extraction functions for Zip formatted archives by Vincent Blavet',
211
+    'LBL_SOURCE_SMARTY' => 'Smarty - A template engine for PHP.',
212
+    'LBL_SOURCE_YAHOO_UI_LIB' => 'Yahoo! User Interface Library - The UI Library Utilities facilitate the implementation of rich client-side features.',
213
+    'LBL_SOURCE_PHPMAILER' => 'PHPMailer - A full featured email transfer class for PHP',
214
+    'LBL_SOURCE_JSHRINK' => 'JShrink - A Javascript minifier written in PHP',
215
+    'LBL_SOURCE_CRYPT_BLOWFISH' => 'Crypt_Blowfish - Allows for quick two-way blowfish encryption without requiring the MCrypt PHP extension.',
216
+    'LBL_SOURCE_XML_HTMLSAX3' => 'XML_HTMLSax3 - A SAX parser for HTML and other badly formed XML documents',
217
+    'LBL_SOURCE_YAHOO_UI_LIB_EXT' => 'Yahoo! UI Extensions Library - Extensions to the Yahoo! User Interface Library by Jack Slocum',
218
+    'LBL_SOURCE_SWFOBJECT' => 'SWFObject - Javascript Flash Player detection and embed script.',
219
+    'LBL_SOURCE_TINYMCE' => 'TinyMCE - A WYSIWYG editor control for web browsers that enables the user to edit HTML contents',
220
+    'LBL_SOURCE_EXT' => 'Ext - A client-side JavaScript framework for building web applications.',
221
+    'LBL_SOURCE_RECAPTCHA' => 'reCAPTCHA - A free CAPTCHA service that helps to digitize books, newspapers and old time radio shows.',
222
+    'LBL_SOURCE_TCPDF' => 'TCPDF - A PHP class for generating PDF documents.',
223
+    'LBL_SOURCE_CSSMIN' => 'CssMin - A css parser and minifier.',
224
+    'LBL_SOURCE_PHPSAML' => 'PHP-SAML - A simple SAML toolkit for PHP.',
225
+    'LBL_SOURCE_ISCROLL' => 'iScroll - The overflow:scroll for mobile webkit.  Native scrolling inside a fixed width/height element.',
226
+    'LBL_SOURCE_FLASHCANVAS' => 'FlashCanvas - FlashCanvas is a JavaScript library which adds the HTML5 Canvas support to Internet Explorer. It renders shapes and images via Flash drawing API. It supports almost all Canvas APIs and, in many cases, runs faster than other similar libraries which use VML or Silverlight.',
227
+    'LBL_SOURCE_JIT' => 'JavaScript InfoVis Toolkit - The JavaScript InfoVis Toolkit provides tools for creating Interactive Data Visualizations for the Web.',
228
+    'LBL_SOURCE_ZEND' => 'Zend Framework - An open source, object oriented web application framework for PHP5.',
229
+    'LBL_SOURCE_PARSECSV' => 'parseCSV - CSV data parser for PHP',
230
+    'LBL_SOURCE_PHPJS' => 'php.js - Use PHP functions in JavaScript',
231
+    'LBL_SOURCE_PHPSQL' => 'PHP SQL Parser',
232
+    'LBL_SOURCE_HTMLPURIFIER' => 'HTML Purifier - A standards-compliant HTML filtering library.',
233
+    'LBL_SOURCE_XHPROF' => 'XHProf - A function-level hierarchical profiler for PHP.',
234
+    'LBL_SOURCE_ELASTICA' => 'Elastica - PHP client for the distributed search engine elasticsearch ',
235
+    'LBL_SOURCE_FACEBOOKSDK' => 'Facebook PHP SDK',
236
+    'LBL_SOURCE_JQUERY' => 'jQuery - jQuery is a fast, small, and feature-rich JavaScript library.',
237
+    'LBL_SOURCE_JQUERY_UI' => 'jQuery UI - jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.',
238
+    'LBL_SOURCE_OVERLIB' => 'OverlibMWS - The overlibmws library uses javascript for DHTML popups that serve as informational and navigational aids for websites.',
239 239
 
240
-  'LBL_DASHLET_TITLE' => 'My Sites',
241
-  'LBL_DASHLET_OPT_TITLE' => 'Title',
242
-  'LBL_DASHLET_INCORRECT_URL' => 'Incorrect website location is specified',
243
-  'LBL_DASHLET_OPT_URL' => 'Website Location',
244
-  'LBL_DASHLET_OPT_HEIGHT' => 'Dashlet Height (in pixels)',
245
-  'LBL_DASHLET_SUGAR_NEWS' => 'SuiteCRM News',
246
-  'LBL_DASHLET_DISCOVER_SUGAR_PRO' => 'Discover SuiteCRM',
247
-	'LBL_POWERED_BY_SUGAR' => 'Powered By SugarCRM' /*for 508 compliance fix*/,
248
-	'LBL_MORE_DETAIL' => 'More Detail' /*for 508 compliance fix*/,
249
-	'LBL_BASIC_SEARCH' => 'Basic Search' /*for 508 compliance fix*/,
250
-	'LBL_ADVANCED_SEARCH' => 'Advanced Search' /*for 508 compliance fix*/,
240
+    'LBL_DASHLET_TITLE' => 'My Sites',
241
+    'LBL_DASHLET_OPT_TITLE' => 'Title',
242
+    'LBL_DASHLET_INCORRECT_URL' => 'Incorrect website location is specified',
243
+    'LBL_DASHLET_OPT_URL' => 'Website Location',
244
+    'LBL_DASHLET_OPT_HEIGHT' => 'Dashlet Height (in pixels)',
245
+    'LBL_DASHLET_SUGAR_NEWS' => 'SuiteCRM News',
246
+    'LBL_DASHLET_DISCOVER_SUGAR_PRO' => 'Discover SuiteCRM',
247
+    'LBL_POWERED_BY_SUGAR' => 'Powered By SugarCRM' /*for 508 compliance fix*/,
248
+    'LBL_MORE_DETAIL' => 'More Detail' /*for 508 compliance fix*/,
249
+    'LBL_BASIC_SEARCH' => 'Basic Search' /*for 508 compliance fix*/,
250
+    'LBL_ADVANCED_SEARCH' => 'Advanced Search' /*for 508 compliance fix*/,
251 251
     'LBL_TOUR_HOME' => 'Home Icon',
252 252
     'LBL_TOUR_HOME_DESCRIPTION' => 'Quickly get back to your Home Page dashboard in one click.',
253 253
     'LBL_TOUR_MODULES' => 'Modules',
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
  * Contributor(s): ______________________________________..
45 45
  ********************************************************************************/
46 46
 
47
-$mod_strings  = array(
47
+$mod_strings = array(
48 48
     'LBL_MODULE_NAME' => 'Home',
49 49
     'LBL_MODULES_TO_SEARCH' => 'Modules to Search',
50 50
     'LBL_NEW_FORM_TITLE' => 'New Contact',
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
   'LBL_HOME_PAGE_1_NAME' => 'My SuiteCRM',
152 152
   'LBL_HOME_PAGE_2_NAME' => 'Sales',
153 153
   'LBL_HOME_PAGE_3_NAME' => 'Support',
154
-  'LBL_HOME_PAGE_6_NAME' => 'Marketing',//bug 16510, separate the support and marketing page from each other
154
+  'LBL_HOME_PAGE_6_NAME' => 'Marketing', //bug 16510, separate the support and marketing page from each other
155 155
   'LBL_HOME_PAGE_4_NAME' => 'Tracker',
156 156
   'LBL_CLOSE_SITEMAP' => 'Close',
157 157
 
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.