aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Activity.php7
-rw-r--r--Zotlabs/Lib/Enotify.php115
-rw-r--r--Zotlabs/Lib/Libzot.php1
-rw-r--r--Zotlabs/Module/Cdav.php1
-rw-r--r--Zotlabs/Module/Hq.php6
-rw-r--r--Zotlabs/Module/Search.php21
-rw-r--r--Zotlabs/Widget/Hq_controls.php10
-rw-r--r--Zotlabs/Widget/Messages.php2
8 files changed, 74 insertions, 89 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 3c1b140a0..2b723bb57 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -42,9 +42,6 @@ class Activity {
if ($x['type'] === ACTIVITY_OBJ_EVENT) {
return self::fetch_event($x);
}
- if ($x['type'] === ACTIVITY_OBJ_PHOTO) {
- return self::fetch_image($x);
- }
call_hooks('encode_object', $x);
}
@@ -194,6 +191,7 @@ class Activity {
}
static function fetch_image($x) {
+
$ret = [
'type' => 'Image',
'id' => $x['id'],
@@ -2264,7 +2262,6 @@ class Activity {
$s['app'] = escape_tags($generator['name']);
}
-
if (!$response_activity) {
$a = self::decode_taxonomy($act->obj);
if ($a) {
@@ -2399,7 +2396,7 @@ class Activity {
}
- if ($act->obj['type'] === 'Image') {
+ if ($act->obj['type'] === 'Image' && strpos($s['body'],'zrl=') === false) {
$ptr = null;
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php
index 50b564bde..7d741edd8 100644
--- a/Zotlabs/Lib/Enotify.php
+++ b/Zotlabs/Lib/Enotify.php
@@ -69,24 +69,24 @@ class Enotify {
$sender_name = $product;
$hostname = \App::get_hostname();
if(strpos($hostname,':'))
- $hostname = substr($hostname,0,strpos($hostname,':'));
+ $hostname = substr($hostname, 0, strpos($hostname,':'));
// Do not translate 'noreply' as it must be a legal 7-bit email address
- $reply_email = get_config('system','reply_address');
+ $reply_email = get_config('system', 'reply_address');
if(! $reply_email)
$reply_email = 'noreply' . '@' . $hostname;
- $sender_email = get_config('system','from_email');
+ $sender_email = get_config('system', 'from_email');
if(! $sender_email)
$sender_email = 'Administrator' . '@' . $hostname;
- $sender_name = get_config('system','from_email_name');
+ $sender_name = get_config('system', 'from_email_name');
if(! $sender_name)
$sender_name = \Zotlabs\Lib\System::get_site_name();
- $additional_mail_header = "";
+ $additional_mail_header = '';
if(array_key_exists('item', $params)) {
require_once('include/conversation.php');
@@ -114,27 +114,28 @@ class Enotify {
}
- $always_show_in_notices = get_pconfig($recip['channel_id'],'system','always_show_in_notices');
- $vnotify = get_pconfig($recip['channel_id'],'system','vnotify');
+ $always_show_in_notices = get_pconfig($recip['channel_id'], 'system', 'always_show_in_notices');
+ $vnotify = get_pconfig($recip['channel_id'], 'system', 'vnotify');
$salutation = $recip['channel_name'];
// e.g. "your post", "David's photo", etc.
$possess_desc = t('%s <!item_type!>');
+// @@TODO: consider using switch instead of those elseif
if ($params['type'] == NOTIFY_MAIL) {
logger('notification: mail');
- $subject = sprintf( t('[$Projectname:Notify] New direct message received at %s'),$sitename);
+ $subject = sprintf( t('[$Projectname:Notify] New direct message received at %s'), $sitename);
- $preamble = sprintf( t('%1$s sent you a new direct message at %2$s.'), $sender['xchan_name'],$sitename);
- $epreamble = sprintf( t('%1$s sent you %2$s.'),'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]', '[zrl=$itemlink]' . t('a direct message') . '[/zrl]');
+ $preamble = sprintf( t('%1$s sent you a new direct message at %2$s.'), $sender['xchan_name'], $sitename);
+ $epreamble = sprintf( t('%1$s sent you %2$s.'), '[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]', '[zrl=$itemlink]' . t('a direct message') . '[/zrl]');
$sitelink = t('Please visit %s to view and/or reply to your direct messages.');
$tsitelink = sprintf( $sitelink, $siteurl . '/hq/' . gen_link_id($params['item']['mid']));
$hsitelink = sprintf( $sitelink, '<a href="' . $siteurl . '/hq/' . gen_link_id($params['item']['mid']) . '">' . $sitename . '</a>');
$itemlink = $siteurl . '/hq/' . gen_link_id($params['item']['mid']);
}
- if ($params['type'] == NOTIFY_COMMENT) {
+ elseif ($params['type'] === NOTIFY_COMMENT) {
//logger("notification: params = " . print_r($params, true), LOGGER_DEBUG);
$moderated = (($params['item']['item_blocked'] == ITEM_MODERATED) ? true : false);
@@ -171,7 +172,6 @@ class Enotify {
// Check to see if there was already a notify for this post.
// If so don't create a second notification
- $p = null;
$p = q("select id from notify where link = '%s' and uid = %d limit 1",
dbesc($params['link']),
intval($recip['channel_id'])
@@ -196,6 +196,7 @@ class Enotify {
xchan_query($p);
+//@@FIXME $p can be null (line 188)
$item_post_type = item_post_type($p[0]);
// $private = $p[0]['item_private'];
$parent_id = $p[0]['id'];
@@ -250,7 +251,7 @@ class Enotify {
}
- if ($params['type'] == NOTIFY_LIKE) {
+ elseif ($params['type'] === NOTIFY_LIKE) {
// logger("notification: params = " . print_r($params, true), LOGGER_DEBUG);
$itemlink = $params['link'];
@@ -268,7 +269,6 @@ class Enotify {
// Check to see if there was already a notify for this post.
// If so don't create a second notification
- $p = null;
$p = q("select id from notify where link = '%s' and uid = %d limit 1",
dbesc($params['link']),
intval($recip['channel_id'])
@@ -293,7 +293,7 @@ class Enotify {
xchan_query($p);
-
+//@@FIXME $p can be null (line 285)
$item_post_type = item_post_type($p[0]);
// $private = $p[0]['item_private'];
$parent_id = $p[0]['id'];
@@ -302,7 +302,7 @@ class Enotify {
// "your post"
- if($p[0]['owner']['xchan_name'] == $p[0]['author']['xchan_name'] && intval($p[0]['item_wall']))
+ if($p[0]['owner']['xchan_name'] === $p[0]['author']['xchan_name'] && intval($p[0]['item_wall']))
$dest_str = sprintf(t('%1$s liked [zrl=%2$s]your %3$s[/zrl]'),
'[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]',
$itemlink,
@@ -328,7 +328,7 @@ class Enotify {
- if($params['type'] == NOTIFY_WALL) {
+ elseif($params['type'] === NOTIFY_WALL) {
$subject = sprintf( t('[$Projectname:Notify] %s posted to your profile wall') , $sender['xchan_name']);
$preamble = sprintf( t('%1$s posted to your profile wall at %2$s') , $sender['xchan_name'], $sitename);
@@ -343,9 +343,8 @@ class Enotify {
$itemlink = $params['link'];
}
- if ($params['type'] == NOTIFY_TAGSELF) {
+ elseif ($params['type'] === NOTIFY_TAGSELF) {
- $p = null;
$p = q("select id from notify where link = '%s' and uid = %d limit 1",
dbesc($params['link']),
intval($recip['channel_id'])
@@ -368,7 +367,7 @@ class Enotify {
$itemlink = $params['link'];
}
- if ($params['type'] == NOTIFY_POKE) {
+ elseif ($params['type'] === NOTIFY_POKE) {
$subject = sprintf( t('[$Projectname:Notify] %1$s poked you') , $sender['xchan_name']);
$preamble = sprintf( t('%1$s poked you at %2$s') , $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s [zrl=%2$s]poked you[/zrl].') ,
@@ -385,7 +384,7 @@ class Enotify {
$itemlink = $params['link'];
}
- if ($params['type'] == NOTIFY_TAGSHARE) {
+ elseif ($params['type'] === NOTIFY_TAGSHARE) {
$subject = sprintf( t('[$Projectname:Notify] %s tagged your post') , $sender['xchan_name']);
$preamble = sprintf( t('%1$s tagged your post at %2$s'),$sender['xchan_name'], $sitename);
$epreamble = sprintf( t('%1$s tagged [zrl=%2$s]your post[/zrl]') ,
@@ -398,7 +397,7 @@ class Enotify {
$itemlink = $params['link'];
}
- if ($params['type'] == NOTIFY_INTRO) {
+ elseif ($params['type'] === NOTIFY_INTRO) {
$subject = sprintf( t('[$Projectname:Notify] Introduction received'));
$preamble = sprintf( t('You\'ve received an new connection request from \'%1$s\' at %2$s'), $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('You\'ve received [zrl=%1$s]a new connection request[/zrl] from %2$s.'),
@@ -412,7 +411,7 @@ class Enotify {
$itemlink = $params['link'];
}
- if ($params['type'] == NOTIFY_SUGGEST) {
+ elseif ($params['type'] === NOTIFY_SUGGEST) {
$subject = sprintf( t('[$Projectname:Notify] Friend suggestion received'));
$preamble = sprintf( t('You\'ve received a friend suggestion from \'%1$s\' at %2$s'), $sender['xchan_name'], $sitename);
$epreamble = sprintf( t('You\'ve received [zrl=%1$s]a friend suggestion[/zrl] for %2$s from %3$s.'),
@@ -430,11 +429,11 @@ class Enotify {
$itemlink = $params['link'];
}
- if ($params['type'] == NOTIFY_CONFIRM) {
+ elseif ($params['type'] === NOTIFY_CONFIRM) {
// ?
}
- if ($params['type'] == NOTIFY_SYSTEM) {
+ elseif ($params['type'] === NOTIFY_SYSTEM) {
// ?
}
@@ -477,7 +476,7 @@ class Enotify {
} while ($dups === true);
- $datarray = array();
+ $datarray = [];
$datarray['hash'] = $hash;
$datarray['sender_hash'] = $sender['xchan_hash'];
$datarray['xname'] = $sender['xchan_name'];
@@ -514,7 +513,7 @@ class Enotify {
// (probably would be better that way)
if (!$always_show_in_notices) {
- if (($params['type'] == NOTIFY_WALL) || ($params['type'] == NOTIFY_MAIL) || ($params['type'] == NOTIFY_INTRO)) {
+ if (($params['type'] === NOTIFY_WALL) || ($params['type'] === NOTIFY_MAIL) || ($params['type'] === NOTIFY_INTRO)) {
$seen = 1;
}
}
@@ -550,12 +549,12 @@ class Enotify {
}
$itemlink = z_root() . '/notify/view/' . $notify_id;
- $msg = str_replace('$itemlink',$itemlink,$epreamble);
+ $msg = str_replace('$itemlink', $itemlink, $epreamble);
// wretched hack, but we don't want to duplicate all the preamble variations and we also don't want to screw up a translation
if ((\App::$language === 'en' || (! \App::$language)) && strpos($msg,', '))
- $msg = substr($msg,strpos($msg,', ')+1);
+ $msg = substr($msg, strpos($msg,', ')+1);
$datarray['id'] = $notify_id;
$datarray['msg'] = $msg;
@@ -575,7 +574,7 @@ class Enotify {
logger('notification: sending notification email');
- $hn = get_pconfig($recip['channel_id'],'system','email_notify_host');
+ $hn = get_pconfig($recip['channel_id'], 'system', 'email_notify_host');
if($hn && (! stristr(\App::get_hostname(),$hn))) {
// this isn't the email notification host
pop_lang();
@@ -584,7 +583,7 @@ class Enotify {
$textversion = strip_tags(html_entity_decode(bbcode(stripslashes(str_replace(array("\\r", "\\n"), array( "", "\n"), $body))),ENT_QUOTES,'UTF-8'));
- $htmlversion = bbcode(stripslashes(str_replace(array("\\r","\\n"), array("","<br />\n"),$body)));
+ $htmlversion = bbcode(stripslashes(str_replace(array("\\r","\\n"), array('',"<br />\n"),$body)));
// use $_SESSION['zid_override'] to force zid() to use
@@ -601,7 +600,7 @@ class Enotify {
unset($_SESSION['zid_override']);
unset($_SESSION['zrl_override']);
- $datarray = array();
+ $datarray = [];
$datarray['banner'] = $banner;
$datarray['product'] = $product;
$datarray['preamble'] = $preamble;
@@ -758,9 +757,9 @@ class Enotify {
$messageSubject = email_header_encode(html_entity_decode($params['messageSubject'],ENT_QUOTES,'UTF-8'),'UTF-8');
// generate a mime boundary
- $mimeBoundary = rand(0, 9) . "-"
- .rand(100000000, 999999999) . "-"
- .rand(100000000, 999999999) . "=:"
+ $mimeBoundary = rand(0, 9) . '-'
+ .rand(100000000, 999999999) . '-'
+ .rand(100000000, 999999999) . '=:'
.rand(10000, 99999);
// generate a multipart/alternative message header
@@ -768,7 +767,7 @@ class Enotify {
$params['additionalMailHeader'] .
"From: $fromName <{$params['fromEmail']}>" . PHP_EOL .
"Reply-To: $fromName <{$params['replyTo']}>" . PHP_EOL .
- "MIME-Version: 1.0" . PHP_EOL .
+ 'MIME-Version: 1.0' . PHP_EOL .
"Content-Type: multipart/alternative; boundary=\"{$mimeBoundary}\"";
// assemble the final multipart message body with the text and html types included
@@ -776,15 +775,15 @@ class Enotify {
$htmlBody = chunk_split(base64_encode($params['htmlVersion']));
$multipartMessageBody =
- "--" . $mimeBoundary . PHP_EOL . // plain text section
- "Content-Type: text/plain; charset=UTF-8" . PHP_EOL .
- "Content-Transfer-Encoding: base64" . PHP_EOL . PHP_EOL .
+ '--' . $mimeBoundary . PHP_EOL . // plain text section
+ 'Content-Type: text/plain; charset=UTF-8' . PHP_EOL .
+ 'Content-Transfer-Encoding: base64' . PHP_EOL . PHP_EOL .
$textBody . PHP_EOL .
- "--" . $mimeBoundary . PHP_EOL . // text/html section
- "Content-Type: text/html; charset=UTF-8" . PHP_EOL .
- "Content-Transfer-Encoding: base64" . PHP_EOL . PHP_EOL .
+ '--' . $mimeBoundary . PHP_EOL . // text/html section
+ 'Content-Type: text/html; charset=UTF-8' . PHP_EOL .
+ 'Content-Transfer-Encoding: base64' . PHP_EOL . PHP_EOL .
$htmlBody . PHP_EOL .
- "--" . $mimeBoundary . "--" . PHP_EOL; // message ending
+ '--' . $mimeBoundary . '--' . PHP_EOL; // message ending
// send the message
$res = mail(
@@ -793,7 +792,7 @@ class Enotify {
$multipartMessageBody, // message body
$messageHeader // message headers
);
- logger("notification: enotify::send returns " . (($res) ? 'success' : 'failure'), LOGGER_DEBUG);
+ logger('notification: enotify::send returns ' . (($res) ? 'success' : 'failure'), LOGGER_DEBUG);
return $res;
}
@@ -833,13 +832,12 @@ class Enotify {
$edit = false;
if($item['edited'] > $item['created']) {
+ $edit = true;
if($item['item_thread_top']) {
$itemem_text = sprintf( t('edited a post dated %s'), relative_date($item['created']));
- $edit = true;
}
else {
$itemem_text = sprintf( t('edited a comment dated %s'), relative_date($item['created']));
- $edit = true;
}
}
@@ -860,14 +858,14 @@ class Enotify {
//'b64mid' => ((in_array($item['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) ? 'b64.' . base64url_encode($item['thr_parent']) : 'b64.' . base64url_encode($item['mid'])),
'thread_top' => (($item['item_thread_top']) ? true : false),
'message' => bbcode(escape_tags($itemem_text)),
- 'body' => htmlentities(html2plain(bbcode($item['body']), 75, true), ENT_QUOTES, 'UTF-8', false),
+ 'body' => htmlentities(html2plain(bbcode($item['body'], ['drop_media', true]), 75, true), ENT_QUOTES, 'UTF-8', false),
// these are for the superblock addon
'hash' => $item[$who]['xchan_hash'],
'uid' => $item['uid'],
'display' => true
);
- call_hooks('enotify_format',$x);
+ call_hooks('enotify_format', $x);
if(! $x['display']) {
return [];
}
@@ -903,7 +901,7 @@ class Enotify {
static public function format_intros($rr) {
- $x = [
+ return [
'notify_link' => z_root() . '/connections/ifpending',
'name' => $rr['xchan_name'],
'addr' => $rr['xchan_addr'],
@@ -912,15 +910,13 @@ class Enotify {
'when' => datetime_convert('UTC', date_default_timezone_get(), $rr['abook_created']),
'hclass' => ('notify-unseen'),
'message' => t('added your channel')
- ];
-
- return $x;
+ ];
}
static public function format_files($rr) {
- $x = [
+ return [
'notify_link' => z_root() . '/sharedwithme',
'name' => $rr['author']['xchan_name'],
'addr' => $rr['author']['xchan_addr'],
@@ -931,13 +927,11 @@ class Enotify {
'message' => t('shared a file with you')
];
- return $x;
-
}
static public function format_mail($rr) {
- $x = [
+ return [
'notify_link' => z_root() . '/mail/' . $rr['id'],
'name' => $rr['xchan_name'],
'addr' => $rr['xchan_addr'],
@@ -948,8 +942,6 @@ class Enotify {
'message' => t('sent you a direct message'),
];
- return $x;
-
}
static public function format_all_events($rr) {
@@ -959,7 +951,7 @@ class Enotify {
$today = ((substr($strt, 0, 10) === datetime_convert('UTC', date_default_timezone_get(), 'now', 'Y-m-d')) ? true : false);
$when = day_translate(datetime_convert('UTC', (($rr['adjust']) ? date_default_timezone_get() : 'UTC'), $rr['dtstart'], $bd_format)) . (($today) ? ' ' . t('[today]') : '');
- $x = [
+ return [
'notify_link' => z_root() . '/cdav/calendar/' . $rr['event_hash'],
'name' => $rr['xchan_name'],
'addr' => $rr['xchan_addr'],
@@ -970,13 +962,12 @@ class Enotify {
'message' => t('created an event')
];
- return $x;
}
static public function format_register($rr) {
- $x = [
+ return [
'notify_link' => z_root() . '/admin/accounts',
'name' => $rr['reg_did2'],
//'addr' => '',
@@ -986,7 +977,5 @@ class Enotify {
'message' => t('status verified')
];
- return $x;
-
}
}
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index d5768cc84..ae8c725d7 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -1142,6 +1142,7 @@ class Libzot {
}
+
$deliveries = null;
if (array_key_exists('recipients', $env) && count($env['recipients'])) {
diff --git a/Zotlabs/Module/Cdav.php b/Zotlabs/Module/Cdav.php
index e26cdd072..e41772d38 100644
--- a/Zotlabs/Module/Cdav.php
+++ b/Zotlabs/Module/Cdav.php
@@ -1059,6 +1059,7 @@ class Cdav extends Controller {
'$cancel' => t('Cancel'),
'$create' => t('Create'),
'$recurrence_warning' => t('Sorry! Editing of recurrent events is not yet implemented.'),
+ '$disabled_warning' => t('Could not fetch calendar resource. The selected calendar might be disabled.'),
'$channel_hash' => $channel['channel_hash'],
'$acl' => $acl,
diff --git a/Zotlabs/Module/Hq.php b/Zotlabs/Module/Hq.php
index 4d55b76b0..8c126d154 100644
--- a/Zotlabs/Module/Hq.php
+++ b/Zotlabs/Module/Hq.php
@@ -113,11 +113,7 @@ class Hq extends \Zotlabs\Web\Controller {
'reset' => t('Reset form')
];
- $o = replace_macros(get_markup_template("hq.tpl"),
- [
- '$editor' => status_editor($a,$x,false,'Hq')
- ]
- );
+ $o = status_editor($a, $x, true);
}
diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php
index 2ad79e3f6..274b02321 100644
--- a/Zotlabs/Module/Search.php
+++ b/Zotlabs/Module/Search.php
@@ -25,10 +25,11 @@ class Search extends Controller {
nav_set_selected('Search');
- require_once("include/bbcode.php");
- require_once('include/security.php');
+ require_once('include/bbcode.php');
require_once('include/conversation.php');
require_once('include/items.php');
+ require_once('include/security.php');
+
$format = (($_REQUEST['format']) ? $_REQUEST['format'] : '');
if ($format !== '') {
@@ -38,11 +39,9 @@ class Search extends Controller {
$observer = App::get_observer();
$observer_hash = (($observer) ? $observer['xchan_hash'] : '');
- $o = '<div id="live-search"></div>' . "\r\n";
-
- $o .= '<div class="generic-content-wrapper-styled">' . "\r\n";
+ $o = '<div class="generic-content-wrapper-styled">' . "\r\n";
- $o .= '<h3>' . t('Search') . '</h3>';
+ $o .= '<h2>' . t('Search') . '</h2>';
if (x(App::$data, 'search'))
$search = trim(App::$data['search']);
@@ -87,21 +86,21 @@ class Search extends Controller {
$tag = true;
$search = substr($search, 1);
}
- if (strpos($search, '@') === 0) {
+ elseif(strpos($search, '@') === 0) {
$search = substr($search, 1);
goaway(z_root() . '/directory' . '?f=1&navsearch=1&search=' . $search);
}
- if (strpos($search, '!') === 0) {
+ elseif(strpos($search, '!') === 0) {
$search = substr($search, 1);
goaway(z_root() . '/directory' . '?f=1&navsearch=1&search=' . $search);
}
- if (strpos($search, '?') === 0) {
+ elseif(strpos($search, '?') === 0) {
$search = substr($search, 1);
goaway(z_root() . '/help' . '?f=1&navsearch=1&search=' . $search);
}
// look for a naked webbie
- if (strpos($search,'@') !== false && strpos($search,'http') !== 0) {
+ if (strpos($search, '@') !== false && strpos($search, 'http') !== 0) {
goaway(z_root() . '/directory' . '?f=1&navsearch=1&search=' . $search);
}
@@ -234,7 +233,7 @@ class Search extends Controller {
$items = [];
}
- if ($format == 'json') {
+ if ($format === 'json') {
$result = [];
require_once('include/conversation.php');
foreach ($items as $item) {
diff --git a/Zotlabs/Widget/Hq_controls.php b/Zotlabs/Widget/Hq_controls.php
index 8c36b8d3a..9504b8f9e 100644
--- a/Zotlabs/Widget/Hq_controls.php
+++ b/Zotlabs/Widget/Hq_controls.php
@@ -7,7 +7,7 @@ use Zotlabs\Lib\Apps;
class Hq_controls {
- function widget($arr) {
+ function widget($options) {
if (! local_channel())
return;
@@ -17,7 +17,7 @@ class Hq_controls {
'label' => t('Toggle post editor'),
'id' => 'jot-toggle',
'href' => '#',
- 'class' => 'btn btn-outline-primary',
+ 'class' => 'btn',
'type' => 'button',
'icon' => 'pencil',
'extra' => 'data-toggle="button"'
@@ -29,7 +29,7 @@ class Hq_controls {
'label' => t('Toggle personal notes'),
'id' => 'notes-toggle',
'href' => '#',
- 'class' => 'btn btn-outline-primary',
+ 'class' => 'btn',
'type' => 'button',
'icon' => 'sticky-note-o',
'extra' => 'data-toggle="button"'
@@ -38,7 +38,9 @@ class Hq_controls {
return replace_macros(get_markup_template('hq_controls.tpl'),
[
- '$entries' => $entries
+ '$entries' => $entries,
+ '$wrapper_class' => $options['wrapper_class'],
+ '$entry_class' => $options['entry_class']
]
);
}
diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php
index a03238c9a..95f3d4eb6 100644
--- a/Zotlabs/Widget/Messages.php
+++ b/Zotlabs/Widget/Messages.php
@@ -95,7 +95,7 @@ class Messages {
$summary = $item['summary'];
}
if (!$summary) {
- $summary = htmlentities(html2plain(bbcode($item['body']), 75, true), ENT_QUOTES, 'UTF-8', false);
+ $summary = htmlentities(html2plain(bbcode($item['body'], ['drop_media' => true]), 75, true), ENT_QUOTES, 'UTF-8', false);
}
if (!$summary) {
$summary = '...';