Commit Graph

1382 Commits

Author SHA1 Message Date
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
87f79381d9 MessageFilter: move decoding to the caller and also check the summary field 2025-12-19 08:24:22 +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
9e5344d624 fix typo in last commit 2025-11-22 19:57:28 +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
7fcc770fbf rename (un)serialise() -> json_(un)serialize() 2025-11-21 20:43:35 +00:00
Mario
7cadb43029 fix insufficient target attribution for forums - channel_url() requires the channel array not the address 2025-11-20 23:05:12 +00:00
Mario
ad017baaa6 singleton object cache - initial commit 2025-11-20 20:41:20 +00:00
Mario
c8c9e4a901 fix some of the constant not found errors 2025-10-21 16:00:06 +00:00
Mario
3cdfa94c29 announced toplevel items will have type Announce in our case - possible fix for issue #1936 2025-10-10 15:47:49 +00:00
Harald Eilertsen
b31123ae2f Fix missing return from translate_scope function
Also make sure the output is escaped wherever this function is used.
2025-09-12 21:51:24 +02:00
Mario
bc7f8b15a8 dismiss our own votes from select query. they are not flagged with item_hidden because otherwise they would not be delivered to the poll owner. received votes are (and should be) flagged with item_hidden so that they are not being relayed. 2025-08-11 23:13:26 +00:00
Mario
02111ad649 start transition deprecated AS1 item.verb vocabulary to AS2 on demand 2025-08-11 22:36:35 +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
9343f00918 improve memory consumption when deleting big threads 2025-08-07 19:05:58 +00:00
Mario
ae8e9bc353 the item_wall directive is not required here since we are looking for parent items which we own - remove it since it will make the DB engine use the wrong index in certain cases. also remove duplication of item_type directive when looking up articles 2025-07-22 09:32:20 +00:00
Mario
a55bba7aa8 fix blog mode if threaded view is disabled 2025-07-13 09:47:38 +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
aeb54655a0 exit if we have not found anything 2025-06-23 09:24:10 +00:00
Mario
767eeee6fe invert the verb query part 2025-06-13 09:42:09 +00:00
Mario
2046abf26f trick sql to use a better suited index 2025-06-13 08:05:05 +00:00
Mario
ad7871270c add EmojiReact to the countable comment verbs 2025-06-12 11:57:13 +00:00
Mario
9e87070f86 iterate only 3 levels when autoexpanding, improve color generation to get more random colors 2025-06-05 15:44:01 +00:00
Mario
f8afa77369 add internal follow and ignore verbs to the list of filtered verbs and add commented out code to display/count only one reaction per author. It appears there can be multiple. We should probably look into how this can happen and if we should prevent it earlier. 2025-06-01 18:48:16 +00:00
Mario
83c963378e remove more redundant sql (perms for the given IDs MUST be checked at the calling module already) and update documentation 2025-05-29 19:47:53 +00:00
Mario
7705d7a87f this is not required because we already filter by a given set of ids here 2025-05-29 19:31:23 +00:00
Mario
29f14ff96b only count comments if we are in threaded mode 2025-05-29 19:10:20 +00:00
Mario
0aef9b486d fix typo 2025-05-29 17:58:48 +00:00
Mario
d584e4f7d5 fix queries in certain situations returning more results than we need producing unexpected rendering results 2025-05-29 17:58:04 +00:00
Mario
3613257cdc pass permission sql to item_reaction_sql() in case we are a visitor and rename the variable 2025-05-29 14:24:53 +00:00
Mario
f61fd2d337 if we are not in threaded mode default comments limit to 1000 2025-05-29 11:55:02 +00:00
Mario
20148d23f1 toplevel comments pagination: initial commit 2025-05-29 10:13:32 +00:00
Mario
bdcee46138 do not check for possibly unset var 2025-05-28 12:53:53 +00:00
Mario
7e3d86bc37 more refactor and streamline for re-usability and easier maintenance 2025-05-28 09:15:18 +00:00
Mario
f0229c9f42 update todo 2025-05-27 09:02:52 +00:00
Mario
8d1fea7ec3 new version of items_by_parent_ids() and item_reaction_sql() with much better performance, streamline rsvp naming convention and some preparatory work for comment lazy loading (unfinshed) 2025-05-27 08:04:36 +00:00
Mario
19df2f596b revert to previous iteration of the parents query function until performance issues will be resolved and adapt the modules accordingly 2025-05-25 14:05:08 +00:00
Mario
d31221e61b use else instead of checking for $ret 2025-05-23 11:54:30 +00:00
Mario
043c1610fd refactor items_by_parent_ids() to accept $thr_parents as an array and stringify it here with the escape flag instead of in the caller modules 2025-05-23 11:35:10 +00:00
Mario
cd7fab3d37 refactor query in items_by_parent_ids() to prepare for pagination. Until pagination will be implemented we will load the last 100 comments. 2025-05-23 09:51:11 +00:00
Mario
a5e171a594 Revert "implement thread limit"
This reverts commit be35f612eb.
2025-05-21 11:11:21 +00:00
Mario
be35f612eb implement thread limit 2025-05-21 10:22:37 +00:00
Mario
6d306bc0b3 more return early if we have not got the required data 2025-05-21 09:24:48 +00:00
Mario
813a5b3621 return early if we have not got the required data 2025-05-21 09:23:23 +00:00
Mario
cf317aa1a1 revert moving thr_parent retrieval to SQL in favor of a more simple solution (fixes SQL error in postgres and strict mysql)Zotlabs/Lib/ThreadItem.php 2025-05-17 16:18:20 +00:00
Mario
43d0e42425 refactor cache_embeds daemon to be called with uuid (instead of item id) so that it will only be processed once (the queueworker will dismiss duplicates) and add a hook for the photocache addon 2025-05-16 20:22:27 +00:00
Mario
2b38eca986 refactor sql_extra > permission_sql 2025-05-15 18:56:30 +00:00
Mario
4ec895b891 make sure sql_extra is prepared for the c table 2025-05-15 18:40:03 +00:00
Mario
757237cbb4 Revert "make sure sql_extra is prepared for the c table"
This reverts commit 869b047fde.
2025-05-15 18:39:05 +00:00