Test Failed
Push — CI ( 785a66...02428e )
by Adam
54:23
created
modules/ProjectTask/metadata/detailviewdefs.php 2 patches
Indentation   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -1,156 +1,156 @@
 block discarded – undo
1 1
 <?php
2 2
 $viewdefs ['ProjectTask'] = 
3 3
 array (
4
-  'DetailView' => 
5
-  array (
4
+    'DetailView' => 
5
+    array (
6 6
     'templateMeta' => 
7 7
     array (
8
-      'maxColumns' => '2',
9
-      'widths' => 
10
-      array (
8
+        'maxColumns' => '2',
9
+        'widths' => 
10
+        array (
11 11
         0 => 
12 12
         array (
13
-          'label' => '10',
14
-          'field' => '30',
13
+            'label' => '10',
14
+            'field' => '30',
15 15
         ),
16 16
         1 => 
17 17
         array (
18
-          'label' => '10',
19
-          'field' => '30',
18
+            'label' => '10',
19
+            'field' => '30',
20 20
         ),
21
-      ),
22
-      'includes' => 
23
-      array (
21
+        ),
22
+        'includes' => 
23
+        array (
24 24
         0 => 
25 25
         array (
26
-          'file' => 'modules/ProjectTask/ProjectTask.js',
26
+            'file' => 'modules/ProjectTask/ProjectTask.js',
27 27
         ),
28
-      ),
29
-      'form' => 
30
-      array (
28
+        ),
29
+        'form' => 
30
+        array (
31 31
         'buttons' => 
32 32
         array (
33
-          0 => 'EDIT',
34
-          1 => 'DUPLICATE',
35
-          2 => 'DELETE',
33
+            0 => 'EDIT',
34
+            1 => 'DUPLICATE',
35
+            2 => 'DELETE',
36 36
         ),
37 37
         'hideAudit' => true,
38
-      ),
39
-      'useTabs' => true,
40
-      'tabDefs' => 
41
-      array (
38
+        ),
39
+        'useTabs' => true,
40
+        'tabDefs' => 
41
+        array (
42 42
         'DEFAULT' => 
43 43
         array (
44
-          'newTab' => true,
45
-          'panelDefault' => 'expanded',
44
+            'newTab' => true,
45
+            'panelDefault' => 'expanded',
46 46
         ),
47 47
         'LBL_PANEL_TIMELINE' =>
48 48
         array (
49
-          'newTab' => true,
50
-          'panelDefault' => 'expanded',
49
+            'newTab' => true,
50
+            'panelDefault' => 'expanded',
51 51
         ),
52
-      ),
53
-      'syncDetailEditViews' => true,
52
+        ),
53
+        'syncDetailEditViews' => true,
54 54
     ),
55 55
     'panels' => 
56 56
     array (
57
-      'default' => 
58
-      array (
57
+        'default' => 
58
+        array (
59 59
         0 => 
60 60
         array (
61
-          0 => 'name',
62
-          1 => 'status',
61
+            0 => 'name',
62
+            1 => 'status',
63 63
         ),
64 64
         1 => 
65 65
         array (
66
-          0 => 'date_start',
67
-          1 => 'date_finish',
66
+            0 => 'date_start',
67
+            1 => 'date_finish',
68 68
         ),
69 69
         2 => 
70 70
         array (
71
-          0 => 'priority',
72
-          1 => 'percent_complete',
71
+            0 => 'priority',
72
+            1 => 'percent_complete',
73 73
         ),
74 74
         3 => 
75 75
         array (
76
-          0 => 
77
-          array (
76
+            0 => 
77
+            array (
78 78
             'name' => 'project_name',
79 79
             'customCode' => '<a href="index.php?module=Project&action=DetailView&record={$fields.project_id.value}">{$fields.project_name.value}&nbsp;</a>',
80 80
             'label' => 'LBL_PARENT_ID',
81
-          ),
82
-          1 => 'task_number',
81
+            ),
82
+            1 => 'task_number',
83 83
         ),
84 84
         4 => 
85 85
         array (
86
-          0 => 
87
-          array (
86
+            0 => 
87
+            array (
88 88
             'name' => 'assigned_user_name',
89 89
             'label' => 'LBL_ASSIGNED_USER_ID',
90
-          ),
90
+            ),
91 91
         ),
92 92
         5 => 
93 93
         array (
94
-          0 => 
95
-          array (
94
+            0 => 
95
+            array (
96 96
             'name' => 'description',
97
-          ),
97
+            ),
98 98
         ),
99
-      ),
100
-      'LBL_PANEL_TIMELINE' =>
101
-      array (
99
+        ),
100
+        'LBL_PANEL_TIMELINE' =>
101
+        array (
102 102
         0 => 
103 103
         array (
104
-          0 => 'estimated_effort',
105
-          1 => 
106
-          array (
104
+            0 => 'estimated_effort',
105
+            1 => 
106
+            array (
107 107
             'name' => 'actual_effort',
108 108
             'label' => 'LBL_ACTUAL_EFFORT',
109
-          ),
109
+            ),
110 110
         ),
111 111
         1 => 
112 112
         array (
113
-          0 => 
114
-          array (
113
+            0 => 
114
+            array (
115 115
             'name' => 'predecessors',
116 116
             'label' => 'LBL_PREDECESSORS',
117
-          ),
118
-          1 => 
119
-          array (
117
+            ),
118
+            1 => 
119
+            array (
120 120
             'name' => 'relationship_type',
121 121
             'studio' => 'visible',
122 122
             'label' => 'LBL_RELATIONSHIP_TYPE',
123
-          ),
123
+            ),
124 124
         ),
125 125
         2 => 
126 126
         array (
127
-          0 => 'order_number',
128
-          1 => 
129
-          array (
127
+            0 => 'order_number',
128
+            1 => 
129
+            array (
130 130
             'name' => 'milestone_flag',
131 131
             'label' => 'LBL_MILESTONE_FLAG',
132
-          ),
132
+            ),
133 133
         ),
134 134
         3 => 
135 135
         array (
136
-          0 => 'utilization',
137
-          1 => '',
136
+            0 => 'utilization',
137
+            1 => '',
138 138
         ),
139 139
         4 => 
140 140
         array (
141
-          0 => 
142
-          array (
141
+            0 => 
142
+            array (
143 143
             'name' => 'duration',
144 144
             'label' => 'LBL_DURATION',
145
-          ),
146
-          1 => 
147
-          array (
145
+            ),
146
+            1 => 
147
+            array (
148 148
             'name' => 'duration_unit',
149 149
             'label' => 'LBL_DURATION_UNIT',
150
-          ),
150
+            ),
151
+        ),
151 152
         ),
152
-      ),
153 153
     ),
154
-  ),
154
+    ),
155 155
 );
156 156
 ?>
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $viewdefs ['ProjectTask'] = 
3
-array (
3
+array(
4 4
   'DetailView' => 
5
-  array (
5
+  array(
6 6
     'templateMeta' => 
7
-    array (
7
+    array(
8 8
       'maxColumns' => '2',
9 9
       'widths' => 
10
-      array (
10
+      array(
11 11
         0 => 
12
-        array (
12
+        array(
13 13
           'label' => '10',
14 14
           'field' => '30',
15 15
         ),
16 16
         1 => 
17
-        array (
17
+        array(
18 18
           'label' => '10',
19 19
           'field' => '30',
20 20
         ),
21 21
       ),
22 22
       'includes' => 
23
-      array (
23
+      array(
24 24
         0 => 
25
-        array (
25
+        array(
26 26
           'file' => 'modules/ProjectTask/ProjectTask.js',
27 27
         ),
28 28
       ),
29 29
       'form' => 
30
-      array (
30
+      array(
31 31
         'buttons' => 
32
-        array (
32
+        array(
33 33
           0 => 'EDIT',
34 34
           1 => 'DUPLICATE',
35 35
           2 => 'DELETE',
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
       ),
39 39
       'useTabs' => true,
40 40
       'tabDefs' => 
41
-      array (
41
+      array(
42 42
         'DEFAULT' => 
43
-        array (
43
+        array(
44 44
           'newTab' => true,
45 45
           'panelDefault' => 'expanded',
46 46
         ),
47 47
         'LBL_PANEL_TIMELINE' =>
48
-        array (
48
+        array(
49 49
           'newTab' => true,
50 50
           'panelDefault' => 'expanded',
51 51
         ),
@@ -53,28 +53,28 @@  discard block
 block discarded – undo
53 53
       'syncDetailEditViews' => true,
54 54
     ),
55 55
     'panels' => 
56
-    array (
56
+    array(
57 57
       'default' => 
58
-      array (
58
+      array(
59 59
         0 => 
60
-        array (
60
+        array(
61 61
           0 => 'name',
62 62
           1 => 'status',
63 63
         ),
64 64
         1 => 
65
-        array (
65
+        array(
66 66
           0 => 'date_start',
67 67
           1 => 'date_finish',
68 68
         ),
69 69
         2 => 
70
-        array (
70
+        array(
71 71
           0 => 'priority',
72 72
           1 => 'percent_complete',
73 73
         ),
74 74
         3 => 
75
-        array (
75
+        array(
76 76
           0 => 
77
-          array (
77
+          array(
78 78
             'name' => 'project_name',
79 79
             'customCode' => '<a href="index.php?module=Project&action=DetailView&record={$fields.project_id.value}">{$fields.project_name.value}&nbsp;</a>',
80 80
             'label' => 'LBL_PARENT_ID',
@@ -82,69 +82,69 @@  discard block
 block discarded – undo
82 82
           1 => 'task_number',
83 83
         ),
84 84
         4 => 
85
-        array (
85
+        array(
86 86
           0 => 
87
-          array (
87
+          array(
88 88
             'name' => 'assigned_user_name',
89 89
             'label' => 'LBL_ASSIGNED_USER_ID',
90 90
           ),
91 91
         ),
92 92
         5 => 
93
-        array (
93
+        array(
94 94
           0 => 
95
-          array (
95
+          array(
96 96
             'name' => 'description',
97 97
           ),
98 98
         ),
99 99
       ),
100 100
       'LBL_PANEL_TIMELINE' =>
101
-      array (
101
+      array(
102 102
         0 => 
103
-        array (
103
+        array(
104 104
           0 => 'estimated_effort',
105 105
           1 => 
106
-          array (
106
+          array(
107 107
             'name' => 'actual_effort',
108 108
             'label' => 'LBL_ACTUAL_EFFORT',
109 109
           ),
110 110
         ),
111 111
         1 => 
112
-        array (
112
+        array(
113 113
           0 => 
114
-          array (
114
+          array(
115 115
             'name' => 'predecessors',
116 116
             'label' => 'LBL_PREDECESSORS',
117 117
           ),
118 118
           1 => 
119
-          array (
119
+          array(
120 120
             'name' => 'relationship_type',
121 121
             'studio' => 'visible',
122 122
             'label' => 'LBL_RELATIONSHIP_TYPE',
123 123
           ),
124 124
         ),
125 125
         2 => 
126
-        array (
126
+        array(
127 127
           0 => 'order_number',
128 128
           1 => 
129
-          array (
129
+          array(
130 130
             'name' => 'milestone_flag',
131 131
             'label' => 'LBL_MILESTONE_FLAG',
132 132
           ),
133 133
         ),
134 134
         3 => 
135
-        array (
135
+        array(
136 136
           0 => 'utilization',
137 137
           1 => '',
138 138
         ),
139 139
         4 => 
140
-        array (
140
+        array(
141 141
           0 => 
142
-          array (
142
+          array(
143 143
             'name' => 'duration',
144 144
             'label' => 'LBL_DURATION',
145 145
           ),
146 146
           1 => 
147
-          array (
147
+          array(
148 148
             'name' => 'duration_unit',
149 149
             'label' => 'LBL_DURATION_UNIT',
150 150
           ),
Please login to merge, or discard this patch.
modules/ProjectTask/metadata/quickcreatedefs.php 2 patches
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -1,130 +1,130 @@
 block discarded – undo
1 1
 <?php
2 2
 $viewdefs ['ProjectTask'] = 
3 3
 array (
4
-  'QuickCreate' => 
5
-  array (
4
+    'QuickCreate' => 
5
+    array (
6 6
     'templateMeta' => 
7 7
     array (
8
-      'maxColumns' => '2',
9
-      'widths' => 
10
-      array (
8
+        'maxColumns' => '2',
9
+        'widths' => 
10
+        array (
11 11
         0 => 
12 12
         array (
13
-          'label' => '10',
14
-          'field' => '30',
13
+            'label' => '10',
14
+            'field' => '30',
15 15
         ),
16 16
         1 => 
17 17
         array (
18
-          'label' => '10',
19
-          'field' => '30',
18
+            'label' => '10',
19
+            'field' => '30',
20 20
         ),
21
-      ),
22
-      'includes' => 
23
-      array (
21
+        ),
22
+        'includes' => 
23
+        array (
24 24
         0 => 
25 25
         array (
26
-          'file' => 'modules/ProjectTask/ProjectTask.js',
26
+            'file' => 'modules/ProjectTask/ProjectTask.js',
27
+        ),
27 28
         ),
28
-      ),
29 29
     ),
30 30
     'panels' => 
31 31
     array (
32
-      'default' => 
33
-      array (
32
+        'default' => 
33
+        array (
34 34
         0 => 
35 35
         array (
36
-          0 => 
37
-          array (
36
+            0 => 
37
+            array (
38 38
             'name' => 'name',
39 39
             'label' => 'LBL_NAME',
40
-          ),
41
-          1 => 
42
-          array (
40
+            ),
41
+            1 => 
42
+            array (
43 43
             'name' => 'project_task_id',
44 44
             'label' => 'LBL_TASK_ID',
45
-          ),
45
+            ),
46 46
         ),
47 47
         1 => 
48 48
         array (
49
-          0 => 
50
-          array (
49
+            0 => 
50
+            array (
51 51
             'name' => 'date_start',
52
-          ),
53
-          1 => 
54
-          array (
52
+            ),
53
+            1 => 
54
+            array (
55 55
             'name' => 'date_finish',
56
-          ),
56
+            ),
57 57
         ),
58 58
         2 => 
59 59
         array (
60
-          'name' => 'assigned_user_name',
60
+            'name' => 'assigned_user_name',
61 61
         ),
62 62
         3 => 
63 63
         array (
64
-          0 => 
65
-          array (
64
+            0 => 
65
+            array (
66 66
             'name' => 'status',
67 67
             'customCode' => '<select name="{$fields.status.name}" id="{$fields.status.name}" title="" tabindex="s" onchange="update_percent_complete(this.value);">{if isset($fields.status.value) && $fields.status.value != ""}{html_options options=$fields.status.options selected=$fields.status.value}{else}{html_options options=$fields.status.options selected=$fields.status.default}{/if}</select>',
68
-          ),
69
-          1 => 'priority',
68
+            ),
69
+            1 => 'priority',
70 70
         ),
71 71
         4 => 
72 72
         array (
73
-          0 => 
74
-          array (
73
+            0 => 
74
+            array (
75 75
             'name' => 'percent_complete',
76 76
             'customCode' => '<input type="text" name="{$fields.percent_complete.name}" id="{$fields.percent_complete.name}" size="30" value="{$fields.percent_complete.value}" title="" tabindex="0" onChange="update_status(this.value);" /></tr>',
77
-          ),
77
+            ),
78 78
         ),
79 79
         5 => 
80 80
         array (
81
-          0 => 'milestone_flag',
81
+            0 => 'milestone_flag',
82 82
         ),
83 83
         6 => 
84 84
         array (
85
-          0 => 
86
-          array (
85
+            0 => 
86
+            array (
87 87
             'name' => 'project_name',
88 88
             'label' => 'LBL_PROJECT_NAME',
89
-          ),
89
+            ),
90 90
         ),
91 91
         7 => 
92 92
         array (
93
-          0 => 'task_number',
94
-          1 => 'order_number',
93
+            0 => 'task_number',
94
+            1 => 'order_number',
95 95
         ),
96 96
         8 => 
97 97
         array (
98
-          0 => 'estimated_effort',
99
-          1 => 'utilization',
98
+            0 => 'estimated_effort',
99
+            1 => 'utilization',
100 100
         ),
101 101
         9 => 
102 102
         array (
103
-          0 => 
104
-          array (
103
+            0 => 
104
+            array (
105 105
             'name' => 'description',
106
-          ),
106
+            ),
107 107
         ),
108 108
         10 => 
109 109
         array (
110
-          0 => 
111
-          array (
110
+            0 => 
111
+            array (
112 112
             'name' => 'duration',
113 113
             'hideLabel' => true,
114 114
             'customCode' => '<input type="hidden" name="duration" id="projectTask_duration" value="0" />',
115
-          ),
115
+            ),
116 116
         ),
117 117
         11 => 
118 118
         array (
119
-          0 => 
120
-          array (
119
+            0 => 
120
+            array (
121 121
             'name' => 'duration_unit',
122 122
             'hideLabel' => true,
123 123
             'customCode' => '<input type="hidden" name="duration_unit" id="projectTask_durationUnit" value="Days" />',
124
-          ),
124
+            ),
125 125
         ),
126
-      ),
126
+        ),
127
+    ),
127 128
     ),
128
-  ),
129 129
 );
130 130
 ?>
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -1,123 +1,123 @@
 block discarded – undo
1 1
 <?php
2 2
 $viewdefs ['ProjectTask'] = 
3
-array (
3
+array(
4 4
   'QuickCreate' => 
5
-  array (
5
+  array(
6 6
     'templateMeta' => 
7
-    array (
7
+    array(
8 8
       'maxColumns' => '2',
9 9
       'widths' => 
10
-      array (
10
+      array(
11 11
         0 => 
12
-        array (
12
+        array(
13 13
           'label' => '10',
14 14
           'field' => '30',
15 15
         ),
16 16
         1 => 
17
-        array (
17
+        array(
18 18
           'label' => '10',
19 19
           'field' => '30',
20 20
         ),
21 21
       ),
22 22
       'includes' => 
23
-      array (
23
+      array(
24 24
         0 => 
25
-        array (
25
+        array(
26 26
           'file' => 'modules/ProjectTask/ProjectTask.js',
27 27
         ),
28 28
       ),
29 29
     ),
30 30
     'panels' => 
31
-    array (
31
+    array(
32 32
       'default' => 
33
-      array (
33
+      array(
34 34
         0 => 
35
-        array (
35
+        array(
36 36
           0 => 
37
-          array (
37
+          array(
38 38
             'name' => 'name',
39 39
             'label' => 'LBL_NAME',
40 40
           ),
41 41
           1 => 
42
-          array (
42
+          array(
43 43
             'name' => 'project_task_id',
44 44
             'label' => 'LBL_TASK_ID',
45 45
           ),
46 46
         ),
47 47
         1 => 
48
-        array (
48
+        array(
49 49
           0 => 
50
-          array (
50
+          array(
51 51
             'name' => 'date_start',
52 52
           ),
53 53
           1 => 
54
-          array (
54
+          array(
55 55
             'name' => 'date_finish',
56 56
           ),
57 57
         ),
58 58
         2 => 
59
-        array (
59
+        array(
60 60
           'name' => 'assigned_user_name',
61 61
         ),
62 62
         3 => 
63
-        array (
63
+        array(
64 64
           0 => 
65
-          array (
65
+          array(
66 66
             'name' => 'status',
67 67
             'customCode' => '<select name="{$fields.status.name}" id="{$fields.status.name}" title="" tabindex="s" onchange="update_percent_complete(this.value);">{if isset($fields.status.value) && $fields.status.value != ""}{html_options options=$fields.status.options selected=$fields.status.value}{else}{html_options options=$fields.status.options selected=$fields.status.default}{/if}</select>',
68 68
           ),
69 69
           1 => 'priority',
70 70
         ),
71 71
         4 => 
72
-        array (
72
+        array(
73 73
           0 => 
74
-          array (
74
+          array(
75 75
             'name' => 'percent_complete',
76 76
             'customCode' => '<input type="text" name="{$fields.percent_complete.name}" id="{$fields.percent_complete.name}" size="30" value="{$fields.percent_complete.value}" title="" tabindex="0" onChange="update_status(this.value);" /></tr>',
77 77
           ),
78 78
         ),
79 79
         5 => 
80
-        array (
80
+        array(
81 81
           0 => 'milestone_flag',
82 82
         ),
83 83
         6 => 
84
-        array (
84
+        array(
85 85
           0 => 
86
-          array (
86
+          array(
87 87
             'name' => 'project_name',
88 88
             'label' => 'LBL_PROJECT_NAME',
89 89
           ),
90 90
         ),
91 91
         7 => 
92
-        array (
92
+        array(
93 93
           0 => 'task_number',
94 94
           1 => 'order_number',
95 95
         ),
96 96
         8 => 
97
-        array (
97
+        array(
98 98
           0 => 'estimated_effort',
99 99
           1 => 'utilization',
100 100
         ),
101 101
         9 => 
102
-        array (
102
+        array(
103 103
           0 => 
104
-          array (
104
+          array(
105 105
             'name' => 'description',
106 106
           ),
107 107
         ),
108 108
         10 => 
109
-        array (
109
+        array(
110 110
           0 => 
111
-          array (
111
+          array(
112 112
             'name' => 'duration',
113 113
             'hideLabel' => true,
114 114
             'customCode' => '<input type="hidden" name="duration" id="projectTask_duration" value="0" />',
115 115
           ),
116 116
         ),
117 117
         11 => 
118
-        array (
118
+        array(
119 119
           0 => 
120
-          array (
120
+          array(
121 121
             'name' => 'duration_unit',
122 122
             'hideLabel' => true,
123 123
             'customCode' => '<input type="hidden" name="duration_unit" id="projectTask_durationUnit" value="Days" />',
Please login to merge, or discard this patch.
modules/ProjectTask/metadata/listviewdefs.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $listViewDefs ['ProjectTask'] = 
3 3
 array (
4
-  'NAME' => 
5
-  array (
4
+    'NAME' => 
5
+    array (
6 6
     'width' => '40%',
7 7
     'label' => 'LBL_LIST_NAME',
8 8
     'link' => true,
9 9
     'default' => true,
10 10
     'sortable' => true,
11
-  ),
12
-  'PROJECT_NAME' => 
13
-  array (
11
+    ),
12
+    'PROJECT_NAME' => 
13
+    array (
14 14
     'width' => '25%',
15 15
     'label' => 'LBL_PROJECT_NAME',
16 16
     'id' => 'PROJECT_ID',
@@ -21,44 +21,44 @@  discard block
 block discarded – undo
21 21
     'ACLTag' => 'PROJECT',
22 22
     'related_fields' => 
23 23
     array (
24
-      0 => 'project_id',
24
+        0 => 'project_id',
25
+    ),
25 26
     ),
26
-  ),
27
-  'DATE_START' => 
28
-  array (
27
+    'DATE_START' => 
28
+    array (
29 29
     'width' => '10%',
30 30
     'label' => 'LBL_DATE_START',
31 31
     'default' => true,
32 32
     'sortable' => true,
33
-  ),
34
-  'DATE_FINISH' => 
35
-  array (
33
+    ),
34
+    'DATE_FINISH' => 
35
+    array (
36 36
     'width' => '10%',
37 37
     'label' => 'LBL_DATE_FINISH',
38 38
     'default' => true,
39 39
     'sortable' => true,
40
-  ),
41
-  'ASSIGNED_USER_NAME' => 
42
-  array (
40
+    ),
41
+    'ASSIGNED_USER_NAME' => 
42
+    array (
43 43
     'width' => '10%',
44 44
     'label' => 'LBL_LIST_ASSIGNED_USER_ID',
45 45
     'module' => 'Employees',
46 46
     'id' => 'ASSIGNED_USER_ID',
47 47
     'default' => true,
48
-  ),
49
-  'PRIORITY' => 
50
-  array (
48
+    ),
49
+    'PRIORITY' => 
50
+    array (
51 51
     'width' => '10%',
52 52
     'label' => 'LBL_LIST_PRIORITY',
53 53
     'default' => true,
54 54
     'sortable' => true,
55
-  ),
56
-  'PERCENT_COMPLETE' => 
57
-  array (
55
+    ),
56
+    'PERCENT_COMPLETE' => 
57
+    array (
58 58
     'width' => '10%',
59 59
     'label' => 'LBL_LIST_PERCENT_COMPLETE',
60 60
     'default' => true,
61 61
     'sortable' => true,
62
-  ),
62
+    ),
63 63
 );
64 64
 ?>
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $listViewDefs ['ProjectTask'] = 
3
-array (
3
+array(
4 4
   'NAME' => 
5
-  array (
5
+  array(
6 6
     'width' => '40%',
7 7
     'label' => 'LBL_LIST_NAME',
8 8
     'link' => true,
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     'sortable' => true,
11 11
   ),
12 12
   'PROJECT_NAME' => 
13
-  array (
13
+  array(
14 14
     'width' => '25%',
15 15
     'label' => 'LBL_PROJECT_NAME',
16 16
     'id' => 'PROJECT_ID',
@@ -20,26 +20,26 @@  discard block
 block discarded – undo
20 20
     'module' => 'Project',
21 21
     'ACLTag' => 'PROJECT',
22 22
     'related_fields' => 
23
-    array (
23
+    array(
24 24
       0 => 'project_id',
25 25
     ),
26 26
   ),
27 27
   'DATE_START' => 
28
-  array (
28
+  array(
29 29
     'width' => '10%',
30 30
     'label' => 'LBL_DATE_START',
31 31
     'default' => true,
32 32
     'sortable' => true,
33 33
   ),
34 34
   'DATE_FINISH' => 
35
-  array (
35
+  array(
36 36
     'width' => '10%',
37 37
     'label' => 'LBL_DATE_FINISH',
38 38
     'default' => true,
39 39
     'sortable' => true,
40 40
   ),
41 41
   'ASSIGNED_USER_NAME' => 
42
-  array (
42
+  array(
43 43
     'width' => '10%',
44 44
     'label' => 'LBL_LIST_ASSIGNED_USER_ID',
45 45
     'module' => 'Employees',
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
     'default' => true,
48 48
   ),
49 49
   'PRIORITY' => 
50
-  array (
50
+  array(
51 51
     'width' => '10%',
52 52
     'label' => 'LBL_LIST_PRIORITY',
53 53
     'default' => true,
54 54
     'sortable' => true,
55 55
   ),
56 56
   'PERCENT_COMPLETE' => 
57
-  array (
57
+  array(
58 58
     'width' => '10%',
59 59
     'label' => 'LBL_LIST_PERCENT_COMPLETE',
60 60
     'default' => true,
Please login to merge, or discard this patch.
modules/Calls/SubPanelViewInvitees.php 3 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -88,29 +88,29 @@  discard block
 block discarded – undo
88 88
 $oddRow = true;
89 89
 foreach($focus_users_list as $user)
90 90
 {
91
-	$user_fields = array(
92
-		'USER_NAME' => $user->user_name,
93
-		'FULL_NAME' => $locale->getLocaleFormattedName($user->first_name, $user->last_name),
94
-		'ID' => $user->id,
95
-		'EMAIL' => $user->email1,
96
-		'PHONE_WORK' => $user->phone_work
97
-	);
91
+    $user_fields = array(
92
+        'USER_NAME' => $user->user_name,
93
+        'FULL_NAME' => $locale->getLocaleFormattedName($user->first_name, $user->last_name),
94
+        'ID' => $user->id,
95
+        'EMAIL' => $user->email1,
96
+        'PHONE_WORK' => $user->phone_work
97
+    );
98 98
 
99
-	$xtpl->assign("USER", $user_fields);
99
+    $xtpl->assign("USER", $user_fields);
100 100
 
101
-	if($oddRow)
101
+    if($oddRow)
102 102
     {
103 103
         //todo move to themes
104
-		$xtpl->assign("ROW_COLOR", 'oddListRow');
104
+        $xtpl->assign("ROW_COLOR", 'oddListRow');
105 105
     }
106 106
     else
107 107
     {
108 108
         //todo move to themes
109
-		$xtpl->assign("ROW_COLOR", 'evenListRow');
109
+        $xtpl->assign("ROW_COLOR", 'evenListRow');
110 110
     }
111 111
     $oddRow = !$oddRow;
112 112
 
113
-	$xtpl->parse("users.row");
113
+    $xtpl->parse("users.row");
114 114
 // Put the rows in.
115 115
 }
116 116
 
@@ -120,30 +120,30 @@  discard block
 block discarded – undo
120 120
 $oddRow = true;
121 121
 foreach($focus_contacts_list as $contact)
122 122
 {
123
-	$contact_fields = array(
124
-		'FIRST_NAME' => $contact->first_name,
125
-		'LAST_NAME' => $contact->last_name,
126
-		'ACCOUNT_NAME' => $contact->account_name,
127
-		'ID' => $contact->id,
128
-		'EMAIL' => $contact->email1,
129
-		'PHONE_WORK' => $contact->phone_work
130
-	);
131
-
132
-	$xtpl->assign("CONTACT", $contact_fields);
133
-
134
-	if($oddRow)
123
+    $contact_fields = array(
124
+        'FIRST_NAME' => $contact->first_name,
125
+        'LAST_NAME' => $contact->last_name,
126
+        'ACCOUNT_NAME' => $contact->account_name,
127
+        'ID' => $contact->id,
128
+        'EMAIL' => $contact->email1,
129
+        'PHONE_WORK' => $contact->phone_work
130
+    );
131
+
132
+    $xtpl->assign("CONTACT", $contact_fields);
133
+
134
+    if($oddRow)
135 135
     {
136 136
         //todo move to themes
137
-		$xtpl->assign("ROW_COLOR", 'oddListRow');
137
+        $xtpl->assign("ROW_COLOR", 'oddListRow');
138 138
     }
139 139
     else
140 140
     {
141 141
         //todo move to themes
142
-		$xtpl->assign("ROW_COLOR", 'evenListRow');
142
+        $xtpl->assign("ROW_COLOR", 'evenListRow');
143 143
     }
144 144
     $oddRow = !$oddRow;
145 145
 
146
-	$xtpl->parse("contacts.row");
146
+    $xtpl->parse("contacts.row");
147 147
 // Put the rows in.
148 148
 }
149 149
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 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.
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 // Stick the form header out there.
80 80
 echo get_form_header($mod_strings['LBL_INVITEES'], $button, false);
81
-$xtpl=new XTemplate ('modules/Calls/SubPanelViewInvitees.html');
81
+$xtpl = new XTemplate('modules/Calls/SubPanelViewInvitees.html');
82 82
 $xtpl->assign("MOD", $mod_strings);
83 83
 $xtpl->assign("APP", $app_strings);
84 84
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 $xtpl->assign("CALL_ID", $focus->id);
87 87
 
88 88
 $oddRow = true;
89
-foreach($focus_users_list as $user)
89
+foreach ($focus_users_list as $user)
90 90
 {
91 91
 	$user_fields = array(
92 92
 		'USER_NAME' => $user->user_name,
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 	$xtpl->assign("USER", $user_fields);
100 100
 
101
-	if($oddRow)
101
+	if ($oddRow)
102 102
     {
103 103
         //todo move to themes
104 104
 		$xtpl->assign("ROW_COLOR", 'oddListRow');
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 $xtpl->out("users");
119 119
 
120 120
 $oddRow = true;
121
-foreach($focus_contacts_list as $contact)
121
+foreach ($focus_contacts_list as $contact)
122 122
 {
123 123
 	$contact_fields = array(
124 124
 		'FIRST_NAME' => $contact->first_name,
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
 	$xtpl->assign("CONTACT", $contact_fields);
133 133
 
134
-	if($oddRow)
134
+	if ($oddRow)
135 135
     {
136 136
         //todo move to themes
137 137
 		$xtpl->assign("ROW_COLOR", 'oddListRow');
Please login to merge, or discard this patch.
Braces   +13 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -65,14 +67,19 @@  discard block
 block discarded – undo
65 67
 
66 68
 $button  = "<table cellspacing='0' cellpadding='1' border='0'><form border='0' action='index.php' method='post' name='form' id='form'>\n";
67 69
 $button .= "<input type='hidden' name='module' value='Contacts'>\n";
68
-if ($currentModule == 'Accounts') $button .= "<input type='hidden' name='account_id' value='$focus->id'>\n<input type='hidden' name='account_name' value='$focus->name'>\n";
70
+if ($currentModule == 'Accounts') {
71
+    $button .= "<input type='hidden' name='account_id' value='$focus->id'>\n<input type='hidden' name='account_name' value='$focus->name'>\n";
72
+}
69 73
 $button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
70 74
 $button .= "<input type='hidden' name='return_action' value='".$action."'>\n";
71 75
 $button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
72 76
 $button .= "<input type='hidden' name='action'>\n";
73 77
 $button .= "<tr><td>&nbsp;</td>";
74
-if ($focus->parent_type == "Accounts") $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name)."\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
75
-else $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."'  type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
78
+if ($focus->parent_type == "Accounts") {
79
+    $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name)."\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
80
+} else {
81
+    $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."'  type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
82
+}
76 83
 $button .= "<td><input title='".$app_strings['LBL_SELECT_USER_BUTTON_TITLE']."'  type='button' class='button' value='".$app_strings['LBL_SELECT_USER_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Users&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n";
77 84
 $button .= "</tr></form></table>\n";
78 85
 
@@ -102,8 +109,7 @@  discard block
 block discarded – undo
102 109
     {
103 110
         //todo move to themes
104 111
 		$xtpl->assign("ROW_COLOR", 'oddListRow');
105
-    }
106
-    else
112
+    } else
107 113
     {
108 114
         //todo move to themes
109 115
 		$xtpl->assign("ROW_COLOR", 'evenListRow');
@@ -135,8 +141,7 @@  discard block
 block discarded – undo
135 141
     {
136 142
         //todo move to themes
137 143
 		$xtpl->assign("ROW_COLOR", 'oddListRow');
138
-    }
139
-    else
144
+    } else
140 145
     {
141 146
         //todo move to themes
142 147
 		$xtpl->assign("ROW_COLOR", 'evenListRow');
Please login to merge, or discard this patch.
modules/Calls/Call.php 4 patches
Indentation   +512 added lines, -512 removed lines patch added patch discarded remove patch
@@ -47,162 +47,162 @@  discard block
 block discarded – undo
47 47
  ********************************************************************************/
48 48
 
49 49
 class Call extends SugarBean {
50
-	var $field_name_map;
51
-	// Stored fields
52
-	var $id;
53
-	var $json_id;
54
-	var $date_entered;
55
-	var $date_modified;
56
-	var $assigned_user_id;
57
-	var $modified_user_id;
58
-	var $description;
59
-	var $name;
60
-	var $status;
61
-	var $date_start;
62
-	var $time_start;
63
-	var $duration_hours;
64
-	var $duration_minutes;
65
-	var $date_end;
66
-	var $parent_type;
67
-	var $parent_type_options;
68
-	var $parent_id;
69
-	var $contact_id;
70
-	var $user_id;
71
-	var $lead_id;
72
-	var $direction;
73
-	var $reminder_time;
74
-	var $reminder_time_options;
75
-	var $reminder_checked;
76
-	var $email_reminder_time;
77
-	var $email_reminder_checked;
78
-	var $email_reminder_sent;
79
-	var $required;
80
-	var $accept_status;
81
-	var $created_by;
82
-	var $created_by_name;
83
-	var $modified_by_name;
84
-	var $parent_name;
85
-	var $contact_name;
86
-	var $contact_phone;
87
-	var $contact_email;
88
-	var $account_id;
89
-	var $opportunity_id;
90
-	var $case_id;
91
-	var $assigned_user_name;
92
-	var $note_id;
50
+    var $field_name_map;
51
+    // Stored fields
52
+    var $id;
53
+    var $json_id;
54
+    var $date_entered;
55
+    var $date_modified;
56
+    var $assigned_user_id;
57
+    var $modified_user_id;
58
+    var $description;
59
+    var $name;
60
+    var $status;
61
+    var $date_start;
62
+    var $time_start;
63
+    var $duration_hours;
64
+    var $duration_minutes;
65
+    var $date_end;
66
+    var $parent_type;
67
+    var $parent_type_options;
68
+    var $parent_id;
69
+    var $contact_id;
70
+    var $user_id;
71
+    var $lead_id;
72
+    var $direction;
73
+    var $reminder_time;
74
+    var $reminder_time_options;
75
+    var $reminder_checked;
76
+    var $email_reminder_time;
77
+    var $email_reminder_checked;
78
+    var $email_reminder_sent;
79
+    var $required;
80
+    var $accept_status;
81
+    var $created_by;
82
+    var $created_by_name;
83
+    var $modified_by_name;
84
+    var $parent_name;
85
+    var $contact_name;
86
+    var $contact_phone;
87
+    var $contact_email;
88
+    var $account_id;
89
+    var $opportunity_id;
90
+    var $case_id;
91
+    var $assigned_user_name;
92
+    var $note_id;
93 93
     var $outlook_id;
94
-	var $update_vcal = true;
95
-	var $contacts_arr;
96
-	var $users_arr;
97
-	var $leads_arr;
98
-	var $default_call_name_values = array('Assemble catalogs', 'Make travel arrangements', 'Send a letter', 'Send contract', 'Send fax', 'Send a follow-up letter', 'Send literature', 'Send proposal', 'Send quote');
99
-	var $minutes_value_default = 15;
100
-	var $minutes_values = array('0'=>'00','15'=>'15','30'=>'30','45'=>'45');
101
-	var $table_name = "calls";
102
-	var $rel_users_table = "calls_users";
103
-	var $rel_contacts_table = "calls_contacts";
94
+    var $update_vcal = true;
95
+    var $contacts_arr;
96
+    var $users_arr;
97
+    var $leads_arr;
98
+    var $default_call_name_values = array('Assemble catalogs', 'Make travel arrangements', 'Send a letter', 'Send contract', 'Send fax', 'Send a follow-up letter', 'Send literature', 'Send proposal', 'Send quote');
99
+    var $minutes_value_default = 15;
100
+    var $minutes_values = array('0'=>'00','15'=>'15','30'=>'30','45'=>'45');
101
+    var $table_name = "calls";
102
+    var $rel_users_table = "calls_users";
103
+    var $rel_contacts_table = "calls_contacts";
104 104
     var $rel_leads_table = "calls_leads";
105
-	var $module_dir = 'Calls';
106
-	var $object_name = "Call";
107
-	var $new_schema = true;
108
-	var $importable = true;
109
-	var $syncing = false;
110
-	var $recurring_source;
111
-
112
-	// This is used to retrieve related fields from form posts.
113
-	var $additional_column_fields = array('assigned_user_name', 'assigned_user_id', 'contact_id', 'user_id', 'contact_name');
114
-	var $relationship_fields = array(	'account_id'		=> 'accounts',
115
-										'opportunity_id'	=> 'opportunities',
116
-										'contact_id'		=> 'contacts',
117
-										'case_id'			=> 'cases',
118
-										'user_id'			=> 'users',
119
-										'assigned_user_id'	=> 'users',
120
-										'note_id'			=> 'notes',
105
+    var $module_dir = 'Calls';
106
+    var $object_name = "Call";
107
+    var $new_schema = true;
108
+    var $importable = true;
109
+    var $syncing = false;
110
+    var $recurring_source;
111
+
112
+    // This is used to retrieve related fields from form posts.
113
+    var $additional_column_fields = array('assigned_user_name', 'assigned_user_id', 'contact_id', 'user_id', 'contact_name');
114
+    var $relationship_fields = array(	'account_id'		=> 'accounts',
115
+                                        'opportunity_id'	=> 'opportunities',
116
+                                        'contact_id'		=> 'contacts',
117
+                                        'case_id'			=> 'cases',
118
+                                        'user_id'			=> 'users',
119
+                                        'assigned_user_id'	=> 'users',
120
+                                        'note_id'			=> 'notes',
121 121
                                         'lead_id'			=> 'leads',
122
-								);
123
-
124
-	function Call() {
125
-		parent::SugarBean();
126
-		global $app_list_strings;
127
-
128
-       	$this->setupCustomFields('Calls');
129
-
130
-		foreach ($this->field_defs as $field) {
131
-			$this->field_name_map[$field['name']] = $field;
132
-		}
133
-
134
-
135
-
136
-
137
-         if(!empty($GLOBALS['app_list_strings']['duration_intervals']))
138
-        	$this->minutes_values = $GLOBALS['app_list_strings']['duration_intervals'];
139
-	}
140
-
141
-	/**
142
-	 * Disable edit if call is recurring and source is not Sugar. It should be edited only from Outlook.
143
-	 * @param $view string
144
-	 * @param $is_owner bool
145
-	 */
146
-	function ACLAccess($view,$is_owner='not_set',$in_group='not_set'){
147
-		// don't check if call is being synced from Outlook
148
-		if($this->syncing == false){
149
-			$view = strtolower($view);
150
-			switch($view){
151
-				case 'edit':
152
-				case 'save':
153
-				case 'editview':
154
-				case 'delete':
155
-					if(!empty($this->recurring_source) && $this->recurring_source != "Sugar"){
156
-						return false;
157
-					}
158
-			}
159
-		}
160
-		return parent::ACLAccess($view,$is_owner,$in_group);
161
-	}
122
+                                );
123
+
124
+    function Call() {
125
+        parent::SugarBean();
126
+        global $app_list_strings;
127
+
128
+            $this->setupCustomFields('Calls');
129
+
130
+        foreach ($this->field_defs as $field) {
131
+            $this->field_name_map[$field['name']] = $field;
132
+        }
133
+
134
+
135
+
136
+
137
+            if(!empty($GLOBALS['app_list_strings']['duration_intervals']))
138
+            $this->minutes_values = $GLOBALS['app_list_strings']['duration_intervals'];
139
+    }
140
+
141
+    /**
142
+     * Disable edit if call is recurring and source is not Sugar. It should be edited only from Outlook.
143
+     * @param $view string
144
+     * @param $is_owner bool
145
+     */
146
+    function ACLAccess($view,$is_owner='not_set',$in_group='not_set'){
147
+        // don't check if call is being synced from Outlook
148
+        if($this->syncing == false){
149
+            $view = strtolower($view);
150
+            switch($view){
151
+                case 'edit':
152
+                case 'save':
153
+                case 'editview':
154
+                case 'delete':
155
+                    if(!empty($this->recurring_source) && $this->recurring_source != "Sugar"){
156
+                        return false;
157
+                    }
158
+            }
159
+        }
160
+        return parent::ACLAccess($view,$is_owner,$in_group);
161
+    }
162 162
     // save date_end by calculating user input
163 163
     // this is for calendar
164
-	function save($check_notify = FALSE) {
165
-		global $timedate,$current_user;
164
+    function save($check_notify = FALSE) {
165
+        global $timedate,$current_user;
166 166
 
167
-	    if(isset($this->date_start) && isset($this->duration_hours) && isset($this->duration_minutes))
167
+        if(isset($this->date_start) && isset($this->duration_hours) && isset($this->duration_minutes))
168 168
         {
169
-    	    $td = $timedate->fromDb($this->date_start);
170
-    	    if($td)
171
-    	    {
172
-	        	$this->date_end = $td->modify("+{$this->duration_hours} hours {$this->duration_minutes} mins")->asDb();
173
-    	    }
169
+            $td = $timedate->fromDb($this->date_start);
170
+            if($td)
171
+            {
172
+                $this->date_end = $td->modify("+{$this->duration_hours} hours {$this->duration_minutes} mins")->asDb();
173
+            }
174 174
         }
175 175
 
176
-		if(!empty($_REQUEST['send_invites']) && $_REQUEST['send_invites'] == '1') {
177
-			$check_notify = true;
176
+        if(!empty($_REQUEST['send_invites']) && $_REQUEST['send_invites'] == '1') {
177
+            $check_notify = true;
178 178
         } else {
179
-			$check_notify = false;
180
-		}
181
-		if(empty($_REQUEST['send_invites'])) {
182
-			if(!empty($this->id)) {
183
-				$old_record = new Call();
184
-				$old_record->retrieve($this->id);
185
-				$old_assigned_user_id = $old_record->assigned_user_id;
186
-			}
187
-			if((empty($this->id) && isset($_REQUEST['assigned_user_id']) && !empty($_REQUEST['assigned_user_id']) && $GLOBALS['current_user']->id != $_REQUEST['assigned_user_id']) || (isset($old_assigned_user_id) && !empty($old_assigned_user_id) && isset($_REQUEST['assigned_user_id']) && !empty($_REQUEST['assigned_user_id']) && $old_assigned_user_id != $_REQUEST['assigned_user_id']) ){
188
-				$this->special_notification = true;
189
-				if(!isset($GLOBALS['resavingRelatedBeans']) || $GLOBALS['resavingRelatedBeans'] == false) {
190
-					$check_notify = true;
191
-				}
179
+            $check_notify = false;
180
+        }
181
+        if(empty($_REQUEST['send_invites'])) {
182
+            if(!empty($this->id)) {
183
+                $old_record = new Call();
184
+                $old_record->retrieve($this->id);
185
+                $old_assigned_user_id = $old_record->assigned_user_id;
186
+            }
187
+            if((empty($this->id) && isset($_REQUEST['assigned_user_id']) && !empty($_REQUEST['assigned_user_id']) && $GLOBALS['current_user']->id != $_REQUEST['assigned_user_id']) || (isset($old_assigned_user_id) && !empty($old_assigned_user_id) && isset($_REQUEST['assigned_user_id']) && !empty($_REQUEST['assigned_user_id']) && $old_assigned_user_id != $_REQUEST['assigned_user_id']) ){
188
+                $this->special_notification = true;
189
+                if(!isset($GLOBALS['resavingRelatedBeans']) || $GLOBALS['resavingRelatedBeans'] == false) {
190
+                    $check_notify = true;
191
+                }
192 192
                 if(isset($_REQUEST['assigned_user_name'])) {
193 193
                     $this->new_assigned_user_name = $_REQUEST['assigned_user_name'];
194 194
                 }
195
-			}
196
-		}
195
+            }
196
+        }
197 197
         if (empty($this->status) ) {
198 198
             $this->status = $this->getDefaultStatus();
199 199
         }
200 200
 
201
-		// prevent a mass mailing for recurring meetings created in Calendar module
202
-		if (empty($this->id) && !empty($_REQUEST['module']) && $_REQUEST['module'] == "Calendar" && !empty($_REQUEST['repeat_type']) && !empty($this->repeat_parent_id)) {
203
-			$check_notify = false;
204
-		}
205
-		/*nsingh 7/3/08  commenting out as bug #20814 is invalid
201
+        // prevent a mass mailing for recurring meetings created in Calendar module
202
+        if (empty($this->id) && !empty($_REQUEST['module']) && $_REQUEST['module'] == "Calendar" && !empty($_REQUEST['repeat_type']) && !empty($this->repeat_parent_id)) {
203
+            $check_notify = false;
204
+        }
205
+        /*nsingh 7/3/08  commenting out as bug #20814 is invalid
206 206
 		if($current_user->getPreference('reminder_time')!= -1 &&  isset($_POST['reminder_checked']) && isset($_POST['reminder_time']) && $_POST['reminder_checked']==0  && $_POST['reminder_time']==-1){
207 207
 			$this->reminder_checked = '1';
208 208
 			$this->reminder_time = $current_user->getPreference('reminder_time');
@@ -213,87 +213,87 @@  discard block
 block discarded – undo
213 213
 
214 214
 
215 215
         if($this->update_vcal) {
216
-			vCal::cache_sugar_vcal($current_user);
216
+            vCal::cache_sugar_vcal($current_user);
217 217
         }
218 218
 
219
-		if(isset($_REQUEST['reminders_data'])) {
220
-			Reminder::saveRemindersDataJson('Calls', $return_id, html_entity_decode($_REQUEST['reminders_data']));
221
-		}
219
+        if(isset($_REQUEST['reminders_data'])) {
220
+            Reminder::saveRemindersDataJson('Calls', $return_id, html_entity_decode($_REQUEST['reminders_data']));
221
+        }
222 222
 
223 223
         return $return_id;
224
-	}
224
+    }
225 225
 
226
-	/** Returns a list of the associated contacts
227
-	 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc..
228
-	 * All Rights Reserved..
229
-	 * Contributor(s): ______________________________________..
230
-	*/
231
-	function get_contacts()
232
-	{
233
-		// First, get the list of IDs.
234
-		$query = "SELECT contact_id as id from calls_contacts where call_id='$this->id' AND deleted=0";
226
+    /** Returns a list of the associated contacts
227
+     * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc..
228
+     * All Rights Reserved..
229
+     * Contributor(s): ______________________________________..
230
+     */
231
+    function get_contacts()
232
+    {
233
+        // First, get the list of IDs.
234
+        $query = "SELECT contact_id as id from calls_contacts where call_id='$this->id' AND deleted=0";
235 235
 
236
-		return $this->build_related_list($query, new Contact());
237
-	}
236
+        return $this->build_related_list($query, new Contact());
237
+    }
238 238
 
239 239
 
240
-	function get_summary_text()
241
-	{
242
-		return "$this->name";
243
-	}
240
+    function get_summary_text()
241
+    {
242
+        return "$this->name";
243
+    }
244 244
 
245
-	function create_list_query($order_by, $where, $show_deleted=0)
246
-	{
245
+    function create_list_query($order_by, $where, $show_deleted=0)
246
+    {
247 247
         $custom_join = $this->getCustomJoin();
248 248
                 $query = "SELECT ";
249
-		$query .= "
249
+        $query .= "
250 250
 			calls.*,";
251
-			if ( preg_match("/calls_users\.user_id/",$where))
252
-			{
253
-				$query .= "calls_users.required,
251
+            if ( preg_match("/calls_users\.user_id/",$where))
252
+            {
253
+                $query .= "calls_users.required,
254 254
 				calls_users.accept_status,";
255
-			}
255
+            }
256 256
 
257
-			$query .= "
257
+            $query .= "
258 258
 			users.user_name as assigned_user_name";
259 259
         $query .= $custom_join['select'];
260 260
 
261
-			// this line will help generate a GMT-metric to compare to a locale's timezone
261
+            // this line will help generate a GMT-metric to compare to a locale's timezone
262 262
 
263
-			if ( preg_match("/contacts/",$where)){
264
-				$query .= ", contacts.first_name, contacts.last_name";
265
-				$query .= ", contacts.assigned_user_id contact_name_owner";
266
-			}
267
-			$query .= " FROM calls ";
263
+            if ( preg_match("/contacts/",$where)){
264
+                $query .= ", contacts.first_name, contacts.last_name";
265
+                $query .= ", contacts.assigned_user_id contact_name_owner";
266
+            }
267
+            $query .= " FROM calls ";
268 268
 
269
-			if ( preg_match("/contacts/",$where)){
270
-				$query .=	"LEFT JOIN calls_contacts
269
+            if ( preg_match("/contacts/",$where)){
270
+                $query .=	"LEFT JOIN calls_contacts
271 271
 	                    ON calls.id=calls_contacts.call_id
272 272
 	                    LEFT JOIN contacts
273 273
 	                    ON calls_contacts.contact_id=contacts.id ";
274
-			}
275
-			if ( preg_match('/calls_users\.user_id/',$where))
276
-			{
277
-		$query .= "LEFT JOIN calls_users
274
+            }
275
+            if ( preg_match('/calls_users\.user_id/',$where))
276
+            {
277
+        $query .= "LEFT JOIN calls_users
278 278
 			ON calls.id=calls_users.call_id and calls_users.deleted=0 ";
279
-			}
280
-			$query .= "
279
+            }
280
+            $query .= "
281 281
 			LEFT JOIN users
282 282
 			ON calls.assigned_user_id=users.id ";
283 283
         $query .= $custom_join['join'];
284
-			$where_auto = '1=1';
285
-       		 if($show_deleted == 0){
286
-            	$where_auto = " $this->table_name.deleted=0  ";
287
-			}else if($show_deleted == 1){
288
-				$where_auto = " $this->table_name.deleted=1 ";
289
-			}
284
+            $where_auto = '1=1';
285
+                if($show_deleted == 0){
286
+                $where_auto = " $this->table_name.deleted=0  ";
287
+            }else if($show_deleted == 1){
288
+                $where_auto = " $this->table_name.deleted=1 ";
289
+            }
290 290
 
291
-			//$where_auto .= " GROUP BY calls.id";
291
+            //$where_auto .= " GROUP BY calls.id";
292 292
 
293
-		if($where != "")
294
-			$query .= "where $where AND ".$where_auto;
295
-		else
296
-			$query .= "where ".$where_auto;
293
+        if($where != "")
294
+            $query .= "where $where AND ".$where_auto;
295
+        else
296
+            $query .= "where ".$where_auto;
297 297
 
298 298
         $order_by = $this->process_order_by($order_by);
299 299
         if (empty($order_by)) {
@@ -301,14 +301,14 @@  discard block
 block discarded – undo
301 301
         }
302 302
         $query .= ' ORDER BY ' . $order_by;
303 303
 
304
-		return $query;
305
-	}
304
+        return $query;
305
+    }
306 306
 
307 307
         function create_export_query($order_by, $where, $relate_link_join='')
308 308
         {
309 309
             $custom_join = $this->getCustomJoin(true, true, $where);
310 310
             $custom_join['join'] .= $relate_link_join;
311
-			$contact_required = stristr($where, "contacts");
311
+            $contact_required = stristr($where, "contacts");
312 312
             if($contact_required)
313 313
             {
314 314
                     $query = "SELECT calls.*, contacts.first_name, contacts.last_name, users.user_name as assigned_user_name ";
@@ -325,11 +325,11 @@  discard block
 block discarded – undo
325 325
             }
326 326
 
327 327
 
328
-			$query .= "  LEFT JOIN users ON calls.assigned_user_id=users.id ";
328
+            $query .= "  LEFT JOIN users ON calls.assigned_user_id=users.id ";
329 329
 
330 330
             $query .= $custom_join['join'];
331 331
 
332
-			if($where != "")
332
+            if($where != "")
333 333
                     $query .= "where $where AND ".$where_auto;
334 334
             else
335 335
                     $query .= "where ".$where_auto;
@@ -347,199 +347,199 @@  discard block
 block discarded – undo
347 347
 
348 348
 
349 349
 
350
-	function fill_in_additional_detail_fields()
351
-	{
352
-		global $locale;
353
-		parent::fill_in_additional_detail_fields();
354
-		if (!empty($this->contact_id)) {
355
-			$query  = "SELECT first_name, last_name FROM contacts ";
356
-			$query .= "WHERE id='$this->contact_id' AND deleted=0";
357
-			$result = $this->db->limitQuery($query,0,1,true," Error filling in additional detail fields: ");
358
-
359
-			// Get the contact name.
360
-			$row = $this->db->fetchByAssoc($result);
361
-			$GLOBALS['log']->info("additional call fields $query");
362
-			if($row != null)
363
-			{
364
-				$this->contact_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], '', '');
365
-				$GLOBALS['log']->debug("Call($this->id): contact_name = $this->contact_name");
366
-				$GLOBALS['log']->debug("Call($this->id): contact_id = $this->contact_id");
367
-			}
368
-		}
369
-		if (!isset($this->duration_minutes)) {
370
-			$this->duration_minutes = $this->minutes_value_default;
371
-		}
350
+    function fill_in_additional_detail_fields()
351
+    {
352
+        global $locale;
353
+        parent::fill_in_additional_detail_fields();
354
+        if (!empty($this->contact_id)) {
355
+            $query  = "SELECT first_name, last_name FROM contacts ";
356
+            $query .= "WHERE id='$this->contact_id' AND deleted=0";
357
+            $result = $this->db->limitQuery($query,0,1,true," Error filling in additional detail fields: ");
358
+
359
+            // Get the contact name.
360
+            $row = $this->db->fetchByAssoc($result);
361
+            $GLOBALS['log']->info("additional call fields $query");
362
+            if($row != null)
363
+            {
364
+                $this->contact_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], '', '');
365
+                $GLOBALS['log']->debug("Call($this->id): contact_name = $this->contact_name");
366
+                $GLOBALS['log']->debug("Call($this->id): contact_id = $this->contact_id");
367
+            }
368
+        }
369
+        if (!isset($this->duration_minutes)) {
370
+            $this->duration_minutes = $this->minutes_value_default;
371
+        }
372 372
 
373 373
         global $timedate;
374 374
         //setting default date and time
375
-		if (is_null($this->date_start)) {
376
-			$this->date_start = $timedate->now();
377
-		}
378
-
379
-		if (is_null($this->duration_hours))
380
-			$this->duration_hours = "0";
381
-		if (is_null($this->duration_minutes))
382
-			$this->duration_minutes = "1";
383
-
384
-		$this->fill_in_additional_parent_fields();
385
-
386
-		global $app_list_strings;
387
-		$parent_types = $app_list_strings['record_type_display'];
388
-		$disabled_parent_types = ACLController::disabledModuleList($parent_types,false, 'list');
389
-		foreach($disabled_parent_types as $disabled_parent_type){
390
-			if($disabled_parent_type != $this->parent_type){
391
-				unset($parent_types[$disabled_parent_type]);
392
-			}
393
-		}
394
-
395
-		$this->parent_type_options = get_select_options_with_id($parent_types, $this->parent_type);
396
-
397
-		if (empty($this->reminder_time)) {
398
-			$this->reminder_time = -1;
399
-		}
400
-
401
-		if ( empty($this->id) ) {
402
-		    $reminder_t = $GLOBALS['current_user']->getPreference('reminder_time');
403
-		    if ( isset($reminder_t) )
404
-		        $this->reminder_time = $reminder_t;
405
-		}
406
-		$this->reminder_checked = $this->reminder_time == -1 ? false : true;
407
-
408
-		if (empty($this->email_reminder_time)) {
409
-			$this->email_reminder_time = -1;
410
-		}
411
-		if(empty($this->id)){
412
-			$reminder_t = $GLOBALS['current_user']->getPreference('email_reminder_time');
413
-			if(isset($reminder_t))
414
-		    		$this->email_reminder_time = $reminder_t;
415
-		}
416
-		$this->email_reminder_checked = $this->email_reminder_time == -1 ? false : true;
417
-
418
-		if (isset ($_REQUEST['parent_type']) && (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'SubpanelEdits')) {
419
-			$this->parent_type = $_REQUEST['parent_type'];
420
-		} elseif (is_null($this->parent_type)) {
421
-			$this->parent_type = $app_list_strings['record_type_default_key'];
422
-		}
423
-	}
424
-
425
-
426
-	function get_list_view_data(){
427
-		$call_fields = $this->get_list_view_array();
428
-		global $app_list_strings, $focus, $action, $currentModule;
429
-		if (isset($focus->id)) $id = $focus->id;
430
-		else $id = '';
431
-		if (isset($this->parent_type) && $this->parent_type != null)
432
-		{
433
-			$call_fields['PARENT_MODULE'] = $this->parent_type;
434
-		}
435
-		if ($this->status == "Planned") {
436
-			//cn: added this if() to deal with sequential Closes in Meetings.  this is a hack to a hack (formbase.php->handleRedirect)
437
-			if(empty($action))
438
-			    $action = "index";
375
+        if (is_null($this->date_start)) {
376
+            $this->date_start = $timedate->now();
377
+        }
378
+
379
+        if (is_null($this->duration_hours))
380
+            $this->duration_hours = "0";
381
+        if (is_null($this->duration_minutes))
382
+            $this->duration_minutes = "1";
383
+
384
+        $this->fill_in_additional_parent_fields();
385
+
386
+        global $app_list_strings;
387
+        $parent_types = $app_list_strings['record_type_display'];
388
+        $disabled_parent_types = ACLController::disabledModuleList($parent_types,false, 'list');
389
+        foreach($disabled_parent_types as $disabled_parent_type){
390
+            if($disabled_parent_type != $this->parent_type){
391
+                unset($parent_types[$disabled_parent_type]);
392
+            }
393
+        }
394
+
395
+        $this->parent_type_options = get_select_options_with_id($parent_types, $this->parent_type);
396
+
397
+        if (empty($this->reminder_time)) {
398
+            $this->reminder_time = -1;
399
+        }
400
+
401
+        if ( empty($this->id) ) {
402
+            $reminder_t = $GLOBALS['current_user']->getPreference('reminder_time');
403
+            if ( isset($reminder_t) )
404
+                $this->reminder_time = $reminder_t;
405
+        }
406
+        $this->reminder_checked = $this->reminder_time == -1 ? false : true;
407
+
408
+        if (empty($this->email_reminder_time)) {
409
+            $this->email_reminder_time = -1;
410
+        }
411
+        if(empty($this->id)){
412
+            $reminder_t = $GLOBALS['current_user']->getPreference('email_reminder_time');
413
+            if(isset($reminder_t))
414
+                    $this->email_reminder_time = $reminder_t;
415
+        }
416
+        $this->email_reminder_checked = $this->email_reminder_time == -1 ? false : true;
417
+
418
+        if (isset ($_REQUEST['parent_type']) && (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'SubpanelEdits')) {
419
+            $this->parent_type = $_REQUEST['parent_type'];
420
+        } elseif (is_null($this->parent_type)) {
421
+            $this->parent_type = $app_list_strings['record_type_default_key'];
422
+        }
423
+    }
424
+
425
+
426
+    function get_list_view_data(){
427
+        $call_fields = $this->get_list_view_array();
428
+        global $app_list_strings, $focus, $action, $currentModule;
429
+        if (isset($focus->id)) $id = $focus->id;
430
+        else $id = '';
431
+        if (isset($this->parent_type) && $this->parent_type != null)
432
+        {
433
+            $call_fields['PARENT_MODULE'] = $this->parent_type;
434
+        }
435
+        if ($this->status == "Planned") {
436
+            //cn: added this if() to deal with sequential Closes in Meetings.  this is a hack to a hack (formbase.php->handleRedirect)
437
+            if(empty($action))
438
+                $action = "index";
439 439
 
440 440
             $setCompleteUrl = "<a id='{$this->id}' onclick='SUGAR.util.closeActivityPanel.show(\"{$this->module_dir}\",\"{$this->id}\",\"Held\",\"listview\",\"1\");'>";
441
-			if ($this->ACLAccess('edit')) {
441
+            if ($this->ACLAccess('edit')) {
442 442
                 $call_fields['SET_COMPLETE'] = $setCompleteUrl . SugarThemeRegistry::current()->getImage("close_inline"," border='0'",null,null,'.gif',translate('LBL_CLOSEINLINE'))."</a>";
443 443
             } else {
444 444
                 $call_fields['SET_COMPLETE'] = '';
445 445
             }
446
-		}
447
-		global $timedate;
448
-		$today = $timedate->nowDb();
449
-		$nextday = $timedate->asDbDate($timedate->getNow()->modify("+1 day"));
450
-		$mergeTime = $call_fields['DATE_START']; //$timedate->merge_date_time($call_fields['DATE_START'], $call_fields['TIME_START']);
451
-		$date_db = $timedate->to_db($mergeTime);
452
-		if( $date_db	< $today){
453
-			$call_fields['DATE_START']= "<font class='overdueTask'>".$call_fields['DATE_START']."</font>";
454
-		}else if($date_db < $nextday){
455
-			$call_fields['DATE_START'] = "<font class='todaysTask'>".$call_fields['DATE_START']."</font>";
456
-		}else{
457
-			$call_fields['DATE_START'] = "<font class='futureTask'>".$call_fields['DATE_START']."</font>";
458
-		}
459
-		$this->fill_in_additional_detail_fields();
460
-
461
-		//make sure we grab the localized version of the contact name, if a contact is provided
462
-		if (!empty($this->contact_id)) {
463
-           // Bug# 46125 - make first name, last name, salutation and title of Contacts respect field level ACLs
446
+        }
447
+        global $timedate;
448
+        $today = $timedate->nowDb();
449
+        $nextday = $timedate->asDbDate($timedate->getNow()->modify("+1 day"));
450
+        $mergeTime = $call_fields['DATE_START']; //$timedate->merge_date_time($call_fields['DATE_START'], $call_fields['TIME_START']);
451
+        $date_db = $timedate->to_db($mergeTime);
452
+        if( $date_db	< $today){
453
+            $call_fields['DATE_START']= "<font class='overdueTask'>".$call_fields['DATE_START']."</font>";
454
+        }else if($date_db < $nextday){
455
+            $call_fields['DATE_START'] = "<font class='todaysTask'>".$call_fields['DATE_START']."</font>";
456
+        }else{
457
+            $call_fields['DATE_START'] = "<font class='futureTask'>".$call_fields['DATE_START']."</font>";
458
+        }
459
+        $this->fill_in_additional_detail_fields();
460
+
461
+        //make sure we grab the localized version of the contact name, if a contact is provided
462
+        if (!empty($this->contact_id)) {
463
+            // Bug# 46125 - make first name, last name, salutation and title of Contacts respect field level ACLs
464 464
             $contact_temp = BeanFactory::getBean("Contacts", $this->contact_id);
465 465
             if(!empty($contact_temp)) {
466 466
                 $contact_temp->_create_proper_name_field();
467 467
                 $this->contact_name = $contact_temp->full_name;
468 468
             }
469
-		}
469
+        }
470 470
 
471 471
         $call_fields['CONTACT_ID'] = $this->contact_id;
472 472
         $call_fields['CONTACT_NAME'] = $this->contact_name;
473
-		$call_fields['PARENT_NAME'] = $this->parent_name;
473
+        $call_fields['PARENT_NAME'] = $this->parent_name;
474 474
         $call_fields['REMINDER_CHECKED'] = $this->reminder_time==-1 ? false : true;
475
-	    $call_fields['EMAIL_REMINDER_CHECKED'] = $this->email_reminder_time==-1 ? false : true;
475
+        $call_fields['EMAIL_REMINDER_CHECKED'] = $this->email_reminder_time==-1 ? false : true;
476 476
 
477
-		return $call_fields;
478
-	}
477
+        return $call_fields;
478
+    }
479 479
 
480
-	function set_notification_body($xtpl, $call) {
481
-		global $sugar_config;
482
-		global $app_list_strings;
483
-		global $current_user;
484
-		global $app_list_strings;
485
-		global $timedate;
480
+    function set_notification_body($xtpl, $call) {
481
+        global $sugar_config;
482
+        global $app_list_strings;
483
+        global $current_user;
484
+        global $app_list_strings;
485
+        global $timedate;
486 486
 
487 487
         // rrs: bug 42684 - passing a contact breaks this call
488
-		$notifyUser =($call->current_notify_user->object_name == 'User') ? $call->current_notify_user : $current_user;
489
-
490
-
491
-		// Assumes $call dates are in user format
492
-		$calldate = $timedate->fromDb($call->date_start);
493
-		$xOffset = $timedate->asUser($calldate, $notifyUser).' '.$timedate->userTimezoneSuffix($calldate, $notifyUser);
494
-
495
-		if ( strtolower(get_class($call->current_notify_user)) == 'contact' ) {
496
-			$xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
497
-				  '/index.php?entryPoint=acceptDecline&module=Calls&contact_id='.$call->current_notify_user->id.'&record='.$call->id);
498
-		} elseif ( strtolower(get_class($call->current_notify_user)) == 'lead' ) {
499
-			$xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
500
-				  '/index.php?entryPoint=acceptDecline&module=Calls&lead_id='.$call->current_notify_user->id.'&record='.$call->id);
501
-		} else {
502
-			$xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
503
-				  '/index.php?entryPoint=acceptDecline&module=Calls&user_id='.$call->current_notify_user->id.'&record='.$call->id);
504
-		}
505
-
506
-		$xtpl->assign("CALL_TO", $call->current_notify_user->new_assigned_user_name);
507
-		$xtpl->assign("CALL_SUBJECT", $call->name);
508
-		$xtpl->assign("CALL_STARTDATE", $xOffset);
509
-		$xtpl->assign("CALL_HOURS", $call->duration_hours);
510
-		$xtpl->assign("CALL_MINUTES", $call->duration_minutes);
511
-		$xtpl->assign("CALL_STATUS", ((isset($call->status))?$app_list_strings['call_status_dom'][$call->status] : ""));
512
-		$xtpl->assign("CALL_DESCRIPTION", $call->description);
513
-
514
-		return $xtpl;
515
-	}
516
-
517
-
518
-	function get_call_users() {
519
-		$template = new User();
520
-		// First, get the list of IDs.
521
-		$query = "SELECT calls_users.required, calls_users.accept_status, calls_users.user_id from calls_users where calls_users.call_id='$this->id' AND calls_users.deleted=0";
522
-		$GLOBALS['log']->debug("Finding linked records $this->object_name: ".$query);
523
-		$result = $this->db->query($query, true);
524
-		$list = Array();
525
-
526
-		while($row = $this->db->fetchByAssoc($result)) {
527
-			$template = new User(); // PHP 5 will retrieve by reference, always over-writing the "old" one
528
-			$record = $template->retrieve($row['user_id']);
529
-			$template->required = $row['required'];
530
-			$template->accept_status = $row['accept_status'];
531
-
532
-			if($record != null) {
533
-			    // this copies the object into the array
534
-				$list[] = $template;
535
-			}
536
-		}
537
-		return $list;
538
-	}
539
-
540
-
541
-  function get_invite_calls(&$user)
542
-  {
488
+        $notifyUser =($call->current_notify_user->object_name == 'User') ? $call->current_notify_user : $current_user;
489
+
490
+
491
+        // Assumes $call dates are in user format
492
+        $calldate = $timedate->fromDb($call->date_start);
493
+        $xOffset = $timedate->asUser($calldate, $notifyUser).' '.$timedate->userTimezoneSuffix($calldate, $notifyUser);
494
+
495
+        if ( strtolower(get_class($call->current_notify_user)) == 'contact' ) {
496
+            $xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
497
+                    '/index.php?entryPoint=acceptDecline&module=Calls&contact_id='.$call->current_notify_user->id.'&record='.$call->id);
498
+        } elseif ( strtolower(get_class($call->current_notify_user)) == 'lead' ) {
499
+            $xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
500
+                    '/index.php?entryPoint=acceptDecline&module=Calls&lead_id='.$call->current_notify_user->id.'&record='.$call->id);
501
+        } else {
502
+            $xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
503
+                    '/index.php?entryPoint=acceptDecline&module=Calls&user_id='.$call->current_notify_user->id.'&record='.$call->id);
504
+        }
505
+
506
+        $xtpl->assign("CALL_TO", $call->current_notify_user->new_assigned_user_name);
507
+        $xtpl->assign("CALL_SUBJECT", $call->name);
508
+        $xtpl->assign("CALL_STARTDATE", $xOffset);
509
+        $xtpl->assign("CALL_HOURS", $call->duration_hours);
510
+        $xtpl->assign("CALL_MINUTES", $call->duration_minutes);
511
+        $xtpl->assign("CALL_STATUS", ((isset($call->status))?$app_list_strings['call_status_dom'][$call->status] : ""));
512
+        $xtpl->assign("CALL_DESCRIPTION", $call->description);
513
+
514
+        return $xtpl;
515
+    }
516
+
517
+
518
+    function get_call_users() {
519
+        $template = new User();
520
+        // First, get the list of IDs.
521
+        $query = "SELECT calls_users.required, calls_users.accept_status, calls_users.user_id from calls_users where calls_users.call_id='$this->id' AND calls_users.deleted=0";
522
+        $GLOBALS['log']->debug("Finding linked records $this->object_name: ".$query);
523
+        $result = $this->db->query($query, true);
524
+        $list = Array();
525
+
526
+        while($row = $this->db->fetchByAssoc($result)) {
527
+            $template = new User(); // PHP 5 will retrieve by reference, always over-writing the "old" one
528
+            $record = $template->retrieve($row['user_id']);
529
+            $template->required = $row['required'];
530
+            $template->accept_status = $row['accept_status'];
531
+
532
+            if($record != null) {
533
+                // this copies the object into the array
534
+                $list[] = $template;
535
+            }
536
+        }
537
+        return $list;
538
+    }
539
+
540
+
541
+    function get_invite_calls(&$user)
542
+    {
543 543
     $template = $this;
544 544
     // First, get the list of IDs.
545 545
     $query = "SELECT calls_users.required, calls_users.accept_status, calls_users.call_id from calls_users where calls_users.user_id='$user->id' AND ( calls_users.accept_status IS NULL OR  calls_users.accept_status='none') AND calls_users.deleted=0";
@@ -554,182 +554,182 @@  discard block
 block discarded – undo
554 554
 
555 555
     while($row = $this->db->fetchByAssoc($result))
556 556
     {
557
-      $record = $template->retrieve($row['call_id']);
558
-      $template->required = $row['required'];
559
-      $template->accept_status = $row['accept_status'];
557
+        $record = $template->retrieve($row['call_id']);
558
+        $template->required = $row['required'];
559
+        $template->accept_status = $row['accept_status'];
560 560
 
561 561
 
562
-      if($record != null)
563
-      {
562
+        if($record != null)
563
+        {
564 564
         // this copies the object into the array
565 565
         $list[] = $template;
566
-      }
566
+        }
567 567
     }
568 568
     return $list;
569 569
 
570
-  }
570
+    }
571 571
 
572 572
 
573
-  function set_accept_status(&$user,$status)
574
-  {
573
+    function set_accept_status(&$user,$status)
574
+    {
575 575
     if ( $user->object_name == 'User')
576 576
     {
577
-      $relate_values = array('user_id'=>$user->id,'call_id'=>$this->id);
578
-      $data_values = array('accept_status'=>$status);
579
-      $this->set_relationship($this->rel_users_table, $relate_values, true, true,$data_values);
580
-      global $current_user;
577
+        $relate_values = array('user_id'=>$user->id,'call_id'=>$this->id);
578
+        $data_values = array('accept_status'=>$status);
579
+        $this->set_relationship($this->rel_users_table, $relate_values, true, true,$data_values);
580
+        global $current_user;
581 581
 
582
-      if ( $this->update_vcal )
583
-      {
582
+        if ( $this->update_vcal )
583
+        {
584 584
         vCal::cache_sugar_vcal($user);
585
-      }
585
+        }
586 586
     }
587 587
     else if ( $user->object_name == 'Contact')
588 588
     {
589
-      $relate_values = array('contact_id'=>$user->id,'call_id'=>$this->id);
590
-      $data_values = array('accept_status'=>$status);
591
-      $this->set_relationship($this->rel_contacts_table, $relate_values, true, true,$data_values);
589
+        $relate_values = array('contact_id'=>$user->id,'call_id'=>$this->id);
590
+        $data_values = array('accept_status'=>$status);
591
+        $this->set_relationship($this->rel_contacts_table, $relate_values, true, true,$data_values);
592 592
     }
593 593
     else if ( $user->object_name == 'Lead')
594 594
     {
595
-      $relate_values = array('lead_id'=>$user->id,'call_id'=>$this->id);
596
-      $data_values = array('accept_status'=>$status);
597
-      $this->set_relationship($this->rel_leads_table, $relate_values, true, true,$data_values);
595
+        $relate_values = array('lead_id'=>$user->id,'call_id'=>$this->id);
596
+        $data_values = array('accept_status'=>$status);
597
+        $this->set_relationship($this->rel_leads_table, $relate_values, true, true,$data_values);
598
+    }
598 599
     }
599
-  }
600 600
 
601 601
 
602 602
 
603
-	function get_notification_recipients() {
604
-		if($this->special_notification) {
605
-			return parent::get_notification_recipients();
606
-		}
603
+    function get_notification_recipients() {
604
+        if($this->special_notification) {
605
+            return parent::get_notification_recipients();
606
+        }
607 607
 
608 608
 //		$GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($this,true));
609
-		$list = array();
609
+        $list = array();
610 610
         if(!is_array($this->contacts_arr)) {
611
-			$this->contacts_arr =	array();
612
-		}
611
+            $this->contacts_arr =	array();
612
+        }
613 613
 
614
-		if(!is_array($this->users_arr)) {
615
-			$this->users_arr =	array();
616
-		}
614
+        if(!is_array($this->users_arr)) {
615
+            $this->users_arr =	array();
616
+        }
617 617
 
618 618
         if(!is_array($this->leads_arr)) {
619
-			$this->leads_arr =	array();
620
-		}
621
-
622
-		foreach($this->users_arr as $user_id) {
623
-			$notify_user = new User();
624
-			$notify_user->retrieve($user_id);
625
-			$notify_user->new_assigned_user_name = $notify_user->full_name;
626
-			$GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
627
-			$list[$notify_user->id] = $notify_user;
628
-		}
629
-
630
-		foreach($this->contacts_arr as $contact_id) {
631
-			$notify_user = new Contact();
632
-			$notify_user->retrieve($contact_id);
633
-			$notify_user->new_assigned_user_name = $notify_user->full_name;
634
-			$GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
635
-			$list[$notify_user->id] = $notify_user;
636
-		}
619
+            $this->leads_arr =	array();
620
+        }
621
+
622
+        foreach($this->users_arr as $user_id) {
623
+            $notify_user = new User();
624
+            $notify_user->retrieve($user_id);
625
+            $notify_user->new_assigned_user_name = $notify_user->full_name;
626
+            $GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
627
+            $list[$notify_user->id] = $notify_user;
628
+        }
629
+
630
+        foreach($this->contacts_arr as $contact_id) {
631
+            $notify_user = new Contact();
632
+            $notify_user->retrieve($contact_id);
633
+            $notify_user->new_assigned_user_name = $notify_user->full_name;
634
+            $GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
635
+            $list[$notify_user->id] = $notify_user;
636
+        }
637 637
 
638 638
         foreach($this->leads_arr as $lead_id) {
639
-			$notify_user = new Lead();
640
-			$notify_user->retrieve($lead_id);
641
-			$notify_user->new_assigned_user_name = $notify_user->full_name;
642
-			$GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
643
-			$list[$notify_user->id] = $notify_user;
644
-		}
645
-		global $sugar_config;
646
-		if(isset($sugar_config['disable_notify_current_user']) && $sugar_config['disable_notify_current_user']) {
647
-			global $current_user;
648
-			if(isset($list[$current_user->id]))
649
-				unset($list[$current_user->id]);
650
-		}
639
+            $notify_user = new Lead();
640
+            $notify_user->retrieve($lead_id);
641
+            $notify_user->new_assigned_user_name = $notify_user->full_name;
642
+            $GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
643
+            $list[$notify_user->id] = $notify_user;
644
+        }
645
+        global $sugar_config;
646
+        if(isset($sugar_config['disable_notify_current_user']) && $sugar_config['disable_notify_current_user']) {
647
+            global $current_user;
648
+            if(isset($list[$current_user->id]))
649
+                unset($list[$current_user->id]);
650
+        }
651 651
 //		$GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($list,true));
652
-		return $list;
653
-	}
652
+        return $list;
653
+    }
654 654
 
655 655
     function bean_implements($interface){
656
-		switch($interface){
657
-			case 'ACL':return true;
658
-		}
659
-		return false;
660
-	}
661
-
662
-	function listviewACLHelper(){
663
-		$array_assign = parent::listviewACLHelper();
664
-		$is_owner = false;
665
-		$in_group = false; //SECURITY GROUPS
666
-		if(!empty($this->parent_name)){
667
-
668
-			if(!empty($this->parent_name_owner)){
669
-				global $current_user;
670
-				$is_owner = $current_user->id == $this->parent_name_owner;
671
-			}
672
-			/* BEGIN - SECURITY GROUPS */
673
-			//parent_name_owner not being set for whatever reason so we need to figure this out
674
-			else if(!empty($this->parent_type) && !empty($this->parent_id)) {
675
-				global $current_user;
656
+        switch($interface){
657
+            case 'ACL':return true;
658
+        }
659
+        return false;
660
+    }
661
+
662
+    function listviewACLHelper(){
663
+        $array_assign = parent::listviewACLHelper();
664
+        $is_owner = false;
665
+        $in_group = false; //SECURITY GROUPS
666
+        if(!empty($this->parent_name)){
667
+
668
+            if(!empty($this->parent_name_owner)){
669
+                global $current_user;
670
+                $is_owner = $current_user->id == $this->parent_name_owner;
671
+            }
672
+            /* BEGIN - SECURITY GROUPS */
673
+            //parent_name_owner not being set for whatever reason so we need to figure this out
674
+            else if(!empty($this->parent_type) && !empty($this->parent_id)) {
675
+                global $current_user;
676 676
                 $parent_bean = BeanFactory::getBean($this->parent_type,$this->parent_id);
677 677
                 if($parent_bean !== false) {
678
-                	$is_owner = $current_user->id == $parent_bean->assigned_user_id;
678
+                    $is_owner = $current_user->id == $parent_bean->assigned_user_id;
679 679
                 }
680
-			}
681
-			require_once("modules/SecurityGroups/SecurityGroup.php");
682
-			$in_group = SecurityGroup::groupHasAccess($this->parent_type, $this->parent_id, 'view'); 
683
-        	/* END - SECURITY GROUPS */
684
-		}
685
-
686
-			/* BEGIN - SECURITY GROUPS */
687
-			/**
680
+            }
681
+            require_once("modules/SecurityGroups/SecurityGroup.php");
682
+            $in_group = SecurityGroup::groupHasAccess($this->parent_type, $this->parent_id, 'view'); 
683
+            /* END - SECURITY GROUPS */
684
+        }
685
+
686
+            /* BEGIN - SECURITY GROUPS */
687
+            /**
688 688
 			if(!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner)){
689
-			*/
690
-			if(!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner, 'module', $in_group)){
691
-        	/* END - SECURITY GROUPS */
692
-				$array_assign['PARENT'] = 'a';
693
-			}else{
694
-				$array_assign['PARENT'] = 'span';
695
-			}
696
-		$is_owner = false;
697
-		$in_group = false; //SECURITY GROUPS
698
-		if(!empty($this->contact_name)){
699
-
700
-			if(!empty($this->contact_name_owner)){
701
-				global $current_user;
702
-				$is_owner = $current_user->id == $this->contact_name_owner;
703
-			}
704
-			/* BEGIN - SECURITY GROUPS */
705
-			//contact_name_owner not being set for whatever reason so we need to figure this out
706
-			else {
707
-				global $current_user;
689
+             */
690
+            if(!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner, 'module', $in_group)){
691
+            /* END - SECURITY GROUPS */
692
+                $array_assign['PARENT'] = 'a';
693
+            }else{
694
+                $array_assign['PARENT'] = 'span';
695
+            }
696
+        $is_owner = false;
697
+        $in_group = false; //SECURITY GROUPS
698
+        if(!empty($this->contact_name)){
699
+
700
+            if(!empty($this->contact_name_owner)){
701
+                global $current_user;
702
+                $is_owner = $current_user->id == $this->contact_name_owner;
703
+            }
704
+            /* BEGIN - SECURITY GROUPS */
705
+            //contact_name_owner not being set for whatever reason so we need to figure this out
706
+            else {
707
+                global $current_user;
708 708
                 $parent_bean = BeanFactory::getBean('Contacts',$this->contact_id);
709 709
                 if($parent_bean !== false) {
710
-                	$is_owner = $current_user->id == $parent_bean->assigned_user_id;
710
+                    $is_owner = $current_user->id == $parent_bean->assigned_user_id;
711 711
                 }
712
-			}
713
-			require_once("modules/SecurityGroups/SecurityGroup.php");
714
-			$in_group = SecurityGroup::groupHasAccess('Contacts', $this->contact_id, 'view'); 
715
-        	/* END - SECURITY GROUPS */
716
-		}
717
-			/* BEGIN - SECURITY GROUPS */
718
-			/**
712
+            }
713
+            require_once("modules/SecurityGroups/SecurityGroup.php");
714
+            $in_group = SecurityGroup::groupHasAccess('Contacts', $this->contact_id, 'view'); 
715
+            /* END - SECURITY GROUPS */
716
+        }
717
+            /* BEGIN - SECURITY GROUPS */
718
+            /**
719 719
 			if( ACLController::checkAccess('Contacts', 'view', $is_owner)){
720
-			*/
721
-			if( ACLController::checkAccess('Contacts', 'view', $is_owner, 'module', $in_group)){
722
-        	/* END - SECURITY GROUPS */
723
-				$array_assign['CONTACT'] = 'a';
724
-			}else{
725
-				$array_assign['CONTACT'] = 'span';
726
-			}
727
-
728
-		return $array_assign;
729
-	}
730
-
731
-	function save_relationship_changes($is_update, $exclude = array()) {
732
-		if(empty($this->in_workflow))
720
+             */
721
+            if( ACLController::checkAccess('Contacts', 'view', $is_owner, 'module', $in_group)){
722
+            /* END - SECURITY GROUPS */
723
+                $array_assign['CONTACT'] = 'a';
724
+            }else{
725
+                $array_assign['CONTACT'] = 'span';
726
+            }
727
+
728
+        return $array_assign;
729
+    }
730
+
731
+    function save_relationship_changes($is_update, $exclude = array()) {
732
+        if(empty($this->in_workflow))
733 733
         {
734 734
             if(empty($this->in_import))
735 735
             {
@@ -737,12 +737,12 @@  discard block
 block discarded – undo
737 737
                 //add assigned_user_id to exclude list and let the logic from MeetingFormBase determine whether assigned user id gets added to the relationship
738 738
                 if(!empty($GLOBALS['soap_server_object']))
739 739
                 {
740
-           		    $exclude = array('lead_id', 'contact_id', 'user_id');
741
-           	    }
740
+                        $exclude = array('lead_id', 'contact_id', 'user_id');
741
+                    }
742 742
                 else
743 743
                 {
744
-	                $exclude = array('lead_id', 'contact_id', 'user_id', 'assigned_user_id');
745
-           	    }
744
+                    $exclude = array('lead_id', 'contact_id', 'user_id', 'assigned_user_id');
745
+                    }
746 746
             }
747 747
             else
748 748
             {
@@ -751,15 +751,15 @@  discard block
 block discarded – undo
751 751
 
752 752
 
753 753
         }
754
-		parent::save_relationship_changes($is_update, $exclude);
755
-	}
754
+        parent::save_relationship_changes($is_update, $exclude);
755
+    }
756 756
 
757 757
     public function getDefaultStatus()
758 758
     {
759
-         $def = $this->field_defs['status'];
760
-         if (isset($def['default'])) {
761
-             return $def['default'];
762
-         } else {
759
+            $def = $this->field_defs['status'];
760
+            if (isset($def['default'])) {
761
+                return $def['default'];
762
+            } else {
763 763
             $app = return_app_list_strings_language($GLOBALS['current_language']);
764 764
             if (isset($def['options']) && isset($app[$def['options']])) {
765 765
                 $keys = array_keys($app[$def['options']]);
Please login to merge, or discard this patch.
Spacing   +104 added lines, -104 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.
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	var $leads_arr;
98 98
 	var $default_call_name_values = array('Assemble catalogs', 'Make travel arrangements', 'Send a letter', 'Send contract', 'Send fax', 'Send a follow-up letter', 'Send literature', 'Send proposal', 'Send quote');
99 99
 	var $minutes_value_default = 15;
100
-	var $minutes_values = array('0'=>'00','15'=>'15','30'=>'30','45'=>'45');
100
+	var $minutes_values = array('0'=>'00', '15'=>'15', '30'=>'30', '45'=>'45');
101 101
 	var $table_name = "calls";
102 102
 	var $rel_users_table = "calls_users";
103 103
 	var $rel_contacts_table = "calls_contacts";
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
 	// This is used to retrieve related fields from form posts.
113 113
 	var $additional_column_fields = array('assigned_user_name', 'assigned_user_id', 'contact_id', 'user_id', 'contact_name');
114
-	var $relationship_fields = array(	'account_id'		=> 'accounts',
114
+	var $relationship_fields = array('account_id'		=> 'accounts',
115 115
 										'opportunity_id'	=> 'opportunities',
116 116
 										'contact_id'		=> 'contacts',
117 117
 										'case_id'			=> 'cases',
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
 
136 136
 
137
-         if(!empty($GLOBALS['app_list_strings']['duration_intervals']))
137
+         if (!empty($GLOBALS['app_list_strings']['duration_intervals']))
138 138
         	$this->minutes_values = $GLOBALS['app_list_strings']['duration_intervals'];
139 139
 	}
140 140
 
@@ -143,58 +143,58 @@  discard block
 block discarded – undo
143 143
 	 * @param $view string
144 144
 	 * @param $is_owner bool
145 145
 	 */
146
-	function ACLAccess($view,$is_owner='not_set',$in_group='not_set'){
146
+	function ACLAccess($view, $is_owner = 'not_set', $in_group = 'not_set') {
147 147
 		// don't check if call is being synced from Outlook
148
-		if($this->syncing == false){
148
+		if ($this->syncing == false) {
149 149
 			$view = strtolower($view);
150
-			switch($view){
150
+			switch ($view) {
151 151
 				case 'edit':
152 152
 				case 'save':
153 153
 				case 'editview':
154 154
 				case 'delete':
155
-					if(!empty($this->recurring_source) && $this->recurring_source != "Sugar"){
155
+					if (!empty($this->recurring_source) && $this->recurring_source != "Sugar") {
156 156
 						return false;
157 157
 					}
158 158
 			}
159 159
 		}
160
-		return parent::ACLAccess($view,$is_owner,$in_group);
160
+		return parent::ACLAccess($view, $is_owner, $in_group);
161 161
 	}
162 162
     // save date_end by calculating user input
163 163
     // this is for calendar
164 164
 	function save($check_notify = FALSE) {
165
-		global $timedate,$current_user;
165
+		global $timedate, $current_user;
166 166
 
167
-	    if(isset($this->date_start) && isset($this->duration_hours) && isset($this->duration_minutes))
167
+	    if (isset($this->date_start) && isset($this->duration_hours) && isset($this->duration_minutes))
168 168
         {
169 169
     	    $td = $timedate->fromDb($this->date_start);
170
-    	    if($td)
170
+    	    if ($td)
171 171
     	    {
172 172
 	        	$this->date_end = $td->modify("+{$this->duration_hours} hours {$this->duration_minutes} mins")->asDb();
173 173
     	    }
174 174
         }
175 175
 
176
-		if(!empty($_REQUEST['send_invites']) && $_REQUEST['send_invites'] == '1') {
176
+		if (!empty($_REQUEST['send_invites']) && $_REQUEST['send_invites'] == '1') {
177 177
 			$check_notify = true;
178 178
         } else {
179 179
 			$check_notify = false;
180 180
 		}
181
-		if(empty($_REQUEST['send_invites'])) {
182
-			if(!empty($this->id)) {
181
+		if (empty($_REQUEST['send_invites'])) {
182
+			if (!empty($this->id)) {
183 183
 				$old_record = new Call();
184 184
 				$old_record->retrieve($this->id);
185 185
 				$old_assigned_user_id = $old_record->assigned_user_id;
186 186
 			}
187
-			if((empty($this->id) && isset($_REQUEST['assigned_user_id']) && !empty($_REQUEST['assigned_user_id']) && $GLOBALS['current_user']->id != $_REQUEST['assigned_user_id']) || (isset($old_assigned_user_id) && !empty($old_assigned_user_id) && isset($_REQUEST['assigned_user_id']) && !empty($_REQUEST['assigned_user_id']) && $old_assigned_user_id != $_REQUEST['assigned_user_id']) ){
187
+			if ((empty($this->id) && isset($_REQUEST['assigned_user_id']) && !empty($_REQUEST['assigned_user_id']) && $GLOBALS['current_user']->id != $_REQUEST['assigned_user_id']) || (isset($old_assigned_user_id) && !empty($old_assigned_user_id) && isset($_REQUEST['assigned_user_id']) && !empty($_REQUEST['assigned_user_id']) && $old_assigned_user_id != $_REQUEST['assigned_user_id'])) {
188 188
 				$this->special_notification = true;
189
-				if(!isset($GLOBALS['resavingRelatedBeans']) || $GLOBALS['resavingRelatedBeans'] == false) {
189
+				if (!isset($GLOBALS['resavingRelatedBeans']) || $GLOBALS['resavingRelatedBeans'] == false) {
190 190
 					$check_notify = true;
191 191
 				}
192
-                if(isset($_REQUEST['assigned_user_name'])) {
192
+                if (isset($_REQUEST['assigned_user_name'])) {
193 193
                     $this->new_assigned_user_name = $_REQUEST['assigned_user_name'];
194 194
                 }
195 195
 			}
196 196
 		}
197
-        if (empty($this->status) ) {
197
+        if (empty($this->status)) {
198 198
             $this->status = $this->getDefaultStatus();
199 199
         }
200 200
 
@@ -212,11 +212,11 @@  discard block
 block discarded – undo
212 212
         global $current_user;
213 213
 
214 214
 
215
-        if($this->update_vcal) {
215
+        if ($this->update_vcal) {
216 216
 			vCal::cache_sugar_vcal($current_user);
217 217
         }
218 218
 
219
-		if(isset($_REQUEST['reminders_data'])) {
219
+		if (isset($_REQUEST['reminders_data'])) {
220 220
 			Reminder::saveRemindersDataJson('Calls', $return_id, html_entity_decode($_REQUEST['reminders_data']));
221 221
 		}
222 222
 
@@ -242,13 +242,13 @@  discard block
 block discarded – undo
242 242
 		return "$this->name";
243 243
 	}
244 244
 
245
-	function create_list_query($order_by, $where, $show_deleted=0)
245
+	function create_list_query($order_by, $where, $show_deleted = 0)
246 246
 	{
247 247
         $custom_join = $this->getCustomJoin();
248 248
                 $query = "SELECT ";
249 249
 		$query .= "
250 250
 			calls.*,";
251
-			if ( preg_match("/calls_users\.user_id/",$where))
251
+			if (preg_match("/calls_users\.user_id/", $where))
252 252
 			{
253 253
 				$query .= "calls_users.required,
254 254
 				calls_users.accept_status,";
@@ -260,19 +260,19 @@  discard block
 block discarded – undo
260 260
 
261 261
 			// this line will help generate a GMT-metric to compare to a locale's timezone
262 262
 
263
-			if ( preg_match("/contacts/",$where)){
263
+			if (preg_match("/contacts/", $where)) {
264 264
 				$query .= ", contacts.first_name, contacts.last_name";
265 265
 				$query .= ", contacts.assigned_user_id contact_name_owner";
266 266
 			}
267 267
 			$query .= " FROM calls ";
268 268
 
269
-			if ( preg_match("/contacts/",$where)){
270
-				$query .=	"LEFT JOIN calls_contacts
269
+			if (preg_match("/contacts/", $where)) {
270
+				$query .= "LEFT JOIN calls_contacts
271 271
 	                    ON calls.id=calls_contacts.call_id
272 272
 	                    LEFT JOIN contacts
273 273
 	                    ON calls_contacts.contact_id=contacts.id ";
274 274
 			}
275
-			if ( preg_match('/calls_users\.user_id/',$where))
275
+			if (preg_match('/calls_users\.user_id/', $where))
276 276
 			{
277 277
 		$query .= "LEFT JOIN calls_users
278 278
 			ON calls.id=calls_users.call_id and calls_users.deleted=0 ";
@@ -282,15 +282,15 @@  discard block
 block discarded – undo
282 282
 			ON calls.assigned_user_id=users.id ";
283 283
         $query .= $custom_join['join'];
284 284
 			$where_auto = '1=1';
285
-       		 if($show_deleted == 0){
285
+       		 if ($show_deleted == 0) {
286 286
             	$where_auto = " $this->table_name.deleted=0  ";
287
-			}else if($show_deleted == 1){
287
+			} else if ($show_deleted == 1) {
288 288
 				$where_auto = " $this->table_name.deleted=1 ";
289 289
 			}
290 290
 
291 291
 			//$where_auto .= " GROUP BY calls.id";
292 292
 
293
-		if($where != "")
293
+		if ($where != "")
294 294
 			$query .= "where $where AND ".$where_auto;
295 295
 		else
296 296
 			$query .= "where ".$where_auto;
@@ -299,17 +299,17 @@  discard block
 block discarded – undo
299 299
         if (empty($order_by)) {
300 300
             $order_by = 'calls.name';
301 301
         }
302
-        $query .= ' ORDER BY ' . $order_by;
302
+        $query .= ' ORDER BY '.$order_by;
303 303
 
304 304
 		return $query;
305 305
 	}
306 306
 
307
-        function create_export_query($order_by, $where, $relate_link_join='')
307
+        function create_export_query($order_by, $where, $relate_link_join = '')
308 308
         {
309 309
             $custom_join = $this->getCustomJoin(true, true, $where);
310 310
             $custom_join['join'] .= $relate_link_join;
311 311
 			$contact_required = stristr($where, "contacts");
312
-            if($contact_required)
312
+            if ($contact_required)
313 313
             {
314 314
                     $query = "SELECT calls.*, contacts.first_name, contacts.last_name, users.user_name as assigned_user_name ";
315 315
                     $query .= $custom_join['select'];
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 
330 330
             $query .= $custom_join['join'];
331 331
 
332
-			if($where != "")
332
+			if ($where != "")
333 333
                     $query .= "where $where AND ".$where_auto;
334 334
             else
335 335
                     $query .= "where ".$where_auto;
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
         if (empty($order_by)) {
339 339
             $order_by = 'calls.name';
340 340
         }
341
-        $query .= ' ORDER BY ' . $order_by;
341
+        $query .= ' ORDER BY '.$order_by;
342 342
 
343 343
             return $query;
344 344
         }
@@ -354,12 +354,12 @@  discard block
 block discarded – undo
354 354
 		if (!empty($this->contact_id)) {
355 355
 			$query  = "SELECT first_name, last_name FROM contacts ";
356 356
 			$query .= "WHERE id='$this->contact_id' AND deleted=0";
357
-			$result = $this->db->limitQuery($query,0,1,true," Error filling in additional detail fields: ");
357
+			$result = $this->db->limitQuery($query, 0, 1, true, " Error filling in additional detail fields: ");
358 358
 
359 359
 			// Get the contact name.
360 360
 			$row = $this->db->fetchByAssoc($result);
361 361
 			$GLOBALS['log']->info("additional call fields $query");
362
-			if($row != null)
362
+			if ($row != null)
363 363
 			{
364 364
 				$this->contact_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], '', '');
365 365
 				$GLOBALS['log']->debug("Call($this->id): contact_name = $this->contact_name");
@@ -385,9 +385,9 @@  discard block
 block discarded – undo
385 385
 
386 386
 		global $app_list_strings;
387 387
 		$parent_types = $app_list_strings['record_type_display'];
388
-		$disabled_parent_types = ACLController::disabledModuleList($parent_types,false, 'list');
389
-		foreach($disabled_parent_types as $disabled_parent_type){
390
-			if($disabled_parent_type != $this->parent_type){
388
+		$disabled_parent_types = ACLController::disabledModuleList($parent_types, false, 'list');
389
+		foreach ($disabled_parent_types as $disabled_parent_type) {
390
+			if ($disabled_parent_type != $this->parent_type) {
391 391
 				unset($parent_types[$disabled_parent_type]);
392 392
 			}
393 393
 		}
@@ -398,9 +398,9 @@  discard block
 block discarded – undo
398 398
 			$this->reminder_time = -1;
399 399
 		}
400 400
 
401
-		if ( empty($this->id) ) {
401
+		if (empty($this->id)) {
402 402
 		    $reminder_t = $GLOBALS['current_user']->getPreference('reminder_time');
403
-		    if ( isset($reminder_t) )
403
+		    if (isset($reminder_t))
404 404
 		        $this->reminder_time = $reminder_t;
405 405
 		}
406 406
 		$this->reminder_checked = $this->reminder_time == -1 ? false : true;
@@ -408,9 +408,9 @@  discard block
 block discarded – undo
408 408
 		if (empty($this->email_reminder_time)) {
409 409
 			$this->email_reminder_time = -1;
410 410
 		}
411
-		if(empty($this->id)){
411
+		if (empty($this->id)) {
412 412
 			$reminder_t = $GLOBALS['current_user']->getPreference('email_reminder_time');
413
-			if(isset($reminder_t))
413
+			if (isset($reminder_t))
414 414
 		    		$this->email_reminder_time = $reminder_t;
415 415
 		}
416 416
 		$this->email_reminder_checked = $this->email_reminder_time == -1 ? false : true;
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 	}
424 424
 
425 425
 
426
-	function get_list_view_data(){
426
+	function get_list_view_data() {
427 427
 		$call_fields = $this->get_list_view_array();
428 428
 		global $app_list_strings, $focus, $action, $currentModule;
429 429
 		if (isset($focus->id)) $id = $focus->id;
@@ -434,12 +434,12 @@  discard block
 block discarded – undo
434 434
 		}
435 435
 		if ($this->status == "Planned") {
436 436
 			//cn: added this if() to deal with sequential Closes in Meetings.  this is a hack to a hack (formbase.php->handleRedirect)
437
-			if(empty($action))
437
+			if (empty($action))
438 438
 			    $action = "index";
439 439
 
440 440
             $setCompleteUrl = "<a id='{$this->id}' onclick='SUGAR.util.closeActivityPanel.show(\"{$this->module_dir}\",\"{$this->id}\",\"Held\",\"listview\",\"1\");'>";
441 441
 			if ($this->ACLAccess('edit')) {
442
-                $call_fields['SET_COMPLETE'] = $setCompleteUrl . SugarThemeRegistry::current()->getImage("close_inline"," border='0'",null,null,'.gif',translate('LBL_CLOSEINLINE'))."</a>";
442
+                $call_fields['SET_COMPLETE'] = $setCompleteUrl.SugarThemeRegistry::current()->getImage("close_inline", " border='0'", null, null, '.gif', translate('LBL_CLOSEINLINE'))."</a>";
443 443
             } else {
444 444
                 $call_fields['SET_COMPLETE'] = '';
445 445
             }
@@ -449,11 +449,11 @@  discard block
 block discarded – undo
449 449
 		$nextday = $timedate->asDbDate($timedate->getNow()->modify("+1 day"));
450 450
 		$mergeTime = $call_fields['DATE_START']; //$timedate->merge_date_time($call_fields['DATE_START'], $call_fields['TIME_START']);
451 451
 		$date_db = $timedate->to_db($mergeTime);
452
-		if( $date_db	< $today){
453
-			$call_fields['DATE_START']= "<font class='overdueTask'>".$call_fields['DATE_START']."</font>";
454
-		}else if($date_db < $nextday){
452
+		if ($date_db < $today) {
453
+			$call_fields['DATE_START'] = "<font class='overdueTask'>".$call_fields['DATE_START']."</font>";
454
+		} else if ($date_db < $nextday) {
455 455
 			$call_fields['DATE_START'] = "<font class='todaysTask'>".$call_fields['DATE_START']."</font>";
456
-		}else{
456
+		} else {
457 457
 			$call_fields['DATE_START'] = "<font class='futureTask'>".$call_fields['DATE_START']."</font>";
458 458
 		}
459 459
 		$this->fill_in_additional_detail_fields();
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 		if (!empty($this->contact_id)) {
463 463
            // Bug# 46125 - make first name, last name, salutation and title of Contacts respect field level ACLs
464 464
             $contact_temp = BeanFactory::getBean("Contacts", $this->contact_id);
465
-            if(!empty($contact_temp)) {
465
+            if (!empty($contact_temp)) {
466 466
                 $contact_temp->_create_proper_name_field();
467 467
                 $this->contact_name = $contact_temp->full_name;
468 468
             }
@@ -471,8 +471,8 @@  discard block
 block discarded – undo
471 471
         $call_fields['CONTACT_ID'] = $this->contact_id;
472 472
         $call_fields['CONTACT_NAME'] = $this->contact_name;
473 473
 		$call_fields['PARENT_NAME'] = $this->parent_name;
474
-        $call_fields['REMINDER_CHECKED'] = $this->reminder_time==-1 ? false : true;
475
-	    $call_fields['EMAIL_REMINDER_CHECKED'] = $this->email_reminder_time==-1 ? false : true;
474
+        $call_fields['REMINDER_CHECKED'] = $this->reminder_time == -1 ? false : true;
475
+	    $call_fields['EMAIL_REMINDER_CHECKED'] = $this->email_reminder_time == -1 ? false : true;
476 476
 
477 477
 		return $call_fields;
478 478
 	}
@@ -485,17 +485,17 @@  discard block
 block discarded – undo
485 485
 		global $timedate;
486 486
 
487 487
         // rrs: bug 42684 - passing a contact breaks this call
488
-		$notifyUser =($call->current_notify_user->object_name == 'User') ? $call->current_notify_user : $current_user;
488
+		$notifyUser = ($call->current_notify_user->object_name == 'User') ? $call->current_notify_user : $current_user;
489 489
 
490 490
 
491 491
 		// Assumes $call dates are in user format
492 492
 		$calldate = $timedate->fromDb($call->date_start);
493 493
 		$xOffset = $timedate->asUser($calldate, $notifyUser).' '.$timedate->userTimezoneSuffix($calldate, $notifyUser);
494 494
 
495
-		if ( strtolower(get_class($call->current_notify_user)) == 'contact' ) {
495
+		if (strtolower(get_class($call->current_notify_user)) == 'contact') {
496 496
 			$xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
497 497
 				  '/index.php?entryPoint=acceptDecline&module=Calls&contact_id='.$call->current_notify_user->id.'&record='.$call->id);
498
-		} elseif ( strtolower(get_class($call->current_notify_user)) == 'lead' ) {
498
+		} elseif (strtolower(get_class($call->current_notify_user)) == 'lead') {
499 499
 			$xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
500 500
 				  '/index.php?entryPoint=acceptDecline&module=Calls&lead_id='.$call->current_notify_user->id.'&record='.$call->id);
501 501
 		} else {
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 		$xtpl->assign("CALL_STARTDATE", $xOffset);
509 509
 		$xtpl->assign("CALL_HOURS", $call->duration_hours);
510 510
 		$xtpl->assign("CALL_MINUTES", $call->duration_minutes);
511
-		$xtpl->assign("CALL_STATUS", ((isset($call->status))?$app_list_strings['call_status_dom'][$call->status] : ""));
511
+		$xtpl->assign("CALL_STATUS", ((isset($call->status)) ? $app_list_strings['call_status_dom'][$call->status] : ""));
512 512
 		$xtpl->assign("CALL_DESCRIPTION", $call->description);
513 513
 
514 514
 		return $xtpl;
@@ -523,13 +523,13 @@  discard block
 block discarded – undo
523 523
 		$result = $this->db->query($query, true);
524 524
 		$list = Array();
525 525
 
526
-		while($row = $this->db->fetchByAssoc($result)) {
526
+		while ($row = $this->db->fetchByAssoc($result)) {
527 527
 			$template = new User(); // PHP 5 will retrieve by reference, always over-writing the "old" one
528 528
 			$record = $template->retrieve($row['user_id']);
529 529
 			$template->required = $row['required'];
530 530
 			$template->accept_status = $row['accept_status'];
531 531
 
532
-			if($record != null) {
532
+			if ($record != null) {
533 533
 			    // this copies the object into the array
534 534
 				$list[] = $template;
535 535
 			}
@@ -552,14 +552,14 @@  discard block
 block discarded – undo
552 552
     $list = Array();
553 553
 
554 554
 
555
-    while($row = $this->db->fetchByAssoc($result))
555
+    while ($row = $this->db->fetchByAssoc($result))
556 556
     {
557 557
       $record = $template->retrieve($row['call_id']);
558 558
       $template->required = $row['required'];
559 559
       $template->accept_status = $row['accept_status'];
560 560
 
561 561
 
562
-      if($record != null)
562
+      if ($record != null)
563 563
       {
564 564
         // this copies the object into the array
565 565
         $list[] = $template;
@@ -570,56 +570,56 @@  discard block
 block discarded – undo
570 570
   }
571 571
 
572 572
 
573
-  function set_accept_status(&$user,$status)
573
+  function set_accept_status(&$user, $status)
574 574
   {
575
-    if ( $user->object_name == 'User')
575
+    if ($user->object_name == 'User')
576 576
     {
577
-      $relate_values = array('user_id'=>$user->id,'call_id'=>$this->id);
577
+      $relate_values = array('user_id'=>$user->id, 'call_id'=>$this->id);
578 578
       $data_values = array('accept_status'=>$status);
579
-      $this->set_relationship($this->rel_users_table, $relate_values, true, true,$data_values);
579
+      $this->set_relationship($this->rel_users_table, $relate_values, true, true, $data_values);
580 580
       global $current_user;
581 581
 
582
-      if ( $this->update_vcal )
582
+      if ($this->update_vcal)
583 583
       {
584 584
         vCal::cache_sugar_vcal($user);
585 585
       }
586 586
     }
587
-    else if ( $user->object_name == 'Contact')
587
+    else if ($user->object_name == 'Contact')
588 588
     {
589
-      $relate_values = array('contact_id'=>$user->id,'call_id'=>$this->id);
589
+      $relate_values = array('contact_id'=>$user->id, 'call_id'=>$this->id);
590 590
       $data_values = array('accept_status'=>$status);
591
-      $this->set_relationship($this->rel_contacts_table, $relate_values, true, true,$data_values);
591
+      $this->set_relationship($this->rel_contacts_table, $relate_values, true, true, $data_values);
592 592
     }
593
-    else if ( $user->object_name == 'Lead')
593
+    else if ($user->object_name == 'Lead')
594 594
     {
595
-      $relate_values = array('lead_id'=>$user->id,'call_id'=>$this->id);
595
+      $relate_values = array('lead_id'=>$user->id, 'call_id'=>$this->id);
596 596
       $data_values = array('accept_status'=>$status);
597
-      $this->set_relationship($this->rel_leads_table, $relate_values, true, true,$data_values);
597
+      $this->set_relationship($this->rel_leads_table, $relate_values, true, true, $data_values);
598 598
     }
599 599
   }
600 600
 
601 601
 
602 602
 
603 603
 	function get_notification_recipients() {
604
-		if($this->special_notification) {
604
+		if ($this->special_notification) {
605 605
 			return parent::get_notification_recipients();
606 606
 		}
607 607
 
608 608
 //		$GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($this,true));
609 609
 		$list = array();
610
-        if(!is_array($this->contacts_arr)) {
611
-			$this->contacts_arr =	array();
610
+        if (!is_array($this->contacts_arr)) {
611
+			$this->contacts_arr = array();
612 612
 		}
613 613
 
614
-		if(!is_array($this->users_arr)) {
615
-			$this->users_arr =	array();
614
+		if (!is_array($this->users_arr)) {
615
+			$this->users_arr = array();
616 616
 		}
617 617
 
618
-        if(!is_array($this->leads_arr)) {
619
-			$this->leads_arr =	array();
618
+        if (!is_array($this->leads_arr)) {
619
+			$this->leads_arr = array();
620 620
 		}
621 621
 
622
-		foreach($this->users_arr as $user_id) {
622
+		foreach ($this->users_arr as $user_id) {
623 623
 			$notify_user = new User();
624 624
 			$notify_user->retrieve($user_id);
625 625
 			$notify_user->new_assigned_user_name = $notify_user->full_name;
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
 			$list[$notify_user->id] = $notify_user;
628 628
 		}
629 629
 
630
-		foreach($this->contacts_arr as $contact_id) {
630
+		foreach ($this->contacts_arr as $contact_id) {
631 631
 			$notify_user = new Contact();
632 632
 			$notify_user->retrieve($contact_id);
633 633
 			$notify_user->new_assigned_user_name = $notify_user->full_name;
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
 			$list[$notify_user->id] = $notify_user;
636 636
 		}
637 637
 
638
-        foreach($this->leads_arr as $lead_id) {
638
+        foreach ($this->leads_arr as $lead_id) {
639 639
 			$notify_user = new Lead();
640 640
 			$notify_user->retrieve($lead_id);
641 641
 			$notify_user->new_assigned_user_name = $notify_user->full_name;
@@ -643,38 +643,38 @@  discard block
 block discarded – undo
643 643
 			$list[$notify_user->id] = $notify_user;
644 644
 		}
645 645
 		global $sugar_config;
646
-		if(isset($sugar_config['disable_notify_current_user']) && $sugar_config['disable_notify_current_user']) {
646
+		if (isset($sugar_config['disable_notify_current_user']) && $sugar_config['disable_notify_current_user']) {
647 647
 			global $current_user;
648
-			if(isset($list[$current_user->id]))
648
+			if (isset($list[$current_user->id]))
649 649
 				unset($list[$current_user->id]);
650 650
 		}
651 651
 //		$GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($list,true));
652 652
 		return $list;
653 653
 	}
654 654
 
655
-    function bean_implements($interface){
656
-		switch($interface){
655
+    function bean_implements($interface) {
656
+		switch ($interface) {
657 657
 			case 'ACL':return true;
658 658
 		}
659 659
 		return false;
660 660
 	}
661 661
 
662
-	function listviewACLHelper(){
662
+	function listviewACLHelper() {
663 663
 		$array_assign = parent::listviewACLHelper();
664 664
 		$is_owner = false;
665 665
 		$in_group = false; //SECURITY GROUPS
666
-		if(!empty($this->parent_name)){
666
+		if (!empty($this->parent_name)) {
667 667
 
668
-			if(!empty($this->parent_name_owner)){
668
+			if (!empty($this->parent_name_owner)) {
669 669
 				global $current_user;
670 670
 				$is_owner = $current_user->id == $this->parent_name_owner;
671 671
 			}
672 672
 			/* BEGIN - SECURITY GROUPS */
673 673
 			//parent_name_owner not being set for whatever reason so we need to figure this out
674
-			else if(!empty($this->parent_type) && !empty($this->parent_id)) {
674
+			else if (!empty($this->parent_type) && !empty($this->parent_id)) {
675 675
 				global $current_user;
676
-                $parent_bean = BeanFactory::getBean($this->parent_type,$this->parent_id);
677
-                if($parent_bean !== false) {
676
+                $parent_bean = BeanFactory::getBean($this->parent_type, $this->parent_id);
677
+                if ($parent_bean !== false) {
678 678
                 	$is_owner = $current_user->id == $parent_bean->assigned_user_id;
679 679
                 }
680 680
 			}
@@ -687,17 +687,17 @@  discard block
 block discarded – undo
687 687
 			/**
688 688
 			if(!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner)){
689 689
 			*/
690
-			if(!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner, 'module', $in_group)){
690
+			if (!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner, 'module', $in_group)) {
691 691
         	/* END - SECURITY GROUPS */
692 692
 				$array_assign['PARENT'] = 'a';
693
-			}else{
693
+			} else {
694 694
 				$array_assign['PARENT'] = 'span';
695 695
 			}
696 696
 		$is_owner = false;
697 697
 		$in_group = false; //SECURITY GROUPS
698
-		if(!empty($this->contact_name)){
698
+		if (!empty($this->contact_name)) {
699 699
 
700
-			if(!empty($this->contact_name_owner)){
700
+			if (!empty($this->contact_name_owner)) {
701 701
 				global $current_user;
702 702
 				$is_owner = $current_user->id == $this->contact_name_owner;
703 703
 			}
@@ -705,8 +705,8 @@  discard block
 block discarded – undo
705 705
 			//contact_name_owner not being set for whatever reason so we need to figure this out
706 706
 			else {
707 707
 				global $current_user;
708
-                $parent_bean = BeanFactory::getBean('Contacts',$this->contact_id);
709
-                if($parent_bean !== false) {
708
+                $parent_bean = BeanFactory::getBean('Contacts', $this->contact_id);
709
+                if ($parent_bean !== false) {
710 710
                 	$is_owner = $current_user->id == $parent_bean->assigned_user_id;
711 711
                 }
712 712
 			}
@@ -718,10 +718,10 @@  discard block
 block discarded – undo
718 718
 			/**
719 719
 			if( ACLController::checkAccess('Contacts', 'view', $is_owner)){
720 720
 			*/
721
-			if( ACLController::checkAccess('Contacts', 'view', $is_owner, 'module', $in_group)){
721
+			if (ACLController::checkAccess('Contacts', 'view', $is_owner, 'module', $in_group)) {
722 722
         	/* END - SECURITY GROUPS */
723 723
 				$array_assign['CONTACT'] = 'a';
724
-			}else{
724
+			} else {
725 725
 				$array_assign['CONTACT'] = 'span';
726 726
 			}
727 727
 
@@ -729,13 +729,13 @@  discard block
 block discarded – undo
729 729
 	}
730 730
 
731 731
 	function save_relationship_changes($is_update, $exclude = array()) {
732
-		if(empty($this->in_workflow))
732
+		if (empty($this->in_workflow))
733 733
         {
734
-            if(empty($this->in_import))
734
+            if (empty($this->in_import))
735 735
             {
736 736
                 //if the global soap_server_object variable is not empty (as in from a soap/OPI call), then process the assigned_user_id relationship, otherwise
737 737
                 //add assigned_user_id to exclude list and let the logic from MeetingFormBase determine whether assigned user id gets added to the relationship
738
-                if(!empty($GLOBALS['soap_server_object']))
738
+                if (!empty($GLOBALS['soap_server_object']))
739 739
                 {
740 740
            		    $exclude = array('lead_id', 'contact_id', 'user_id');
741 741
            	    }
Please login to merge, or discard this patch.
Braces   +49 added lines, -40 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -134,8 +136,9 @@  discard block
 block discarded – undo
134 136
 
135 137
 
136 138
 
137
-         if(!empty($GLOBALS['app_list_strings']['duration_intervals']))
138
-        	$this->minutes_values = $GLOBALS['app_list_strings']['duration_intervals'];
139
+         if(!empty($GLOBALS['app_list_strings']['duration_intervals'])) {
140
+                 	$this->minutes_values = $GLOBALS['app_list_strings']['duration_intervals'];
141
+         }
139 142
 	}
140 143
 
141 144
 	/**
@@ -284,16 +287,17 @@  discard block
 block discarded – undo
284 287
 			$where_auto = '1=1';
285 288
        		 if($show_deleted == 0){
286 289
             	$where_auto = " $this->table_name.deleted=0  ";
287
-			}else if($show_deleted == 1){
290
+			} else if($show_deleted == 1){
288 291
 				$where_auto = " $this->table_name.deleted=1 ";
289 292
 			}
290 293
 
291 294
 			//$where_auto .= " GROUP BY calls.id";
292 295
 
293
-		if($where != "")
294
-			$query .= "where $where AND ".$where_auto;
295
-		else
296
-			$query .= "where ".$where_auto;
296
+		if($where != "") {
297
+					$query .= "where $where AND ".$where_auto;
298
+		} else {
299
+					$query .= "where ".$where_auto;
300
+		}
297 301
 
298 302
         $order_by = $this->process_order_by($order_by);
299 303
         if (empty($order_by)) {
@@ -315,8 +319,7 @@  discard block
 block discarded – undo
315 319
                     $query .= $custom_join['select'];
316 320
                     $query .= " FROM contacts, calls, calls_contacts ";
317 321
                     $where_auto = "calls_contacts.contact_id = contacts.id AND calls_contacts.call_id = calls.id AND calls.deleted=0 AND contacts.deleted=0";
318
-            }
319
-            else
322
+            } else
320 323
             {
321 324
                     $query = 'SELECT calls.*, users.user_name as assigned_user_name ';
322 325
                     $query .= $custom_join['select'];
@@ -329,10 +332,11 @@  discard block
 block discarded – undo
329 332
 
330 333
             $query .= $custom_join['join'];
331 334
 
332
-			if($where != "")
333
-                    $query .= "where $where AND ".$where_auto;
334
-            else
335
-                    $query .= "where ".$where_auto;
335
+			if($where != "") {
336
+			                    $query .= "where $where AND ".$where_auto;
337
+			} else {
338
+                                $query .= "where ".$where_auto;
339
+            }
336 340
 
337 341
         $order_by = $this->process_order_by($order_by);
338 342
         if (empty($order_by)) {
@@ -376,10 +380,12 @@  discard block
 block discarded – undo
376 380
 			$this->date_start = $timedate->now();
377 381
 		}
378 382
 
379
-		if (is_null($this->duration_hours))
380
-			$this->duration_hours = "0";
381
-		if (is_null($this->duration_minutes))
382
-			$this->duration_minutes = "1";
383
+		if (is_null($this->duration_hours)) {
384
+					$this->duration_hours = "0";
385
+		}
386
+		if (is_null($this->duration_minutes)) {
387
+					$this->duration_minutes = "1";
388
+		}
383 389
 
384 390
 		$this->fill_in_additional_parent_fields();
385 391
 
@@ -400,8 +406,9 @@  discard block
 block discarded – undo
400 406
 
401 407
 		if ( empty($this->id) ) {
402 408
 		    $reminder_t = $GLOBALS['current_user']->getPreference('reminder_time');
403
-		    if ( isset($reminder_t) )
404
-		        $this->reminder_time = $reminder_t;
409
+		    if ( isset($reminder_t) ) {
410
+		    		        $this->reminder_time = $reminder_t;
411
+		    }
405 412
 		}
406 413
 		$this->reminder_checked = $this->reminder_time == -1 ? false : true;
407 414
 
@@ -410,8 +417,9 @@  discard block
 block discarded – undo
410 417
 		}
411 418
 		if(empty($this->id)){
412 419
 			$reminder_t = $GLOBALS['current_user']->getPreference('email_reminder_time');
413
-			if(isset($reminder_t))
414
-		    		$this->email_reminder_time = $reminder_t;
420
+			if(isset($reminder_t)) {
421
+					    		$this->email_reminder_time = $reminder_t;
422
+			}
415 423
 		}
416 424
 		$this->email_reminder_checked = $this->email_reminder_time == -1 ? false : true;
417 425
 
@@ -426,16 +434,20 @@  discard block
 block discarded – undo
426 434
 	function get_list_view_data(){
427 435
 		$call_fields = $this->get_list_view_array();
428 436
 		global $app_list_strings, $focus, $action, $currentModule;
429
-		if (isset($focus->id)) $id = $focus->id;
430
-		else $id = '';
437
+		if (isset($focus->id)) {
438
+		    $id = $focus->id;
439
+		} else {
440
+		    $id = '';
441
+		}
431 442
 		if (isset($this->parent_type) && $this->parent_type != null)
432 443
 		{
433 444
 			$call_fields['PARENT_MODULE'] = $this->parent_type;
434 445
 		}
435 446
 		if ($this->status == "Planned") {
436 447
 			//cn: added this if() to deal with sequential Closes in Meetings.  this is a hack to a hack (formbase.php->handleRedirect)
437
-			if(empty($action))
438
-			    $action = "index";
448
+			if(empty($action)) {
449
+						    $action = "index";
450
+			}
439 451
 
440 452
             $setCompleteUrl = "<a id='{$this->id}' onclick='SUGAR.util.closeActivityPanel.show(\"{$this->module_dir}\",\"{$this->id}\",\"Held\",\"listview\",\"1\");'>";
441 453
 			if ($this->ACLAccess('edit')) {
@@ -451,9 +463,9 @@  discard block
 block discarded – undo
451 463
 		$date_db = $timedate->to_db($mergeTime);
452 464
 		if( $date_db	< $today){
453 465
 			$call_fields['DATE_START']= "<font class='overdueTask'>".$call_fields['DATE_START']."</font>";
454
-		}else if($date_db < $nextday){
466
+		} else if($date_db < $nextday){
455 467
 			$call_fields['DATE_START'] = "<font class='todaysTask'>".$call_fields['DATE_START']."</font>";
456
-		}else{
468
+		} else{
457 469
 			$call_fields['DATE_START'] = "<font class='futureTask'>".$call_fields['DATE_START']."</font>";
458 470
 		}
459 471
 		$this->fill_in_additional_detail_fields();
@@ -583,14 +595,12 @@  discard block
 block discarded – undo
583 595
       {
584 596
         vCal::cache_sugar_vcal($user);
585 597
       }
586
-    }
587
-    else if ( $user->object_name == 'Contact')
598
+    } else if ( $user->object_name == 'Contact')
588 599
     {
589 600
       $relate_values = array('contact_id'=>$user->id,'call_id'=>$this->id);
590 601
       $data_values = array('accept_status'=>$status);
591 602
       $this->set_relationship($this->rel_contacts_table, $relate_values, true, true,$data_values);
592
-    }
593
-    else if ( $user->object_name == 'Lead')
603
+    } else if ( $user->object_name == 'Lead')
594 604
     {
595 605
       $relate_values = array('lead_id'=>$user->id,'call_id'=>$this->id);
596 606
       $data_values = array('accept_status'=>$status);
@@ -645,8 +655,9 @@  discard block
 block discarded – undo
645 655
 		global $sugar_config;
646 656
 		if(isset($sugar_config['disable_notify_current_user']) && $sugar_config['disable_notify_current_user']) {
647 657
 			global $current_user;
648
-			if(isset($list[$current_user->id]))
649
-				unset($list[$current_user->id]);
658
+			if(isset($list[$current_user->id])) {
659
+							unset($list[$current_user->id]);
660
+			}
650 661
 		}
651 662
 //		$GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($list,true));
652 663
 		return $list;
@@ -690,7 +701,7 @@  discard block
 block discarded – undo
690 701
 			if(!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner, 'module', $in_group)){
691 702
         	/* END - SECURITY GROUPS */
692 703
 				$array_assign['PARENT'] = 'a';
693
-			}else{
704
+			} else{
694 705
 				$array_assign['PARENT'] = 'span';
695 706
 			}
696 707
 		$is_owner = false;
@@ -721,7 +732,7 @@  discard block
 block discarded – undo
721 732
 			if( ACLController::checkAccess('Contacts', 'view', $is_owner, 'module', $in_group)){
722 733
         	/* END - SECURITY GROUPS */
723 734
 				$array_assign['CONTACT'] = 'a';
724
-			}else{
735
+			} else{
725 736
 				$array_assign['CONTACT'] = 'span';
726 737
 			}
727 738
 
@@ -738,13 +749,11 @@  discard block
 block discarded – undo
738 749
                 if(!empty($GLOBALS['soap_server_object']))
739 750
                 {
740 751
            		    $exclude = array('lead_id', 'contact_id', 'user_id');
741
-           	    }
742
-                else
752
+           	    } else
743 753
                 {
744 754
 	                $exclude = array('lead_id', 'contact_id', 'user_id', 'assigned_user_id');
745 755
            	    }
746
-            }
747
-            else
756
+            } else
748 757
             {
749 758
                 $exclude = array('user_id');
750 759
             }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
 
141 141
 	/**
142 142
 	 * Disable edit if call is recurring and source is not Sugar. It should be edited only from Outlook.
143
-	 * @param $view string
143
+	 * @param string $view string
144 144
 	 * @param $is_owner bool
145 145
 	 */
146 146
 	function ACLAccess($view,$is_owner='not_set',$in_group='not_set'){
Please login to merge, or discard this patch.
modules/Calls/metadata/additionalDetails.php 3 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
 
42 42
 function additionalDetailsCall($fields) {
43 43
     global $timedate;
44
-	static $mod_strings;
45
-	if(empty($mod_strings)) {
46
-		global $current_language;
47
-		$mod_strings = return_module_language($current_language, 'Calls');
48
-	}
44
+    static $mod_strings;
45
+    if(empty($mod_strings)) {
46
+        global $current_language;
47
+        $mod_strings = return_module_language($current_language, 'Calls');
48
+    }
49 49
     $overlib_string = '';
50 50
     $overlib_string .= '<input id="type" type="hidden" value="Call"/>';
51 51
 
@@ -56,20 +56,20 @@  discard block
 block discarded – undo
56 56
 
57 57
     $overlib_string .= '<h2><img src="index.php?entryPoint=getImage&themeName=' . SugarThemeRegistry::current()->name .'&imageName=Calls.gif"/> '.$mod_strings['LBL_CALL'].'</h2>';
58 58
 
59
-   if(!empty($fields['NAME'])) {
60
-        	$overlib_string .= '<b>'. $mod_strings['LBL_SUBJECT'] . '</b> ';
59
+    if(!empty($fields['NAME'])) {
60
+            $overlib_string .= '<b>'. $mod_strings['LBL_SUBJECT'] . '</b> ';
61 61
             $url = 'index.php?action=DetailView&module=Calls&record='.$fields['ID'];
62 62
             $overlib_string .= '<a href="'.$url.'">' . $fields['NAME'] . '</a>';
63
-        	$overlib_string .= '<br>';
63
+            $overlib_string .= '<br>';
64 64
     }
65
-	if(!empty($fields['DATE_START'])) {
65
+    if(!empty($fields['DATE_START'])) {
66 66
         $data_date = $timedate->fromUser($fields['DATE_START'])->format('Y-m-d H:i:s');
67 67
         $overlib_string .= '<span data-field="DATE_START" data-date="' . $data_date . '">';
68 68
         $overlib_string .= '<b>' . $mod_strings['LBL_DATE_TIME'] . '</b> ' . $fields['DATE_START'] . ' <br>';
69 69
         $overlib_string .= '</span>';
70 70
     }
71
-	if(isset($fields['DURATION_HOURS']) || isset($fields['DURATION_MINUTES'])) {
72
-		$overlib_string .= '<b>'. $mod_strings['LBL_DURATION'] . '</b> ';
71
+    if(isset($fields['DURATION_HOURS']) || isset($fields['DURATION_MINUTES'])) {
72
+        $overlib_string .= '<b>'. $mod_strings['LBL_DURATION'] . '</b> ';
73 73
         if(isset($fields['DURATION_HOURS'])) {
74 74
             $overlib_string .= $fields['DURATION_HOURS'] . $mod_strings['LBL_HOURS_ABBREV'] . ' ';
75 75
         }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             $overlib_string .=  $fields['DURATION_MINUTES'] . $mod_strings['LBL_MINSS_ABBREV'];
78 78
         }
79 79
         $overlib_string .=  '<br>';
80
-	}
80
+    }
81 81
     if (!empty($fields['PARENT_ID']))
82 82
     {
83 83
             $overlib_string .= "<b>". $mod_strings['LBL_RELATED_TO'] . "</b> ".
@@ -86,21 +86,21 @@  discard block
 block discarded – undo
86 86
             $overlib_string .= '<br>';
87 87
     }
88 88
     if(!empty($fields['STATUS'])) {
89
-      	$overlib_string .= '<b>'. $mod_strings['LBL_STATUS'] . '</b> ' . $fields['STATUS'];
90
-      	$overlib_string .= '<br>';
91
-      }
92
-	if(!empty($fields['DESCRIPTION'])) {
93
-		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
94
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
95
-		$overlib_string .= '<br>';
96
-	}
89
+            $overlib_string .= '<b>'. $mod_strings['LBL_STATUS'] . '</b> ' . $fields['STATUS'];
90
+            $overlib_string .= '<br>';
91
+        }
92
+    if(!empty($fields['DESCRIPTION'])) {
93
+        $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
94
+        if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
95
+        $overlib_string .= '<br>';
96
+    }
97 97
     $overlib_string .= '<br>';
98
-	$editLink = "index.php?action=EditView&module=Calls&record={$fields['ID']}";
99
-	$viewLink = "index.php?action=DetailView&module=Calls&record={$fields['ID']}";
98
+    $editLink = "index.php?action=EditView&module=Calls&record={$fields['ID']}";
99
+    $viewLink = "index.php?action=DetailView&module=Calls&record={$fields['ID']}";
100 100
 
101
-	return array('fieldToAddTo' => 'NAME',
102
-				 'string' => $overlib_string,
103
-				 'editLink' => $editLink,
104
-				 'viewLink' => $viewLink);
101
+    return array('fieldToAddTo' => 'NAME',
102
+                    'string' => $overlib_string,
103
+                    'editLink' => $editLink,
104
+                    'viewLink' => $viewLink);
105 105
 }
106 106
 
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 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.
@@ -42,56 +42,56 @@  discard block
 block discarded – undo
42 42
 function additionalDetailsCall($fields) {
43 43
     global $timedate;
44 44
 	static $mod_strings;
45
-	if(empty($mod_strings)) {
45
+	if (empty($mod_strings)) {
46 46
 		global $current_language;
47 47
 		$mod_strings = return_module_language($current_language, 'Calls');
48 48
 	}
49 49
     $overlib_string = '';
50 50
     $overlib_string .= '<input id="type" type="hidden" value="Call"/>';
51 51
 
52
-    if(!empty($fields['ID'])) {
53
-        $overlib_string .= '<input id="id" type="hidden" value="'. $fields['ID'];
52
+    if (!empty($fields['ID'])) {
53
+        $overlib_string .= '<input id="id" type="hidden" value="'.$fields['ID'];
54 54
         $overlib_string .= '"/>';
55 55
     }
56 56
 
57
-    $overlib_string .= '<h2><img src="index.php?entryPoint=getImage&themeName=' . SugarThemeRegistry::current()->name .'&imageName=Calls.gif"/> '.$mod_strings['LBL_CALL'].'</h2>';
57
+    $overlib_string .= '<h2><img src="index.php?entryPoint=getImage&themeName='.SugarThemeRegistry::current()->name.'&imageName=Calls.gif"/> '.$mod_strings['LBL_CALL'].'</h2>';
58 58
 
59
-   if(!empty($fields['NAME'])) {
60
-        	$overlib_string .= '<b>'. $mod_strings['LBL_SUBJECT'] . '</b> ';
59
+   if (!empty($fields['NAME'])) {
60
+        	$overlib_string .= '<b>'.$mod_strings['LBL_SUBJECT'].'</b> ';
61 61
             $url = 'index.php?action=DetailView&module=Calls&record='.$fields['ID'];
62
-            $overlib_string .= '<a href="'.$url.'">' . $fields['NAME'] . '</a>';
62
+            $overlib_string .= '<a href="'.$url.'">'.$fields['NAME'].'</a>';
63 63
         	$overlib_string .= '<br>';
64 64
     }
65
-	if(!empty($fields['DATE_START'])) {
65
+	if (!empty($fields['DATE_START'])) {
66 66
         $data_date = $timedate->fromUser($fields['DATE_START'])->format('Y-m-d H:i:s');
67
-        $overlib_string .= '<span data-field="DATE_START" data-date="' . $data_date . '">';
68
-        $overlib_string .= '<b>' . $mod_strings['LBL_DATE_TIME'] . '</b> ' . $fields['DATE_START'] . ' <br>';
67
+        $overlib_string .= '<span data-field="DATE_START" data-date="'.$data_date.'">';
68
+        $overlib_string .= '<b>'.$mod_strings['LBL_DATE_TIME'].'</b> '.$fields['DATE_START'].' <br>';
69 69
         $overlib_string .= '</span>';
70 70
     }
71
-	if(isset($fields['DURATION_HOURS']) || isset($fields['DURATION_MINUTES'])) {
72
-		$overlib_string .= '<b>'. $mod_strings['LBL_DURATION'] . '</b> ';
73
-        if(isset($fields['DURATION_HOURS'])) {
74
-            $overlib_string .= $fields['DURATION_HOURS'] . $mod_strings['LBL_HOURS_ABBREV'] . ' ';
71
+	if (isset($fields['DURATION_HOURS']) || isset($fields['DURATION_MINUTES'])) {
72
+		$overlib_string .= '<b>'.$mod_strings['LBL_DURATION'].'</b> ';
73
+        if (isset($fields['DURATION_HOURS'])) {
74
+            $overlib_string .= $fields['DURATION_HOURS'].$mod_strings['LBL_HOURS_ABBREV'].' ';
75 75
         }
76
-        if(isset($fields['DURATION_MINUTES'])) {
77
-            $overlib_string .=  $fields['DURATION_MINUTES'] . $mod_strings['LBL_MINSS_ABBREV'];
76
+        if (isset($fields['DURATION_MINUTES'])) {
77
+            $overlib_string .= $fields['DURATION_MINUTES'].$mod_strings['LBL_MINSS_ABBREV'];
78 78
         }
79
-        $overlib_string .=  '<br>';
79
+        $overlib_string .= '<br>';
80 80
 	}
81 81
     if (!empty($fields['PARENT_ID']))
82 82
     {
83
-            $overlib_string .= "<b>". $mod_strings['LBL_RELATED_TO'] . "</b> ".
83
+            $overlib_string .= "<b>".$mod_strings['LBL_RELATED_TO']."</b> ".
84 84
                     "<a href='index.php?module=".$fields['PARENT_TYPE']."&action=DetailView&record=".$fields['PARENT_ID']."'>".
85
-                    $fields['PARENT_NAME'] . "</a>";
85
+                    $fields['PARENT_NAME']."</a>";
86 86
             $overlib_string .= '<br>';
87 87
     }
88
-    if(!empty($fields['STATUS'])) {
89
-      	$overlib_string .= '<b>'. $mod_strings['LBL_STATUS'] . '</b> ' . $fields['STATUS'];
88
+    if (!empty($fields['STATUS'])) {
89
+      	$overlib_string .= '<b>'.$mod_strings['LBL_STATUS'].'</b> '.$fields['STATUS'];
90 90
       	$overlib_string .= '<br>';
91 91
       }
92
-	if(!empty($fields['DESCRIPTION'])) {
93
-		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
94
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
92
+	if (!empty($fields['DESCRIPTION'])) {
93
+		$overlib_string .= '<b>'.$mod_strings['LBL_DESCRIPTION'].'</b> '.substr($fields['DESCRIPTION'], 0, 300);
94
+		if (strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
95 95
 		$overlib_string .= '<br>';
96 96
 	}
97 97
     $overlib_string .= '<br>';
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -91,7 +93,9 @@  discard block
 block discarded – undo
91 93
       }
92 94
 	if(!empty($fields['DESCRIPTION'])) {
93 95
 		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
94
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
96
+		if(strlen($fields['DESCRIPTION']) > 300) {
97
+		    $overlib_string .= '...';
98
+		}
95 99
 		$overlib_string .= '<br>';
96 100
 	}
97 101
     $overlib_string .= '<br>';
Please login to merge, or discard this patch.
modules/Calls/metadata/editviewdefs.php 2 patches
Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -39,136 +39,136 @@  discard block
 block discarded – undo
39 39
 
40 40
 $viewdefs ['Calls'] =
41 41
 array (
42
-  'EditView' => 
43
-  array (
42
+    'EditView' => 
43
+    array (
44 44
     'templateMeta' => 
45 45
     array (
46 46
         'includes' => array(
47 47
             array('file' => 'modules/Reminders/Reminders.js'),
48 48
         ),
49
-      'maxColumns' => '2',
50
-      'form' => 
51
-      array (
49
+        'maxColumns' => '2',
50
+        'form' => 
51
+        array (
52 52
         'hidden' => 
53 53
         array (
54
-          0 => '<input type="hidden" name="isSaveAndNew" value="false">',
55
-          1 => '<input type="hidden" name="send_invites">',
56
-          2 => '<input type="hidden" name="user_invitees">',
57
-          3 => '<input type="hidden" name="lead_invitees">',
58
-          4 => '<input type="hidden" name="contact_invitees">',
54
+            0 => '<input type="hidden" name="isSaveAndNew" value="false">',
55
+            1 => '<input type="hidden" name="send_invites">',
56
+            2 => '<input type="hidden" name="user_invitees">',
57
+            3 => '<input type="hidden" name="lead_invitees">',
58
+            4 => '<input type="hidden" name="contact_invitees">',
59 59
         ),
60 60
         'buttons' => 
61 61
         array (
62
-          0 => 
63
-          array (
62
+            0 => 
63
+            array (
64 64
             'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" id="SAVE_HEADER" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\'; document.EditView.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}document.EditView.return_id.value=\'\'; {/if}formSubmitCheck();;" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
65
-          ),
66
-          1 => 'CANCEL',
67
-          2 => 
68
-          array (
65
+            ),
66
+            1 => 'CANCEL',
67
+            2 => 
68
+            array (
69 69
             'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" id="SAVE_SEND_HEADER" class="button" onclick="document.EditView.send_invites.value=\'1\';SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\';document.EditView.return_action.value=\'EditView\';document.EditView.return_module.value=\'{$smarty.request.return_module}\';formSubmitCheck();;" type="button" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">',
70
-          ),
71
-          3 => 
72
-          array (
70
+            ),
71
+            3 => 
72
+            array (
73 73
             'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" id="CLOSE_CREATE_HEADER" accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" class="button" onclick="SUGAR.calls.fill_invitees(); document.EditView.status.value=\'Held\'; document.EditView.action.value=\'Save\'; document.EditView.return_module.value=\'Calls\'; document.EditView.isDuplicate.value=true; document.EditView.isSaveAndNew.value=true; document.EditView.return_action.value=\'EditView\'; document.EditView.return_id.value=\'{$fields.id.value}\'; formSubmitCheck();" type="button" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
74
-          ),
74
+            ),
75 75
         ),
76 76
         'buttons_footer' => 
77 77
         array (
78
-          0 => 
79
-          array (
78
+            0 => 
79
+            array (
80 80
             'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" id="SAVE_FOOTER" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\'; document.EditView.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}document.EditView.return_id.value=\'\'; {/if}formSubmitCheck();;" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
81
-          ),
82
-          1 => 'CANCEL',
83
-          2 => 
84
-          array (
81
+            ),
82
+            1 => 'CANCEL',
83
+            2 => 
84
+            array (
85 85
             'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" id="SAVE_SEND_FOOTER" class="button" onclick="document.EditView.send_invites.value=\'1\';SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\';document.EditView.return_action.value=\'EditView\';document.EditView.return_module.value=\'{$smarty.request.return_module}\';formSubmitCheck();;" type="button" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">',
86
-          ),
87
-          3 => 
88
-          array (
86
+            ),
87
+            3 => 
88
+            array (
89 89
             'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" id="CLOSE_CREATE_FOOTER" accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" class="button" onclick="SUGAR.calls.fill_invitees(); document.EditView.status.value=\'Held\'; document.EditView.action.value=\'Save\'; document.EditView.return_module.value=\'Calls\'; document.EditView.isDuplicate.value=true; document.EditView.isSaveAndNew.value=true; document.EditView.return_action.value=\'EditView\'; document.EditView.return_id.value=\'{$fields.id.value}\'; formSubmitCheck();" type="button" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
90
-          ),
90
+            ),
91 91
         ),
92 92
         'footerTpl' => 'modules/Calls/tpls/footer.tpl',
93
-      ),
94
-      'widths' => 
95
-      array (
93
+        ),
94
+        'widths' => 
95
+        array (
96 96
         0 => 
97 97
         array (
98
-          'label' => '10',
99
-          'field' => '30',
98
+            'label' => '10',
99
+            'field' => '30',
100 100
         ),
101 101
         1 => 
102 102
         array (
103
-          'label' => '10',
104
-          'field' => '30',
103
+            'label' => '10',
104
+            'field' => '30',
105
+        ),
105 106
         ),
106
-      ),
107
-      'javascript' => '{sugar_getscript file="cache/include/javascript/sugar_grp_jsolait.js"}
107
+        'javascript' => '{sugar_getscript file="cache/include/javascript/sugar_grp_jsolait.js"}
108 108
 <script type="text/javascript">{$JSON_CONFIG_JAVASCRIPT}</script>
109 109
 <script>toggle_portal_flag();function toggle_portal_flag()  {ldelim} {$TOGGLE_JS} {rdelim}
110 110
 function formSubmitCheck(){ldelim}var duration=true;if(typeof(isValidDuration)!="undefined"){ldelim}duration=isValidDuration();{rdelim}if(check_form(\'EditView\') && duration){ldelim}SUGAR.ajaxUI.submitForm("EditView");{rdelim}{rdelim}</script>',
111
-      'useTabs' => false,
112
-      'tabDefs' => 
113
-      array (
111
+        'useTabs' => false,
112
+        'tabDefs' => 
113
+        array (
114 114
         'LBL_CALL_INFORMATION' => 
115 115
         array (
116
-          'newTab' => false,
117
-          'panelDefault' => 'expanded',
116
+            'newTab' => false,
117
+            'panelDefault' => 'expanded',
118
+        ),
118 119
         ),
119
-      ),
120 120
     ),
121 121
     'panels' => 
122 122
     array (
123
-      'lbl_call_information' => 
124
-      array (
123
+        'lbl_call_information' => 
124
+        array (
125 125
         0 => 
126 126
         array (
127
-          0 => 
128
-          array (
127
+            0 => 
128
+            array (
129 129
             'name' => 'name',
130
-          ),
131
-          1 => 
132
-          array (
130
+            ),
131
+            1 => 
132
+            array (
133 133
             'name' => 'status',
134 134
             'fields' => 
135 135
             array (
136
-              0 => 
137
-              array (
136
+                0 => 
137
+                array (
138 138
                 'name' => 'direction',
139
-              ),
140
-              1 => 
141
-              array (
139
+                ),
140
+                1 => 
141
+                array (
142 142
                 'name' => 'status',
143
-              ),
143
+                ),
144
+            ),
144 145
             ),
145
-          ),
146 146
         ),
147 147
         1 => 
148 148
         array (
149
-          0 => 
150
-          array (
149
+            0 => 
150
+            array (
151 151
             'name' => 'date_start',
152 152
             'displayParams' => 
153 153
             array (
154
-              'updateCallback' => 'SugarWidgetScheduler.update_time();',
154
+                'updateCallback' => 'SugarWidgetScheduler.update_time();',
155 155
             ),
156 156
             'label' => 'LBL_DATE_TIME',
157
-          ),
158
-          1 => 
159
-          array (
157
+            ),
158
+            1 => 
159
+            array (
160 160
             'name' => 'parent_name',
161 161
             'label' => 'LBL_LIST_RELATED_TO',
162
-          ),
162
+            ),
163 163
         ),
164 164
         2 => 
165 165
         array (
166
-          0 => 
167
-          array (
166
+            0 => 
167
+            array (
168 168
             'name' => 'duration_hours',
169 169
             'label' => 'LBL_DURATION',
170 170
             'customCode' => '{literal}<script type="text/javascript">function isValidDuration() { form = document.getElementById(\'EditView\'); if ( form.duration_hours.value + form.duration_minutes.value <= 0 ) { alert(\'{/literal}{$MOD.NOTICE_DURATION_TIME}{literal}\'); return false; } return true; }</script>{/literal}<input id="duration_hours" name="duration_hours" size="2" maxlength="2" type="text" value="{$fields.duration_hours.value}" onkeyup="SugarWidgetScheduler.update_time();"/>{$fields.duration_minutes.value}&nbsp;<span class="dateFormat">{$MOD.LBL_HOURS_MINUTES}</span>',
171
-          ),
171
+            ),
172 172
 //          1 =>
173 173
 //          array (
174 174
 //            'name' => 'reminder_time',
@@ -186,23 +186,23 @@  discard block
 block discarded – undo
186 186
         ),
187 187
         4 =>
188 188
         array (
189
-          0 => 
190
-          array (
189
+            0 => 
190
+            array (
191 191
             'name' => 'description',
192 192
             'comment' => 'Full text of the note',
193 193
             'label' => 'LBL_DESCRIPTION',
194
-          ),
194
+            ),
195 195
         ),
196 196
         5 =>
197 197
         array (
198
-          0 => 
199
-          array (
198
+            0 => 
199
+            array (
200 200
             'name' => 'assigned_user_name',
201 201
             'label' => 'LBL_ASSIGNED_TO_NAME',
202
-          ),
202
+            ),
203 203
         ),
204
-      ),
204
+        ),
205
+    ),
205 206
     ),
206
-  ),
207 207
 );
208 208
 ?>
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -38,19 +38,19 @@  discard block
 block discarded – undo
38 38
  ********************************************************************************/
39 39
 
40 40
 $viewdefs ['Calls'] =
41
-array (
41
+array(
42 42
   'EditView' => 
43
-  array (
43
+  array(
44 44
     'templateMeta' => 
45
-    array (
45
+    array(
46 46
         'includes' => array(
47 47
             array('file' => 'modules/Reminders/Reminders.js'),
48 48
         ),
49 49
       'maxColumns' => '2',
50 50
       'form' => 
51
-      array (
51
+      array(
52 52
         'hidden' => 
53
-        array (
53
+        array(
54 54
           0 => '<input type="hidden" name="isSaveAndNew" value="false">',
55 55
           1 => '<input type="hidden" name="send_invites">',
56 56
           2 => '<input type="hidden" name="user_invitees">',
@@ -58,48 +58,48 @@  discard block
 block discarded – undo
58 58
           4 => '<input type="hidden" name="contact_invitees">',
59 59
         ),
60 60
         'buttons' => 
61
-        array (
61
+        array(
62 62
           0 => 
63
-          array (
63
+          array(
64 64
             'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" id="SAVE_HEADER" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\'; document.EditView.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}document.EditView.return_id.value=\'\'; {/if}formSubmitCheck();;" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
65 65
           ),
66 66
           1 => 'CANCEL',
67 67
           2 => 
68
-          array (
68
+          array(
69 69
             'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" id="SAVE_SEND_HEADER" class="button" onclick="document.EditView.send_invites.value=\'1\';SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\';document.EditView.return_action.value=\'EditView\';document.EditView.return_module.value=\'{$smarty.request.return_module}\';formSubmitCheck();;" type="button" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">',
70 70
           ),
71 71
           3 => 
72
-          array (
72
+          array(
73 73
             'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" id="CLOSE_CREATE_HEADER" accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" class="button" onclick="SUGAR.calls.fill_invitees(); document.EditView.status.value=\'Held\'; document.EditView.action.value=\'Save\'; document.EditView.return_module.value=\'Calls\'; document.EditView.isDuplicate.value=true; document.EditView.isSaveAndNew.value=true; document.EditView.return_action.value=\'EditView\'; document.EditView.return_id.value=\'{$fields.id.value}\'; formSubmitCheck();" type="button" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
74 74
           ),
75 75
         ),
76 76
         'buttons_footer' => 
77
-        array (
77
+        array(
78 78
           0 => 
79
-          array (
79
+          array(
80 80
             'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" id="SAVE_FOOTER" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\'; document.EditView.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}document.EditView.return_id.value=\'\'; {/if}formSubmitCheck();;" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
81 81
           ),
82 82
           1 => 'CANCEL',
83 83
           2 => 
84
-          array (
84
+          array(
85 85
             'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" id="SAVE_SEND_FOOTER" class="button" onclick="document.EditView.send_invites.value=\'1\';SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\';document.EditView.return_action.value=\'EditView\';document.EditView.return_module.value=\'{$smarty.request.return_module}\';formSubmitCheck();;" type="button" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">',
86 86
           ),
87 87
           3 => 
88
-          array (
88
+          array(
89 89
             'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" id="CLOSE_CREATE_FOOTER" accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" class="button" onclick="SUGAR.calls.fill_invitees(); document.EditView.status.value=\'Held\'; document.EditView.action.value=\'Save\'; document.EditView.return_module.value=\'Calls\'; document.EditView.isDuplicate.value=true; document.EditView.isSaveAndNew.value=true; document.EditView.return_action.value=\'EditView\'; document.EditView.return_id.value=\'{$fields.id.value}\'; formSubmitCheck();" type="button" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
90 90
           ),
91 91
         ),
92 92
         'footerTpl' => 'modules/Calls/tpls/footer.tpl',
93 93
       ),
94 94
       'widths' => 
95
-      array (
95
+      array(
96 96
         0 => 
97
-        array (
97
+        array(
98 98
           'label' => '10',
99 99
           'field' => '30',
100 100
         ),
101 101
         1 => 
102
-        array (
102
+        array(
103 103
           'label' => '10',
104 104
           'field' => '30',
105 105
         ),
@@ -110,61 +110,61 @@  discard block
 block discarded – undo
110 110
 function formSubmitCheck(){ldelim}var duration=true;if(typeof(isValidDuration)!="undefined"){ldelim}duration=isValidDuration();{rdelim}if(check_form(\'EditView\') && duration){ldelim}SUGAR.ajaxUI.submitForm("EditView");{rdelim}{rdelim}</script>',
111 111
       'useTabs' => false,
112 112
       'tabDefs' => 
113
-      array (
113
+      array(
114 114
         'LBL_CALL_INFORMATION' => 
115
-        array (
115
+        array(
116 116
           'newTab' => false,
117 117
           'panelDefault' => 'expanded',
118 118
         ),
119 119
       ),
120 120
     ),
121 121
     'panels' => 
122
-    array (
122
+    array(
123 123
       'lbl_call_information' => 
124
-      array (
124
+      array(
125 125
         0 => 
126
-        array (
126
+        array(
127 127
           0 => 
128
-          array (
128
+          array(
129 129
             'name' => 'name',
130 130
           ),
131 131
           1 => 
132
-          array (
132
+          array(
133 133
             'name' => 'status',
134 134
             'fields' => 
135
-            array (
135
+            array(
136 136
               0 => 
137
-              array (
137
+              array(
138 138
                 'name' => 'direction',
139 139
               ),
140 140
               1 => 
141
-              array (
141
+              array(
142 142
                 'name' => 'status',
143 143
               ),
144 144
             ),
145 145
           ),
146 146
         ),
147 147
         1 => 
148
-        array (
148
+        array(
149 149
           0 => 
150
-          array (
150
+          array(
151 151
             'name' => 'date_start',
152 152
             'displayParams' => 
153
-            array (
153
+            array(
154 154
               'updateCallback' => 'SugarWidgetScheduler.update_time();',
155 155
             ),
156 156
             'label' => 'LBL_DATE_TIME',
157 157
           ),
158 158
           1 => 
159
-          array (
159
+          array(
160 160
             'name' => 'parent_name',
161 161
             'label' => 'LBL_LIST_RELATED_TO',
162 162
           ),
163 163
         ),
164 164
         2 => 
165
-        array (
165
+        array(
166 166
           0 => 
167
-          array (
167
+          array(
168 168
             'name' => 'duration_hours',
169 169
             'label' => 'LBL_DURATION',
170 170
             'customCode' => '{literal}<script type="text/javascript">function isValidDuration() { form = document.getElementById(\'EditView\'); if ( form.duration_hours.value + form.duration_minutes.value <= 0 ) { alert(\'{/literal}{$MOD.NOTICE_DURATION_TIME}{literal}\'); return false; } return true; }</script>{/literal}<input id="duration_hours" name="duration_hours" size="2" maxlength="2" type="text" value="{$fields.duration_hours.value}" onkeyup="SugarWidgetScheduler.update_time();"/>{$fields.duration_minutes.value}&nbsp;<span class="dateFormat">{$MOD.LBL_HOURS_MINUTES}</span>',
@@ -178,25 +178,25 @@  discard block
 block discarded – undo
178 178
         ),
179 179
         3 => array(
180 180
             0 =>
181
-                array (
181
+                array(
182 182
                     'name' => 'reminders',
183 183
                     'customCode' => '{include file="modules/Reminders/tpls/reminders.tpl"}',
184 184
                     'label' => 'LBL_REMINDERS',
185 185
                 ),
186 186
         ),
187 187
         4 =>
188
-        array (
188
+        array(
189 189
           0 => 
190
-          array (
190
+          array(
191 191
             'name' => 'description',
192 192
             'comment' => 'Full text of the note',
193 193
             'label' => 'LBL_DESCRIPTION',
194 194
           ),
195 195
         ),
196 196
         5 =>
197
-        array (
197
+        array(
198 198
           0 => 
199
-          array (
199
+          array(
200 200
             'name' => 'assigned_user_name',
201 201
             'label' => 'LBL_ASSIGNED_TO_NAME',
202 202
           ),
Please login to merge, or discard this patch.
modules/Calls/metadata/SearchFields.php 3 patches
Indentation   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -40,135 +40,135 @@
 block discarded – undo
40 40
 global $current_user;
41 41
 $module_name = "Calls";
42 42
 $searchFields['Calls'] = array (
43
-  'name' =>
44
-  array (
43
+    'name' =>
44
+    array (
45 45
     'query_type' => 'default',
46
-  ),
47
-  'contact_name' => 
48
-  array (
46
+    ),
47
+    'contact_name' => 
48
+    array (
49 49
     'query_type' => 'default',
50 50
     'db_field' => 
51 51
     array (
52
-      0 => 'contacts.first_name',
53
-      1 => 'contacts.last_name',
52
+        0 => 'contacts.first_name',
53
+        1 => 'contacts.last_name',
54 54
     ),
55
-  ),
56
-  'date_start' => 
57
-  array (
55
+    ),
56
+    'date_start' => 
57
+    array (
58 58
     'query_type' => 'default',
59
-  ),
60
-  'location' => 
61
-  array (
59
+    ),
60
+    'location' => 
61
+    array (
62 62
     'query_type' => 'default',
63
-  ),
64
-  'current_user_only' => 
65
-  array (
63
+    ),
64
+    'current_user_only' => 
65
+    array (
66 66
     'query_type' => 'default',
67 67
     'db_field' => 
68 68
     array (
69
-      0 => 'assigned_user_id',
69
+        0 => 'assigned_user_id',
70 70
     ),
71 71
     'my_items' => true,
72 72
     'vname' => 'LBL_CURRENT_USER_FILTER',
73 73
     'type' => 'bool',
74
-  ),
75
-  'assigned_user_id' => 
76
-  array (
74
+    ),
75
+    'assigned_user_id' => 
76
+    array (
77 77
     'query_type' => 'default',
78
-  ),
79
-  'status' => 
80
-  array (
78
+    ),
79
+    'status' => 
80
+    array (
81 81
     'query_type' => 'default',
82 82
     'options' => 'call_status_dom',
83 83
     'template_var' => 'STATUS_FILTER',
84
-  ),
85
-  'open_only' => 
86
-  array (
84
+    ),
85
+    'open_only' => 
86
+    array (
87 87
     'query_type' => 'default',
88 88
     'db_field' => 
89 89
     array (
90
-      0 => 'status',
90
+        0 => 'status',
91 91
     ),
92 92
     'operator' => 'not in',
93 93
     'closed_values' => 
94 94
     array (
95
-      0 => 'Held',
96
-      1 => 'Not Held',
95
+        0 => 'Held',
96
+        1 => 'Not Held',
97 97
     ),
98 98
     'type' => 'bool',
99
-  ),
100
-  'range_date_entered' => 
101
-  array (
99
+    ),
100
+    'range_date_entered' => 
101
+    array (
102 102
     'query_type' => 'default',
103 103
     'enable_range_search' => true,
104 104
     'is_date_field' => true,
105
-  ),
106
-  'start_range_date_entered' => 
107
-  array (
105
+    ),
106
+    'start_range_date_entered' => 
107
+    array (
108 108
     'query_type' => 'default',
109 109
     'enable_range_search' => true,
110 110
     'is_date_field' => true,
111
-  ),
112
-  'end_range_date_entered' => 
113
-  array (
111
+    ),
112
+    'end_range_date_entered' => 
113
+    array (
114 114
     'query_type' => 'default',
115 115
     'enable_range_search' => true,
116 116
     'is_date_field' => true,
117
-  ),
118
-  'range_date_modified' => 
119
-  array (
117
+    ),
118
+    'range_date_modified' => 
119
+    array (
120 120
     'query_type' => 'default',
121 121
     'enable_range_search' => true,
122 122
     'is_date_field' => true,
123
-  ),
124
-  'start_range_date_modified' => 
125
-  array (
123
+    ),
124
+    'start_range_date_modified' => 
125
+    array (
126 126
     'query_type' => 'default',
127 127
     'enable_range_search' => true,
128 128
     'is_date_field' => true,
129
-  ),
130
-  'end_range_date_modified' => 
131
-  array (
129
+    ),
130
+    'end_range_date_modified' => 
131
+    array (
132 132
     'query_type' => 'default',
133 133
     'enable_range_search' => true,
134 134
     'is_date_field' => true,
135
-  ),
136
-  'range_date_start' => 
137
-  array (
135
+    ),
136
+    'range_date_start' => 
137
+    array (
138 138
     'query_type' => 'default',
139 139
     'enable_range_search' => true,
140 140
     'is_date_field' => true,
141
-  ),
142
-  'start_range_date_start' => 
143
-  array (
141
+    ),
142
+    'start_range_date_start' => 
143
+    array (
144 144
     'query_type' => 'default',
145 145
     'enable_range_search' => true,
146 146
     'is_date_field' => true,
147
-  ),
148
-  'end_range_date_start' => 
149
-  array (
147
+    ),
148
+    'end_range_date_start' => 
149
+    array (
150 150
     'query_type' => 'default',
151 151
     'enable_range_search' => true,
152 152
     'is_date_field' => true,
153
-  ),
154
-  'range_date_end' => 
155
-  array (
153
+    ),
154
+    'range_date_end' => 
155
+    array (
156 156
     'query_type' => 'default',
157 157
     'enable_range_search' => true,
158 158
     'is_date_field' => true,
159
-  ),
160
-  'start_range_date_end' => 
161
-  array (
159
+    ),
160
+    'start_range_date_end' => 
161
+    array (
162 162
     'query_type' => 'default',
163 163
     'enable_range_search' => true,
164 164
     'is_date_field' => true,
165
-  ),
166
-  'end_range_date_end' => 
167
-  array (
165
+    ),
166
+    'end_range_date_end' => 
167
+    array (
168 168
     'query_type' => 'default',
169 169
     'enable_range_search' => true,
170 170
     'is_date_field' => true,
171
-  ),
171
+    ),
172 172
     'favorites_only' => array(
173 173
         'query_type'=>'format',
174 174
         'operator' => 'subquery',
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 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.
@@ -39,33 +39,33 @@  discard block
 block discarded – undo
39 39
  ********************************************************************************/
40 40
 global $current_user;
41 41
 $module_name = "Calls";
42
-$searchFields['Calls'] = array (
42
+$searchFields['Calls'] = array(
43 43
   'name' =>
44
-  array (
44
+  array(
45 45
     'query_type' => 'default',
46 46
   ),
47 47
   'contact_name' => 
48
-  array (
48
+  array(
49 49
     'query_type' => 'default',
50 50
     'db_field' => 
51
-    array (
51
+    array(
52 52
       0 => 'contacts.first_name',
53 53
       1 => 'contacts.last_name',
54 54
     ),
55 55
   ),
56 56
   'date_start' => 
57
-  array (
57
+  array(
58 58
     'query_type' => 'default',
59 59
   ),
60 60
   'location' => 
61
-  array (
61
+  array(
62 62
     'query_type' => 'default',
63 63
   ),
64 64
   'current_user_only' => 
65
-  array (
65
+  array(
66 66
     'query_type' => 'default',
67 67
     'db_field' => 
68
-    array (
68
+    array(
69 69
       0 => 'assigned_user_id',
70 70
     ),
71 71
     'my_items' => true,
@@ -73,98 +73,98 @@  discard block
 block discarded – undo
73 73
     'type' => 'bool',
74 74
   ),
75 75
   'assigned_user_id' => 
76
-  array (
76
+  array(
77 77
     'query_type' => 'default',
78 78
   ),
79 79
   'status' => 
80
-  array (
80
+  array(
81 81
     'query_type' => 'default',
82 82
     'options' => 'call_status_dom',
83 83
     'template_var' => 'STATUS_FILTER',
84 84
   ),
85 85
   'open_only' => 
86
-  array (
86
+  array(
87 87
     'query_type' => 'default',
88 88
     'db_field' => 
89
-    array (
89
+    array(
90 90
       0 => 'status',
91 91
     ),
92 92
     'operator' => 'not in',
93 93
     'closed_values' => 
94
-    array (
94
+    array(
95 95
       0 => 'Held',
96 96
       1 => 'Not Held',
97 97
     ),
98 98
     'type' => 'bool',
99 99
   ),
100 100
   'range_date_entered' => 
101
-  array (
101
+  array(
102 102
     'query_type' => 'default',
103 103
     'enable_range_search' => true,
104 104
     'is_date_field' => true,
105 105
   ),
106 106
   'start_range_date_entered' => 
107
-  array (
107
+  array(
108 108
     'query_type' => 'default',
109 109
     'enable_range_search' => true,
110 110
     'is_date_field' => true,
111 111
   ),
112 112
   'end_range_date_entered' => 
113
-  array (
113
+  array(
114 114
     'query_type' => 'default',
115 115
     'enable_range_search' => true,
116 116
     'is_date_field' => true,
117 117
   ),
118 118
   'range_date_modified' => 
119
-  array (
119
+  array(
120 120
     'query_type' => 'default',
121 121
     'enable_range_search' => true,
122 122
     'is_date_field' => true,
123 123
   ),
124 124
   'start_range_date_modified' => 
125
-  array (
125
+  array(
126 126
     'query_type' => 'default',
127 127
     'enable_range_search' => true,
128 128
     'is_date_field' => true,
129 129
   ),
130 130
   'end_range_date_modified' => 
131
-  array (
131
+  array(
132 132
     'query_type' => 'default',
133 133
     'enable_range_search' => true,
134 134
     'is_date_field' => true,
135 135
   ),
136 136
   'range_date_start' => 
137
-  array (
137
+  array(
138 138
     'query_type' => 'default',
139 139
     'enable_range_search' => true,
140 140
     'is_date_field' => true,
141 141
   ),
142 142
   'start_range_date_start' => 
143
-  array (
143
+  array(
144 144
     'query_type' => 'default',
145 145
     'enable_range_search' => true,
146 146
     'is_date_field' => true,
147 147
   ),
148 148
   'end_range_date_start' => 
149
-  array (
149
+  array(
150 150
     'query_type' => 'default',
151 151
     'enable_range_search' => true,
152 152
     'is_date_field' => true,
153 153
   ),
154 154
   'range_date_end' => 
155
-  array (
155
+  array(
156 156
     'query_type' => 'default',
157 157
     'enable_range_search' => true,
158 158
     'is_date_field' => true,
159 159
   ),
160 160
   'start_range_date_end' => 
161
-  array (
161
+  array(
162 162
     'query_type' => 'default',
163 163
     'enable_range_search' => true,
164 164
     'is_date_field' => true,
165 165
   ),
166 166
   'end_range_date_end' => 
167
-  array (
167
+  array(
168 168
     'query_type' => 'default',
169 169
     'enable_range_search' => true,
170 170
     'is_date_field' => true,
@@ -175,6 +175,6 @@  discard block
 block discarded – undo
175 175
         'subquery' => 'SELECT favorites.parent_id FROM favorites
176 176
 			                    WHERE favorites.deleted = 0
177 177
 			                        and favorites.parent_type = "'.$module_name.'"
178
-			                        and favorites.assigned_user_id = "' .$current_user->id . '") OR NOT ({0}',
178
+			                        and favorites.assigned_user_id = "' .$current_user->id.'") OR NOT ({0}',
179 179
         'db_field'=>array('id')),
180 180
 );
181 181
\ No newline at end of file
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/Calls/metadata/detailviewdefs.php 2 patches
Indentation   +97 added lines, -97 removed lines patch added patch discarded remove patch
@@ -40,150 +40,150 @@  discard block
 block discarded – undo
40 40
 
41 41
 $viewdefs ['Calls'] =
42 42
 array (
43
-  'DetailView' => 
44
-  array (
43
+    'DetailView' => 
44
+    array (
45 45
     'templateMeta' => 
46 46
     array (
47
-      'form' => 
48
-      array (
47
+        'form' => 
48
+        array (
49 49
         'buttons' => 
50 50
         array (
51
-          0 => 'EDIT',
52
-          1 => 'DUPLICATE',
53
-          2 => 'DELETE',
54
-          3 => 
55
-          array (
51
+            0 => 'EDIT',
52
+            1 => 'DUPLICATE',
53
+            2 => 'DELETE',
54
+            3 => 
55
+            array (
56 56
             'customCode' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")} <input type="hidden" name="isSaveAndNew" value="false">  <input type="hidden" name="status" value="">  <input type="hidden" name="isSaveFromDetailView" value="true">  <input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}"   class="button"  onclick="this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'" id="close_create_button" name="button"  value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}"  type="submit">{/if}',
57 57
             'sugar_html' => 
58 58
             array (
59
-              'type' => 'submit',
60
-              'value' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
61
-              'htmlOptions' => 
62
-              array (
59
+                'type' => 'submit',
60
+                'value' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
61
+                'htmlOptions' => 
62
+                array (
63 63
                 'title' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
64 64
                 'class' => 'button',
65 65
                 'onclick' => 'this.form.isSaveFromDetailView.value=true; this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'',
66 66
                 'name' => 'button',
67 67
                 'id' => 'close_create_button',
68
-              ),
69
-              'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}',
68
+                ),
69
+                'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}',
70
+            ),
70 71
             ),
71
-          ),
72
-          4 => 
73
-          array (
72
+            4 => 
73
+            array (
74 74
             'customCode' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")} <input type="hidden" name="isSave" value="false">  <input title="{$APP.LBL_CLOSE_BUTTON_TITLE}"  accesskey="{$APP.LBL_CLOSE_BUTTON_KEY}"  class="button"  onclick="this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'" id="close_button" name="button1"  value="{$APP.LBL_CLOSE_BUTTON_TITLE}"  type="submit">{/if}',
75 75
             'sugar_html' => 
76 76
             array (
77
-              'type' => 'submit',
78
-              'value' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
79
-              'htmlOptions' => 
80
-              array (
77
+                'type' => 'submit',
78
+                'value' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
79
+                'htmlOptions' => 
80
+                array (
81 81
                 'title' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
82 82
                 'accesskey' => '{$APP.LBL_CLOSE_BUTTON_KEY}',
83 83
                 'class' => 'button',
84 84
                 'onclick' => 'this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\';this.form.isSaveFromDetailView.value=true',
85 85
                 'name' => 'button1',
86 86
                 'id' => 'close_button',
87
-              ),
88
-              'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}',
87
+                ),
88
+                'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}',
89
+            ),
89 90
             ),
90
-          ),
91
-          'SA_RESCHEDULE' => 
92
-          array (
91
+            'SA_RESCHEDULE' => 
92
+            array (
93 93
             'customCode' => '{if $fields.status.value != "Held"} <input title="{$MOD.LBL_RESCHEDULE}" class="button" onclick="get_form();" name="Reschedule" id="reschedule_button" value="{$MOD.LBL_RESCHEDULE}" type="button">{/if}',
94
-          ),
94
+            ),
95 95
         ),
96 96
         'hidden' => 
97 97
         array (
98
-          0 => '<input type="hidden" name="isSaveAndNew">',
99
-          1 => '<input type="hidden" name="status">',
100
-          2 => '<input type="hidden" name="isSaveFromDetailView">',
101
-          3 => '<input type="hidden" name="isSave">',
98
+            0 => '<input type="hidden" name="isSaveAndNew">',
99
+            1 => '<input type="hidden" name="status">',
100
+            2 => '<input type="hidden" name="isSaveFromDetailView">',
101
+            3 => '<input type="hidden" name="isSave">',
102 102
         ),
103 103
         'headerTpl' => 'modules/Calls/tpls/detailHeader.tpl',
104
-      ),
105
-      'maxColumns' => '2',
106
-      'widths' => 
107
-      array (
104
+        ),
105
+        'maxColumns' => '2',
106
+        'widths' => 
107
+        array (
108 108
         0 => 
109 109
         array (
110
-          'label' => '10',
111
-          'field' => '30',
110
+            'label' => '10',
111
+            'field' => '30',
112 112
         ),
113 113
         1 => 
114 114
         array (
115
-          'label' => '10',
116
-          'field' => '30',
115
+            'label' => '10',
116
+            'field' => '30',
117 117
         ),
118
-      ),
119
-      'useTabs' => true,
120
-      'includes' => 
121
-      array (
118
+        ),
119
+        'useTabs' => true,
120
+        'includes' => 
121
+        array (
122 122
         'SA_RESCHEDULE' => 
123 123
         array (
124
-          'file' => 'modules/Calls_Reschedule/reschedule_form.js',
124
+            'file' => 'modules/Calls_Reschedule/reschedule_form.js',
125
+        ),
126
+            array('file' => 'modules/Reminders/Reminders.js'),
125 127
         ),
126
-          array('file' => 'modules/Reminders/Reminders.js'),
127
-      ),
128
-      'tabDefs' => 
129
-      array (
128
+        'tabDefs' => 
129
+        array (
130 130
         'LBL_CALL_INFORMATION' => 
131 131
         array (
132
-          'newTab' => true,
133
-          'panelDefault' => 'expanded',
132
+            'newTab' => true,
133
+            'panelDefault' => 'expanded',
134 134
         ),
135 135
         'LBL_RESCHEDULE_PANEL' => 
136 136
         array (
137
-          'newTab' => true,
138
-          'panelDefault' => 'expanded',
137
+            'newTab' => true,
138
+            'panelDefault' => 'expanded',
139 139
         ),
140 140
         'LBL_PANEL_ASSIGNMENT' =>
141 141
         array (
142
-          'newTab' => true,
143
-          'panelDefault' => 'expanded',
142
+            'newTab' => true,
143
+            'panelDefault' => 'expanded',
144
+        ),
144 145
         ),
145
-      ),
146 146
     ),
147 147
     'panels' => 
148 148
     array (
149
-      'lbl_call_information' => 
150
-      array (
149
+        'lbl_call_information' => 
150
+        array (
151 151
         0 => 
152 152
         array (
153
-          0 => 
154
-          array (
153
+            0 => 
154
+            array (
155 155
             'name' => 'name',
156 156
             'label' => 'LBL_SUBJECT',
157
-          ),
158
-          1 => 
159
-          array (
157
+            ),
158
+            1 => 
159
+            array (
160 160
             'name' => 'direction',
161 161
             'customCode' => '{$fields.direction.options[$fields.direction.value]} {$fields.status.options[$fields.status.value]}',
162 162
             'label' => 'LBL_STATUS',
163
-          ),
163
+            ),
164 164
         ),
165 165
         1 => 
166 166
         array (
167
-          0 => 
168
-          array (
167
+            0 => 
168
+            array (
169 169
             'name' => 'date_start',
170 170
             'customCode' => '{$fields.date_start.value} {$fields.time_start.value}&nbsp;',
171 171
             'label' => 'LBL_DATE_TIME',
172
-          ),
173
-          1 => 
174
-          array (
172
+            ),
173
+            1 => 
174
+            array (
175 175
             'name' => 'parent_name',
176 176
             'customLabel' => '{sugar_translate label=\'LBL_MODULE_NAME\' module=$fields.parent_type.value}',
177
-          ),
177
+            ),
178 178
         ),
179 179
         2 => 
180 180
         array (
181
-          0 => 
182
-          array (
181
+            0 => 
182
+            array (
183 183
             'name' => 'duration_hours',
184 184
             'customCode' => '{$fields.duration_hours.value}{$MOD.LBL_HOURS_ABBREV} {$fields.duration_minutes.value}{$MOD.LBL_MINSS_ABBREV}&nbsp;',
185 185
             'label' => 'LBL_DURATION',
186
-          ),
186
+            ),
187 187
 //          1 =>
188 188
 //          array (
189 189
 //            'name' => 'reminder_time',
@@ -197,55 +197,55 @@  discard block
 block discarded – undo
197 197
         ),
198 198
         3 => 
199 199
         array (
200
-          0 => 
201
-          array (
200
+            0 => 
201
+            array (
202 202
             'name' => 'description',
203 203
             'comment' => 'Full text of the note',
204 204
             'label' => 'LBL_DESCRIPTION',
205
-          ),
205
+            ),
206 206
         ),
207 207
         4 => 
208 208
         array (
209
-          0 => 
210
-          array (
209
+            0 => 
210
+            array (
211 211
             'name' => 'assigned_user_name',
212 212
             'customCode' => '{$fields.assigned_user_name.value}',
213 213
             'label' => 'LBL_ASSIGNED_TO',
214
-          ),
214
+            ),
215 215
         ),
216
-      ),
217
-      'lbl_reschedule_panel' => 
218
-      array (
216
+        ),
217
+        'lbl_reschedule_panel' => 
218
+        array (
219 219
         0 => 
220 220
         array (
221
-          0 => 
222
-          array (
221
+            0 => 
222
+            array (
223 223
             'name' => 'reschedule_history',
224 224
             'comment' => 'Call duration, minutes portion',
225 225
             'label' => 'LBL_RESCHEDULE_HISTORY',
226
-          ),
227
-          1 => '',
226
+            ),
227
+            1 => '',
228
+        ),
228 229
         ),
229
-      ),
230
-      'LBL_PANEL_ASSIGNMENT' =>
231
-      array (
230
+        'LBL_PANEL_ASSIGNMENT' =>
231
+        array (
232 232
         0 => 
233 233
         array (
234
-          0 => 
235
-          array (
234
+            0 => 
235
+            array (
236 236
             'name' => 'date_entered',
237 237
             'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}&nbsp;',
238 238
             'label' => 'LBL_DATE_ENTERED',
239
-          ),
240
-          1 => 
241
-          array (
239
+            ),
240
+            1 => 
241
+            array (
242 242
             'name' => 'date_modified',
243 243
             'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}&nbsp;',
244 244
             'label' => 'LBL_DATE_MODIFIED',
245
-          ),
245
+            ),
246 246
         ),
247
-      ),
247
+        ),
248
+    ),
248 249
     ),
249
-  ),
250 250
 );
251 251
 ?>
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -39,27 +39,27 @@  discard block
 block discarded – undo
39 39
 
40 40
 
41 41
 $viewdefs ['Calls'] =
42
-array (
42
+array(
43 43
   'DetailView' => 
44
-  array (
44
+  array(
45 45
     'templateMeta' => 
46
-    array (
46
+    array(
47 47
       'form' => 
48
-      array (
48
+      array(
49 49
         'buttons' => 
50
-        array (
50
+        array(
51 51
           0 => 'EDIT',
52 52
           1 => 'DUPLICATE',
53 53
           2 => 'DELETE',
54 54
           3 => 
55
-          array (
55
+          array(
56 56
             'customCode' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")} <input type="hidden" name="isSaveAndNew" value="false">  <input type="hidden" name="status" value="">  <input type="hidden" name="isSaveFromDetailView" value="true">  <input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}"   class="button"  onclick="this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'" id="close_create_button" name="button"  value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}"  type="submit">{/if}',
57 57
             'sugar_html' => 
58
-            array (
58
+            array(
59 59
               'type' => 'submit',
60 60
               'value' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
61 61
               'htmlOptions' => 
62
-              array (
62
+              array(
63 63
                 'title' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
64 64
                 'class' => 'button',
65 65
                 'onclick' => 'this.form.isSaveFromDetailView.value=true; this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'',
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
             ),
71 71
           ),
72 72
           4 => 
73
-          array (
73
+          array(
74 74
             'customCode' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")} <input type="hidden" name="isSave" value="false">  <input title="{$APP.LBL_CLOSE_BUTTON_TITLE}"  accesskey="{$APP.LBL_CLOSE_BUTTON_KEY}"  class="button"  onclick="this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'" id="close_button" name="button1"  value="{$APP.LBL_CLOSE_BUTTON_TITLE}"  type="submit">{/if}',
75 75
             'sugar_html' => 
76
-            array (
76
+            array(
77 77
               'type' => 'submit',
78 78
               'value' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
79 79
               'htmlOptions' => 
80
-              array (
80
+              array(
81 81
                 'title' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
82 82
                 'accesskey' => '{$APP.LBL_CLOSE_BUTTON_KEY}',
83 83
                 'class' => 'button',
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
             ),
90 90
           ),
91 91
           'SA_RESCHEDULE' => 
92
-          array (
92
+          array(
93 93
             'customCode' => '{if $fields.status.value != "Held"} <input title="{$MOD.LBL_RESCHEDULE}" class="button" onclick="get_form();" name="Reschedule" id="reschedule_button" value="{$MOD.LBL_RESCHEDULE}" type="button">{/if}',
94 94
           ),
95 95
         ),
96 96
         'hidden' => 
97
-        array (
97
+        array(
98 98
           0 => '<input type="hidden" name="isSaveAndNew">',
99 99
           1 => '<input type="hidden" name="status">',
100 100
           2 => '<input type="hidden" name="isSaveFromDetailView">',
@@ -104,82 +104,82 @@  discard block
 block discarded – undo
104 104
       ),
105 105
       'maxColumns' => '2',
106 106
       'widths' => 
107
-      array (
107
+      array(
108 108
         0 => 
109
-        array (
109
+        array(
110 110
           'label' => '10',
111 111
           'field' => '30',
112 112
         ),
113 113
         1 => 
114
-        array (
114
+        array(
115 115
           'label' => '10',
116 116
           'field' => '30',
117 117
         ),
118 118
       ),
119 119
       'useTabs' => true,
120 120
       'includes' => 
121
-      array (
121
+      array(
122 122
         'SA_RESCHEDULE' => 
123
-        array (
123
+        array(
124 124
           'file' => 'modules/Calls_Reschedule/reschedule_form.js',
125 125
         ),
126 126
           array('file' => 'modules/Reminders/Reminders.js'),
127 127
       ),
128 128
       'tabDefs' => 
129
-      array (
129
+      array(
130 130
         'LBL_CALL_INFORMATION' => 
131
-        array (
131
+        array(
132 132
           'newTab' => true,
133 133
           'panelDefault' => 'expanded',
134 134
         ),
135 135
         'LBL_RESCHEDULE_PANEL' => 
136
-        array (
136
+        array(
137 137
           'newTab' => true,
138 138
           'panelDefault' => 'expanded',
139 139
         ),
140 140
         'LBL_PANEL_ASSIGNMENT' =>
141
-        array (
141
+        array(
142 142
           'newTab' => true,
143 143
           'panelDefault' => 'expanded',
144 144
         ),
145 145
       ),
146 146
     ),
147 147
     'panels' => 
148
-    array (
148
+    array(
149 149
       'lbl_call_information' => 
150
-      array (
150
+      array(
151 151
         0 => 
152
-        array (
152
+        array(
153 153
           0 => 
154
-          array (
154
+          array(
155 155
             'name' => 'name',
156 156
             'label' => 'LBL_SUBJECT',
157 157
           ),
158 158
           1 => 
159
-          array (
159
+          array(
160 160
             'name' => 'direction',
161 161
             'customCode' => '{$fields.direction.options[$fields.direction.value]} {$fields.status.options[$fields.status.value]}',
162 162
             'label' => 'LBL_STATUS',
163 163
           ),
164 164
         ),
165 165
         1 => 
166
-        array (
166
+        array(
167 167
           0 => 
168
-          array (
168
+          array(
169 169
             'name' => 'date_start',
170 170
             'customCode' => '{$fields.date_start.value} {$fields.time_start.value}&nbsp;',
171 171
             'label' => 'LBL_DATE_TIME',
172 172
           ),
173 173
           1 => 
174
-          array (
174
+          array(
175 175
             'name' => 'parent_name',
176 176
             'customLabel' => '{sugar_translate label=\'LBL_MODULE_NAME\' module=$fields.parent_type.value}',
177 177
           ),
178 178
         ),
179 179
         2 => 
180
-        array (
180
+        array(
181 181
           0 => 
182
-          array (
182
+          array(
183 183
             'name' => 'duration_hours',
184 184
             'customCode' => '{$fields.duration_hours.value}{$MOD.LBL_HOURS_ABBREV} {$fields.duration_minutes.value}{$MOD.LBL_MINSS_ABBREV}&nbsp;',
185 185
             'label' => 'LBL_DURATION',
@@ -196,18 +196,18 @@  discard block
 block discarded – undo
196 196
                 ),
197 197
         ),
198 198
         3 => 
199
-        array (
199
+        array(
200 200
           0 => 
201
-          array (
201
+          array(
202 202
             'name' => 'description',
203 203
             'comment' => 'Full text of the note',
204 204
             'label' => 'LBL_DESCRIPTION',
205 205
           ),
206 206
         ),
207 207
         4 => 
208
-        array (
208
+        array(
209 209
           0 => 
210
-          array (
210
+          array(
211 211
             'name' => 'assigned_user_name',
212 212
             'customCode' => '{$fields.assigned_user_name.value}',
213 213
             'label' => 'LBL_ASSIGNED_TO',
@@ -215,11 +215,11 @@  discard block
 block discarded – undo
215 215
         ),
216 216
       ),
217 217
       'lbl_reschedule_panel' => 
218
-      array (
218
+      array(
219 219
         0 => 
220
-        array (
220
+        array(
221 221
           0 => 
222
-          array (
222
+          array(
223 223
             'name' => 'reschedule_history',
224 224
             'comment' => 'Call duration, minutes portion',
225 225
             'label' => 'LBL_RESCHEDULE_HISTORY',
@@ -228,17 +228,17 @@  discard block
 block discarded – undo
228 228
         ),
229 229
       ),
230 230
       'LBL_PANEL_ASSIGNMENT' =>
231
-      array (
231
+      array(
232 232
         0 => 
233
-        array (
233
+        array(
234 234
           0 => 
235
-          array (
235
+          array(
236 236
             'name' => 'date_entered',
237 237
             'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}&nbsp;',
238 238
             'label' => 'LBL_DATE_ENTERED',
239 239
           ),
240 240
           1 => 
241
-          array (
241
+          array(
242 242
             'name' => 'date_modified',
243 243
             'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}&nbsp;',
244 244
             'label' => 'LBL_DATE_MODIFIED',
Please login to merge, or discard this patch.