4 * @file mod/dfrn_confirm.php
5 * @brief Module: dfrn_confirm
6 * Purpose: Friendship acceptance for DFRN contacts
8 * There are two possible entry points and three scenarios.
10 * 1. A form was submitted by our user approving a friendship that originated elsewhere.
11 * This may also be called from dfrn_request to automatically approve a friendship.
13 * 2. We may be the target or other side of the conversation to scenario 1, and will
14 * interact with that process on our own user's behalf.
16 * @see PDF with dfrn specs: https://github.com/friendica/friendica/blob/master/spec/dfrn2.pdf
17 * You also find a graphic which describes the confirmation process at
18 * https://github.com/friendica/friendica/blob/master/spec/dfrn2_contact_confirmation.png
21 require_once('include/enotify.php');
22 require_once('include/group.php');
23 require_once('include/Probe.php');
25 function dfrn_confirm_post(&$a,$handsfree = null) {
27 if(is_array($handsfree)) {
30 * We were called directly from dfrn_request due to automatic friend acceptance.
31 * Any $_POST parameters we may require are supplied in the $handsfree array.
35 $node = $handsfree['node'];
36 $a->interactive = false; // notice() becomes a no-op since nobody is there to see it
46 * Main entry point. Scenario 1. Our user received a friend request notification (perhaps
47 * from another site) and clicked 'Approve'.
48 * $POST['source_url'] is not set. If it is, it indicates Scenario 2.
50 * We may also have been called directly from dfrn_request ($handsfree != null) due to
51 * this being a page type which supports automatic friend acceptance. That is also Scenario 1
52 * since we are operating on behalf of our registered user to approve a friendship.
56 if(! x($_POST,'source_url')) {
58 $uid = ((is_array($handsfree)) ? $handsfree['uid'] : local_user());
61 notice( t('Permission denied.') . EOL );
65 $user = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
70 notice( t('Profile not found.') . EOL );
75 // These data elements may come from either the friend request notification form or $handsfree array.
77 if(is_array($handsfree)) {
78 logger('Confirm in handsfree mode');
79 $dfrn_id = $handsfree['dfrn_id'];
80 $intro_id = $handsfree['intro_id'];
81 $duplex = $handsfree['duplex'];
82 $hidden = ((array_key_exists('hidden',$handsfree)) ? intval($handsfree['hidden']) : 0 );
83 $activity = ((array_key_exists('activity',$handsfree)) ? intval($handsfree['activity']) : 0 );
86 $dfrn_id = ((x($_POST,'dfrn_id')) ? notags(trim($_POST['dfrn_id'])) : "");
87 $intro_id = ((x($_POST,'intro_id')) ? intval($_POST['intro_id']) : 0 );
88 $duplex = ((x($_POST,'duplex')) ? intval($_POST['duplex']) : 0 );
89 $cid = ((x($_POST,'contact_id')) ? intval($_POST['contact_id']) : 0 );
90 $hidden = ((x($_POST,'hidden')) ? intval($_POST['hidden']) : 0 );
91 $activity = ((x($_POST,'activity')) ? intval($_POST['activity']) : 0 );
96 * Ensure that dfrn_id has precedence when we go to find the contact record.
97 * We only want to search based on contact id if there is no dfrn_id,
98 * e.g. for OStatus network followers.
105 logger('Confirming request for dfrn_id (issued) ' . $dfrn_id);
107 logger('Confirming follower with contact_id: ' . $cid);
112 * The other person will have been issued an ID when they first requested friendship.
113 * Locate their record. At this time, their record will have both pending and blocked set to 1.
114 * There won't be any dfrn_id if this is a network follower, so use the contact_id instead.
118 $r = q("SELECT * FROM `contact` WHERE ( ( `issued-id` != '' AND `issued-id` = '%s' ) OR ( `id` = %d AND `id` != 0 ) ) AND `uid` = %d AND `duplex` = 0 LIMIT 1",
124 if (! dbm::is_result($r)) {
125 logger('Contact not found in DB.');
126 notice( t('Contact not found.') . EOL );
127 notice( t('This may occasionally happen if contact was requested by both persons and it has already been approved.') . EOL );
133 $contact_id = $contact['id'];
134 $relation = $contact['rel'];
135 $site_pubkey = $contact['site-pubkey'];
136 $dfrn_confirm = $contact['confirm'];
137 $aes_allow = $contact['aes_allow'];
139 $network = ((strlen($contact['issued-id'])) ? NETWORK_DFRN : NETWORK_OSTATUS);
141 if($contact['network'])
142 $network = $contact['network'];
144 if($network === NETWORK_DFRN) {
148 * Generate a key pair for all further communications with this person.
149 * We have a keypair for every contact, and a site key for unknown people.
150 * This provides a means to carry on relationships with other people if
151 * any single key is compromised. It is a robust key. We're much more
152 * worried about key leakage than anybody cracking it.
155 require_once('include/crypto.php');
157 $res = new_keypair(4096);
160 $private_key = $res['prvkey'];
161 $public_key = $res['pubkey'];
163 // Save the private key. Send them the public key.
165 $r = q("UPDATE `contact` SET `prvkey` = '%s' WHERE `id` = %d AND `uid` = %d",
175 * Per the DFRN protocol, we will verify both ends by encrypting the dfrn_id with our
176 * site private key (person on the other end can decrypt it with our site public key).
177 * Then encrypt our profile URL with the other person's site public key. They can decrypt
178 * it with their site private key. If the decryption on the other end fails for either
179 * item, it indicates tampering or key failure on at least one site and we will not be
180 * able to provide a secure communication pathway.
182 * If other site is willing to accept full encryption, (aes_allow is 1 AND we have php5.3
183 * or later) then we encrypt the personal public key we send them using AES-256-CBC and a
184 * random key which is encrypted with their site public key.
188 $src_aes_key = random_string();
191 openssl_private_encrypt($dfrn_id,$result,$user[0]['prvkey']);
193 $params['dfrn_id'] = bin2hex($result);
194 $params['public_key'] = $public_key;
197 $my_url = App::get_baseurl() . '/profile/' . $user[0]['nickname'];
199 openssl_public_encrypt($my_url, $params['source_url'], $site_pubkey);
200 $params['source_url'] = bin2hex($params['source_url']);
202 if($aes_allow && function_exists('openssl_encrypt')) {
203 openssl_public_encrypt($src_aes_key, $params['aes_key'], $site_pubkey);
204 $params['aes_key'] = bin2hex($params['aes_key']);
205 $params['public_key'] = bin2hex(openssl_encrypt($public_key,'AES-256-CBC',$src_aes_key));
208 $params['dfrn_version'] = DFRN_PROTOCOL_VERSION ;
210 $params['duplex'] = 1;
212 if($user[0]['page-flags'] == PAGE_COMMUNITY)
214 if($user[0]['page-flags'] == PAGE_PRVGROUP)
217 logger('Confirm: posting data to ' . $dfrn_confirm . ': ' . print_r($params,true), LOGGER_DATA);
221 * POST all this stuff to the other site.
222 * Temporarily raise the network timeout to 120 seconds because the default 60
223 * doesn't always give the other side quite enough time to decrypt everything.
227 $a->config['system']['curl_timeout'] = 120;
229 $res = post_url($dfrn_confirm,$params);
231 logger(' Confirm: received data: ' . $res, LOGGER_DATA);
233 // Now figure out what they responded. Try to be robust if the remote site is
234 // having difficulty and throwing up errors of some kind.
236 $leading_junk = substr($res,0,strpos($res,'<?xml'));
238 $res = substr($res,strpos($res,'<?xml'));
241 // No XML at all, this exchange is messed up really bad.
242 // We shouldn't proceed, because the xml parser might choke,
243 // and $status is going to be zero, which indicates success.
244 // We can hardly call this a success.
246 notice( t('Response from remote site was not understood.') . EOL);
250 if(strlen($leading_junk) && get_config('system','debugging')) {
252 // This might be more common. Mixed error text and some XML.
253 // If we're configured for debugging, show the text. Proceed in either case.
255 notice( t('Unexpected response from remote site: ') . EOL . $leading_junk . EOL );
258 if(stristr($res, "<status")===false) {
259 // wrong xml! stop here!
260 notice( t('Unexpected response from remote site: ') . EOL . htmlspecialchars($res) . EOL );
264 $xml = parse_xml_string($res);
265 $status = (int) $xml->status;
266 $message = unxmlify($xml->message); // human readable text of what may have gone wrong.
269 info( t("Confirmation completed successfully.") . EOL);
271 notice( t('Remote site reported: ') . $message . EOL);
274 // birthday paradox - generate new dfrn-id and fall through.
275 $new_dfrn_id = random_string();
276 $r = q("UPDATE contact SET `issued-id` = '%s' WHERE `id` = %d AND `uid` = %d",
283 notice( t("Temporary failure. Please wait and try again.") . EOL);
285 notice( t('Remote site reported: ') . $message . EOL);
290 notice( t("Introduction failed or was revoked.") . EOL);
292 notice( t('Remote site reported: ') . $message . EOL);
296 if(($status == 0) && ($intro_id)) {
298 // Success. Delete the notification.
300 $r = q("DELETE FROM `intro` WHERE `id` = %d AND `uid` = %d",
314 * We have now established a relationship with the other site.
315 * Let's make our own personal copy of their profile photo so we don't have
316 * to always load it from their site.
318 * We will also update the contact record with the nature and scope of the relationship.
322 require_once('include/Photo.php');
324 update_contact_avatar($contact['photo'],$uid,$contact_id);
326 logger('dfrn_confirm: confirm - imported photos');
328 if($network === NETWORK_DFRN) {
330 $new_relation = CONTACT_IS_FOLLOWER;
331 if(($relation == CONTACT_IS_SHARING) || ($duplex))
332 $new_relation = CONTACT_IS_FRIEND;
334 if(($relation == CONTACT_IS_SHARING) && ($duplex))
337 $r = q("UPDATE `contact` SET `rel` = %d,
344 `network` = '%s' WHERE `id` = %d
346 intval($new_relation),
347 dbesc(datetime_convert()),
348 dbesc(datetime_convert()),
357 // $network !== NETWORK_DFRN
359 $network = (($contact['network']) ? $contact['network'] : NETWORK_OSTATUS);
360 $notify = (($contact['notify']) ? $contact['notify'] : '');
361 $poll = (($contact['poll']) ? $contact['poll'] : '');
363 if((! $contact['notify']) || (! $contact['poll'])) {
364 $arr = Probe::lrdd($contact['url']);
366 foreach($arr as $link) {
367 if($link['@attributes']['rel'] === 'salmon')
368 $notify = $link['@attributes']['href'];
369 if($link['@attributes']['rel'] === NAMESPACE_FEED)
370 $poll = $link['@attributes']['href'];
375 $new_relation = $contact['rel'];
376 $writable = $contact['writable'];
378 if($network === NETWORK_DIASPORA) {
380 $new_relation = CONTACT_IS_FRIEND;
382 $new_relation = CONTACT_IS_FOLLOWER;
384 if($new_relation != CONTACT_IS_FOLLOWER)
388 $r = q("DELETE FROM `intro` WHERE `id` = %d AND `uid` = %d",
394 $r = q("UPDATE `contact` SET `name-date` = '%s',
406 dbesc(datetime_convert()),
407 dbesc(datetime_convert()),
413 intval($new_relation),
418 /// @TODO is dbm::is_result() working here?
420 notice( t('Unable to set contact photo.') . EOL);
423 // reload contact info
425 $r = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
428 if (dbm::is_result($r)) {
435 if ((isset($new_relation) && $new_relation == CONTACT_IS_FRIEND)) {
437 if (($contact) && ($contact['network'] === NETWORK_DIASPORA)) {
438 require_once('include/diaspora.php');
439 $ret = diaspora::send_share($user[0],$r[0]);
440 logger('share returns: ' . $ret);
443 // Send a new friend post if we are allowed to...
445 $r = q("SELECT `hide-friends` FROM `profile` WHERE `uid` = %d AND `is-default` = 1 LIMIT 1",
449 if((dbm::is_result($r)) && ($r[0]['hide-friends'] == 0) && ($activity) && (! $hidden)) {
451 require_once('include/items.php');
453 $self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1",
460 $arr['guid'] = get_guid(32);
461 $arr['uri'] = $arr['parent-uri'] = item_new_uri($a->get_hostname(), $uid);
463 $arr['contact-id'] = $self[0]['id'];
465 $arr['type'] = 'wall';
468 $arr['author-name'] = $arr['owner-name'] = $self[0]['name'];
469 $arr['author-link'] = $arr['owner-link'] = $self[0]['url'];
470 $arr['author-avatar'] = $arr['owner-avatar'] = $self[0]['thumb'];
472 $A = '[url=' . $self[0]['url'] . ']' . $self[0]['name'] . '[/url]';
473 $APhoto = '[url=' . $self[0]['url'] . ']' . '[img]' . $self[0]['thumb'] . '[/img][/url]';
475 $B = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
476 $BPhoto = '[url=' . $contact['url'] . ']' . '[img]' . $contact['thumb'] . '[/img][/url]';
478 $arr['verb'] = ACTIVITY_FRIEND;
479 $arr['object-type'] = ACTIVITY_OBJ_PERSON;
480 $arr['body'] = sprintf( t('%1$s is now friends with %2$s'), $A, $B)."\n\n\n".$BPhoto;
482 $arr['object'] = '<object><type>' . ACTIVITY_OBJ_PERSON . '</type><title>' . $contact['name'] . '</title>'
483 . '<id>' . $contact['url'] . '/' . $contact['name'] . '</id>';
484 $arr['object'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $contact['url'] . '" />' . "\n");
485 $arr['object'] .= xmlify('<link rel="photo" type="image/jpeg" href="' . $contact['thumb'] . '" />' . "\n");
486 $arr['object'] .= '</link></object>' . "\n";
488 $arr['last-child'] = 1;
490 $arr['allow_cid'] = $user[0]['allow_cid'];
491 $arr['allow_gid'] = $user[0]['allow_gid'];
492 $arr['deny_cid'] = $user[0]['deny_cid'];
493 $arr['deny_gid'] = $user[0]['deny_gid'];
495 $i = item_store($arr);
497 proc_run(PRIORITY_HIGH, "include/notifier.php", "activity", $i);
502 $def_gid = get_default_group($uid, $contact["network"]);
503 if($contact && intval($def_gid))
504 group_add_member($uid, '', $contact['id'], $def_gid);
506 // Let's send our user to the contact editor in case they want to
507 // do anything special with this new friend.
509 if ($handsfree === null) {
510 goaway(App::get_baseurl() . '/contacts/' . intval($contact_id));
520 * End of Scenario 1. [Local confirmation of remote friend request].
522 * Begin Scenario 2. This is the remote response to the above scenario.
523 * This will take place on the site that originally initiated the friend request.
524 * In the section above where the confirming party makes a POST and
525 * retrieves xml status information, they are communicating with the following code.
529 if (x($_POST,'source_url')) {
531 // We are processing an external confirmation to an introduction created by our user.
533 $public_key = ((x($_POST,'public_key')) ? $_POST['public_key'] : '');
534 $dfrn_id = ((x($_POST,'dfrn_id')) ? hex2bin($_POST['dfrn_id']) : '');
535 $source_url = ((x($_POST,'source_url')) ? hex2bin($_POST['source_url']) : '');
536 $aes_key = ((x($_POST,'aes_key')) ? $_POST['aes_key'] : '');
537 $duplex = ((x($_POST,'duplex')) ? intval($_POST['duplex']) : 0 );
538 $page = ((x($_POST,'page')) ? intval($_POST['page']) : 0 );
539 $version_id = ((x($_POST,'dfrn_version')) ? (float) $_POST['dfrn_version'] : 2.0);
541 $forum = (($page == 1) ? 1 : 0);
542 $prv = (($page == 2) ? 1 : 0);
544 logger('dfrn_confirm: requestee contacted: ' . $node);
546 logger('dfrn_confirm: request: POST=' . print_r($_POST,true), LOGGER_DATA);
548 // If $aes_key is set, both of these items require unpacking from the hex transport encoding.
551 $aes_key = hex2bin($aes_key);
552 $public_key = hex2bin($public_key);
555 // Find our user's account
557 $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1",
560 if (! dbm::is_result($r)) {
561 $message = sprintf(t('No user record found for \'%s\' '), $node);
562 xml_status(3,$message); // failure
566 $my_prvkey = $r[0]['prvkey'];
567 $local_uid = $r[0]['uid'];
570 if(! strstr($my_prvkey,'PRIVATE KEY')) {
571 $message = t('Our site encryption key is apparently messed up.');
572 xml_status(3,$message);
577 $decrypted_source_url = "";
578 openssl_private_decrypt($source_url,$decrypted_source_url,$my_prvkey);
581 if(! strlen($decrypted_source_url)) {
582 $message = t('Empty site URL was provided or URL could not be decrypted by us.');
583 xml_status(3,$message);
587 $ret = q("SELECT * FROM `contact` WHERE `url` = '%s' AND `uid` = %d LIMIT 1",
588 dbesc($decrypted_source_url),
591 if(! dbm::is_result($ret)) {
592 if(strstr($decrypted_source_url,'http:'))
593 $newurl = str_replace('http:','https:',$decrypted_source_url);
595 $newurl = str_replace('https:','http:',$decrypted_source_url);
597 $ret = q("SELECT * FROM `contact` WHERE `url` = '%s' AND `uid` = %d LIMIT 1",
601 if(! dbm::is_result($ret)) {
602 // this is either a bogus confirmation (?) or we deleted the original introduction.
603 $message = t('Contact record was not found for you on our site.');
604 xml_status(3,$message);
605 return; // NOTREACHED
609 $relation = $ret[0]['rel'];
611 // Decrypt all this stuff we just received
613 $foreign_pubkey = $ret[0]['site-pubkey'];
614 $dfrn_record = $ret[0]['id'];
616 if(! $foreign_pubkey) {
617 $message = sprintf( t('Site public key not available in contact record for URL %s.'), $newurl);
618 xml_status(3,$message);
621 $decrypted_dfrn_id = "";
622 openssl_public_decrypt($dfrn_id,$decrypted_dfrn_id,$foreign_pubkey);
624 if(strlen($aes_key)) {
625 $decrypted_aes_key = "";
626 openssl_private_decrypt($aes_key,$decrypted_aes_key,$my_prvkey);
627 $dfrn_pubkey = openssl_decrypt($public_key,'AES-256-CBC',$decrypted_aes_key);
630 $dfrn_pubkey = $public_key;
633 $r = q("SELECT * FROM `contact` WHERE `dfrn-id` = '%s' LIMIT 1",
634 dbesc($decrypted_dfrn_id)
636 if (dbm::is_result($r)) {
637 $message = t('The ID provided by your system is a duplicate on our system. It should work if you try again.');
638 xml_status(1,$message); // Birthday paradox - duplicate dfrn-id
642 $r = q("UPDATE `contact` SET `dfrn-id` = '%s', `pubkey` = '%s' WHERE `id` = %d",
643 dbesc($decrypted_dfrn_id),
647 if (! dbm::is_result($r)) {
648 $message = t('Unable to set your contact credentials on our system.');
649 xml_status(3,$message);
652 // It's possible that the other person also requested friendship.
653 // If it is a duplex relationship, ditch the issued-id if one exists.
656 $r = q("UPDATE `contact` SET `issued-id` = '' WHERE `id` = %d",
661 // We're good but now we have to scrape the profile photo and send notifications.
665 $r = q("SELECT `photo` FROM `contact` WHERE `id` = %d LIMIT 1",
666 intval($dfrn_record));
668 if (dbm::is_result($r)) {
669 $photo = $r[0]['photo'];
671 $photo = App::get_baseurl() . '/images/person-175.jpg';
674 require_once("include/Photo.php");
676 update_contact_avatar($photo,$local_uid,$dfrn_record);
678 logger('dfrn_confirm: request - photos imported');
680 $new_relation = CONTACT_IS_SHARING;
681 if (($relation == CONTACT_IS_FOLLOWER) || ($duplex)) {
682 $new_relation = CONTACT_IS_FRIEND;
685 if (($relation == CONTACT_IS_FOLLOWER) && ($duplex)) {
689 $r = q("UPDATE `contact` SET
698 `network` = '%s' WHERE `id` = %d
700 intval($new_relation),
701 dbesc(datetime_convert()),
702 dbesc(datetime_convert()),
709 if ($r === false) { // indicates schema is messed up or total db failure
710 $message = t('Unable to update your contact profile details on our system');
711 xml_status(3,$message);
714 // Otherwise everything seems to have worked and we are almost done. Yay!
715 // Send an email notification
717 logger('dfrn_confirm: request: info updated');
719 $r = q("SELECT `contact`.*, `user`.* FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
720 WHERE `contact`.`id` = %d LIMIT 1",
724 if (dbm::is_result($r))
727 if((dbm::is_result($r)) && ($r[0]['notify-flags'] & NOTIFY_CONFIRM)) {
728 $mutual = ($new_relation == CONTACT_IS_FRIEND);
730 'type' => NOTIFY_CONFIRM,
731 'notify_flags' => $r[0]['notify-flags'],
732 'language' => $r[0]['language'],
733 'to_name' => $r[0]['username'],
734 'to_email' => $r[0]['email'],
735 'uid' => $r[0]['uid'],
736 'link' => App::get_baseurl() . '/contacts/' . $dfrn_record,
737 'source_name' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
738 'source_link' => $r[0]['url'],
739 'source_photo' => $r[0]['photo'],
740 'verb' => ($mutual?ACTIVITY_FRIEND:ACTIVITY_FOLLOW),
745 // Send a new friend post if we are allowed to...
747 if($page && intval(get_pconfig($local_uid,'system','post_joingroup'))) {
748 $r = q("SELECT `hide-friends` FROM `profile` WHERE `uid` = %d AND `is-default` = 1 LIMIT 1",
752 if((dbm::is_result($r)) && ($r[0]['hide-friends'] == 0)) {
754 require_once('include/items.php');
756 $self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1",
763 $arr['uri'] = $arr['parent-uri'] = item_new_uri($a->get_hostname(), $local_uid);
764 $arr['uid'] = $local_uid;
765 $arr['contact-id'] = $self[0]['id'];
767 $arr['type'] = 'wall';
770 $arr['author-name'] = $arr['owner-name'] = $self[0]['name'];
771 $arr['author-link'] = $arr['owner-link'] = $self[0]['url'];
772 $arr['author-avatar'] = $arr['owner-avatar'] = $self[0]['thumb'];
774 $A = '[url=' . $self[0]['url'] . ']' . $self[0]['name'] . '[/url]';
775 $APhoto = '[url=' . $self[0]['url'] . ']' . '[img]' . $self[0]['thumb'] . '[/img][/url]';
777 $B = '[url=' . $combined['url'] . ']' . $combined['name'] . '[/url]';
778 $BPhoto = '[url=' . $combined['url'] . ']' . '[img]' . $combined['thumb'] . '[/img][/url]';
780 $arr['verb'] = ACTIVITY_JOIN;
781 $arr['object-type'] = ACTIVITY_OBJ_GROUP;
782 $arr['body'] = sprintf( t('%1$s has joined %2$s'), $A, $B)."\n\n\n" .$BPhoto;
783 $arr['object'] = '<object><type>' . ACTIVITY_OBJ_GROUP . '</type><title>' . $combined['name'] . '</title>'
784 . '<id>' . $combined['url'] . '/' . $combined['name'] . '</id>';
785 $arr['object'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $combined['url'] . '" />' . "\n");
786 $arr['object'] .= xmlify('<link rel="photo" type="image/jpeg" href="' . $combined['thumb'] . '" />' . "\n");
787 $arr['object'] .= '</link></object>' . "\n";
789 $arr['last-child'] = 1;
791 $arr['allow_cid'] = $user[0]['allow_cid'];
792 $arr['allow_gid'] = $user[0]['allow_gid'];
793 $arr['deny_cid'] = $user[0]['deny_cid'];
794 $arr['deny_gid'] = $user[0]['deny_gid'];
796 $i = item_store($arr);
798 proc_run(PRIORITY_HIGH, "include/notifier.php", "activity", $i);
803 xml_status(0); // Success
804 return; // NOTREACHED
806 ////////////////////// End of this scenario ///////////////////////////////////////////////
809 // somebody arrived here by mistake or they are fishing. Send them to the homepage.