Compare commits

...

98 Commits
dev ... 8.6.2

Author SHA1 Message Date
Mario
ec66949b35 version 8.6.2 2023-08-27 19:06:14 +00:00
Mario
542a527d0d changelog 2023-08-27 19:02:55 +00:00
Mario Vavti
5e0c392287 test refactor the previous commit
(cherry picked from commit 0a3094fc9a)
2023-08-27 20:01:01 +02:00
Mario Vavti
05ff94941c allow public stream comments/reactions if item_fetched is set, when fetching parent of a reaction fetch the thr_parent
(cherry picked from commit 816bbad28a)
2023-08-27 20:00:30 +02:00
Mario
a27d75d610 fix notification text for likes in cases where obj.actor is not set
(cherry picked from commit ce4150cd06)
2023-08-27 19:59:24 +02:00
Mario
446e842904 make sure that we allow "0" as pathname
(cherry picked from commit be19b75031)
2023-08-27 19:58:55 +02:00
Mario
ba153e2c18 mising pdl file
(cherry picked from commit 2d5c99f459)
2023-08-27 19:58:07 +02:00
Mario
3342ea6891 fix unable to create folders with name 0
(cherry picked from commit c4af4e3297)
2023-08-27 19:57:01 +02:00
Mario
8c3d5fd295 fix index name mixup
(cherry picked from commit 1acfc05e2d)
2023-08-27 19:56:26 +02:00
Mario
5fc58fb10a missing semicolon
(cherry picked from commit b40c38f58c)
2023-08-27 19:56:10 +02:00
Mario
4e2ae9cd4e remove unused variable
(cherry picked from commit 0ec715d7c9)
2023-08-27 19:55:49 +02:00
DM42.Net Hubzilla Development
4167ca2e5c Fix Typo
(cherry picked from commit 3bd2a91992)
2023-08-27 19:55:23 +02:00
Mario
9b3e9dcf02 fix cached jsonld files fetched via network 2023-08-27 17:53:40 +00:00
Mario
f203fcc92e more performance improvements
(cherry picked from commit 4b1384be83)
2023-08-27 19:50:39 +02:00
Mario
0b20069c20 move trigger out of the loop for better performance and some var -> let 2023-08-27 17:49:52 +00:00
Mario
f89ce93940 ignore internal follow activity
(cherry picked from commit 7200c71673)
2023-08-27 19:45:51 +02:00
Mario
1ddbc8a26d fix admin table highlight by adding the correct classes
(cherry picked from commit c412c01a65)
2023-08-27 19:43:09 +02:00
Mario
7dad60bbd5 version 8.6.1 2023-07-18 13:09:56 +00:00
Mario
a66b4626fb changelog
(cherry picked from commit 330add963d)
2023-07-18 15:08:07 +02:00
Mario
74d7fa61d9 fix hcard addon regression
(cherry picked from commit ef6ea4484e)
2023-07-18 12:11:50 +02:00
Mario
63fb8d0392 Merge branch '8.6RC' 2023-07-11 18:57:18 +00:00
Mario
384de0925e version 8.6 2023-07-11 18:56:21 +00:00
Mario
5b5c569c82 RC2 2023-07-05 10:06:57 +00:00
Mario
57796a2f96 only remove the owner from delivery if its their post and minor cleanup
(cherry picked from commit 59b217f7ea)
2023-06-12 10:17:17 +02:00
Mario
ec6cec8854 even more changelog
(cherry picked from commit 3fb22d27ab)
2023-06-02 21:47:41 +02:00
Mario
1cbaab5889 more changelog
(cherry picked from commit fef19b47c2)
2023-06-02 21:39:27 +02:00
Mario
5126613825 update bootstrap to version 5.3 2023-06-02 19:35:23 +00:00
Mario
07097d2fa3 version 8.4.2 2023-06-02 19:27:36 +00:00
Mario
8c9fb32ca0 changelog
(cherry picked from commit 68d921e918)
2023-06-02 21:26:22 +02:00
Mario
330b36159d work around hubloc confusion in mod rmagic
(cherry picked from commit 02089f15c4)
2023-06-02 21:18:52 +02:00
Mario
046152e798 improved unseen forums notification
(cherry picked from commit 6a27afa6ac)
2023-06-02 21:18:30 +02:00
Mario
11ca5bb7d5 owa: workaround for friendica when using nginx until this will be fixed at their side and check prrofile uid for features instead of local channel
(cherry picked from commit 423fdc0a96)
2023-06-02 21:16:56 +02:00
Mario
e0838ff8ab fix wrong array key
(cherry picked from commit 11a2419c22)
2023-06-02 21:13:31 +02:00
Mario Vavti
1b0e268416 fix theme_attachments()
(cherry picked from commit 65a472c113)
2023-06-02 13:35:39 +02:00
Mario
1a27fad9b9 backgound url must be between quotation marks 2023-05-20 12:40:28 +00:00
Mario
c2cfe481df version 8.4.1 2023-05-20 09:28:32 +00:00
Mario
3a56fb6ec6 Merge branch 'dev' 2023-05-20 09:27:45 +00:00
Mario
1a614ea023 instead of setting the value to 0 just continue so that already existing values will not be overwritten 2023-05-19 13:17:45 +00:00
Mario
65d98af24c Merge branch '8.4RC' 2023-05-17 13:28:23 +00:00
Mario
62d35627f3 version 8.4 2023-05-17 13:28:05 +00:00
Mario
84f1ed1587 Merge branch 'dev' into 8.4RC 2023-05-17 13:26:01 +00:00
Mario
18914f2081 Merge branch 'dev' into 8.4RC 2023-05-15 08:04:02 +00:00
Mario
5bdd699c9d Merge branch 'dev' into 8.4RC 2023-05-13 19:52:52 +00:00
Mario Vavti
049fc91615 Merge branch 'dev' into 8.4RC 2023-05-13 21:38:08 +02:00
Mario
5d330e18ff save a query 2023-05-12 16:29:42 +00:00
Mario
07662ff076 Merge branch 'dev' into 8.4RC 2023-05-12 08:02:19 +00:00
Mario
247cf40ace bump version 2023-05-10 20:45:33 +00:00
Mario
4a6b450c55 Merge branch 'dev' into 8.4RC 2023-05-10 20:44:43 +00:00
Mario
efd2f78274 check if var is set and escape $ sign in ru translation 2023-05-10 16:42:12 +00:00
Mario
690ff955fa Merge branch 'dev' into 8.4RC 2023-05-10 16:09:36 +00:00
Mario
d8306fca6f Merge branch 'dev' into 8.4RC 2023-05-10 12:05:15 +00:00
Mario
4ae81d753c Merge branch 'dev' into 8.4RC 2023-05-10 08:16:09 +00:00
Mario
93dda6f1fd Merge branch 'dev' into 8.4RC 2023-05-09 09:20:48 +00:00
Mario
74436eb03e Merge branch 'dev' into 8.4RC 2023-05-09 09:08:06 +00:00
Mario
677e730235 Merge branch 'dev' into 8.4RC 2023-05-07 14:25:17 +00:00
Mario
06c0af50c3 Merge branch 'dev' into 8.4RC 2023-05-07 12:48:14 +00:00
Mario
f6b66f4cad Merge branch 'dev' into 8.4RC 2023-05-07 12:17:09 +00:00
Mario
ca913e5077 Merge branch 'dev' into 8.4RC 2023-05-07 12:04:54 +00:00
Mario
984980b170 version 2023-05-07 11:31:50 +00:00
Mario
a57739c462 Merge branch 'dev' 2023-04-09 20:01:22 +00:00
Mario
92246ce3a8 Merge branch 'dev' 2023-04-09 19:53:27 +00:00
Mario
4a72ea6666 Merge branch 'dev' 2023-04-09 19:45:04 +00:00
Mario
dcfdf3a5d7 Merge branch 'dev' 2023-04-09 19:02:36 +00:00
Mario
9083e99d2a in fact this can be removed
(cherry picked from commit 70ca247c88)
2023-03-24 10:29:09 +01:00
Mario
14fc0c735b encode object after we have dealt with deleted items and work around a php error
(cherry picked from commit 70b3c8080e)
2023-03-24 10:05:37 +01:00
Mario
79405cf1d3 Merge branch 'dev' 2023-03-21 09:20:57 +00:00
Mario
89285f1408 Merge branch '8.2RC' 2023-03-19 13:55:18 +00:00
Mario
17c0bb2069 version 8.2 2023-03-19 13:54:15 +00:00
Mario
192736f6d7 Merge branch 'dev' into 8.2RC 2023-03-19 13:53:12 +00:00
Mario
4eee8ce770 Merge branch 'dev' into 8.2RC 2023-03-19 13:50:39 +00:00
Mario
3dcfdba74b simplify 2023-03-19 13:28:43 +00:00
Mario
5428053663 Merge branch 'dev' into 8.2RC 2023-03-19 09:43:34 +00:00
Mario
1e184b781b Merge branch 'dev' into 8.2RC 2023-03-19 08:22:29 +00:00
Mario
c1ddb89990 Merge branch 'dev' into 8.2RC 2023-03-18 15:47:09 +00:00
Mario
7ac7cb129f Merge branch 'dev' into 8.2RC 2023-03-17 09:44:17 +00:00
Mario
11b9e546a9 Merge branch 'dev' into 8.2RC 2023-03-14 10:43:03 +00:00
Mario
3a3fd38e3a Merge branch 'dev' into 8.2RC 2023-03-12 22:04:37 +00:00
Mario
0a679e503e make sure to only transform channel wall posts for group actors
(cherry picked from commit 95cbcf30d7)
2023-03-12 19:56:34 +01:00
Mario
e7c529f2c3 Merge branch 'dev' into 8.2RC 2023-03-12 18:44:28 +00:00
Mario
dfc70021e3 fix version after merge 2023-03-12 09:38:31 +00:00
Harald Eilertsen
0140f9fe56 translations: Misc updates for nb_NO.
(cherry picked from commit ec6832687b)
2023-01-27 08:00:26 +01:00
Harald Eilertsen
03243df16a translations: Fix timeago for nb_NO.
(cherry picked from commit 9065a90ac0)
2023-01-27 08:00:07 +01:00
Mario
2805520d1b Merge remote-tracking branch 'origin/8.0RC' 2023-01-13 20:01:05 +00:00
Mario
fb7ca18820 version 8.0 2023-01-13 19:56:11 +00:00
Mario
1b00d5657f Merge branch 'dev' into 8.0RC 2023-01-13 19:55:44 +00:00
Mario
9ec516e5a4 Merge branch 'dev' into 8.0RC 2023-01-12 16:12:26 +00:00
Mario
5cb92b6e21 Merge branch 'dev' into 8.0RC 2023-01-12 11:55:13 +00:00
Mario
2ddb88a34d RC2 2023-01-11 19:57:35 +00:00
Mario
71761c9039 Merge branch 'dev' into 8.0RC 2023-01-11 16:35:21 +00:00
Mario
bd5e834b42 Merge branch 'dev' into 8.0RC 2023-01-08 08:20:05 +00:00
Mario
4c434129a6 Merge branch 'dev' into 8.0RC 2023-01-05 18:25:45 +01:00
Mario
66333aedb7 fix version 2023-01-05 18:23:00 +01:00
Mario
f6d9406063 streamline ap followers only privacy warning with current handling. also fixes possible php error.
(cherry picked from commit 34125177e8)
2022-12-19 10:05:02 +01:00
Mario
6e881bcef2 exclude not tagable xchan networks handle_tag()
(cherry picked from commit 4f9a933108)
2022-12-08 21:41:56 +01:00
Mario
12a963cc40 version 7.8.7 2022-12-03 09:01:18 +00:00
Mario
f89975fd0e changelog 7.8.7
(cherry picked from commit b4dffe5946)
2022-12-03 09:59:06 +01:00
Mario
00512579f3 fix regression when adding feed contacts
(cherry picked from commit 5216c5b232)
2022-12-02 18:47:40 +01:00
Mario
697a74f37e fix regression: new event not created
(cherry picked from commit d16b6c3838)
2022-12-02 18:06:20 +01:00
18 changed files with 166 additions and 116 deletions

View File

@@ -1,4 +1,25 @@
Hubzilla 8.6 (2023-07-??)
Hubzilla 8.6.2
- Fix public stream comments/reactions fetching
- Fix notification text for likes in cases where obj.actor is not set
- Fix missing pdl file for mod cover_photo
- Fix unable to create folders with name 0
- Fix index name mixup in mysql schema file
- Fix missing semicolon in mysql schema file
- Removed unused variable
- Fix typo in manifest
- Fix cached jsonld files fetched via network
- Page rendering performance improvements
- Fix internal follow activity possibly creating notification items
- Fix admin table highlight color for dark mode
- Pubcrawl: do not handle not implemented listen activity
- Diaspora: fix unshare not implemented
Hubzilla 8.6.1 (2023-07-18)
- Fix diaspora discovery
Hubzilla 8.6 (2023-07-11)
- Update fullcalendar library
- Improve and unify selection of deliverable abook xchans
- Remove unused pseudo_abook()

View File

@@ -2281,6 +2281,7 @@ class Activity {
}
static function decode_note($act) {
$response_activity = false;
$s = [];
@@ -2362,6 +2363,9 @@ class Activity {
$s['mid'] = $act->id;
$s['uuid'] = ((!empty($act->data['diaspora:guid'])) ? $act->data['diaspora:guid'] : uuid_from_url($s['mid']));
$s['parent_mid'] = $act->objprop('id') ?: $act->obj;
/*
if ($act->objprop('inReplyTo')) {
$s['parent_mid'] = $act->objprop('inReplyTo');
}
@@ -2372,7 +2376,7 @@ class Activity {
logger('response activity without parent_mid or thr_parent');
return;
}
*/
// over-ride the object timestamp with the activity
if (isset($act->data['published'])) {
@@ -3007,7 +3011,7 @@ class Activity {
$allowed = true;
// reject public stream comments that weren't sent by the conversation owner
if ($is_sys_channel && $item['owner_xchan'] !== $observer_hash && !$fetch_parents) {
if ($is_sys_channel && $item['owner_xchan'] !== $observer_hash && !$fetch_parents && empty($item['item_fetched'])) {
$allowed = false;
}
}
@@ -3143,8 +3147,6 @@ class Activity {
$fetch = false;
// TODO: debug
// if (perm_is_allowed($channel['channel_id'],$observer_hash,'send_stream') && (PConfig::Get($channel['channel_id'],'system','hyperdrive',true) || $act->type === 'Announce')) {
if (perm_is_allowed($channel['channel_id'], $observer_hash, 'send_stream') || $is_sys_channel) {
$fetch = (($fetch_parents) ? self::fetch_and_store_parents($channel, $observer_hash, $item, $force) : false);
}
@@ -3162,7 +3164,7 @@ class Activity {
return;
}
/*
if ($parent[0]['parent_mid'] !== $item['parent_mid']) {
$item['thr_parent'] = $item['parent_mid'];
}
@@ -3170,7 +3172,7 @@ class Activity {
$item['thr_parent'] = $parent[0]['parent_mid'];
}
$item['parent_mid'] = $parent[0]['parent_mid'];
*/
/*
*

View File

@@ -35,7 +35,7 @@ class File_upload extends \Zotlabs\Web\Controller {
$_REQUEST['deny_cid'] = ((isset($_REQUEST['contact_deny'])) ? perms2str($_REQUEST['contact_deny']) : '');
$_REQUEST['deny_gid'] = ((isset($_REQUEST['group_deny'])) ? perms2str($_REQUEST['group_deny']) : '');
if(isset($_REQUEST['filename']) && $_REQUEST['filename']) {
if(isset($_REQUEST['filename']) && strlen($_REQUEST['filename'])) {
$r = attach_mkdir($channel, get_observer_hash(), $_REQUEST);
if($r['success']) {
$hash = $r['data']['hash'];

View File

@@ -23,7 +23,7 @@ class Manifest extends Controller {
[ 'src' => '/images/app/hz-144.png', 'sizes' => '144x144', 'type' => 'image/png' ],
[ 'src' => '/images/app/hz-152.png', 'sizes' => '152x152', 'type' => 'image/png' ],
[ 'src' => '/images/app/hz-192.png', 'sizes' => '192x192', 'type' => 'image/png', 'purpose' => 'any maskable' ],
[ 'src' => '/images/app/hz-348.png', 'sizes' => '384x384', 'type' => 'image/png' ],
[ 'src' => '/images/app/hz-384.png', 'sizes' => '384x384', 'type' => 'image/png' ],
[ 'src' => '/images/app/hz-512.png', 'sizes' => '512x512', 'type' => 'image/png' ],
[ 'src' => '/images/app/hz.svg', 'sizes' => '64x64', 'type' => 'image/xml+svg' ]
],

View File

@@ -169,12 +169,12 @@ class Sse_bs extends Controller {
$sql_extra2 = '';
if(self::$xchans)
$sql_extra2 = " AND CASE WHEN verb = '" . ACTIVITY_SHARE . "' THEN owner_xchan ELSE author_xchan END IN (" . self::$xchans . ") ";
$sql_extra2 = " AND CASE WHEN verb = '" . dbesc(ACTIVITY_SHARE) . "' THEN owner_xchan ELSE author_xchan END IN (" . self::$xchans . ") ";
$item_normal = item_normal();
// FEP-5624 filter approvals for comments
$approvals = " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject') ";
// Filter FEP-5624 approvals for comments and internal follow activities
$item_normal .= " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject', '" . dbesc(ACTIVITY_FOLLOW) . "') ";
if ($notifications) {
$items = q("SELECT * FROM item
@@ -184,7 +184,6 @@ class Sse_bs extends Controller {
AND obj_type NOT IN ('Document', 'Video', 'Audio', 'Image')
AND author_xchan != '%s'
$item_normal
$approvals
$sql_extra
$sql_extra2
ORDER BY created DESC LIMIT $limit OFFSET $offset",
@@ -214,7 +213,6 @@ class Sse_bs extends Controller {
AND obj_type NOT IN ('Document', 'Video', 'Audio', 'Image')
AND author_xchan != '%s'
$item_normal
$approvals
$sql_extra LIMIT 100",
intval(self::$uid),
dbesc(self::$ob_hash)
@@ -258,8 +256,8 @@ class Sse_bs extends Controller {
$item_normal = item_normal();
// FEP-5624 filter approvals for comments
$approvals = " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject') ";
// Filter FEP-5624 approvals for comments and internal follow activities
$item_normal .= " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject', '" . dbesc(ACTIVITY_FOLLOW) . "') ";
if ($notifications) {
$items = q("SELECT * FROM item
@@ -269,7 +267,6 @@ class Sse_bs extends Controller {
AND obj_type NOT IN ('Document', 'Video', 'Audio', 'Image')
AND author_xchan != '%s'
$item_normal
$approvals
$sql_extra
$sql_extra2
ORDER BY created DESC LIMIT $limit OFFSET $offset",
@@ -297,7 +294,6 @@ class Sse_bs extends Controller {
$r = q("SELECT id FROM item
WHERE uid = %d and item_unseen = 1 AND item_private = 2
$item_normal
$approvals
$sql_extra
AND author_xchan != '%s' LIMIT 100",
intval(self::$uid),
@@ -343,8 +339,8 @@ class Sse_bs extends Controller {
$item_normal = item_normal();
// FEP-5624 filter approvals for comments
$approvals = " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject') ";
// Filter FEP-5624 approvals for comments and internal follow activities
$item_normal .= " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject', '" . dbesc(ACTIVITY_FOLLOW) . "') ";
if ($notifications) {
$items = q("SELECT * FROM item
@@ -354,7 +350,6 @@ class Sse_bs extends Controller {
AND obj_type NOT IN ('Document', 'Video', 'Audio', 'Image')
AND author_xchan != '%s'
$item_normal
$approvals
$sql_extra
$sql_extra2
ORDER BY created DESC LIMIT $limit OFFSET $offset",
@@ -382,7 +377,6 @@ class Sse_bs extends Controller {
$r = q("SELECT id FROM item
WHERE uid = %d and item_unseen = 1 AND item_wall = 1 AND item_private IN (0, 1)
$item_normal
$approvals
$sql_extra
AND author_xchan != '%s' LIMIT 100",
intval(self::$uid),
@@ -445,8 +439,8 @@ class Sse_bs extends Controller {
$item_normal = item_normal();
// FEP-5624 filter approvals for comments
$approvals = " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject') ";
// Filter FEP-5624 approvals for comments and internal follow activities
$item_normal .= " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject', '" . dbesc(ACTIVITY_FOLLOW) . "') ";
if ($notifications) {
$items = q("SELECT * FROM item
@@ -456,7 +450,6 @@ class Sse_bs extends Controller {
AND author_xchan != '%s'
AND created > '%s'
$item_normal
$approvals
$sql_extra
$sql_extra2
ORDER BY created DESC LIMIT $limit OFFSET $offset",
@@ -484,7 +477,6 @@ class Sse_bs extends Controller {
WHERE true $uids
AND created > '%s'
$item_normal
$approvals
$sql_extra
AND author_xchan != '%s' LIMIT 100",
dbescdate($_SESSION['static_loadtime']),
@@ -641,6 +633,10 @@ class Sse_bs extends Controller {
$item_normal = item_normal();
// Filter FEP-5624 approvals for comments and internal follow activities
$item_normal .= " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject', '" . dbesc(ACTIVITY_FOLLOW) . "') ";
$r = q("SELECT * FROM item
WHERE verb = '%s'
AND obj_type IN ('Document', 'Video', 'Audio', 'Image')

View File

@@ -60,8 +60,10 @@ class Messages {
}
$channel = App::get_channel();
$item_normal_i = str_replace('item.', 'i.', item_normal());
$item_normal_c = str_replace('item.', 'c.', item_normal());
$item_normal = item_normal();
$item_normal .= " and item.verb != '" . ACTIVITY_FOLLOW . "'";
$item_normal_i = str_replace('item.', 'i.', $item_normal);
$item_normal_c = str_replace('item.', 'c.', $item_normal);
$entries = [];
$limit = 30;
$dummy_order_sql = '';

View File

@@ -60,7 +60,7 @@ require_once('include/bbcode.php');
require_once('include/items.php');
define('PLATFORM_NAME', 'hubzilla');
define('STD_VERSION', '8.7');
define('STD_VERSION', '8.6.2');
define('ZOT_REVISION', '6.0');
define('DB_UPDATE_VERSION', 1258);

View File

@@ -691,7 +691,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
$type = $gis['mime'];
}
$pathname = '';
$pathname = null;
if($source === 'photos') {
if($newalbum) {
@@ -708,7 +708,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
$pathname = find_path_by_hash($channel['channel_id'], $arr['folder']);
}
if(! $pathname) {
if($pathname === null) {
$pathname = filepath_macro($upload_path);
}
@@ -1180,7 +1180,7 @@ function attach_mkdir($channel, $observer_hash, $arr = null) {
return $ret;
}
if(! $arr['filename']) {
if(isset($arr['filename']) && !strlen($arr['filename'])) {
$ret['message'] = t('Empty pathname');
return $ret;
}

View File

@@ -108,6 +108,8 @@ function localize_item(&$item){
$author_link = ((is_array($obj['actor']['url'])) ? $obj['actor']['url'][0]['href'] : $obj['actor']['url']);
elseif (isset($obj['actor']) && is_string($obj['actor']))
$author_link = $obj['actor'];
elseif (isset($obj['attributedTo']) && is_string($obj['attributedTo']) && $obj['attributedTo'])
$author_link = $obj['attributedTo'];
else
$author_link = '';
@@ -123,6 +125,13 @@ function localize_item(&$item){
}
}
if(!$author_name && isset($obj['attributedTo']) && is_string($obj['attributedTo'])) {
$cached_actor = Activity::get_cached_actor($obj['attributedTo']);
if (is_array($cached_actor)) {
$author_name = $cached_actor['name'] ?? $cached_actor['preferredUsername'];
}
}
$item_url = '';
if(isset($obj['link']) && is_array($obj['link']))
$item_url = get_rel_link($obj['link'],'alternate');

View File

@@ -2040,68 +2040,85 @@ function getBestSupportedMimeType($mimeTypes = null, $acceptedTypes = false) {
return null;
}
/**
* @brief Perform caching for jsonld normaliser.
*
* @param string $url
* @return mixed|boolean|array
* @return mixed|bool|array
*/
function jsonld_document_loader($url) {
switch ($url) {
case 'https://www.w3.org/ns/activitystreams':
$url = z_root() . '/library/w3org/activitystreams.jsonld';
break;
case 'https://w3id.org/identity/v1':
$url = z_root() . '/library/w3org/identity-v1.jsonld';
break;
case 'https://w3id.org/security/v1':
$url = z_root() . '/library/w3org/security-v1.jsonld';
break;
default:
logger('URL: ' . $url, LOGGER_DEBUG);
break;
}
require_once('library/jsonld/jsonld.php');
$doc = (object) [
'contextUrl' => null,
'document' => null,
'documentUrl' => $url
];
$recursion = 0;
$builtins = [
'https://www.w3.org/ns/activitystreams' => 'library/w3org/activitystreams.jsonld',
'https://w3id.org/identity/v1' => 'library/w3org/identity-v1.jsonld',
'https://w3id.org/security/v1' => 'library/w3org/security-v1.jsonld',
];
$x = debug_backtrace();
if($x) {
foreach($x as $n) {
if($n['function'] === __FUNCTION__) {
$recursion ++;
if ($x) {
foreach ($x as $n) {
if ($n['function'] === __FUNCTION__) {
$recursion++;
}
}
}
if($recursion > 5) {
if ($recursion > 5) {
logger('jsonld bomb detected at: ' . $url);
killme();
}
foreach ($builtins as $key => $value) {
if ($url === $key) {
$doc->document = file_get_contents($value);
return $doc;
}
}
$cachepath = 'store/[data]/ldcache';
if(! is_dir($cachepath))
if(!is_dir($cachepath)) {
os_mkdir($cachepath, STORAGE_DEFAULT_PERMISSIONS, true);
}
$filename = $cachepath . '/' . urlencode($url);
if(file_exists($filename) && filemtime($filename) > time() - (12 * 60 * 60)) {
return json_decode(file_get_contents($filename));
if (file_exists($filename) && filemtime($filename) > time() - (12 * 60 * 60)) {
logger('loading ' . $filename . ' from recent cache');
$doc->document = file_get_contents($filename);
return $doc;
}
$r = jsonld_default_document_loader($url);
if($r) {
file_put_contents($filename, json_encode($r));
if ($r) {
if (!in_array($url, $builtins)) {
$cache_obj = $r;
// To prevent double encoding we need to decode $cache_obj->document
// before encoding the whole object for storage.
$cache_obj->document = json_decode($cache_obj->document);
file_put_contents($filename, json_encode($cache_obj));
}
return $r;
}
logger('not found');
if(file_exists($filename)) {
return json_decode(file_get_contents($filename));
if (file_exists($filename)) {
logger('loading ' . $filename . ' from longterm cache');
$doc->document = file_get_contents($filename);
return $doc;
}
else {
logger($filename . ' does not exist and cannot be loaded');
}
return [];
return $doc;
}
/**

View File

@@ -1627,6 +1627,6 @@ CREATE TABLE IF NOT EXISTS workerq (
workerq_cmd varchar(191) NOT NULL DEFAULT '',
KEY workerq_priority (workerq_priority),
KEY workerq_reservationid (workerq_reservationid),
KEY workerq_processtimeout (workerq_uuid),
KEY workerq_uuid (workerq_processtimeout)
) ENGINE = InnoDB DEFAULT CHARSET=utf8mb4
KEY workerq_processtimeout (workerq_processtimeout),
KEY workerq_uuid (workerq_uuid)
) ENGINE = InnoDB DEFAULT CHARSET=utf8mb4;

View File

@@ -54,23 +54,6 @@
margin-right: 1em;
}
#adminpage table {width:100%; border-bottom: 1px solid #000000; margin: 5px 0px;}
#adminpage table th { text-align: left;}
#adminpage td .icon { float: left;}
#adminpage table#users img { width: 16px; height: 16px; }
#adminpage table tr:hover { background-color: #bbc7d7; }
#adminpage .selectall { text-align: right; }
.checkbox_bulkedit {
width: 1.2em;
height: 1.2em;
}
.channels_ckbx, .pending_ckbx, .users_ckbx {
margin-top: 0px !important;
margin-left: 0px !important;
}
tr.zebra9 { background-color: #eafaf1; }
tr.zebra0 { background-color: #fbeee6; }
tr.zebra1 { background-color: #fef9e7; }

View File

@@ -646,7 +646,8 @@ function updatePageItems(mode, data) {
function updateConvItems(mode,data) {
var scroll_position = $(window).scrollTop();
let scroll_position = $(window).scrollTop();
let b64mids = [];
if(mode !== 'update')
$(document).trigger('hz:updateConvItems');
@@ -660,12 +661,12 @@ function updateConvItems(mode,data) {
$('.thread-wrapper', data).each(function() {
if(this.classList.contains('toplevel_item')) {
var ident = this.id;
var convId = ident.replace('thread-wrapper-','');
var commentWrap = $('#'+ident+' .collapsed-comments').attr('id');
let ident = this.id;
let convId = ident.replace('thread-wrapper-','');
let commentWrap = $('#'+ident+' .collapsed-comments').attr('id');
var itmId = 0;
var isVisible = false;
let itmId = 0;
let isVisible = false;
// figure out the comment state
if(typeof commentWrap !== 'undefined')
@@ -695,7 +696,7 @@ function updateConvItems(mode,data) {
if(isVisible)
showHideComments(itmId);
var commentBody = localStorage.getItem("comment_body-" + convId);
let commentBody = localStorage.getItem("comment_body-" + convId);
if(commentBody) {
var commentElm = $('#comment-edit-text-' + convId);
@@ -723,7 +724,7 @@ function updateConvItems(mode,data) {
if(mode === 'replace') {
if (window.location.search.indexOf("mid=") != -1 || window.location.pathname.indexOf("display") != -1) {
var title = $(".wall-item-title").text();
let title = $(".wall-item-title").text();
title.replace(/^\s+/, '');
title.replace(/\s+$/, '');
if (title) {
@@ -734,10 +735,14 @@ function updateConvItems(mode,data) {
}
}
$(document).trigger('hz:sse_setNotificationsStatus', [$(this).data('b64mids')]);
$(this).data('b64mids').forEach((b64mid) => {
b64mids.push(b64mid);
});
});
$(document).trigger('hz:sse_setNotificationsStatus', [b64mids]);
$(window).scrollTop(scroll_position);
if(followUpPageLoad) {
@@ -802,7 +807,7 @@ function updateConvItems(mode,data) {
}
// reset rotators and cursors we may have set before reaching this place
$('.like-rotator').hide();
$("#page-spinner").hide();
$("#profile-jot-text-loading").hide();
@@ -837,8 +842,7 @@ function scrollToItem() {
}
function collapseHeight() {
$(".wall-item-content, .directory-collapse").each(function() {
$(".wall-item-content:not('.divmore_checked'), .directory-collapse:not('.divmore_checked')").each(function(i) {
var orgHeight = $(this).outerHeight(true);
var id = $(this).attr('id')
var open = ((expanded_items.indexOf($(this).attr('id')) === -1) ? false : true);
@@ -866,6 +870,7 @@ function collapseHeight() {
$(this).addClass('divmore');
}
}
$(this).addClass('divmore_checked');
});
}

View File

@@ -0,0 +1,10 @@
[region=aside]
[widget=fullprofile][/widget]
[/region]
[region=content]
$content
[/region]
[region=right_aside]
[widget=notifications][/widget]
[widget=newmember][/widget]
[/region]

View File

@@ -924,10 +924,6 @@ a .drop-icons:hover {
list-style-type: none;
}
#adminpage table tr:hover {
background-color: #BBC7D7;
}
table {
border-spacing: 2px;
max-width: 100%;

View File

@@ -7,7 +7,7 @@
<h3>{{$h_pending}}</h3>
{{if $debug}}<div>{{$debug}}</div>{{/if}}
{{if $pending}}
<table id="pending">
<table id="pending" class="table table-hover">
<thead>
<tr>
{{foreach $th_pending as $th}}<th>{{$th}}</th>{{/foreach}}
@@ -53,12 +53,13 @@
<br><br>
<h3>{{$h_users}}</h3>
{{if $users}}
<table id="users">
<table id="users" class="table table-hover">
<thead>
<tr>
{{foreach $th_users as $th}}<th><a href="{{$base}}&key={{$th.1}}&dir={{$odir}}">{{$th.0}}</a></th>{{/foreach}}
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@@ -75,10 +76,12 @@
<td class="login_date">{{$u.account_lastlog}}</td>
<td class="account_expires">{{$u.account_expires}}</td>
<td class="service_class">{{$u.account_service_class}}</td>
<td class="checkbox_bulkedit"><input type="checkbox" class="users_ckbx" id="id_user_{{$u.account_id}}" name="user[]" value="{{$u.account_id}}"><input type="hidden" name="blocked[]" value="{{$u.blocked}}"></td>
<td class="checkbox_bulkedit"><input type="checkbox" class="users_ckbx p-1" id="id_user_{{$u.account_id}}" name="user[]" value="{{$u.account_id}}"><input type="hidden" name="blocked[]" value="{{$u.blocked}}"></td>
<td class="tools">
<a href="{{$baseurl}}/admin/accounts/{{if ($u.blocked)}}un{{/if}}block/{{$u.account_id}}?t={{$form_security_token}}" class="btn btn-default btn-xs" title='{{if ($u.blocked)}}{{$unblock}}{{else}}{{$block}}{{/if}}'><i class="fa fa-ban admin-icons{{if ($u.blocked)}} dim{{/if}}"></i></a>
<a href="{{$baseurl}}/admin/accounts/delete/{{$u.account_id}}?t={{$form_security_token}}" class="btn btn-default btn-xs" title='{{$delete}}' onclick="return confirm_delete('{{$u.name}}')"><i class="fa fa-trash-o admin-icons"></i></a>
<a href="{{$baseurl}}/admin/accounts/delete/{{$u.account_id}}?t={{$form_security_token}}" class="p-1 text-reset" title='{{$delete}}' onclick="return confirm_delete('{{$u.name}}')"><i class="fa fa-trash-o admin-icons"></i></a>
</td>
<td class="tools">
<a href="{{$baseurl}}/admin/accounts/{{if ($u.blocked)}}un{{/if}}block/{{$u.account_id}}?t={{$form_security_token}}" class="p-1 text-reset" title='{{if ($u.blocked)}}{{$unblock}}{{else}}{{$block}}{{/if}}'><i class="fa fa-ban admin-icons{{if ($u.blocked)}} dim{{/if}}"></i></a>
</td>
</tr>
{{/foreach}}

View File

@@ -12,18 +12,20 @@
</script>
<div class = "generic-content-wrapper-styled" id='adminpage'>
<h1>{{$title}} - {{$page}}</h1>
<form action="{{$baseurl}}/admin/channels" method="post">
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
<h3>{{$h_channels}}</h3>
{{if $channels}}
<table id='channels'>
<table id="channels" class="table table-hover">
<thead>
<tr>
{{foreach $th_channels as $th}}<th><a href="{{$base}}&key={{$th.1}}&dir={{$odir}}">{{$th.0}}</a></th>{{/foreach}}
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@@ -32,11 +34,15 @@
<td class='channel_id'>{{$c.channel_id}}</td>
<td class='channel_name'><a href="channel/{{$c.channel_address}}">{{$c.channel_name}}</a></td>
<td class='channel_address'>{{$c.channel_address}}</td>
<td class="checkbox_bulkedit"><input type="checkbox" class="channels_ckbx" id="id_channel_{{$c.channel_id}}" name="channel[]" value="{{$c.channel_id}}"/></td>
<td class="checkbox_bulkedit"><input type="checkbox" class="channels_ckbx p-1" id="id_channel_{{$c.channel_id}}" name="channel[]" value="{{$c.channel_id}}"/></td>
<td class="tools">
<a href="{{$baseurl}}/admin/channels/block/{{$c.channel_id}}?t={{$form_security_token}}" class="btn btn-default btn-xs" title='{{if ($c.blocked)}}{{$unblock}}{{else}}{{$block}}{{/if}}'><i class='fa fa-ban admin-icons {{if ($c.blocked)}}dim{{/if}}'></i></a>
<a href="{{$baseurl}}/admin/channels/code/{{$c.channel_id}}?t={{$form_security_token}}" class="btn btn-default btn-xs{{if ($c.allowcode)}} btn-danger{{/if}}" title='{{if ($c.allowcode)}}{{$uncode}}{{else}}{{$code}}{{/if}}'><i class='fa fa-terminal admin-icons {{if ($c.allowcode)}}dim{{/if}}'></i></a>
<a href="{{$baseurl}}/admin/channels/delete/{{$c.channel_id}}?t={{$form_security_token}}" class="btn btn-default btn-xs" title='{{$delete}}' onclick="return confirm_delete('{{$c.channel_name}}')"><i class='fa fa-trash-o admin-icons'></i></a>
<a href="{{$baseurl}}/admin/channels/block/{{$c.channel_id}}?t={{$form_security_token}}" class="p-1 text-reset" title='{{if ($c.blocked)}}{{$unblock}}{{else}}{{$block}}{{/if}}'><i class='fa fa-ban admin-icons {{if ($c.blocked)}}text-danger{{/if}}'></i></a>
</td>
<td class="tools">
<a href="{{$baseurl}}/admin/channels/code/{{$c.channel_id}}?t={{$form_security_token}}" class="p-1 text-reset" title='{{if ($c.allowcode)}}{{$uncode}}{{else}}{{$code}}{{/if}}'><i class='fa fa-terminal admin-icons {{if ($c.allowcode)}}text-danger{{/if}}'></i></a>
</td>
<td class="tools">
<a href="{{$baseurl}}/admin/channels/delete/{{$c.channel_id}}?t={{$form_security_token}}" class="p-1 text-reset" title='{{$delete}}' onclick="return confirm_delete('{{$c.channel_name}}')"><i class='fa fa-trash-o admin-icons'></i></a>
</td>
</tr>
{{/foreach}}
@@ -44,10 +50,10 @@
</table>
<div class='selectall'><a href='#' onclick="return selectall('channels_ckbx');">{{$select_all}}</a></div>
<div class="submit">
<input type="submit" name="page_channels_block" class="btn btn-primary" value="{{$block}}/{{$unblock}}" />
<input type="submit" name="page_channels_code" class="btn btn-primary" value="{{$code}}/{{$uncode}}" />
<input type="submit" name="page_channels_block" class="btn btn-primary" value="{{$block}}/{{$unblock}}" />
<input type="submit" name="page_channels_code" class="btn btn-primary" value="{{$code}}/{{$uncode}}" />
<input type="submit" name="page_channels_delete" class="btn btn-primary" onclick="return confirm_delete_multi()" value="{{$delete}}" />
</div>
</div>
{{else}}
NO CHANNELS?!?
{{/if}}

View File

@@ -94,8 +94,8 @@
<dd class="homepage-url u-url">{{$profile.homepage}}</dd>
</dl>
{{/if}}
<div class="hcard-addon rounded"></div>
</div>
<div class="hcard-addon"></div>
{{/if}}
</div>
{{if $details}}