mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
Compare commits
98 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec66949b35 | ||
|
|
542a527d0d | ||
|
|
5e0c392287 | ||
|
|
05ff94941c | ||
|
|
a27d75d610 | ||
|
|
446e842904 | ||
|
|
ba153e2c18 | ||
|
|
3342ea6891 | ||
|
|
8c3d5fd295 | ||
|
|
5fc58fb10a | ||
|
|
4e2ae9cd4e | ||
|
|
4167ca2e5c | ||
|
|
9b3e9dcf02 | ||
|
|
f203fcc92e | ||
|
|
0b20069c20 | ||
|
|
f89ce93940 | ||
|
|
1ddbc8a26d | ||
|
|
7dad60bbd5 | ||
|
|
a66b4626fb | ||
|
|
74d7fa61d9 | ||
|
|
63fb8d0392 | ||
|
|
384de0925e | ||
|
|
5b5c569c82 | ||
|
|
57796a2f96 | ||
|
|
ec6cec8854 | ||
|
|
1cbaab5889 | ||
|
|
5126613825 | ||
|
|
07097d2fa3 | ||
|
|
8c9fb32ca0 | ||
|
|
330b36159d | ||
|
|
046152e798 | ||
|
|
11ca5bb7d5 | ||
|
|
e0838ff8ab | ||
|
|
1b0e268416 | ||
|
|
1a27fad9b9 | ||
|
|
c2cfe481df | ||
|
|
3a56fb6ec6 | ||
|
|
1a614ea023 | ||
|
|
65d98af24c | ||
|
|
62d35627f3 | ||
|
|
84f1ed1587 | ||
|
|
18914f2081 | ||
|
|
5bdd699c9d | ||
|
|
049fc91615 | ||
|
|
5d330e18ff | ||
|
|
07662ff076 | ||
|
|
247cf40ace | ||
|
|
4a6b450c55 | ||
|
|
efd2f78274 | ||
|
|
690ff955fa | ||
|
|
d8306fca6f | ||
|
|
4ae81d753c | ||
|
|
93dda6f1fd | ||
|
|
74436eb03e | ||
|
|
677e730235 | ||
|
|
06c0af50c3 | ||
|
|
f6b66f4cad | ||
|
|
ca913e5077 | ||
|
|
984980b170 | ||
|
|
a57739c462 | ||
|
|
92246ce3a8 | ||
|
|
4a72ea6666 | ||
|
|
dcfdf3a5d7 | ||
|
|
9083e99d2a | ||
|
|
14fc0c735b | ||
|
|
79405cf1d3 | ||
|
|
89285f1408 | ||
|
|
17c0bb2069 | ||
|
|
192736f6d7 | ||
|
|
4eee8ce770 | ||
|
|
3dcfdba74b | ||
|
|
5428053663 | ||
|
|
1e184b781b | ||
|
|
c1ddb89990 | ||
|
|
7ac7cb129f | ||
|
|
11b9e546a9 | ||
|
|
3a3fd38e3a | ||
|
|
0a679e503e | ||
|
|
e7c529f2c3 | ||
|
|
dfc70021e3 | ||
|
|
0140f9fe56 | ||
|
|
03243df16a | ||
|
|
2805520d1b | ||
|
|
fb7ca18820 | ||
|
|
1b00d5657f | ||
|
|
9ec516e5a4 | ||
|
|
5cb92b6e21 | ||
|
|
2ddb88a34d | ||
|
|
71761c9039 | ||
|
|
bd5e834b42 | ||
|
|
4c434129a6 | ||
|
|
66333aedb7 | ||
|
|
f6d9406063 | ||
|
|
6e881bcef2 | ||
|
|
12a963cc40 | ||
|
|
f89975fd0e | ||
|
|
00512579f3 | ||
|
|
697a74f37e |
23
CHANGELOG
23
CHANGELOG
@@ -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()
|
||||
|
||||
@@ -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'];
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
|
||||
@@ -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'];
|
||||
|
||||
@@ -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' ]
|
||||
],
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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 = '';
|
||||
|
||||
2
boot.php
2
boot.php
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
10
view/pdl/mod_cover_photo.pdl
Normal file
10
view/pdl/mod_cover_photo.pdl
Normal 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]
|
||||
@@ -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%;
|
||||
|
||||
@@ -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}}
|
||||
|
||||
@@ -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}}
|
||||
|
||||
@@ -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}}
|
||||
|
||||
Reference in New Issue
Block a user