mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
Merge branch 'dev' into 11.2RC
This commit is contained in:
34
CHANGELOG
34
CHANGELOG
@@ -1,3 +1,37 @@
|
||||
Hubzilla 11.2 (2026-??-??)
|
||||
Features
|
||||
- Introduce parse_webbie() for preparing webbies and URLs for webfinger usage
|
||||
- Allow to override cUrl useragent
|
||||
- New HQ system status widget for admins (sponsored by NLnet NGI0 Commons Fund/Performance Profiling)
|
||||
|
||||
Maintenance
|
||||
- Use PHP matching rules in util/run_xgettext
|
||||
- Store translation templates as .pot instead of .po
|
||||
- Deprecate NULL_DATE constant in favor of DBA::get_null_date()
|
||||
- Composer require guzzlehttp/psr7
|
||||
- Update composer libs
|
||||
- Move HQ channel notifications widget HTML to template
|
||||
- Deprecate tags and attachment in activities
|
||||
- Update the nginx config example to meet the more modern approach
|
||||
|
||||
Bugfixes
|
||||
- Fix fatal error in italian translation file
|
||||
- Fix mod network not displaying direct messages when filters active - issue #1973
|
||||
- Fix ghost notifications with reshared items - issue #1970
|
||||
- Fix issue with double typed objects in Lib/Activity
|
||||
- Fix events displaying event timezone instead of adjusted to timezone
|
||||
- Fix duplicated terms in activity object
|
||||
- Fix last modified timestamp not updating in attach_store()
|
||||
|
||||
Addons
|
||||
- Wopi: fix headers already set warning when serving the file to the client
|
||||
- Superblock: complete rewrite with extended functionality and added tests for version 3.0 (sponsored by NLnet NGI0 Commons Fund/Superblock)
|
||||
- Diaspora: use Diaspora/2 useragent when fetching hcards to prevent being redirected to some shady bot guard
|
||||
- Add composer config and autoload files for addons
|
||||
- Wopi: return early in construct_page hook and
|
||||
- Wopi: fix wrong hook name in uninstall function
|
||||
|
||||
|
||||
Hubzilla 11.0 (2026-01-30)
|
||||
Features
|
||||
- Rewrite Lib/MessageFilter (ported from forte) and add more tests
|
||||
|
||||
@@ -6,6 +6,7 @@ use Zotlabs\Lib\Activity;
|
||||
use Zotlabs\Lib\ActivityStreams;
|
||||
use Zotlabs\Lib\ASCollection;
|
||||
use Zotlabs\Lib\ASCache;
|
||||
use Zotlabs\Lib\Config;
|
||||
|
||||
class Convo {
|
||||
|
||||
@@ -33,6 +34,7 @@ class Convo {
|
||||
}
|
||||
|
||||
$force = $argv[4] ?? false;
|
||||
$interval = Config::Get('queueworker', 'queue_interval', 500000);
|
||||
|
||||
foreach ($channels as $channel_id) {
|
||||
$channel = channelx_by_n($channel_id);
|
||||
@@ -46,6 +48,8 @@ class Convo {
|
||||
}
|
||||
|
||||
foreach ($messages as $message) {
|
||||
$network_fetch = false;
|
||||
|
||||
if (is_string($message)) {
|
||||
$cached = ASCache::Get($message);
|
||||
if ($cached) {
|
||||
@@ -54,6 +58,8 @@ class Convo {
|
||||
}
|
||||
else {
|
||||
// logger('convo_fetching: ' . $message);
|
||||
$network_fetch = true;
|
||||
|
||||
$data = Activity::fetch($message, $channel);
|
||||
if ($data) {
|
||||
ASCache::Set($message, $data);
|
||||
@@ -65,6 +71,12 @@ class Convo {
|
||||
$data = $message;
|
||||
}
|
||||
|
||||
if (!$network_fetch) {
|
||||
// Add some delay so that the DB will not be overwhelmed
|
||||
// Fetched from network will already have a slight delay
|
||||
usleep($interval);
|
||||
}
|
||||
|
||||
$AS = new ActivityStreams($data);
|
||||
if ($AS->is_valid() && is_array($AS->obj)) {
|
||||
$item = Activity::decode_note($AS);
|
||||
|
||||
@@ -3790,6 +3790,9 @@ class Activity {
|
||||
*/
|
||||
|
||||
public static function init_background_fetch(string $observer_hash = '') {
|
||||
|
||||
$interval = Config::Get('queueworker', 'queue_interval', 500000);
|
||||
|
||||
if (isset(App::$cache['zot_fetch_objects'])) {
|
||||
foreach (App::$cache['zot_fetch_objects'] as $mid => $info) {
|
||||
$force = $info['force'];
|
||||
@@ -3803,6 +3806,10 @@ class Activity {
|
||||
}
|
||||
|
||||
Master::Summon(['Zotconvo', $channels_str, $mid, $force]);
|
||||
|
||||
if ($interval) {
|
||||
usleep($interval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3824,6 +3831,10 @@ class Activity {
|
||||
}
|
||||
|
||||
Master::Summon(['Fetchparents', $channels_str, $observer_hash, $mid, $force]);
|
||||
|
||||
if ($interval) {
|
||||
usleep($interval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3840,6 +3851,10 @@ class Activity {
|
||||
}
|
||||
|
||||
Master::Summon(['Convo', $channels_str, $observer_hash, $mid, $force]);
|
||||
|
||||
if ($interval) {
|
||||
usleep($interval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -150,28 +150,29 @@ function clean_query_string($s = '') {
|
||||
*/
|
||||
|
||||
function drop_query_params($s, $p) {
|
||||
$unescaped = unescape_tags($s);
|
||||
$parsed = parse_url($unescaped);
|
||||
|
||||
$s = unescape_tags($s);
|
||||
|
||||
$parsed = parse_url($s);
|
||||
$query = '';
|
||||
$query_args = null;
|
||||
|
||||
if(isset($parsed['query'])) {
|
||||
parse_str($parsed['query'], $query_args);
|
||||
if (empty($parsed['query'])) {
|
||||
// No query parameters were found, return the original string
|
||||
return $s;
|
||||
}
|
||||
|
||||
if(is_array($query_args)) {
|
||||
foreach($query_args as $k => $v) {
|
||||
if(in_array($k, $p))
|
||||
continue;
|
||||
$query .= (($query) ? '&' : '') . urlencode($k) . '=' . urlencode($v);
|
||||
$query_args = [];
|
||||
|
||||
parse_str($parsed['query'], $query_args);
|
||||
|
||||
foreach($query_args as $k => $v) {
|
||||
if (in_array($k, $p)) {
|
||||
unset($query_args[$k]);
|
||||
}
|
||||
}
|
||||
|
||||
unset($parsed['query']);
|
||||
|
||||
if($query) {
|
||||
$query = http_build_query($query_args, '', '&');
|
||||
|
||||
if ($query) {
|
||||
$parsed['query'] = $query;
|
||||
}
|
||||
|
||||
|
||||
35
tests/unit/includes/ZidTest.php
Normal file
35
tests/unit/includes/ZidTest.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2026 The Hubzilla Community
|
||||
* SPDX-FileContributor: Mario Vavti <mario@mariovavti.com>
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
namespace Zotlabs\Tests\Unit;
|
||||
|
||||
class ZidTest extends UnitTestCase {
|
||||
|
||||
/**
|
||||
* Test the drop_query_params function.
|
||||
*
|
||||
* @dataProvider drop_query_params_provider
|
||||
*/
|
||||
public function test_drop_query_params(string $url, array $drop_params, string $expected) : void {
|
||||
$this->assertEquals(escape_tags($expected), drop_query_params($url, $drop_params));
|
||||
}
|
||||
|
||||
public static function drop_query_params_provider() : array {
|
||||
return [
|
||||
// Query params with array
|
||||
['https://www.example.net/en/pro/detail/some-detail?tx_news_pi1%5Bday%5D=15&tx_news_pi1%5Bmonth%5D=3&tx_news_pi1%5Byear%5D=2026&cHash=85200a0007de8fecd4cd55199146e19c', ['zid', 'f'], 'https://www.example.net/en/pro/detail/some-detail?tx_news_pi1%5Bday%5D=15&tx_news_pi1%5Bmonth%5D=3&tx_news_pi1%5Byear%5D=2026&cHash=85200a0007de8fecd4cd55199146e19c'],
|
||||
// Query params with zid
|
||||
['https://www.example.net/channel/test?zid=test@example.net', ['zid', 'f'], 'https://www.example.net/channel/test'],
|
||||
// Query params with zid and empty f
|
||||
['https://www.example.net/channel/test?f=&zid=test@example.net', ['zid', 'f'], 'https://www.example.net/channel/test'],
|
||||
// Query params with zid and empty f encoded
|
||||
['https://www.example.net/channel/test?f=&zid=test@example.net', ['zid', 'f'], 'https://www.example.net/channel/test'],
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
12
vendor/composer/installed.php
vendored
12
vendor/composer/installed.php
vendored
@@ -1,9 +1,9 @@
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => 'zotlabs/hubzilla',
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => '2fb816139a2dbd42a9a0e29804e363d8636ec22f',
|
||||
'pretty_version' => 'dev-11.2RC',
|
||||
'version' => 'dev-11.2RC',
|
||||
'reference' => '955ee217e30e12dec86bdcd936ce10abc3ed366a',
|
||||
'type' => 'application',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -542,9 +542,9 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'zotlabs/hubzilla' => array(
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => '2fb816139a2dbd42a9a0e29804e363d8636ec22f',
|
||||
'pretty_version' => 'dev-11.2RC',
|
||||
'version' => 'dev-11.2RC',
|
||||
'reference' => '955ee217e30e12dec86bdcd936ce10abc3ed366a',
|
||||
'type' => 'application',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
|
||||
Reference in New Issue
Block a user