diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/dfrn_notify.php | 22 | ||||
-rw-r--r-- | mod/dfrn_poll.php | 6 | ||||
-rw-r--r-- | mod/item.php | 30 | ||||
-rw-r--r-- | mod/profiles.php | 2 |
4 files changed, 33 insertions, 27 deletions
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 65fd29eb3..5d6f2c371 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -419,7 +419,7 @@ function dfrn_notify_post(&$a) { '$email' => $importer['email'], // email address to send to '$url' => $datarray['author-link'], // full url for the site '$from' => $from, // name of the person sending the message - '$body' => 'q1' .$msg['htmlversion'], // html version of the message + '$body' => $msg['htmlversion'], // html version of the message '$display' => $a->get_baseurl() . '/display/' . $importer['nick'] . '/' . $posted_id, )); @@ -440,10 +440,10 @@ function dfrn_notify_post(&$a) { require_once("include/EmailNotification.php"); EmailNotification::sendTextHtmlEmail( $msg['notificationfromname'], - t("Administrator@") . $a->get_hostname(), + t("Administrator") . '@' . $a->get_hostname(), t("noreply") . '@' . $a->get_hostname(), $importer['email'], - $from . t(" commented on an item at ") . $a->config['sitename'], + sprintf( t('%s commented on an item at %s'), $from , $a->config['sitename']), $email_html_body_tpl, $email_text_body_tpl ); @@ -504,7 +504,7 @@ function dfrn_notify_post(&$a) { $datarray['type'] = 'activity'; $datarray['gravity'] = GRAVITY_LIKE; } - $r = item_store($datarray); + $posted_id = item_store($datarray); // find out if our user is involved in this conversation and wants to be notified. @@ -544,11 +544,11 @@ function dfrn_notify_post(&$a) { $email_html_body_tpl = replace_macros($tpl,array( '$sitename' => $a->config['sitename'], // name of this site '$siteurl' => $a->get_baseurl(), // descriptive url of this site - '$thumb' => $conv['author-avatar'], // thumbnail url for sender icon - '$url' => $conv['author-link'], // full url for the site + '$thumb' => $datarray['author-avatar'], // thumbnail url for sender icon + '$url' => $datarray['author-link'], // full url for the site '$from' => $from, // name of the person sending the message '$body' => $msg['htmlversion'], // html version of the message - '$display' => $a->get_baseurl() . '/display/' . $importer['nick'] . '/' . $posted_id, + '$display' => $a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $posted_id, )); // load the template for private message notifications @@ -556,11 +556,11 @@ function dfrn_notify_post(&$a) { $email_text_body_tpl = replace_macros($tpl,array( '$sitename' => $a->config['sitename'], // name of this site '$siteurl' => $a->get_baseurl(), // descriptive url of this site - '$thumb' => $conv['author-avatar'], // thumbnail url for sender icon - '$url' => $conv['author-link'], // full url for the site + '$thumb' => $datarray['author-avatar'], // thumbnail url for sender icon + '$url' => $datarray['author-link'], // full url for the site '$from' => $from, // name of the person sending the message '$body' => $msg['textversion'], // text version of the message - '$display' => $a->get_baseurl() . '/display/' . $importer['nick'] . '/' . $posted_id, + '$display' => $a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $posted_id, )); // use the EmailNotification library to send the message @@ -570,7 +570,7 @@ function dfrn_notify_post(&$a) { t("Administrator@") . $a->get_hostname(), t("noreply") . '@' . $a->get_hostname(), $importer['email'], - $from . t(" commented on an item at ") . $a->config['sitename'], + sprintf( t('%s commented on an item at %s'), $from , $a->config['sitename']), $email_html_body_tpl, $email_text_body_tpl ); diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index ef8469523..7d8568188 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -31,6 +31,12 @@ function dfrn_poll_init(&$a) { killme(); } + $r = q("SELECT `hidewall` FROM `profile` LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid` WHERE `user`.`nickname` = '%s' AND `profile`.`is-default` = 1 LIMIT 1", + dbesc($a->argv[1]) + ); + if(count($r) && $r[0]['hidewall']) + killme(); + logger('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] ); header("Content-type: application/atom+xml"); $o = get_feed_for($a, '', $a->argv[1],$last_update); diff --git a/mod/item.php b/mod/item.php index 6120b140b..82f33eaeb 100644 --- a/mod/item.php +++ b/mod/item.php @@ -443,7 +443,7 @@ function item_post(&$a) { else $post_id = 0; -dbg(1); + $r = q("INSERT INTO `item` (`uid`,`type`,`wall`,`gravity`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`, `author-name`, `author-link`, `author-avatar`, `created`, `edited`, `changed`, `uri`, `title`, `body`, `location`, `coord`, `tag`, `inform`, `verb`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`, `pubmail`, `attach` ) @@ -533,10 +533,10 @@ dbg(1); '$siteurl' => $a->get_baseurl(), // descriptive url of this site '$thumb' => $author['thumb'], // thumbnail url for sender icon '$email' => $importer['email'], // email address to send to - '$url' => $author['url'], // full url for the site - '$from' => $from, // name of the person sending the message + '$url' => $author['url'], // full url for the site + '$from' => $from, // name of the person sending the message '$body' => $msg['htmlversion'], // html version of the message - '$display' => $a->get_baseurl() . '/display/' . $author['nick'] . '/' . $post_id, + '$display' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id, )); // load the template for private message notifications @@ -546,10 +546,10 @@ dbg(1); '$siteurl' => $a->get_baseurl(), // descriptive url of this site '$thumb' => $author['thumb'], // thumbnail url for sender icon '$email' => $importer['email'], // email address to send to - '$url' => $author['url'], // full url for the site - '$from' => $from, // name of the person sending the message + '$url' => $author['url'], // profile url for the author + '$from' => $from, // name of the person sending the message '$body' => $msg['textversion'], // text version of the message - '$display' => $a->get_baseurl() . '/display/' . $author['nick'] . '/' . $post_id, + '$display' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id, )); // use the EmailNotification library to send the message @@ -559,7 +559,7 @@ dbg(1); t("Administrator@") . $a->get_hostname(), t("noreply") . '@' . $a->get_hostname(), $user['email'], - $from . t(" commented on an item at ") . $a->config['sitename'], + sprintf( t('%s commented on an item at %s'), $from , $a->config['sitename']), $email_html_body_tpl, $email_text_body_tpl ); @@ -598,10 +598,10 @@ dbg(1); '$sitename' => $a->config['sitename'], // name of this site '$siteurl' => $a->get_baseurl(), // descriptive url of this site '$thumb' => $author['thumb'], // thumbnail url for sender icon - '$url' => $author['url'], // full url for the site - '$from' => $from, // name of the person sending the message + '$url' => $author['url'], // full url for the site + '$from' => $from, // name of the person sending the message '$body' => $msg['htmlversion'], // html version of the message - '$display' => $a->get_baseurl() . '/display/' . $author['nick'] . '/' . $post_id, + '$display' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id, )); // load the template for private message notifications @@ -610,10 +610,10 @@ dbg(1); '$sitename' => $a->config['sitename'], // name of this site '$siteurl' => $a->get_baseurl(), // descriptive url of this site '$thumb' => $author['thumb'], // thumbnail url for sender icon - '$url' => $author['url'], // full url for the site - '$from' => $from, // name of the person sending the message + '$url' => $author['url'], // full url for the site + '$from' => $from, // name of the person sending the message '$body' => $msg['textversion'], // text version of the message - '$display' => $a->get_baseurl() . '/display/' . $author['nick'] . '/' . $post_id, + '$display' => $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $post_id, )); // use the EmailNotification library to send the message @@ -623,7 +623,7 @@ dbg(1); t("Administrator@") . $a->get_hostname(), t("noreply") . '@' . $a->get_hostname(), $user['email'], - $from . t(" commented on an item at ") . $a->config['sitename'], + sprintf( t('%s posted to your profile wall at %s') , $from , $a->config['sitename']), $email_html_body_tpl, $email_text_body_tpl ); diff --git a/mod/profiles.php b/mod/profiles.php index b64c1294e..f0821a4f8 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -363,7 +363,7 @@ function profiles_content(&$a) { $opt_tpl = get_markup_template("profile-hide-wall.tpl"); $hide_wall = replace_macros($opt_tpl,array( - '$desc' => t('Hide your messages from unknown viewers of this profile?'), + '$desc' => t('Hide profile details and all your messages from unknown viewers?'), '$yes_str' => t('Yes'), '$no_str' => t('No'), '$yes_selected' => (($r[0]['hidewall']) ? " checked=\"checked\" " : ""), |