]> git.mxchange.org Git - friendica.git/blob - mod/notifications.php
Merge remote-tracking branch 'remotes/friendica/master' into moveme
[friendica.git] / mod / notifications.php
1 <?php
2
3 function notifications_post(&$a) {
4
5         if(! local_user()) {
6                 goaway(z_root());
7         }
8         
9         $request_id = (($a->argc > 1) ? $a->argv[1] : 0);
10         
11         if($request_id === "all")
12                 return;
13
14         if($request_id) {
15
16                 $r = q("SELECT * FROM `intro` WHERE `id` = %d  AND `uid` = %d LIMIT 1",
17                         intval($request_id),
18                         intval(local_user())
19                 );
20         
21                 if(count($r)) {
22                         $intro_id = $r[0]['id'];
23                         $contact_id = $r[0]['contact-id'];
24                 }
25                 else {
26                         notice( t('Invalid request identifier.') . EOL);
27                         return;
28                 }
29
30                 // If it is a friend suggestion, the contact is not a new friend but an existing friend
31                 // that should not be deleted.
32
33                 $fid = $r[0]['fid'];
34
35                 if($_POST['submit'] == t('Discard')) {
36                         $r = q("DELETE FROM `intro` WHERE `id` = %d LIMIT 1", 
37                                 intval($intro_id)
38                         );      
39                         if(! $fid) {
40
41                                 // The check for blocked and pending is in case the friendship was already approved
42                                 // and we just want to get rid of the now pointless notification
43
44                                 $r = q("DELETE FROM `contact` WHERE `id` = %d AND `uid` = %d AND `self` = 0 AND `blocked` = 1 AND `pending` = 1 LIMIT 1", 
45                                         intval($contact_id),
46                                         intval(local_user())
47                                 );
48                         }
49                         goaway($a->get_baseurl(true) . '/notifications/intros');
50                 }
51                 if($_POST['submit'] == t('Ignore')) {
52                         $r = q("UPDATE `intro` SET `ignore` = 1 WHERE `id` = %d LIMIT 1",
53                                 intval($intro_id));
54                         goaway($a->get_baseurl(true) . '/notifications/intros');
55                 }
56         }
57 }
58
59
60
61
62
63 function notifications_content(&$a) {
64
65         if(! local_user()) {
66                 notice( t('Permission denied.') . EOL);
67                 return;
68         }
69
70         nav_set_selected('notifications');              
71
72         $json = (($a->argc > 1 && $a->argv[$a->argc - 1] === 'json') ? true : false);
73
74
75         $o = '';
76         $tabs = array(
77                 array(
78                         'label' => t('System'),
79                         'url'=>$a->get_baseurl(true) . '/notifications/system',
80                         'sel'=> (($a->argv[1] == 'system') ? 'active' : ''),
81                 ),
82                 array(
83                         'label' => t('Network'),
84                         'url'=>$a->get_baseurl(true) . '/notifications/network',
85                         'sel'=> (($a->argv[1] == 'network') ? 'active' : ''),
86                 ),
87                 array(
88                         'label' => t('Personal'),
89                         'url'=>$a->get_baseurl(true) . '/notifications/personal',
90                         'sel'=> (($a->argv[1] == 'personal') ? 'active' : ''),
91                 ),
92                 array(
93                         'label' => t('Home'),
94                         'url' => $a->get_baseurl(true) . '/notifications/home',
95                         'sel'=> (($a->argv[1] == 'home') ? 'active' : ''),
96                 ),
97                 array(
98                         'label' => t('Introductions'),
99                         'url' => $a->get_baseurl(true) . '/notifications/intros',
100                         'sel'=> (($a->argv[1] == 'intros') ? 'active' : ''),
101                 ),
102                 array(
103                         'label' => t('Messages'),
104                         'url' => $a->get_baseurl(true) . '/message',
105                         'sel'=> '',
106                 ),
107         );
108         
109         $o = "";
110
111         
112         if( (($a->argc > 1) && ($a->argv[1] == 'intros')) || (($a->argc == 1))) {
113                 nav_set_selected('introductions');
114                 if(($a->argc > 2) && ($a->argv[2] == 'all'))
115                         $sql_extra = '';
116                 else
117                         $sql_extra = " AND `ignore` = 0 ";
118                 
119                 $notif_tpl = get_markup_template('notifications.tpl');
120                 
121                 $notif_content .= '<a href="' . ((strlen($sql_extra)) ? 'notifications/intros/all' : 'notifications/intros' ) . '" id="notifications-show-hide-link" >'
122                         . ((strlen($sql_extra)) ? t('Show Ignored Requests') : t('Hide Ignored Requests')) . '</a></div>' . "\r\n";
123
124                 $r = q("SELECT COUNT(*) AS `total` FROM `intro` 
125                         WHERE `intro`.`uid` = %d $sql_extra AND `intro`.`blocked` = 0 ",
126                                 intval($_SESSION['uid'])
127                 );
128                 if($r && count($r)) {
129                         $a->set_pager_total($r[0]['total']);
130                         $a->set_pager_itemspage(20);
131                 }
132
133                 $r = q("SELECT `intro`.`id` AS `intro_id`, `intro`.*, `contact`.*, `fcontact`.`name` AS `fname`,`fcontact`.`url` AS `furl`,`fcontact`.`photo` AS `fphoto`,`fcontact`.`request` AS `frequest`
134                         FROM `intro` LEFT JOIN `contact` ON `contact`.`id` = `intro`.`contact-id` LEFT JOIN `fcontact` ON `intro`.`fid` = `fcontact`.`id`
135                         WHERE `intro`.`uid` = %d $sql_extra AND `intro`.`blocked` = 0 ",
136                                 intval($_SESSION['uid']));
137
138                 if(($r !== false) && (count($r))) {
139
140                         $sugg = get_markup_template('suggestions.tpl');
141                         $tpl = get_markup_template("intros.tpl");
142
143                         foreach($r as $rr) {
144                                 if($rr['fid']) {
145
146                                         $return_addr = bin2hex($a->user['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
147                                         $notif_content .= replace_macros($sugg,array(
148                                                 '$str_notifytype' => t('Notification type: '),
149                                                 '$notify_type' => t('Friend Suggestion'),
150                                                 '$intro_id' => $rr['intro_id'],
151                                                 '$madeby' => sprintf( t('suggested by %s'),$rr['name']),
152                                                 '$contact_id' => $rr['contact-id'],
153                                                 '$photo' => ((x($rr,'fphoto')) ? $rr['fphoto'] : "images/person-175.jpg"),
154                                                 '$fullname' => $rr['fname'],
155                                                 '$url' => zrl($rr['furl']),
156                                                 '$hidden' => array('hidden', t('Hide this contact from others'), ($rr['hidden'] == 1), ''),
157                                                 '$activity' => array('activity', t('Post a new friend activity'), (intval(get_pconfig(local_user(),'system','post_newfriend')) ? '1' : 0), t('if applicable')),
158
159                                                 '$knowyou' => $knowyou,
160                                                 '$approve' => t('Approve'),
161                                                 '$note' => $rr['note'],
162                                                 '$request' => $rr['frequest'] . '?addr=' . $return_addr,
163                                                 '$ignore' => t('Ignore'),
164                                                 '$discard' => t('Discard')
165
166                                         ));
167
168                                         continue;
169
170                                 }
171                                 $friend_selected = (($rr['network'] !== NETWORK_OSTATUS) ? ' checked="checked" ' : ' disabled ');
172                                 $fan_selected = (($rr['network'] === NETWORK_OSTATUS) ? ' checked="checked" disabled ' : '');
173                                 $dfrn_tpl = get_markup_template('netfriend.tpl');
174
175                                 $knowyou   = '';
176                                 $dfrn_text = '';
177
178                                 if($rr['network'] === NETWORK_DFRN || $rr['network'] === NETWORK_DIASPORA) {
179                                         if($rr['network'] === NETWORK_DFRN)
180                                                 $knowyou = t('Claims to be known to you: ') . (($rr['knowyou']) ? t('yes') : t('no'));
181                                         else
182                                                 $knowyou = '';
183                                         $dfrn_text = replace_macros($dfrn_tpl,array(
184                                                 '$intro_id' => $rr['intro_id'],
185                                                 '$friend_selected' => $friend_selected,
186                                                 '$fan_selected' => $fan_selected,
187                                                 '$approve_as' => t('Approve as: '),
188                                                 '$as_friend' => t('Friend'),
189                                                 '$as_fan' => (($rr['network'] == NETWORK_DIASPORA) ? t('Sharer') : t('Fan/Admirer'))
190                                         ));
191                                 }                       
192
193                                 $notif_content .= replace_macros($tpl,array(
194                                         '$str_notifytype' => t('Notification type: '),
195                                         '$notify_type' => (($rr['network'] !== NETWORK_OSTATUS) ? t('Friend/Connect Request') : t('New Follower')),
196                                         '$dfrn_text' => $dfrn_text,     
197                                         '$dfrn_id' => $rr['issued-id'],
198                                         '$uid' => $_SESSION['uid'],
199                                         '$intro_id' => $rr['intro_id'],
200                                         '$contact_id' => $rr['contact-id'],
201                                         '$photo' => ((x($rr,'photo')) ? $rr['photo'] : "images/person-175.jpg"),
202                                         '$fullname' => $rr['name'],
203                                         '$hidden' => array('hidden', t('Hide this contact from others'), ($rr['hidden'] == 1), ''),
204                                         '$activity' => array('activity', t('Post a new friend activity'), (intval(get_pconfig(local_user(),'system','post_newfriend')) ? '1' : 0), t('if applicable')),
205                                         '$url' => zrl($rr['url']),
206                                         '$knowyou' => $knowyou,
207                                         '$approve' => t('Approve'),
208                                         '$note' => $rr['note'],
209                                         '$ignore' => t('Ignore'),
210                                         '$discard' => t('Discard')
211
212                                 ));
213                         }
214                 }
215                 else
216                         info( t('No introductions.') . EOL);
217
218                 $o .= replace_macros($notif_tpl,array(
219                         '$notif_header' => t('Notifications'),
220                         '$tabs' => $tabs,
221                         '$notif_content' => $notif_content,
222                 ));
223                 
224                 $o .= paginate($a);
225                 return $o;
226                                 
227         } else if (($a->argc > 1) && ($a->argv[1] == 'network')) {
228                 
229                 $notif_tpl = get_markup_template('notifications.tpl');
230                 
231                 $r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`author-name`, 
232                                 `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object` as `object`, 
233                                 `pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink` 
234                                 FROM `item` INNER JOIN `item` as `pitem` ON  `pitem`.`id`=`item`.`parent`
235                                 WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND `pitem`.`parent` != 0
236                                  `item`.`deleted` = 0 AND `item`.`uid` = %d AND `item`.`wall` = 0 ORDER BY `item`.`created` DESC" ,
237                         intval(local_user())
238                 );
239                 
240                 $tpl_item_likes = get_markup_template('notifications_likes_item.tpl');
241                 $tpl_item_dislikes = get_markup_template('notifications_dislikes_item.tpl');
242                 $tpl_item_friends = get_markup_template('notifications_friends_item.tpl');
243                 $tpl_item_comments = get_markup_template('notifications_comments_item.tpl');
244                 $tpl_item_posts = get_markup_template('notifications_posts_item.tpl');
245                 
246                 $notif_content = '';
247                 
248                 if ($r) {
249                         
250                         foreach ($r as $it) {
251                                 switch($it['verb']){
252                                         case ACTIVITY_LIKE:
253                                                 $notif_content .= replace_macros($tpl_item_likes,array(
254                                                         '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
255                                                         '$item_image' => $it['author-avatar'],
256                                                         '$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']),
257                                                         '$item_when' => relative_date($it['created'])
258                                                 ));
259                                                 break;
260                                                 
261                                         case ACTIVITY_DISLIKE:
262                                                 $notif_content .= replace_macros($tpl_item_dislikes,array(
263                                                         '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
264                                                         '$item_image' => $it['author-avatar'],
265                                                         '$item_text' => sprintf( t("%s disliked %s's post"), $it['author-name'], $it['pname']),
266                                                         '$item_when' => relative_date($it['created'])
267                                                 ));
268                                                 break;
269                                                 
270                                         case ACTIVITY_FRIEND:
271                                         
272                                                 $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
273                                                 $obj = parse_xml_string($xmlhead.$it['object']);
274                                                 $it['fname'] = $obj->title;
275                                                 
276                                                 $notif_content .= replace_macros($tpl_item_friends,array(
277                                                         '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
278                                                         '$item_image' => $it['author-avatar'],
279                                                         '$item_text' => sprintf( t("%s is now friends with %s"), $it['author-name'], $it['fname']),
280                                                         '$item_when' => relative_date($it['created'])
281                                                 ));
282                                                 break;
283                                                 
284                                         default:
285                                                 $item_text = (($it['id'] == $it['parent'])
286                                                         ? sprintf( t("%s created a new post"), $it['author-name'])
287                                                         : sprintf( t("%s commented on %s's post"), $it['author-name'], $it['pname']));
288                                                 $tpl = (($it['id'] == $it['parent']) ? $tpl_item_posts : $tpl_item_comments);
289
290                                                 $notif_content .= replace_macros($tpl,array(
291                                                         '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
292                                                         '$item_image' => $it['author-avatar'],
293                                                         '$item_text' => $item_text,
294                                                         '$item_when' => relative_date($it['created'])
295                                                 ));
296                                 }
297                         }
298                         
299                 } else {
300                         
301                         $notif_content = t('No more network notifications.');
302                 }
303                 
304                 $o .= replace_macros($notif_tpl,array(
305                         '$notif_header' => t('Network Notifications'),
306                         '$tabs' => $tabs,
307                         '$notif_content' => $notif_content,
308                 ));
309                 
310         } else if (($a->argc > 1) && ($a->argv[1] == 'system')) {
311                 
312                 $notif_tpl = get_markup_template('notifications.tpl');
313                 
314                 $not_tpl = get_markup_template('notify.tpl');
315                 require_once('include/bbcode.php');
316
317                 $r = q("SELECT * from notify where uid = %d and seen = 0 order by date desc",
318                         intval(local_user())
319                 );
320                 
321                 if (count($r) > 0) {
322                         foreach ($r as $it) {
323                                 $notif_content .= replace_macros($not_tpl,array(
324                                         '$item_link' => $a->get_baseurl(true).'/notify/view/'. $it['id'],
325                                         '$item_image' => $it['photo'],
326                                         '$item_text' => strip_tags(bbcode($it['msg'])),
327                                         '$item_when' => relative_date($it['date'])
328                                 ));
329                         }
330                 } else {
331                         $notif_content .= t('No more system notifications.');
332                 }
333                 
334                 $o .= replace_macros($notif_tpl,array(
335                         '$notif_header' => t('System Notifications'),
336                         '$tabs' => $tabs,
337                         '$notif_content' => $notif_content,
338                 ));
339
340         } else if (($a->argc > 1) && ($a->argv[1] == 'personal')) {
341                 
342                 $notif_tpl = get_markup_template('notifications.tpl');
343                 
344                 $myurl = $a->get_baseurl(true) . '/profile/'. $a->user['nickname'];
345                 $myurl = substr($myurl,strpos($myurl,'://')+3);
346                 $myurl = str_replace(array('www.','.'),array('','\\.'),$myurl);
347                 $diasp_url = str_replace('/profile/','/u/',$myurl);
348                 $sql_extra .= sprintf(" AND ( `item`.`author-link` regexp '%s' or `item`.`tag` regexp '%s' or `item`.`tag` regexp '%s' ) ",
349                         dbesc($myurl . '$'),
350                         dbesc($myurl . '\\]'),
351                         dbesc($diasp_url . '\\]')
352                 );
353
354
355                 $r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`author-name`, 
356                                 `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object` as `object`, 
357                                 `pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink` 
358                                 FROM `item` INNER JOIN `item` as `pitem` ON  `pitem`.`id`=`item`.`parent`
359                                 WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 
360                                 $sql_extra
361                                 AND `item`.`deleted` = 0 AND `item`.`uid` = %d AND `item`.`wall` = 0 ORDER BY `item`.`created` DESC" ,
362                         intval(local_user())
363                 );
364                 
365                 $tpl_item_likes = get_markup_template('notifications_likes_item.tpl');
366                 $tpl_item_dislikes = get_markup_template('notifications_dislikes_item.tpl');
367                 $tpl_item_friends = get_markup_template('notifications_friends_item.tpl');
368                 $tpl_item_comments = get_markup_template('notifications_comments_item.tpl');
369                 $tpl_item_posts = get_markup_template('notifications_posts_item.tpl');
370                 
371                 $notif_content = '';
372                 
373                 if (count($r) > 0) {
374                         
375                         foreach ($r as $it) {
376                                 switch($it['verb']){
377                                         case ACTIVITY_LIKE:
378                                                 $notif_content .= replace_macros($tpl_item_likes,array(
379                                                         '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
380                                                         '$item_image' => $it['author-avatar'],
381                                                         '$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']),
382                                                         '$item_when' => relative_date($it['created'])
383                                                 ));
384                                                 break;
385                                                 
386                                         case ACTIVITY_DISLIKE:
387                                                 $notif_content .= replace_macros($tpl_item_dislikes,array(
388                                                         '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
389                                                         '$item_image' => $it['author-avatar'],
390                                                         '$item_text' => sprintf( t("%s disliked %s's post"), $it['author-name'], $it['pname']),
391                                                         '$item_when' => relative_date($it['created'])
392                                                 ));
393                                                 break;
394                                                 
395                                         case ACTIVITY_FRIEND:
396                                         
397                                                 $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
398                                                 $obj = parse_xml_string($xmlhead.$it['object']);
399                                                 $it['fname'] = $obj->title;
400                                                 
401                                                 $notif_content .= replace_macros($tpl_item_friends,array(
402                                                         '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
403                                                         '$item_image' => $it['author-avatar'],
404                                                         '$item_text' => sprintf( t("%s is now friends with %s"), $it['author-name'], $it['fname']),
405                                                         '$item_when' => relative_date($it['created'])
406                                                 ));
407                                                 break;
408                                                 
409                                         default:
410                                                 $item_text = (($it['id'] == $it['parent'])
411                                                         ? sprintf( t("%s created a new post"), $it['author-name'])
412                                                         : sprintf( t("%s commented on %s's post"), $it['author-name'], $it['pname']));
413                                                 $tpl = (($it['id'] == $it['parent']) ? $tpl_item_posts : $tpl_item_comments);
414
415                                                 $notif_content .= replace_macros($tpl,array(
416                                                         '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
417                                                         '$item_image' => $it['author-avatar'],
418                                                         '$item_text' => $item_text,
419                                                         '$item_when' => relative_date($it['created'])
420                                                 ));
421                                 }
422                         }
423                         
424                 } else {
425                         
426                         $notif_content = t('No more personal notifications.');
427                 }
428                 
429                 $o .= replace_macros($notif_tpl,array(
430                         '$notif_header' => t('Personal Notifications'),
431                         '$tabs' => $tabs,
432                         '$notif_content' => $notif_content,
433                 ));
434                 
435
436
437
438
439
440         } else if (($a->argc > 1) && ($a->argv[1] == 'home')) {
441                 
442                 $notif_tpl = get_markup_template('notifications.tpl');
443                 
444                 $r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`author-name`, 
445                                 `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object` as `object`, 
446                                 `pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink` 
447                                 FROM `item` INNER JOIN `item` as `pitem` ON  `pitem`.`id`=`item`.`parent`
448                                 WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND
449                                  `item`.`deleted` = 0 AND `item`.`uid` = %d AND `item`.`wall` = 1 ORDER BY `item`.`created` DESC",
450                         intval(local_user())
451                 );
452                 
453                 $tpl_item_likes = get_markup_template('notifications_likes_item.tpl');
454                 $tpl_item_dislikes = get_markup_template('notifications_dislikes_item.tpl');
455                 $tpl_item_friends = get_markup_template('notifications_friends_item.tpl');
456                 $tpl_item_comments = get_markup_template('notifications_comments_item.tpl');
457                 
458                 $notif_content = '';
459                 
460                 if (count($r) > 0) {
461                         
462                         foreach ($r as $it) {
463                                 switch($it['verb']){
464                                         case ACTIVITY_LIKE:
465                                                 $notif_content .= replace_macros($tpl_item_likes,array(
466                                                         '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
467                                                         '$item_image' => $it['author-avatar'],
468                                                         '$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']),
469                                                         '$item_when' => relative_date($it['created'])
470                                                 ));
471
472                                                 break;
473                                         case ACTIVITY_DISLIKE:
474                                                 $notif_content .= replace_macros($tpl_item_dislikes,array(
475                                                         '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
476                                                         '$item_image' => $it['author-avatar'],
477                                                         '$item_text' => sprintf( t("%s disliked %s's post"), $it['author-name'], $it['pname']),
478                                                         '$item_when' => relative_date($it['created'])
479                                                 ));
480
481                                                 break;
482                                         case ACTIVITY_FRIEND:
483                                         
484                                                 $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
485                                                 $obj = parse_xml_string($xmlhead.$it['object']);
486                                                 $it['fname'] = $obj->title;
487                                                 
488                                                 $notif_content .= replace_macros($tpl_item_friends,array(
489                                                         '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
490                                                         '$item_image' => $it['author-avatar'],
491                                                         '$item_text' => sprintf( t("%s is now friends with %s"), $it['author-name'], $it['fname']),
492                                                         '$item_when' => relative_date($it['created'])
493                                                 ));
494
495                                                 break;
496                                         default:
497                                                 $notif_content .= replace_macros($tpl_item_comments,array(
498                                                         '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'],
499                                                         '$item_image' => $it['author-avatar'],
500                                                         '$item_text' => sprintf( t("%s commented on %s's post"), $it['author-name'], $it['pname']),
501                                                         '$item_when' => relative_date($it['created'])
502                                                 ));
503                                 }
504                         }
505                                 
506                 } else {
507                         $notif_content = t('No more home notifications.');
508                 }
509                 
510                 $o .= replace_macros($notif_tpl,array(
511                         '$notif_header' => t('Home Notifications'),
512                         '$tabs' => $tabs,
513                         '$notif_content' => $notif_content,
514                 ));
515         }
516
517         $o .= paginate($a);
518         return $o;
519 }