@@ -1,140 +1,140 @@ |
||
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 |
@@ -28,4 +28,4 @@ |
||
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 |
@@ -43,19 +43,19 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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(); |
@@ -43,10 +43,10 @@ |
||
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 | } |
@@ -3,48 +3,48 @@ |
||
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 |
@@ -55,13 +55,13 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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); |
@@ -18,7 +18,7 @@ |
||
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() غير ممكن.'; |
@@ -1,5 +1,5 @@ |
||
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. |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -55,27 +55,27 @@ discard block |
||
55 | 55 | //if the contract has been executed or selected_revision is same as latest revision |
56 | 56 | //then hide the latest button. |
57 | 57 | //if the contract state is executed or document is not a template hide this action. |
58 | - if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS']=='executed') or |
|
59 | - $layout_def['fields']['SELECTED_REVISION_ID']== $layout_def['fields']['LATEST_REVISION_ID']) { |
|
58 | + if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS'] == 'executed') or |
|
59 | + $layout_def['fields']['SELECTED_REVISION_ID'] == $layout_def['fields']['LATEST_REVISION_ID']) { |
|
60 | 60 | return ""; |
61 | 61 | } |
62 | 62 | |
63 | 63 | global $app_strings; |
64 | 64 | |
65 | 65 | |
66 | - $href = 'index.php?module=' . $layout_def['module'] |
|
67 | - . '&action=' . 'GetLatestRevision' |
|
68 | - . '&record=' . $layout_def['fields']['ID'] |
|
69 | - . '&return_module=' . $_REQUEST['module'] |
|
70 | - . '&return_action=' . 'DetailView' |
|
71 | - . '&return_id=' . $_REQUEST['record'] |
|
72 | - . '&get_latest_for_id=' . $layout_def['fields']['LINKED_ID']; |
|
66 | + $href = 'index.php?module='.$layout_def['module'] |
|
67 | + . '&action='.'GetLatestRevision' |
|
68 | + . '&record='.$layout_def['fields']['ID'] |
|
69 | + . '&return_module='.$_REQUEST['module'] |
|
70 | + . '&return_action='.'DetailView' |
|
71 | + . '&return_id='.$_REQUEST['record'] |
|
72 | + . '&get_latest_for_id='.$layout_def['fields']['LINKED_ID']; |
|
73 | 73 | |
74 | - $edit_icon_html = SugarThemeRegistry::current()->getImage( 'getLatestDocument','align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_GET_LATEST']); |
|
75 | - if($layout_def['EditView']){ |
|
76 | - return '<a href="' . $href . '"' . "title ='". $app_strings['LNK_GET_LATEST_TOOLTIP'] ."'" |
|
77 | - . 'class="listViewTdToolsS1">' . $edit_icon_html . ' ' . $app_strings['LNK_GET_LATEST'] .'</a> '; |
|
78 | - }else{ |
|
74 | + $edit_icon_html = SugarThemeRegistry::current()->getImage('getLatestDocument', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_GET_LATEST']); |
|
75 | + if ($layout_def['EditView']) { |
|
76 | + return '<a href="'.$href.'"'."title ='".$app_strings['LNK_GET_LATEST_TOOLTIP']."'" |
|
77 | + . 'class="listViewTdToolsS1">'.$edit_icon_html.' '.$app_strings['LNK_GET_LATEST'].'</a> '; |
|
78 | + } else { |
|
79 | 79 | return ''; |
80 | 80 | } |
81 | 81 | } |