203 Commits

Author SHA1 Message Date
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
d88f3169c8 fix possibly duplicated terms in activity object 2026-02-13 08:22:19 +00:00
Mario
fc243196d9 store the object cache right on and remove some commented out code 2025-12-05 09:19:26 +00:00
Mario
4685568e0d item links will be replaced at the sync receiver side - use the channel url of the current site when storing. fixes issue #1932 2025-11-24 07:48:54 +00:00
Mario
4c122fd3b3 do not attempt tag delivery if not item type post - fix issue #1941 2025-11-22 19:54:58 +00:00
Mario
51c79aecac make item_normal() deal with various item types and add missing reactions modal 2025-08-07 22:36:35 +00:00
Mario
6028f0490e minor refactor to get rid of the $webpage variable (it does not cut it anymore) and use $item_type instead 2025-06-26 08:08:08 +00:00
Mario
ac5d22d514 refactor doreply() and move reply functionality to modal 2025-05-07 12:31:47 +00:00
Mario
afe31160db mod item: deprecate x() and use $_POST instead of $_REQUEST 2025-04-24 06:41:43 +00:00
Mario
481113f641 set $plink to null if not provided 2025-04-22 09:30:35 +00:00
Mario
a5a2d80c50 fix some plink for forum posts and comments 2025-04-05 15:55:58 +00:00
Mario
84d63b3b67 fix $owner_hash not set correctly when editing and some whitespace fixes 2025-02-28 20:28:49 +00:00
Mario Vavti
fc52d1b44f exclude uplinked items from those queries since they are unlikely to be the originals (sourced items from a channel at the same hub) 2025-02-11 19:14:11 +01:00
Mario
7785487d77 fix delayed post handling in cron, always set item_delayed if we select a create date 2024-12-08 22:46:21 +00:00
Mario
66d502d8e1 an attempt to fix some comments on/off anomalies 2024-12-06 19:24:14 +00:00
Mario
428ffa5e35 save a loop by ordering results by item_wall and more uuid only lookup 2024-11-28 15:34:16 +00:00
Mario
0bffe6e019 sql lookup by uuid should be sufficient by now, remove superfluous require_once() 2024-11-28 15:12:57 +00:00
Mario Vavti
4c3f3d1477 Merge branch 'dev' into containers 2024-11-10 23:38:30 +01:00
Mario
d446f171c5 Revert "Module\Item: Make $item_id an object property."
This reverts commit 2c17d0b031
2024-11-10 22:36:35 +00:00
Mario Vavti
b24b409a01 Merge branch 'dev' into containers 2024-11-10 19:01:40 +01:00
Harald Eilertsen
2c17d0b031 Module\Item: Make $item_id an object property.
This also allows us to deduplicate initialization and validation.
2024-11-10 16:43:48 +01:00
Harald Eilertsen
57e69372d3 Module\Item: Move processing of zot and as requests to functions.
These seem to be entirely independent, so moving the body of the if
statements to separate functions should be fine.
2024-11-10 16:43:48 +01:00
Mario Vavti
c9d4b068c2 remove extensiv logging to syslog 2024-11-09 12:49:10 +01:00
Mario Vavti
b6dbbbc82f fix regression propagating deletes 2024-11-09 12:39:24 +01:00
Mario Vavti
ebad9d56c9 port to containers item_store() continued 2024-11-08 22:24:33 +01:00
Mario Vavti
0481901b59 refactor drop_item[s]() for containers 2024-11-08 20:18:20 +01:00
Mario Vavti
d25314c75b Merge branch 'dev' into containers 2024-11-03 11:45:08 +01:00
Mario
160c40b580 make sure the objects published date has the correct time format 2024-10-31 11:07:42 +00:00
Mario Vavti
c2ce1d9881 containers: send add in mod like, send remove on delete 2024-10-09 22:43:01 +02:00
Mario Vavti
45c0091d3d more work on porting containers from streams 2024-10-09 18:17:37 +02:00
Mario
75184355d0 whitespace and use empty for check 2024-10-06 16:47:15 +00:00
Mario
1988d21e6c start containers 2024-10-06 15:53:39 +00:00
Mario
176298ffeb remove garbage 2024-09-18 15:09:56 +00:00
Mario
fdf19e659e not yet ready for primetime 2024-09-18 15:09:10 +00:00
Mario
39933052a9 do not run set_linkified_perms() if editing an existing post 2024-07-23 14:40:36 +00:00
Mario
4e35d34226 item buttons redesign - initial checkin 2024-07-22 19:07:19 +00:00
Mario
3f5cfc8fa2 fix return to blank page after editing post under some circumstances 2024-06-18 07:18:09 +00:00
Mario
51fe071c5e Ãfix undefined variable 2024-06-10 09:16:21 +00:00
Mario
ecdd9a4d6e revert default to activity type Article until we have a more stable solution to override it for platforms which do not support it 2024-03-23 11:19:24 +00:00
Mario
46fa26502b more work on emojis 2024-03-09 20:53:18 +00:00
Mario
0e27f010f9 start sending articles instead of notes by default 2024-03-08 08:44:16 +00:00
Mario
af839a0589 AS2 Follow/Ignore 2024-03-01 15:47:40 +00:00
Mario
3dd7394247 AS2 2024-02-25 19:29:50 +00:00
Mario
17e2877c91 make sure to decode html special chars before sending over the wire and 2024-02-21 10:44:56 +00:00
Mario
dd204ec34f start using uuid for internal reference instead of base64 encoded mid 2024-02-01 11:42:55 +00:00
Mario
af58364fef only check for privacy mismatch if observer != owner 2023-11-17 07:50:10 +00:00
Mario
eadf83d61b work around a possible privacy mismatch when processing zot requests 2023-11-16 15:57:03 +00:00
Mario
48a33f08e2 ocap initial checkin 2023-06-02 11:33:44 +00:00
Mario
8a14e4261d check for uuid so that will be also catch items that were posted from alternate locations 2023-04-23 18:44:39 +00:00
Mario
eec4845cd0 add the conversation endpoint and implement paginated fetch for zot requests in mod item 2023-04-23 09:23:39 +00:00