aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-03-26 17:57:27 -0700
committerfriendica <info@friendica.com>2012-03-26 17:57:27 -0700
commitb5d0315d55b6488d9493dd49bd35a2fe1b1492c7 (patch)
treefc3fbda1fd755912423fb186a651d64c5eb8dab0 /mod
parent03b95c9a091920d0796f7835afc762d09971ab32 (diff)
downloadvolse-hubzilla-b5d0315d55b6488d9493dd49bd35a2fe1b1492c7.tar.gz
volse-hubzilla-b5d0315d55b6488d9493dd49bd35a2fe1b1492c7.tar.bz2
volse-hubzilla-b5d0315d55b6488d9493dd49bd35a2fe1b1492c7.zip
preparation for some possibly killer features
Diffstat (limited to 'mod')
-rwxr-xr-xmod/dfrn_poll.php21
-rwxr-xr-xmod/message.php7
2 files changed, 19 insertions, 9 deletions
diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php
index fe5cd4906..6030587ce 100755
--- a/mod/dfrn_poll.php
+++ b/mod/dfrn_poll.php
@@ -26,21 +26,24 @@ function dfrn_poll_init(&$a) {
$dfrn_id = substr($dfrn_id,2);
}
- if(($dfrn_id === '') && (! x($_POST,'dfrn_id')) && ($a->argc > 1)) {
+ if(($dfrn_id === '') && (! x($_POST,'dfrn_id'))) {
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
killme();
}
- $r = q("SELECT `hidewall` FROM `user` WHERE `user`.`nickname` = '%s' LIMIT 1",
- dbesc($a->argv[1])
- );
- if(count($r) && $r[0]['hidewall'])
- killme();
+ $user = '';
+ if($a->argc > 1) {
+ $r = q("SELECT `hidewall` FROM `user` WHERE `user`.`nickname` = '%s' LIMIT 1",
+ dbesc($a->argv[1])
+ );
+ if((! count($r)) || (count($r) && $r[0]['hidewall']))
+ killme();
+ $user = $r[0]['nickname'];
+ }
- logger('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] );
+ logger('dfrn_poll: public feed request from ' . $_SERVER['REMOTE_ADDR'] . ' for ' . $user);
header("Content-type: application/atom+xml");
- $o = get_feed_for($a, '', $a->argv[1],$last_update);
- echo $o;
+ echo get_feed_for($a, '', $user,$last_update);
killme();
}
diff --git a/mod/message.php b/mod/message.php
index 0907abd77..8991f643d 100755
--- a/mod/message.php
+++ b/mod/message.php
@@ -15,6 +15,13 @@ function message_post(&$a) {
$body = ((x($_REQUEST,'body')) ? escape_tags(trim($_REQUEST['body'])) : '');
$recipient = ((x($_REQUEST,'messageto')) ? intval($_REQUEST['messageto']) : 0 );
+ // Work around doubled linefeeds in Tinymce 3.5b2
+
+ $plaintext = intval(get_pconfig(local_user(),'system','plaintext'));
+ if(! $plaintext) {
+ $body = str_replace("\r\n","\n",$body);
+ $body = str_replace("\n\n","\n",$body);
+ }
$ret = send_message($recipient, $body, $subject, $replyto);
$norecip = false;