diff --git a/CHANGELOG b/CHANGELOG
index 272f839fb..c3e280963 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,17 @@
+Hubzilla 3.8.3 (2018-11-05)
+ - Do not count likes in forum notifications if likes notifications are disabled
+ - Fix typo in spanish translation which broke javascript
+ - Improve linkinfo charset handling and image detection
+ - Fix wrong image resize for some external images
+ - Move blueimp upload lib to composer and update to version 9.25
+ - Remove primary/clone counts from admin summary until we have a mechanism to update the fixed counts
+ - Fix html2markdown() and re-enable previously failing tests
+ - Improve look of oembed content for Hubzilla links
+ - Fix forum notifications count not correct
+ - Fix gallery addon which broke mod apps in some situations
+ - Fix wiki_list widget not working on every page respectively level
+
+
Hubzilla 3.8.2 (2018-10-29)
- Merge unmerged changes from dev into master
- Fix issues with forum handling in mod network and ping
diff --git a/Zotlabs/Module/Admin.php b/Zotlabs/Module/Admin.php
index 6edced9b5..8ccdaf4f5 100644
--- a/Zotlabs/Module/Admin.php
+++ b/Zotlabs/Module/Admin.php
@@ -109,11 +109,9 @@ class Admin extends \Zotlabs\Web\Controller {
// available channels, primary and clones
$channels = array();
- $r = q("SELECT COUNT(*) AS total, COUNT(CASE WHEN channel_primary = 1 THEN 1 ELSE NULL END) AS main, COUNT(CASE WHEN channel_primary = 0 THEN 1 ELSE NULL END) AS clones FROM channel WHERE channel_removed = 0 and channel_system = 0");
+ $r = q("SELECT COUNT(*) AS total FROM channel WHERE channel_removed = 0 and channel_system = 0");
if ($r) {
$channels['total'] = array('label' => t('Channels'), 'val' => $r[0]['total']);
- $channels['main'] = array('label' => t('Primary'), 'val' => $r[0]['main']);
- $channels['clones'] = array('label' => t('Clones'), 'val' => $r[0]['clones']);
}
// We can do better, but this is a quick queue status
diff --git a/Zotlabs/Module/Linkinfo.php b/Zotlabs/Module/Linkinfo.php
index a0ad17e68..7c7dc0e88 100644
--- a/Zotlabs/Module/Linkinfo.php
+++ b/Zotlabs/Module/Linkinfo.php
@@ -228,8 +228,13 @@ class Linkinfo extends \Zotlabs\Web\Controller {
$header = $result['header'];
$body = $result['body'];
+
+ // Check codepage in HTTP headers or HTML if not exist
+ $cp = (preg_match('/Content-Type: text\/html; charset=(.+)\r\n/i', $header, $o) ? $o[1] : '');
+ if(empty($cp))
+ $cp = (preg_match('/meta.+content=["|\']text\/html; charset=([^"|\']+)/i', $body, $o) ? $o[1] : 'AUTO');
- $body = mb_convert_encoding($body, 'UTF-8', (preg_match('/meta.+content=["|\']text\/html;\s+charset=([^"|\']+)/i', $body, $o) ? $o[1] : 'UTF-8'));
+ $body = mb_convert_encoding($body, 'UTF-8', $cp);
$body = mb_convert_encoding($body, 'HTML-ENTITIES', "UTF-8");
$doc = new \DOMDocument();
@@ -265,20 +270,43 @@ class Linkinfo extends \Zotlabs\Web\Controller {
$attr["content"] = html_entity_decode($attr["content"], ENT_QUOTES, "UTF-8");
switch (strtolower($attr["name"])) {
- case 'generator':
- $siteinfo['generator'] = $attr['content'];
- break;
case "fulltitle":
- $siteinfo["title"] = $attr["content"];
+ $siteinfo["title"] = trim($attr["content"]);
break;
case "description":
- $siteinfo["text"] = $attr["content"];
+ $siteinfo["text"] = trim($attr["content"]);
+ break;
+ case "thumbnail":
+ $siteinfo["image"] = $attr["content"];
+ break;
+ case "twitter:image":
+ $siteinfo["image"] = $attr["content"];
+ break;
+ case "twitter:image:src":
+ $siteinfo["image"] = $attr["content"];
+ break;
+ case "twitter:card":
+ if (($siteinfo["type"] == "") || ($attr["content"] == "photo")) {
+ $siteinfo["type"] = $attr["content"];
+ }
+ break;
+ case "twitter:description":
+ $siteinfo["text"] = trim($attr["content"]);
+ break;
+ case "twitter:title":
+ $siteinfo["title"] = trim($attr["content"]);
break;
case "dc.title":
- $siteinfo["title"] = $attr["content"];
+ $siteinfo["title"] = trim($attr["content"]);
break;
case "dc.description":
- $siteinfo["text"] = $attr["content"];
+ $siteinfo["text"] = trim($attr["content"]);
+ break;
+ case "keywords":
+ $keywords = explode(",", $attr["content"]);
+ break;
+ case "news_keywords":
+ $keywords = explode(",", $attr["content"]);
break;
}
}
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index 294e11c52..b93faa612 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -258,6 +258,10 @@ class Network extends \Zotlabs\Web\Controller {
}
elseif($pf && $unseen && $nouveau) {
+ $vnotify = get_pconfig(local_channel(), 'system', 'vnotify');
+ if(! ($vnotify & VNOTIFY_LIKE))
+ $likes_sql = " AND verb NOT IN ('" . dbesc(ACTIVITY_LIKE) . "', '" . dbesc(ACTIVITY_DISLIKE) . "') ";
+
// This is for nouveau view public forum cid queries (if a forum notification is clicked)
$p = q("SELECT oid AS parent FROM term WHERE uid = %d AND ttype = %d AND term = '%s'",
intval(local_channel()),
@@ -269,7 +273,7 @@ class Network extends \Zotlabs\Web\Controller {
if($p_str)
$p_sql = " OR item.parent IN ( $p_str ) ";
- $sql_extra = " AND ( owner_xchan = '" . protect_sprintf(dbesc($cid_r[0]['abook_xchan'])) . "' OR owner_xchan = '" . protect_sprintf(dbesc($cid_r[0]['abook_xchan'])) . "' $p_sql ) AND item_unseen = 1 ";
+ $sql_extra = " AND ( owner_xchan = '" . protect_sprintf(dbesc($cid_r[0]['abook_xchan'])) . "' OR owner_xchan = '" . protect_sprintf(dbesc($cid_r[0]['abook_xchan'])) . "' $p_sql ) AND item_unseen = 1 $likes_sql ";
}
else {
// This is for threaded view cid queries (e.g. if a forum is selected from the forum filter)
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php
index f97f31ff7..78bfb1f09 100644
--- a/Zotlabs/Module/Photos.php
+++ b/Zotlabs/Module/Photos.php
@@ -612,9 +612,9 @@ class Photos extends \Zotlabs\Web\Controller {
nav_set_selected('Photos');
- $o = '
-
- ';
+ $o = '
+
+ ';
$o .= "
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-