aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-04-26 20:11:12 -0700
committerzotlabs <mike@macgirvin.com>2017-04-26 20:11:12 -0700
commit88149f56bb2d2fb8f4a02cc320e5ba83435d8acc (patch)
tree8fd1c67cc364af4dee4ce81cd37befe4a9857e44 /include
parent6fcfab34883e5e93e9438ed4872de304e22b0f00 (diff)
parent1c304eb8ba5395e62c0245133d58a3f00adaeaac (diff)
downloadvolse-hubzilla-88149f56bb2d2fb8f4a02cc320e5ba83435d8acc.tar.gz
volse-hubzilla-88149f56bb2d2fb8f4a02cc320e5ba83435d8acc.tar.bz2
volse-hubzilla-88149f56bb2d2fb8f4a02cc320e5ba83435d8acc.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php9
-rw-r--r--include/message.php6
-rw-r--r--include/text.php2
3 files changed, 14 insertions, 3 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 93a6d7406..b6832e22c 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1533,6 +1533,15 @@ function prepare_page($item) {
// the template will get passed an unobscured title.
$body = prepare_body($item, true);
+ if(App::$page['template'] == 'none') {
+ $tpl = 'page_display_empty.tpl';
+
+ return replace_macros(get_markup_template($tpl), array(
+ '$body' => $body['html']
+ ));
+
+ }
+
$tpl = get_pconfig($item['uid'], 'system', 'pagetemplate');
if (! $tpl)
$tpl = 'page_display.tpl';
diff --git a/include/message.php b/include/message.php
index da3514184..e7db98d7e 100644
--- a/include/message.php
+++ b/include/message.php
@@ -188,9 +188,10 @@ function send_message($uid = 0, $recipient = '', $body = '', $subject = '', $rep
$body = str_rot47(base64url_encode($body));
$sig = ''; // placeholder
+ $mimetype = ''; //placeholder
- $r = q("INSERT INTO mail ( account_id, conv_guid, mail_obscured, channel_id, from_xchan, to_xchan, title, body, sig, attach, mid, parent_mid, created, expires, mail_isreply )
- VALUES ( %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d )",
+ $r = q("INSERT INTO mail ( account_id, conv_guid, mail_obscured, channel_id, from_xchan, to_xchan, mail_mimetype, title, body, sig, attach, mid, parent_mid, created, expires, mail_isreply )
+ VALUES ( %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d )",
intval($channel['channel_account_id']),
dbesc($conv_guid),
intval(1),
@@ -198,6 +199,7 @@ function send_message($uid = 0, $recipient = '', $body = '', $subject = '', $rep
dbesc($channel['channel_hash']),
dbesc($recipient),
dbesc($subject),
+ dbesc(($mimetype)? $mimetype : 'text/bbcode'),
dbesc($body),
dbesc($sig),
dbesc($jattach),
diff --git a/include/text.php b/include/text.php
index 14a60f060..e769d0c79 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3175,4 +3175,4 @@ function ellipsify($s,$maxlen) {
return $s;
return mb_substr($s,0,$maxlen / 2) . '...' . mb_substr($s,mb_strlen($s) - ($maxlen / 2));
-} \ No newline at end of file
+}