aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Mail.php20
-rw-r--r--Zotlabs/Module/Wfinger.php2
-rw-r--r--Zotlabs/Module/Xrd.php2
-rwxr-xr-xboot.php2
-rw-r--r--images/emoji/README2
-rw-r--r--include/conversation.php9
-rw-r--r--include/message.php6
-rw-r--r--include/text.php2
-rw-r--r--install/schema_mysql.sql2
-rw-r--r--install/schema_postgres.sql2
-rw-r--r--install/update.php13
-rw-r--r--view/tpl/page_display_empty.tpl1
12 files changed, 46 insertions, 17 deletions
diff --git a/Zotlabs/Module/Mail.php b/Zotlabs/Module/Mail.php
index 2fb89fed5..52f1ddf32 100644
--- a/Zotlabs/Module/Mail.php
+++ b/Zotlabs/Module/Mail.php
@@ -113,18 +113,18 @@ class Mail extends \Zotlabs\Web\Controller {
if($preview) {
$mail = [
- 'mailbox' => 'outbox',
- 'id' => 0,
- 'mid' => 'M0',
- 'from_name' => $channel['xchan_name'],
- 'from_url' => $channel['xchan_url'],
- 'from_photo' => $channel['xchan_photo_s'],
- 'subject' => zidify_links(smilies(bbcode($subject))),
- 'body' => zidify_links(smilies(bbcode($body))),
+ 'mailbox' => 'outbox',
+ 'id' => 0,
+ 'mid' => 'M0',
+ 'from_name' => $channel['xchan_name'],
+ 'from_url' => $channel['xchan_url'],
+ 'from_photo' => $channel['xchan_photo_s'],
+ 'subject' => zidify_links(smilies(bbcode($subject))),
+ 'body' => zidify_links(smilies(bbcode($body))),
'attachments' => '',
- 'can_recall' => false,
+ 'can_recall' => false,
'is_recalled' => '',
- 'date' => datetime_convert('UTC',date_default_timezone_get(),$message['created'], 'c')
+ 'date' => datetime_convert('UTC',date_default_timezone_get(),$message['created'], 'c')
];
echo replace_macros(get_markup_template('mail_conv.tpl'), [ '$mail' => $mail ] );
diff --git a/Zotlabs/Module/Wfinger.php b/Zotlabs/Module/Wfinger.php
index 3fdff691b..118ec5e7c 100644
--- a/Zotlabs/Module/Wfinger.php
+++ b/Zotlabs/Module/Wfinger.php
@@ -107,7 +107,7 @@ class Wfinger extends \Zotlabs\Web\Controller {
[
'rel' => 'http://schemas.google.com/g/2010#updates-from',
'type' => 'application/atom+xml',
- 'href' => z_root() . '/feed/' . $r[0]['channel_address'] . '?f=&compat=1'
+ 'href' => z_root() . '/feed/' . $r[0]['channel_address'] . '/?compat=1'
],
[
diff --git a/Zotlabs/Module/Xrd.php b/Zotlabs/Module/Xrd.php
index ba650be55..7fd81e490 100644
--- a/Zotlabs/Module/Xrd.php
+++ b/Zotlabs/Module/Xrd.php
@@ -57,7 +57,7 @@ class Xrd extends \Zotlabs\Web\Controller {
'$aliases' => $aliases,
'$profile_url' => z_root() . '/channel/' . $r[0]['channel_address'],
'$hcard_url' => z_root() . '/hcard/' . $r[0]['channel_address'],
- '$atom' => z_root() . '/feed/' . $r[0]['channel_address'] . '?f=&compat=1',
+ '$atom' => z_root() . '/feed/' . $r[0]['channel_address'] . '/?compat=1',
'$zot_post' => z_root() . '/post/' . $r[0]['channel_address'],
'$poco_url' => z_root() . '/poco/' . $r[0]['channel_address'],
'$photo' => z_root() . '/photo/profile/l/' . $r[0]['channel_id'],
diff --git a/boot.php b/boot.php
index b063cd6f9..031c1562e 100755
--- a/boot.php
+++ b/boot.php
@@ -53,7 +53,7 @@ define ( 'PLATFORM_NAME', 'red' );
define ( 'STD_VERSION', '5.3' );
define ( 'ZOT_REVISION', '1.2' );
-define ( 'DB_UPDATE_VERSION', 1189 );
+define ( 'DB_UPDATE_VERSION', 1190 );
define ( 'PROJECT_BASE', __DIR__ );
diff --git a/images/emoji/README b/images/emoji/README
new file mode 100644
index 000000000..ab478b753
--- /dev/null
+++ b/images/emoji/README
@@ -0,0 +1,2 @@
+These files supplied by emojione. License is CC BY 4.0. Attribution is required for commercial use.
+See http://emojione.com
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
+}
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index 19b8efc21..bfeec0801 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -717,6 +717,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
`to_xchan` char(191) NOT NULL DEFAULT '',
`account_id` int(10) unsigned NOT NULL DEFAULT '0',
`channel_id` int(10) unsigned NOT NULL DEFAULT '0',
+ `mail_mimetype` char(64) NOT NULL DEFAULT 'text/bbcode',
`title` text NOT NULL,
`body` mediumtext NOT NULL,
`sig` text NOT NULL,
@@ -729,6 +730,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
`mail_seen` tinyint(4) NOT NULL DEFAULT '0',
`mail_recalled` tinyint(4) NOT NULL DEFAULT '0',
`mail_obscured` smallint(6) NOT NULL DEFAULT '0',
+ `mail_raw` tinyint(4) NOT NULL DEFAULT '0',
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
`expires` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY (`id`),
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index 40e320eb7..02cb48d8c 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -710,6 +710,7 @@ CREATE TABLE "mail" (
"to_xchan" text NOT NULL DEFAULT '',
"account_id" bigint NOT NULL DEFAULT '0',
"channel_id" bigint NOT NULL DEFAULT '0',
+ "mail_mimetype char(64) NOT NULL DEFAULT '0',
"title" text NOT NULL,
"body" text NOT NULL,
"sig" text NOT NULL,
@@ -722,6 +723,7 @@ CREATE TABLE "mail" (
"mail_seen" smallint NOT NULL DEFAULT '0',
"mail_recalled" smallint NOT NULL DEFAULT '0',
"mail_obscured" smallint NOT NULL DEFAULT '0',
+ "mail_raw" smallint NOT NULL DEFAULT '0',
"created" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
"expires" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY ("id")
diff --git a/install/update.php b/install/update.php
index 75f9158c9..ce65d1db9 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1189 );
+define( 'UPDATE_VERSION' , 1190 );
/**
*
@@ -2521,3 +2521,14 @@ function update_r1188() {
}
+function update_r1189() {
+
+ $r1 = q("alter table mail add mail_mimetype char(64) not null default 'text/bbcode' ");
+ $r2 = q("alter table mail add mail_raw int(4) not null default '0' ");
+
+ if($r1 && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+
+}
+
diff --git a/view/tpl/page_display_empty.tpl b/view/tpl/page_display_empty.tpl
new file mode 100644
index 000000000..9f000dee8
--- /dev/null
+++ b/view/tpl/page_display_empty.tpl
@@ -0,0 +1 @@
+{{$body}} \ No newline at end of file