Completed
Push — console-installer ( 3d54e5...e2b50d )
by Adam
69:10 queued 48:24
created
custom/modules/unified_search_modules_display.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,140 +1,140 @@
 block discarded – undo
1 1
 <?php
2 2
 // created: 2014-01-29 09:59:23
3
-$unified_search_modules_display = array (
3
+$unified_search_modules_display = array(
4 4
   'AOP_Case_Events' => 
5
-  array (
5
+  array(
6 6
     'visible' => false,
7 7
   ),
8 8
   'AOP_Case_Updates' => 
9
-  array (
9
+  array(
10 10
     'visible' => false,
11 11
   ),
12 12
   'AOR_Reports' => 
13
-  array (
13
+  array(
14 14
     'visible' => false,
15 15
   ),
16 16
   'AOS_Contracts' => 
17
-  array (
17
+  array(
18 18
     'visible' => false,
19 19
   ),
20 20
   'AOS_Invoices' => 
21
-  array (
21
+  array(
22 22
     'visible' => false,
23 23
   ),
24 24
   'AOS_PDF_Templates' => 
25
-  array (
25
+  array(
26 26
     'visible' => false,
27 27
   ),
28 28
   'AOS_Product_Categories' => 
29
-  array (
29
+  array(
30 30
     'visible' => false,
31 31
   ),
32 32
   'AOS_Products' => 
33
-  array (
33
+  array(
34 34
     'visible' => false,
35 35
   ),
36 36
   'AOS_Quotes' => 
37
-  array (
37
+  array(
38 38
     'visible' => false,
39 39
   ),
40 40
   'AOW_Processed' => 
41
-  array (
41
+  array(
42 42
     'visible' => false,
43 43
   ),
44 44
   'AOW_WorkFlow' => 
45
-  array (
45
+  array(
46 46
     'visible' => false,
47 47
   ),
48 48
   'Accounts' => 
49
-  array (
49
+  array(
50 50
     'visible' => true,
51 51
   ),
52 52
   'Bugs' => 
53
-  array (
53
+  array(
54 54
     'visible' => false,
55 55
   ),
56 56
   'Calls' => 
57
-  array (
57
+  array(
58 58
     'visible' => true,
59 59
   ),
60 60
   'Calls_Reschedule' => 
61
-  array (
61
+  array(
62 62
     'visible' => false,
63 63
   ),
64 64
   'Campaigns' => 
65
-  array (
65
+  array(
66 66
     'visible' => false,
67 67
   ),
68 68
   'Cases' => 
69
-  array (
69
+  array(
70 70
     'visible' => true,
71 71
   ),
72 72
   'Contacts' => 
73
-  array (
73
+  array(
74 74
     'visible' => true,
75 75
   ),
76 76
   'Documents' => 
77
-  array (
77
+  array(
78 78
     'visible' => true,
79 79
   ),
80 80
   'FP_Event_Locations' => 
81
-  array (
81
+  array(
82 82
     'visible' => false,
83 83
   ),
84 84
   'FP_events' => 
85
-  array (
85
+  array(
86 86
     'visible' => false,
87 87
   ),
88 88
   'Leads' => 
89
-  array (
89
+  array(
90 90
     'visible' => true,
91 91
   ),
92 92
   'Meetings' => 
93
-  array (
93
+  array(
94 94
     'visible' => true,
95 95
   ),
96 96
   'Notes' => 
97
-  array (
97
+  array(
98 98
     'visible' => true,
99 99
   ),
100 100
   'Opportunities' => 
101
-  array (
101
+  array(
102 102
     'visible' => true,
103 103
   ),
104 104
   'Project' => 
105
-  array (
105
+  array(
106 106
     'visible' => false,
107 107
   ),
108 108
   'ProjectTask' => 
109
-  array (
109
+  array(
110 110
     'visible' => false,
111 111
   ),
112 112
   'ProspectLists' => 
113
-  array (
113
+  array(
114 114
     'visible' => false,
115 115
   ),
116 116
   'Prospects' => 
117
-  array (
117
+  array(
118 118
     'visible' => false,
119 119
   ),
120 120
   'Tasks' => 
121
-  array (
121
+  array(
122 122
     'visible' => false,
123 123
   ),
124 124
   'jjwg_Address_Cache' => 
125
-  array (
125
+  array(
126 126
     'visible' => false,
127 127
   ),
128 128
   'jjwg_Areas' => 
129
-  array (
129
+  array(
130 130
     'visible' => false,
131 131
   ),
132 132
   'jjwg_Maps' => 
133
-  array (
133
+  array(
134 134
     'visible' => false,
135 135
   ),
136 136
   'jjwg_Markers' => 
137
-  array (
137
+  array(
138 138
     'visible' => false,
139 139
   ),
140 140
 );
141 141
\ No newline at end of file
Please login to merge, or discard this patch.
custom/Extension/application/Ext/LogicHooks/AOW_WorkFlow_Hook.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,4 +28,4 @@
 block discarded – undo
28 28
 if (!isset($hook_array['after_save']) || !is_array($hook_array['after_save'])) {
29 29
     $hook_array['after_save'] = array();
30 30
 }
31
-$hook_array['after_save'][] = Array(99, 'AOW_Workflow', 'modules/AOW_WorkFlow/AOW_WorkFlow.php','AOW_WorkFlow', 'run_bean_flows');
32 31
\ No newline at end of file
32
+$hook_array['after_save'][] = Array(99, 'AOW_Workflow', 'modules/AOW_WorkFlow/AOW_WorkFlow.php', 'AOW_WorkFlow', 'run_bean_flows');
33 33
\ No newline at end of file
Please login to merge, or discard this patch.
include/SugarFields/Fields/Datetimecombo/SugarFieldDatetimecombo.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -43,19 +43,19 @@  discard block
 block discarded – undo
43 43
 
44 44
     function getEditViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) {
45 45
         // Create Smarty variables for the Calendar picker widget
46
-        if(!isset($displayParams['showMinutesDropdown'])) {
46
+        if (!isset($displayParams['showMinutesDropdown'])) {
47 47
            $displayParams['showMinutesDropdown'] = false;
48 48
         }
49 49
 
50
-        if(!isset($displayParams['showHoursDropdown'])) {
50
+        if (!isset($displayParams['showHoursDropdown'])) {
51 51
            $displayParams['showHoursDropdown'] = false;
52 52
         }
53 53
 
54
-        if(!isset($displayParams['showNoneCheckbox'])) {
54
+        if (!isset($displayParams['showNoneCheckbox'])) {
55 55
            $displayParams['showNoneCheckbox'] = false;
56 56
         }
57 57
 
58
-        if(!isset($displayParams['showFormats'])) {
58
+        if (!isset($displayParams['showFormats'])) {
59 59
            $displayParams['showFormats'] = false;
60 60
         }
61 61
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	
76 76
     function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) {
77 77
 
78
-    	 if($this->isRangeSearchView($vardef)) {
78
+    	 if ($this->isRangeSearchView($vardef)) {
79 79
            $displayParams['showMinutesDropdown'] = false;
80 80
            $displayParams['showHoursDropdown'] = false;
81 81
            $displayParams['showNoneCheckbox'] = false;
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
            $this->ss->assign('id_range_start', "start_range_{$id}");
92 92
            $this->ss->assign('id_range_end', "end_range_{$id}");
93 93
            $this->ss->assign('id_range_choice', "{$id}_range_choice");
94
-           if(file_exists('custom/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl'))
94
+           if (file_exists('custom/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl'))
95 95
            {
96 96
               return $this->fetch('custom/include/SugarFields/Fields/Datetimecombo/RangeSearchForm.tpl');
97 97
            }
@@ -99,19 +99,19 @@  discard block
 block discarded – undo
99 99
         }
100 100
 
101 101
     	// Create Smarty variables for the Calendar picker widget
102
-        if(!isset($displayParams['showMinutesDropdown'])) {
102
+        if (!isset($displayParams['showMinutesDropdown'])) {
103 103
            $displayParams['showMinutesDropdown'] = false;
104 104
         }
105 105
 
106
-        if(!isset($displayParams['showHoursDropdown'])) {
106
+        if (!isset($displayParams['showHoursDropdown'])) {
107 107
            $displayParams['showHoursDropdown'] = false;
108 108
         }
109 109
 
110
-        if(!isset($displayParams['showNoneCheckbox'])) {
110
+        if (!isset($displayParams['showNoneCheckbox'])) {
111 111
            $displayParams['showNoneCheckbox'] = false;
112 112
         }
113 113
 
114
-        if(!isset($displayParams['showFormats'])) {
114
+        if (!isset($displayParams['showFormats'])) {
115 115
            $displayParams['showFormats'] = false;
116 116
         }
117 117
 
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
     }
125 125
 
126 126
 
127
-	public function getEmailTemplateValue($inputField, $vardef, $context = null, $tabindex = 0){
127
+	public function getEmailTemplateValue($inputField, $vardef, $context = null, $tabindex = 0) {
128 128
         // This does not return a smarty section, instead it returns a direct value
129
-        if(isset($context['notify_user'])) {
129
+        if (isset($context['notify_user'])) {
130 130
             $user = $context['notify_user'];
131 131
         } else {
132 132
             $user = $GLOBALS['current_user'];
@@ -136,19 +136,19 @@  discard block
 block discarded – undo
136 136
     
137 137
     public function save(&$bean, $params, $field, $properties, $prefix = '') {
138 138
         global $timedate;
139
-        if ( !isset($params[$prefix.$field]) ) {
139
+        if (!isset($params[$prefix.$field])) {
140 140
             //$bean->$field = '';
141 141
             return;
142 142
         }
143 143
 
144
-        if(strpos($params[$prefix.$field], ' ') > 0) {
144
+        if (strpos($params[$prefix.$field], ' ') > 0) {
145 145
             if ($timedate->check_matching_format($params[$prefix.$field], TimeDate::DB_DATETIME_FORMAT)) {
146 146
 	            $bean->$field = $params[$prefix.$field];
147 147
             } else {
148 148
                 $bean->$field = $timedate->to_db($params[$prefix.$field]);
149 149
             }
150 150
         } else {
151
-        	$GLOBALS['log']->error('Field ' . $prefix.$field . ' expecting datetime format, but got value: ' . $params[$prefix.$field]);
151
+        	$GLOBALS['log']->error('Field '.$prefix.$field.' expecting datetime format, but got value: '.$params[$prefix.$field]);
152 152
 	        //Default to assume date format value
153 153
         	if ($timedate->check_matching_format($params[$prefix.$field], TimeDate::DB_DATE_FORMAT)) {
154 154
                 $bean->$field = $params[$prefix.$field];
@@ -172,39 +172,39 @@  discard block
 block discarded – undo
172 172
 
173 173
         $format = $timedate->merge_date_time($settings->dateformat, $settings->timeformat);
174 174
 
175
-        if ( !$timedate->check_matching_format($value, $format) ) {
175
+        if (!$timedate->check_matching_format($value, $format)) {
176 176
             $parts = $timedate->split_date_time($value);
177
-            if(empty($parts[0])) {
177
+            if (empty($parts[0])) {
178 178
                $datepart = $timedate->getNow()->format($settings->dateformat);
179 179
             }
180 180
             else {
181 181
                $datepart = $parts[0];
182 182
             }
183
-            if(empty($parts[1])) {
183
+            if (empty($parts[1])) {
184 184
                 $timepart = $timedate->fromTimestamp(0)->format($settings->timeformat);
185 185
             } else {
186 186
                 $timepart = $parts[1];
187 187
                 // see if we can get by stripping the seconds
188
-                if(strpos($settings->timeformat, 's') === false) {
188
+                if (strpos($settings->timeformat, 's') === false) {
189 189
                     $sep = $timedate->timeSeparatorFormat($settings->timeformat);
190 190
                     // We are assuming here seconds are the last component, which
191 191
                     // is kind of reasonable - no sane time format puts seconds first
192 192
                     $timeparts = explode($sep, $timepart);
193
-                    if(!empty($timeparts[2])) {
193
+                    if (!empty($timeparts[2])) {
194 194
                         $timepart = join($sep, array($timeparts[0], $timeparts[1]));
195 195
                     }
196 196
                 }
197 197
             }
198 198
 
199 199
             $value = $timedate->merge_date_time($datepart, $timepart);
200
-            if ( !$timedate->check_matching_format($value, $format) ) {
200
+            if (!$timedate->check_matching_format($value, $format)) {
201 201
                 return false;
202 202
             }
203 203
         }
204 204
 
205 205
         try {
206 206
             $date = SugarDateTime::createFromFormat($format, $value, new DateTimeZone($settings->timezone));
207
-        } catch(Exception $e) {
207
+        }catch (Exception $e) {
208 208
             return false;
209 209
         }
210 210
         return $date->asDb();
Please login to merge, or discard this patch.
SugarFields/Fields/Assigned_user_name/SugarFieldAssigned_user_name.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@
 block discarded – undo
43 43
 
44 44
 	function getSearchViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) {
45 45
     	$vardef['options'] = get_user_array(false);
46
-		if(!empty($vardef['function']['returns']) && $vardef['function']['returns']== 'html'){
46
+		if (!empty($vardef['function']['returns']) && $vardef['function']['returns'] == 'html') {
47 47
     	   $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex);
48 48
            return $this->fetch($this->findTemplate('EditViewFunction'));
49
-    	}else{
49
+    	} else {
50 50
     	   $this->setup($parentFieldArray, $vardef, $displayParams, $tabindex);
51 51
            return $this->fetch($this->findTemplate('SearchView'));
52 52
     	}
Please login to merge, or discard this patch.
include/SugarFields/Fields/Text/SugarFieldText.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,18 +42,18 @@  discard block
 block discarded – undo
42 42
 class SugarFieldText extends SugarFieldBase {
43 43
 
44 44
 	function getDetailViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex) {
45
-        if(!isset($displayParams['nl2br'])){
45
+        if (!isset($displayParams['nl2br'])) {
46 46
             $displayParams['nl2br'] = true;
47 47
         }
48
-        if(!isset($displayParams['htmlescape'])) {
48
+        if (!isset($displayParams['htmlescape'])) {
49 49
             $displayParams['htmlescape'] = true;
50 50
         }
51
-        if(!isset($displayParams['url2html'])) {
51
+        if (!isset($displayParams['url2html'])) {
52 52
             $displayParams['url2html'] = true;
53 53
         }
54 54
 		return parent::getDetailViewSmarty($parentFieldArray, $vardef, $displayParams, $tabindex);
55 55
     }
56
-    function getClassicEditView($field_id='description', $value='', $prefix='', $rich_text=false, $maxlength='', $tabindex=1, $cols=80, $rows=4) {
56
+    function getClassicEditView($field_id = 'description', $value = '', $prefix = '', $rich_text = false, $maxlength = '', $tabindex = 1, $cols = 80, $rows = 4) {
57 57
 
58 58
         $this->ss->assign('prefix', $prefix);
59 59
         $this->ss->assign('field_id', $field_id);
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
 
70 70
         $this->ss->assign('displayParams', $displayParams);
71
-		if(isset($GLOBALS['current_user'])) {
71
+		if (isset($GLOBALS['current_user'])) {
72 72
 			$height = $GLOBALS['current_user']->getPreference('text_editor_height');
73 73
 			$width = $GLOBALS['current_user']->getPreference('text_editor_width');
74 74
 			$height = isset($height) ? $height : '300px';
Please login to merge, or discard this patch.
include/SugarFields/Fields/CronSchedule/SugarFieldCronSchedule.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -3,48 +3,48 @@
 block discarded – undo
3 3
 
4 4
 class SugarFieldCronSchedule extends SugarFieldBase {
5 5
 
6
-    private function getDays(){
6
+    private function getDays() {
7 7
         $days = array();
8 8
         $date = new DateTime("1986-05-01");
9 9
         $period = new DateInterval('P1D');
10
-        for($x = 1; $x <= 31; $x++){
11
-            $days[$x] = $date->format('jS');;
10
+        for ($x = 1; $x <= 31; $x++) {
11
+            $days[$x] = $date->format('jS'); ;
12 12
             $date->add($period);
13 13
         }
14 14
         return $days;
15 15
     }
16
-    private function getWeekDays(){
16
+    private function getWeekDays() {
17 17
         $days = array();
18 18
         $date = new DateTime("1986-05-04");
19 19
         $period = new DateInterval('P1D');
20
-        for($x = 0; $x < 7; $x++){
20
+        for ($x = 0; $x < 7; $x++) {
21 21
             $days[$x] = $date->format('D');
22 22
             $date->add($period);
23 23
         }
24 24
         return $days;
25 25
     }
26 26
 
27
-    function getHumanReadable($schedule){
27
+    function getHumanReadable($schedule) {
28 28
 
29 29
     }
30 30
 
31 31
     function setup($parentFieldArray, $vardef, $displayParams, $tabindex, $twopass = true) {
32
-        global $app_list_strings,$app_strings;
32
+        global $app_list_strings, $app_strings;
33 33
         parent::setup($parentFieldArray, $vardef, $displayParams, $tabindex, $twopass);
34
-        $this->ss->assign('APP',$app_strings);
35
-        $this->ss->assign('types',get_select_options_with_id($app_list_strings['aor_scheduled_report_schedule_types'],''));
34
+        $this->ss->assign('APP', $app_strings);
35
+        $this->ss->assign('types', get_select_options_with_id($app_list_strings['aor_scheduled_report_schedule_types'], ''));
36 36
         $weekdays = $this->getWeekDays();
37
-        $this->ss->assign('weekday_vals',json_encode($weekdays));
38
-        $this->ss->assign('weekdays',get_select_options($weekdays,''));
37
+        $this->ss->assign('weekday_vals', json_encode($weekdays));
38
+        $this->ss->assign('weekdays', get_select_options($weekdays, ''));
39 39
         $days = $this->getDays();
40
-        $this->ss->assign('days',get_select_options($days,''));
41
-        function padNumbers($x){
42
-            return str_pad($x,2,'0',STR_PAD_LEFT);
40
+        $this->ss->assign('days', get_select_options($days, ''));
41
+        function padNumbers($x) {
42
+            return str_pad($x, 2, '0', STR_PAD_LEFT);
43 43
         }
44
-        $minutes = array_map('padNumbers',range(0,59));
45
-        $hours = array_map('padNumbers',range(0,23));
46
-        $this->ss->assign('minutes',get_select_options($minutes,''));
47
-        $this->ss->assign('hours',get_select_options($hours,''));
44
+        $minutes = array_map('padNumbers', range(0, 59));
45
+        $hours = array_map('padNumbers', range(0, 23));
46
+        $this->ss->assign('minutes', get_select_options($minutes, ''));
47
+        $this->ss->assign('hours', get_select_options($hours, ''));
48 48
     }
49 49
 
50 50
 
Please login to merge, or discard this patch.
include/SugarOauth.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
          * @param string $consumer_secret
56 56
          * @param array $params OAuth options
57 57
          */
58
-        public function __construct($consumer_key , $consumer_secret, $params = null)
58
+        public function __construct($consumer_key, $consumer_secret, $params = null)
59 59
         {
60 60
             $this->_oauth_config = array(
61 61
                 'consumerKey' => $consumer_key,
62 62
                 'consumerSecret' => $consumer_secret,
63 63
             );
64
-            if(!empty($params)) {
64
+            if (!empty($params)) {
65 65
                 $this->_oauth_config = array_merge($this->_oauth_config, $params);
66 66
             }
67 67
             parent::__construct($this->_oauth_config);
@@ -120,20 +120,20 @@  discard block
 block discarded – undo
120 120
          */
121 121
         public function getRequestTokenByUrl($url, $callback = null, $params = array())
122 122
         {
123
-            if(!empty($callback)) {
123
+            if (!empty($callback)) {
124 124
                 $this->setCallbackUrl($callback);
125 125
             }
126 126
             list($clean_url, $query) = explode('?', $url);
127
-            if($query) {
127
+            if ($query) {
128 128
                 $url = $clean_url;
129 129
                 parse_str($query, $query_params);
130 130
                 $params = array_merge($params, $query_params);
131 131
             }
132 132
             $this->setRequestTokenUrl($url);
133
-            try{
133
+            try {
134 134
                 $this->_last = $token = parent::getRequestToken($params);
135 135
                 return array('oauth_token' => $token->getToken(), 'oauth_token_secret' => $token->getTokenSecret());
136
-            }catch(Zend_Oauth_Exception $e){
136
+            }catch (Zend_Oauth_Exception $e) {
137 137
                 return array('oauth_token' => '', 'oauth_token_secret' => '');
138 138
             }
139 139
         }
@@ -166,12 +166,12 @@  discard block
 block discarded – undo
166 166
         public function fetch($url, $params = null, $method = 'GET', $headers = null)
167 167
         {
168 168
             $acc = $this->makeAccessToken();
169
-            if ( strpos($url,'?') ) {
169
+            if (strpos($url, '?')) {
170 170
                list($clean_url, $query) = explode('?', $url);
171
-               if($query) {
171
+               if ($query) {
172 172
                    $url = $clean_url;
173 173
                    parse_str($query, $query_params);
174
-                   $params = array_merge($params?$params:array(), $query_params);
174
+                   $params = array_merge($params ? $params : array(), $query_params);
175 175
                }
176 176
             }
177 177
             $client = $acc->getHttpClient($this->_oauth_config, $url);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             $proxy_config = SugarModule::get('Administration')->loadBean();
181 181
             $proxy_config->retrieveSettings('proxy');
182 182
             
183
-            if( !empty($proxy_config) && 
183
+            if (!empty($proxy_config) && 
184 184
                 !empty($proxy_config->settings['proxy_on']) &&
185 185
                 $proxy_config->settings['proxy_on'] == 1) {
186 186
                 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                 $proxy_settings['proxy_host'] = $proxy_config->settings['proxy_host'];
189 189
                 $proxy_settings['proxy_port'] = $proxy_config->settings['proxy_port'];
190 190
     
191
-                if(!empty($proxy_config->settings['proxy_auth'])){
191
+                if (!empty($proxy_config->settings['proxy_auth'])) {
192 192
                     $proxy_settings['proxy_user'] = $proxy_config->settings['proxy_username'];
193 193
                     $proxy_settings['proxy_pass'] = $proxy_config->settings['proxy_password'];
194 194
                 }
@@ -199,11 +199,11 @@  discard block
 block discarded – undo
199 199
             }
200 200
             
201 201
             $client->setMethod($method);
202
-            if(!empty($headers)) {
202
+            if (!empty($headers)) {
203 203
                 $client->setHeaders($headers);
204 204
             }
205
-            if(!empty($params)) {
206
-                if($method == 'GET') {
205
+            if (!empty($params)) {
206
+                if ($method == 'GET') {
207 207
                     $client->setParameterGet($params);
208 208
                 } else {
209 209
                     $client->setParameterPost($params);
Please login to merge, or discard this patch.
include/phpmailer/language/phpmailer.lang-ar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 $PHPMAILER_LANG['invalid_address']      = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح.';
19 19
 $PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.';
20 20
 $PHPMAILER_LANG['provide_address']      = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.';
21
-$PHPMAILER_LANG['recipients_failed']    = 'خطأ SMTP: الأخطاء التالية ' .
21
+$PHPMAILER_LANG['recipients_failed']    = 'خطأ SMTP: الأخطاء التالية '.
22 22
                                           'فشل في الارسال لكل من : ';
23 23
 $PHPMAILER_LANG['signing']              = 'خطأ في التوقيع: ';
24 24
 $PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() غير ممكن.';
Please login to merge, or discard this patch.
include/formbase.php 1 patch
Spacing   +69 added lines, -69 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.
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
  */
55 55
 function checkRequired($prefix, $required)
56 56
 {
57
-	foreach($required as $key)
57
+	foreach ($required as $key)
58 58
 	{
59
-		if(!isset($_POST[$prefix.$key]) || number_empty($_POST[$prefix.$key]))
59
+		if (!isset($_POST[$prefix.$key]) || number_empty($_POST[$prefix.$key]))
60 60
 		{
61 61
 			return false;
62 62
 		}
@@ -77,15 +77,15 @@  discard block
 block discarded – undo
77 77
 {
78 78
 	global $current_user;
79 79
 
80
-	if(!empty($_REQUEST[$prefix.'record']) && !$skipRetrieve)
80
+	if (!empty($_REQUEST[$prefix.'record']) && !$skipRetrieve)
81 81
 		$focus->retrieve($_REQUEST[$prefix.'record']);
82 82
 
83
-	if(!empty($_POST['assigned_user_id']) && 
83
+	if (!empty($_POST['assigned_user_id']) && 
84 84
 	    ($focus->assigned_user_id != $_POST['assigned_user_id']) && 
85 85
 	    ($_POST['assigned_user_id'] != $current_user->id)) {
86 86
 		$GLOBALS['check_notify'] = true;
87 87
 	}
88
-    if(isset($_POST['dup_checked']) && $_POST['dup_checked'] && isset($_POST['id']) && $_POST['id'] != '' ){
88
+    if (isset($_POST['dup_checked']) && $_POST['dup_checked'] && isset($_POST['id']) && $_POST['id'] != '') {
89 89
         $focus->new_with_id = true;
90 90
     }
91 91
     require_once('include/SugarFields/SugarFieldHandler.php');
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
         $relatedFields[$def['id_name']] = $field;
107 107
     }
108 108
 
109
-	foreach($focus->field_defs as $field=>$def) {
110
-        if ( $field == 'id' && !empty($focus->id) ) {
109
+	foreach ($focus->field_defs as $field=>$def) {
110
+        if ($field == 'id' && !empty($focus->id)) {
111 111
             // Don't try and overwrite the ID
112 112
             continue;
113 113
         }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
 	    $type = !empty($def['custom_type']) ? $def['custom_type'] : $def['type'];
117 117
 		$sf = $sfh->getSugarField($type);
118
-        if($sf != null){
118
+        if ($sf != null) {
119 119
             $sf->save($focus, $_POST, $field, $def, $prefix);
120 120
         } else {
121 121
             $GLOBALS['log']->fatal("Field '$field' does not have a SugarField handler");
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
 */
155 155
 	}
156 156
 
157
-	foreach($focus->additional_column_fields as $field) {
158
-		if(isset($_POST[$prefix.$field])) {
157
+	foreach ($focus->additional_column_fields as $field) {
158
+		if (isset($_POST[$prefix.$field])) {
159 159
 			$value = $_POST[$prefix.$field];
160 160
 			$focus->$field = $value;
161 161
 		}
@@ -180,18 +180,18 @@  discard block
 block discarded – undo
180 180
 }
181 181
 
182 182
 
183
-function getPostToForm($ignore='', $isRegularExpression=false)
183
+function getPostToForm($ignore = '', $isRegularExpression = false)
184 184
 {
185 185
 	$fields = '';
186
-	if(!empty($ignore) && $isRegularExpression) {
187
-		foreach ($_POST as $key=>$value){
188
-			if(!preg_match($ignore, $key)) {
186
+	if (!empty($ignore) && $isRegularExpression) {
187
+		foreach ($_POST as $key=>$value) {
188
+			if (!preg_match($ignore, $key)) {
189 189
                                 $fields .= add_hidden_elements($key, $value);
190 190
 			}
191 191
 		}	
192 192
 	} else {
193
-		foreach ($_POST as $key=>$value){
194
-			if($key != $ignore) {
193
+		foreach ($_POST as $key=>$value) {
194
+			if ($key != $ignore) {
195 195
                                 $fields .= add_hidden_elements($key, $value);
196 196
 			}
197 197
 		}
@@ -199,21 +199,21 @@  discard block
 block discarded – undo
199 199
 	return $fields;
200 200
 }
201 201
 
202
-function getGetToForm($ignore='', $usePostAsAuthority = false)
202
+function getGetToForm($ignore = '', $usePostAsAuthority = false)
203 203
 {
204 204
 	$fields = '';
205 205
 	foreach ($_GET as $key=>$value)
206 206
 	{
207
-		if($key != $ignore){
208
-			if(!$usePostAsAuthority || !isset($_POST[$key])){
209
-				$fields.= "<input type='hidden' name='$key' value='$value'>";
207
+		if ($key != $ignore) {
208
+			if (!$usePostAsAuthority || !isset($_POST[$key])) {
209
+				$fields .= "<input type='hidden' name='$key' value='$value'>";
210 210
 			}
211 211
 		}
212 212
 	}
213 213
 	return $fields;
214 214
 
215 215
 }
216
-function getAnyToForm($ignore='', $usePostAsAuthority = false)
216
+function getAnyToForm($ignore = '', $usePostAsAuthority = false)
217 217
 {
218 218
 	$fields = getPostToForm($ignore);
219 219
 	$fields .= getGetToForm($ignore, $usePostAsAuthority);
@@ -221,11 +221,11 @@  discard block
 block discarded – undo
221 221
 
222 222
 }
223 223
 
224
-function handleRedirect($return_id='', $return_module='', $additionalFlags = false)
224
+function handleRedirect($return_id = '', $return_module = '', $additionalFlags = false)
225 225
 {
226
-	if(isset($_REQUEST['return_url']) && $_REQUEST['return_url'] != "")
226
+	if (isset($_REQUEST['return_url']) && $_REQUEST['return_url'] != "")
227 227
 	{
228
-		header("Location: ". $_REQUEST['return_url']);
228
+		header("Location: ".$_REQUEST['return_url']);
229 229
 		exit;
230 230
 	}
231 231
 
@@ -235,9 +235,9 @@  discard block
 block discarded – undo
235 235
 }
236 236
 
237 237
 //eggsurplus: abstract to simplify unit testing
238
-function buildRedirectURL($return_id='', $return_module='') 
238
+function buildRedirectURL($return_id = '', $return_module = '') 
239 239
 {
240
-    if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "")
240
+    if (isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "")
241 241
 	{
242 242
 		$return_module = $_REQUEST['return_module'];
243 243
 	}
@@ -245,24 +245,24 @@  discard block
 block discarded – undo
245 245
 	{
246 246
 		$return_module = $return_module;
247 247
 	}
248
-	if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "")
248
+	if (isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "")
249 249
 	{
250 250
 	    
251 251
 	   //if we are doing a "Close and Create New"
252
-        if(isCloseAndCreateNewPressed())
252
+        if (isCloseAndCreateNewPressed())
253 253
         {
254 254
             $return_action = "EditView";    
255 255
             $isDuplicate = "true";        
256 256
             $status = "";
257 257
             
258 258
             // Meeting Integration
259
-            if(isset($_REQUEST['meetingIntegrationFlag']) && $_REQUEST['meetingIntegrationFlag'] == 1) {
259
+            if (isset($_REQUEST['meetingIntegrationFlag']) && $_REQUEST['meetingIntegrationFlag'] == 1) {
260 260
             	$additionalFlags = array('meetingIntegrationShowForm' => '1');
261 261
             }
262 262
             // END Meeting Integration
263 263
         } 
264 264
 		// if we create a new record "Save", we want to redirect to the DetailView
265
-		else if(isset($_REQUEST['action']) && $_REQUEST['action'] == "Save" 
265
+		else if (isset($_REQUEST['action']) && $_REQUEST['action'] == "Save" 
266 266
 			&& $_REQUEST['return_module'] != 'Activities'
267 267
 			&& $_REQUEST['return_module'] != 'Home' 
268 268
 			&& $_REQUEST['return_module'] != 'Forecasts' 
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 			) 
272 272
 			{
273 273
 			    $return_action = 'DetailView';
274
-			} elseif($_REQUEST['return_module'] == 'Activities' || $_REQUEST['return_module'] == 'Calendar') {
274
+			} elseif ($_REQUEST['return_module'] == 'Activities' || $_REQUEST['return_module'] == 'Calendar') {
275 275
 			$return_module = $_REQUEST['module'];
276 276
 			$return_action = $_REQUEST['return_action']; 
277 277
 			// wp: return action needs to be set for one-click close in task list
@@ -287,25 +287,25 @@  discard block
 block discarded – undo
287 287
 		$return_action = "DetailView";
288 288
 	}
289 289
 	
290
-	if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "")
290
+	if (isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "")
291 291
 	{
292 292
 		$return_id = $_REQUEST['return_id'];
293 293
 	}
294 294
 
295 295
     $add = "";
296
-    if(isset($additionalFlags) && !empty($additionalFlags)) {
297
-        foreach($additionalFlags as $k => $v) {
296
+    if (isset($additionalFlags) && !empty($additionalFlags)) {
297
+        foreach ($additionalFlags as $k => $v) {
298 298
             $add .= "&{$k}={$v}";
299 299
         }
300 300
     }
301 301
     
302 302
     if (!isset($isDuplicate) || !$isDuplicate)
303 303
     {
304
-        $url="index.php?action=$return_action&module=$return_module&record=$return_id&return_module=$return_module&return_action=$return_action{$add}";
305
-        if(isset($_REQUEST['offset']) && empty($_REQUEST['duplicateSave'])) {
304
+        $url = "index.php?action=$return_action&module=$return_module&record=$return_id&return_module=$return_module&return_action=$return_action{$add}";
305
+        if (isset($_REQUEST['offset']) && empty($_REQUEST['duplicateSave'])) {
306 306
             $url .= "&offset=".$_REQUEST['offset'];
307 307
         }
308
-        if(!empty($_REQUEST['ajax_load']))
308
+        if (!empty($_REQUEST['ajax_load']))
309 309
         {
310 310
             $ajax_ret = array(
311 311
                 'content' => "<script>SUGAR.ajaxUI.loadContent('$url');</script>\n",
@@ -321,8 +321,8 @@  discard block
 block discarded – undo
321 321
         }
322 322
     } else {
323 323
     	$standard = "action=$return_action&module=$return_module&record=$return_id&isDuplicate=true&return_module=$return_module&return_action=$return_action&status=$status";
324
-        $url="index.php?{$standard}{$add}";
325
-        if(!empty($_REQUEST['ajax_load']))
324
+        $url = "index.php?{$standard}{$add}";
325
+        if (!empty($_REQUEST['ajax_load']))
326 326
         {
327 327
             $ajax_ret = array(
328 328
                  'content' => "<script>SUGAR.ajaxUI.loadContent('$url');</script>\n",
@@ -339,20 +339,20 @@  discard block
 block discarded – undo
339 339
     }
340 340
 }
341 341
 
342
-function getLikeForEachWord($fieldname, $value, $minsize=4)
342
+function getLikeForEachWord($fieldname, $value, $minsize = 4)
343 343
 {
344 344
 	$value = trim($value);
345
-	$values = explode(' ',$value);
345
+	$values = explode(' ', $value);
346 346
 	$ret = '';
347
-	foreach($values as $val)
347
+	foreach ($values as $val)
348 348
 	{
349
-		if(strlen($val) >= $minsize)
349
+		if (strlen($val) >= $minsize)
350 350
 		{
351
-			if(!empty($ret))
351
+			if (!empty($ret))
352 352
 			{
353 353
 				$ret .= ' or';
354 354
 			}
355
-			$ret .= ' '. $fieldname . ' LIKE %'.$val.'%';
355
+			$ret .= ' '.$fieldname.' LIKE %'.$val.'%';
356 356
 		}
357 357
 
358 358
 	}
@@ -373,36 +373,36 @@  discard block
 block discarded – undo
373 373
  * @see include/generic/Save2.php
374 374
  */
375 375
 
376
-function add_prospects_to_prospect_list($parent_id,$child_id)
376
+function add_prospects_to_prospect_list($parent_id, $child_id)
377 377
 {
378
-    $focus=BeanFactory::getBean('Prospects');
379
-    if(is_array($child_id)){
378
+    $focus = BeanFactory::getBean('Prospects');
379
+    if (is_array($child_id)) {
380 380
         $uids = $child_id;
381 381
     }
382
-    else{
382
+    else {
383 383
         $uids = array($child_id);
384 384
     }
385 385
 
386 386
     $relationship = '';
387
-    foreach($focus->get_linked_fields() as $field => $def) {
387
+    foreach ($focus->get_linked_fields() as $field => $def) {
388 388
         if ($focus->load_relationship($field)) {
389
-            if ( $focus->$field->getRelatedModuleName() == 'ProspectLists' ) {
389
+            if ($focus->$field->getRelatedModuleName() == 'ProspectLists') {
390 390
                 $relationship = $field;
391 391
                 break;
392 392
             }
393 393
         }
394 394
     }
395 395
 
396
-    if ( $relationship != '' ) {
397
-        foreach ( $uids as $id) {
396
+    if ($relationship != '') {
397
+        foreach ($uids as $id) {
398 398
             $focus->retrieve($id);
399 399
             $focus->load_relationship($relationship);
400
-            $focus->prospect_lists->add( $parent_id );
400
+            $focus->prospect_lists->add($parent_id);
401 401
         }
402 402
     }
403 403
 }
404 404
 
405
-function add_to_prospect_list($query_panel,$parent_module,$parent_type,$parent_id,$child_id,$link_attribute,$link_type,$parent)
405
+function add_to_prospect_list($query_panel, $parent_module, $parent_type, $parent_id, $child_id, $link_attribute, $link_type, $parent)
406 406
 {
407 407
     $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$query_panel);
408 408
     $GLOBALS['log']->debug('add_prospects_to_prospect_list:parameters:'.$parent_module);
@@ -419,21 +419,21 @@  discard block
 block discarded – undo
419 419
     }
420 420
     $focus = new $parent_type();
421 421
     $focus->retrieve($parent_id);
422
-    if(empty($focus->id)) {
422
+    if (empty($focus->id)) {
423 423
         return false;
424 424
     }
425
-    if(empty($parent)) {
425
+    if (empty($parent)) {
426 426
         return false;
427 427
     }
428 428
 
429 429
     //if link_type is default then load relationship once and add all the child ids.
430
-    $relationship_attribute=$link_attribute;
430
+    $relationship_attribute = $link_attribute;
431 431
 
432 432
     //find all prospects based on the query
433 433
 
434 434
     $subpanel = new SubPanelTiles($parent, $parent->module_dir);
435
-    $thisPanel=$subpanel->subpanel_definitions->load_subpanel($query_panel);
436
-    if(empty($thisPanel)) {
435
+    $thisPanel = $subpanel->subpanel_definitions->load_subpanel($query_panel);
436
+    if (empty($thisPanel)) {
437 437
         return false;
438 438
     }
439 439
 
@@ -443,12 +443,12 @@  discard block
 block discarded – undo
443 443
         $thisPanel->_instance_properties['function_parameters']['EMAIL_MARKETING_ID_VALUE'] = $_REQUEST['marketing_id'];
444 444
     }
445 445
 
446
-    $result = SugarBean::get_union_related_list($parent, '', '', '', 0, -99,-99,'', $thisPanel);
446
+    $result = SugarBean::get_union_related_list($parent, '', '', '', 0, -99, -99, '', $thisPanel);
447 447
 
448
-    if(!empty($result['list'])) {
449
-        foreach($result['list'] as $object) {
448
+    if (!empty($result['list'])) {
449
+        foreach ($result['list'] as $object) {
450 450
             if ($link_type != 'default') {
451
-                $relationship_attribute=strtolower($object->$link_attribute);
451
+                $relationship_attribute = strtolower($object->$link_attribute);
452 452
             }
453 453
             $GLOBALS['log']->debug('add_prospects_to_prospect_list:relationship_attribute:'.$relationship_attribute);
454 454
             // load relationship for the first time or on change of relationship atribute.
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 }
463 463
 
464 464
 //Link rows returned by a report to parent record.
465
-function save_from_report($report_id,$parent_id, $module_name, $relationship_attr_name) {
465
+function save_from_report($report_id, $parent_id, $module_name, $relationship_attr_name) {
466 466
     global $beanFiles;
467 467
     global $beanList;
468 468
 
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
     $GLOBALS['log']->debug("Save2:Module Name=".$module_name);
473 473
     $GLOBALS['log']->debug("Save2:Relationship Attribute Name=".$relationship_attr_name);
474 474
 
475
-    $GLOBALS['log']->debug("Save2:Bean Name=" . $module_name);
475
+    $GLOBALS['log']->debug("Save2:Bean Name=".$module_name);
476 476
     $focus = BeanFactory::newBean($module_name);
477 477
 
478 478
     $focus->retrieve($parent_id);
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
     //fetch report definition.
482 482
     global $current_language, $report_modules, $modules_report;
483 483
 
484
-    $mod_strings = return_module_language($current_language,"Reports");
484
+    $mod_strings = return_module_language($current_language, "Reports");
485 485
 
486 486
 
487 487
     $saved = new SavedReport();
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
     $result = $report->db->query($sql);
499 499
 
500 500
     $reportBean = BeanFactory::newBean($saved->module);
501
-    while($row = $report->db->fetchByAssoc($result))
501
+    while ($row = $report->db->fetchByAssoc($result))
502 502
     {
503 503
         $reportBean->id = $row['primaryid'];
504 504
         $focus->$relationship_attr_name->add($reportBean);
Please login to merge, or discard this patch.