9150 Commits

Author SHA1 Message Date
Mario
3ee82b5ccc make sure we have all the necessary parts to calculate lat/lon before attempting (there might be issues in getGps() otherwise) - fix issue #1986 2026-06-18 08:47:10 +00:00
Harald Eilertsen
bb303ebc4c Some cleanup in Hook API's and tests
Clean up duplicated code in include/plugin.php and Zotlabs\Extend\Hook,
making the former just wrappers calling the latter. Also removed the
unnecessary serialization of arrays in Hook::insert, and cleaned up and
expaned the tests a bit.
2026-06-12 21:19:59 +02:00
Mario
3952aba824 Merge branch 'apidocs-head_add_css' into 'dev'
Improve API docs and naming in head_add_css()

See merge request hubzilla/core!2290
2026-06-05 19:24:59 +00:00
Harald Eilertsen
f1bd35b555 Improve API docs and naming in head_add_css() 2026-05-26 21:15:32 +02:00
Harald Eilertsen
6f65d2d6ef Make array_find available for PHP < 8.4
array_find is a useful function, but only available in PHP 8.4 or later.
Here we implement it ourselves if it's not already defined, to make it
available for all supported PHP versions.
2026-05-16 09:32:26 +02:00
Harald Eilertsen
965e643c71 tests: Tests for opengraph meta tags
Also fixed a minor whitespace issue in include/opengraph.php, and added
braces so the logic is clearer.
2026-05-02 23:19:18 +02:00
Mario
3d29c498e9 move unparse_url() to Url class, also move tests 2026-04-29 14:16:15 +00:00
Mario
fa7c8e93f1 merge dev 2026-04-28 12:54:40 +02:00
Mario
fd6b252b36 refactor zid() and add tests 2026-04-28 12:50:38 +02:00
Harald Eilertsen
de9e2c27ea Drop cleaning empty f query param from links 2026-04-27 12:40:45 +02:00
Harald Eilertsen
a574c79f9e Clean up detection of naked URL's in posts
Fix detecting naked IPv6 URL's in posts, and clean up a bit how we deal
with zid parameters. Also drops the `nakedoembed` function which no
longer had anything to do with oembed handling. This also means we no
longer need to scan the body twice for the same regex.
2026-04-26 16:22:18 +02:00
Harald Eilertsen
7fc1d58b10 Remove bookmark prefix from naked URLs
See discussion here:
https://hubzilla.org/channel/adminsforum?mid=00a360a1-6281-52aa-b4de-65493b8899f5
2026-04-22 13:22:32 +02:00
Mario
782765e377 move mention- and hashtag symbols inside the anchor tag 2026-04-15 07:37:15 +00:00
Harald Eilertsen
7f98cd606b Remove custom CA certs
The included collection of CA certificates has not been updated since
2021, which means it's outdated and possibly a security risk. Also it
should not be necessary, as curl is able to find the system installed CA
certs which is more likely to be up to date and safer.
2026-03-25 18:06:39 +01:00
Mario Vavti
51ac502d97 refactor drop_query_params() to deal with array params and add test 2026-03-16 10:32:59 +01:00
Harald Eilertsen
ced3113516 Remove unneccessary use statements 2026-03-07 12:00:56 +01:00
Harald Eilertsen
cbd208eea3 Remove use of NULL_DATE constant in core
The NULL_DATE constant is defined conditionally in the DBA static class.
This causes issues with static analyzing tools like PHPStan, because
they can not really know if the constant is defined or not.

We could make PHPStan ignore this, but since there already is a
`get_null_date()` method on the `dba_driver` class, this patch
changes the code to use this method instead.

We could also use the public static attribute `$null_date` on the DBA
class directly, but using a method feels cleaner, and allows for making
the attribute private, or even removing it completely at some later
time.

I'm not removing the NULL_DATE constant for now, in case it is in use by
any extensions.
2026-03-07 11:15:46 +01:00
Mario Vavti
86d58065b3 deal with leading or missing @ and add more tests 2026-03-04 10:25:32 +01:00
Mario
4474fdd4f9 introduce parse_webbie() with basic tests 2026-03-04 08:34:45 +00:00
Mario
b3526415f9 allow to override curl useragent 2026-03-03 10:59:11 +00:00
Mario
dc03263bef Merge branch 'system-status-activity-widget' into 'dev'
Add system status activity widget to HQ for admins

See merge request hubzilla/core!2266
2026-03-01 18:42:54 +00:00
Harald Eilertsen
738797467d Turn dba_driver params into attributes
To allow for inspecting the params used to connect to the database, we
now save the params in the dba_driver object instance as readonly
attributes. An exception is made to the $pass parameter which is set to
protected access, to make it slightly harder to accidentally leak it.

Project......: Performance Profiling
Sponsored-by.: NLnet NGI0 Commons Fund
2026-02-23 21:20:52 +01:00
Mario
b6bec6f7b7 reverse logic 2026-02-14 10:29:14 +00:00
Mario
31b5cfe7ef if the event timezone is different from the channel timezone, display the timezone we have adjusted to instead of the actual event timezone. Otherwise we might create UX confusion about if the displayed time is already timezone adjusted or not. 2026-02-13 08:50:25 +00:00
Mario
4c0b37db66 fix required $x variable overwritten with attach_mkdirp() data on update 2026-02-12 18:18:00 +00:00
Mario Vavti
cb7dc2059a Remove capability to update xchan entries via api. If this functionality is required it should be implemented over a channel endpoint where xchan and channel info would be updated after verification. 2026-01-30 13:34:54 +01:00
Mario
5cb4db0353 Merge branch 'dev-send_reg_approval' into 'dev'
(Re?)enable email to user after account approval

See merge request hubzilla/core!2263
2026-01-29 10:45:25 +00:00
ltning
268fccdb30 Fix SQL in send_reg_confirmation_email_from_register 2026-01-28 20:06:59 +00:00
ltning
bb7689be93 Return boolean instead of nonexistent array 2026-01-28 02:51:58 +00:00
ltning
bd63af69b2 (Re?)enable email to user after account approval
Existing function account_allow() does not seem to be used a whole
lot, and certainly not when approving a registration request.

Created new function send_reg_confirmation_email_from_register
(going for longest-function-name-in-Hubzilla) which attempts to
send such a confirmation email, and also a new email template.

Plugged this into the create_account_from_register function.

Open question: Should the sending of this email be among the success
criteria for the create_account_from_register function?
2026-01-28 02:51:46 +00:00
ltning
e5d4358d61 Clean up send_reg_approval_email_from_register, new email template
Since there is no easy way to produce direct links to approve/reject
registrations, create new email template which simply links to the
Accounts admin page.

In response to comments:
 - Add type annotations
 - Simplify some 'if' statements
 - add and fix some whitespace
 - simplify input arguments to the function
2026-01-27 16:32:16 +00:00
ltning
fe4d6229a4 Add new send_reg_approval_email_from_register function
Current send_reg_approval_email function expects account to already
exist, and does not seem to be called anywhere. New function takes
necessary information from the register table.

Added call to new function in Regate.php after verification is
done. Will fail and roll back if the function call fails or if no
admin accounts were found to notify (delivered<1).
2026-01-27 16:32:16 +00:00
Mario Vavti
9019636449 update attach.filetype field length to match photo.mimetype field length and attempt to find mimetype with finfo class if applicable. 2026-01-05 15:34:42 +01:00
Mario Vavti
7675ed0145 add (not exactly correct -> see fixme) mime types for docx and xlsx 2026-01-05 12:14:01 +01:00
Mario
f25211d7ff Merge branch 'xchan-fetch-escape-args' into 'dev'
Escape args in xchan_fetch

See merge request hubzilla/core!2252
2026-01-04 19:53:51 +00:00
Mario
1323ea8e18 Merge branch 'dev' into 'dev'
move shared post formatting to its own tpl

See merge request hubzilla/core!2248
2026-01-04 19:36:06 +00:00
Saiwal K
9f98f6bbd5 move shared post formatting to its own tpl 2026-01-04 19:36:06 +00:00
Harald Eilertsen
cedc6c4230 Escape args in xchan_fetch 2026-01-04 14:55:03 +01:00
Mario Vavti
e295765bef fix typo and wrongedited timestamp. also add data-{id, type} to cloud directory listings 2026-01-02 15:31:54 +01:00
Mario
87f79381d9 MessageFilter: move decoding to the caller and also check the summary field 2025-12-19 08:24:22 +00:00
Mario
28746891c8 curl_close() is deprected and noop since PHP version 8.0 2025-12-16 11:47:10 +00:00
Mario Vavti
48dbba2f4d implement new version of MessageFilter derived from forte and add some more tests 2025-12-12 12:42:01 +01:00
Mario
bb49a51be3 feed: fix channel links and check for top=0. also filter out Add and Remove activities when building the feed (we should probably do this in fetch_items() but that will require some refactoring 2025-12-09 12:05:19 +00:00
Mario
be5c8aa2a3 more work on determining whether an event should be adjusted is an all-day event 2025-12-09 08:24:53 +00:00
Mario
643d25b34b simplify and be slightly more strict to define allday events 2025-12-05 22:38:20 +00:00
Mario Vavti
c29d79854e Merge branch 'dev' of https://framagit.org/hubzilla/core into dev 2025-12-05 22:24:33 +01:00
Mario
2834544451 an attempt to better deal with events that have no endTime and events that inline timezone offset in the timestamp 2025-12-05 21:16:30 +00:00
Mario Vavti
60eb8aa42b provide the event hash and timezone in the event object 2025-12-05 22:04:52 +01:00
Harald Eilertsen
94e5aa172c Update API docs for hooks 2025-11-29 22:52:30 +01:00
Mario
9e5344d624 fix typo in last commit 2025-11-22 19:57:28 +00:00