1
0
Fork 0
Commit graph

2920 commits

Author SHA1 Message Date
f12cc9648e
Changes:
- added some type-hints
- changed some double-quotes to single
2022-06-25 16:48:35 +02:00
aa133b5437 Add explicit gserver.site_name string truncate in Model\GServer
- Avoids "Data too long for column 'site_name'" database errors
2022-06-25 06:25:48 -04:00
636b84b41c Update return value type-hint of GServer::getProtocol
- Address https://github.com/friendica/friendica/issues/11630#issuecomment-1164880874
2022-06-25 05:06:22 -04:00
c5b46fe748
Merge pull request #11681 from Quix0r/fixes/item-guidfromuri-allow-null
Allowing Item::getFromUri()'s 2nd parameter a null value
2022-06-24 10:15:26 -04:00
82bb36e13d
Changes:
- Made Item::guidFromUri()'s $host parameter optional (allowing null)
- added some type-hints
- added documentation
- this may fix reported issue in #11630
2022-06-24 03:17:57 +02:00
d441b90bda
Respect Forwarded-For headers 2022-06-23 22:42:35 +02:00
202857ba7d
No need to log $tid here 2022-06-23 17:30:17 +02:00
fd8f4269ff
Reformatted code 2022-06-23 17:30:17 +02:00
182c3db9b8
Changes:
- added type-hints
- added missing documentation
2022-06-23 17:30:15 +02:00
b8353a6eb7
Changes:
- reformatted some array
- added missing documentation
- added type-hints
- changed double-quotes to single
2022-06-23 17:30:14 +02:00
c6c936a80f
Added more type-hints 2022-06-23 17:30:14 +02:00
2f3705f471
Continued:
- renamed varibales to $camelCase
- added type-hints
- updated documentation
2022-06-23 17:30:11 +02:00
7eefb9aed8
Changed:
- empty() is maybe superflous here, still I would prefer a code style that is
  written explicitly and not rely on "magic casting"
2022-06-22 18:57:01 +02:00
101cd2dd10
Changes:
- added some documentation
- fixed some documentation
- changed more double-quotes to singl
2022-06-22 16:14:14 +02:00
ee8d0ad619
Changes:
- added more type-hints
- added some documentation
2022-06-22 14:36:47 +02:00
4650ff53d9
Merge pull request #11662 from MrPetovan/bug/11661-splitattachment-null
Ensure parameter 4 of Post\Media::splitAttachment is a boolean value
2022-06-21 06:48:52 +02:00
752953e472
Changes:
- as @MrPetovan pointed out, $actor can be NULL earlier and used later as NULL
- added some missing type-hints
- added missing documentation
- the added @TODO points out to avoid true|false|null for a boolean
2022-06-20 21:00:19 +02:00
88eacbf66e Ensure parameter 4 of Post\Media::splitAttachment is a boolean value 2022-06-20 14:34:02 -04:00
4fb03cf163
Changes:
- fixed a null value handled over to Friendica\Model\APContact::getByURL()
- added missing type-hints
2022-06-20 19:05:02 +02:00
e96a548286
Changes:
- dumped default value for $input
- added unknown 'platform' which prevents an "Undefined index: platform in
  /var/www/.../src/Model/GServer.php on line 940" error
2022-06-20 18:56:22 +02:00
c0d7f8944d
Some calls saved 2022-06-19 11:26:10 +02:00
2c5685c89c
Changes:
- changed to proper "use Foo\Bar;"
- added doctag
- added return type as this is fixed
2022-06-19 01:11:30 +02:00
39f2d197ea
Changed to suggestings (back to original) + fixed typo in scalar type 2022-06-18 23:30:37 +02:00
6f1d52cf71
Changed back to suggestions by @MrPetovan 2022-06-18 23:24:08 +02:00
fa14a02a19
Changes:
- added type-hints
- added documentation
- changed double-quotes to single
2022-06-18 23:12:52 +02:00
f3b57008b5
Proper type is string 2022-06-18 18:41:16 +02:00
41f34c4261
Maybe fix for:
"Argument 1 passed to Friendica\Model\ItemURI::getIdByURI() must be of the type string, null given, called in Processor.php line 1219"
2022-06-18 18:30:50 +02:00
9691bb06fb
Changes:
- added more type-hints
- added missing documentation
2022-06-18 18:21:29 +02:00
94eb426151
Nodeinfo::getOrganization() doesn't need configuration object being inserted
when you have DI::config() around.
2022-06-18 17:56:33 +02:00
c29c49797a
Added missing type-hints 2022-06-18 17:52:46 +02:00
4e437190c5
Renamed variable, no need for "orig_" prefix 2022-06-18 17:50:11 +02:00
a1a81cdc6b
Continued:
- changed some double-quotes to single
- added missing type-hints
- added missing documentation
- fixed indenting a bit
2022-06-18 17:46:34 +02:00
8fc710f82a
Continued:
- added more type-hints
- added some missing documentation
- Return the result from DBA::delete() to let other methods know about it
2022-06-18 17:22:50 +02:00
8ba3f13fae
Changes:
- added more type-hints
- added missing documentation
2022-06-18 17:09:46 +02:00
7ec07178c8
Changes:
- added missing type-hints
- added missing documentation
2022-06-18 16:59:23 +02:00
adb4aea6ad
Changes:
- added some type-hints
- replaced most double-quotes (only Diaspora.php, later more) with single
- added some documentation
- normalized indenting in Diaspora.php (I hope I got all?)
2022-06-18 05:03:10 +02:00
36d56a4041 Continued:
- changed back to 'return false;' as other methods heavily rely on false instead
  of an empty array as pointed out by @heluecht@pirati.ca
- $fetched_contact should be initialized as an empty array, let's not make this
  code more crazier than it already is (see APContact::getByURL())
2022-06-17 17:18:31 +02:00
c467bff79f Some more type-hints added 2022-06-17 17:18:31 +02:00
4f3321cc9f Nore fixes 2022-06-17 17:18:31 +02:00
10bb7d5625 Possible fix for
Uncaught Exception TypeError: "Return value of
Friendica\Model\APContact::getByURL() must be of the type array, bool returned"
2022-06-17 17:18:31 +02:00
fdd237a090 Fix for "Uncaught Exception TypeError: "Argument 1 passed to
Friendica\Model\APContact::unarchiveInbox() must be of the type string, null
given" error message
2022-06-17 17:18:31 +02:00
605e7d55b3 Continued:
- added more type-hints
- some methods in Diaspora returned void but integer was documented so I
  changed it to -1 to have a proper type-hint
2022-06-17 17:18:31 +02:00
227bab43a8 Ops, wrong type-hint here, must be string ($nickname can never be an integer). 2022-06-17 17:18:31 +02:00
e484b6d6dc Continued:
- added more type-hints
- added some documentation
- Contact::getAccountType() should only process string, not null
2022-06-17 17:18:31 +02:00
45b5f67bca Fix for non-existing record system.mobile_theme in config table 2022-06-17 17:18:31 +02:00
33768ea1c6 Some fixes:
- $gsid's default value cannot sadly be 0, it now must be null to allow some
  code work
- added some more type-hints
- documented a bit more
2022-06-17 17:18:31 +02:00
7560dccc08 Added again more type-hints 2022-06-17 17:18:31 +02:00
40d7f29a11 Continued:
- more type-hints
- fixed incompatible method declarations
2022-06-17 17:18:31 +02:00
c2e889cfae Added more type-hints 2022-06-17 17:18:31 +02:00
0e1f734b03
Also make this null-coalscing 2022-06-16 17:35:01 +02:00
f2b7326650
This will 2 things:
1) The first change prevents "expensive" code in HTML::toBBcode() to be executed
   just for an empty string which makes no sense.
2) The above change was maybe flawed as $apcontact['about'] would have never
   been created, not even empty which could have side effects

Thanks to @annando to make me rethink this part of code.
2022-06-16 16:54:50 +02:00
b1e4c0931a
Fixes and type-hints:
- added more checked type-hints as they prevent bad method invocations
- fixed TypeError for HTML::toBBCode() invocations with NULL as first (wrong)
  argument, thanks to @tobias@social.diekershoff.de pointing this out.
2022-06-16 16:54:49 +02:00
5fa954208a
Changes:
- ops, wasn't actually fixing `return;` to proper `return '';`
- added more type-hints
- added TODO ($uid is unused)
2022-06-15 22:28:33 +02:00
a3fa95e8e4
Changes:
- added more type-hints
- changed `return;` to `return '';` when `string` was requested as returned type-hint
  (thanks to @MrPetovan)
2022-06-15 22:05:38 +02:00
34aee64349
Added more type-hints
Signed-off-by: Roland Häder <roland@mxchange.org>
2022-06-15 21:52:51 +02:00
143e4c4a18
Added more known type-hints
Signed-off-by: Roland Häder <roland@mxchange.org>
2022-06-15 21:52:50 +02:00
b816ae4db5 Some more default avatars 2022-06-13 20:07:54 +00:00
70b9a8114d Improve license comment 2022-06-13 10:30:21 +00:00
d9fb081db9 Using separate avatars for different peertube account types 2022-06-13 10:27:46 +00:00
c1a64b77c0 Improved license text 2022-06-13 10:03:34 +00:00
e0a0c57c44 Use platform specific default avatar pictures 2022-06-13 05:18:54 +00:00
57b8708425 Issue 11566: More detailled notification configuration 2022-06-05 11:41:08 +00:00
4108704ee3 Fix: Only public posts can be pinned 2022-06-04 06:11:32 +00:00
7f711e266f Assume unsettable system.always_my_theme pconfig value is always true
- This was a logged in user setting so it assumes false for anonymous users
2022-05-29 16:13:49 -04:00
220703575c
Merge pull request #11577 from annando/issue-11557
Issue 11557: Update all local contacts
2022-05-29 15:53:21 -04:00
540b3f892b Issue 11557: Update all local contacts 2022-05-29 17:48:09 +00:00
42d3e5c1ce Issue 11488: Don't search for mentions in shared posts 2022-05-29 16:07:53 +00:00
1dccc31508 Issue 11469: Repect desktop notification settings 2022-05-29 09:20:06 +00:00
4ef7f42257 Issue 11470: Check for removed account 2022-05-28 16:21:41 +00:00
0a43fe857c Pass the "force" parameter to the avatar update 2022-05-27 05:36:07 +00:00
488fdd9791
Merge pull request #11558 from annando/public-contact
Ensure that the public contact exists before adding a user contact
2022-05-25 09:06:13 -04:00
918c1eeb56 Check for phantom network 2022-05-25 11:46:58 +00:00
f5d69b3b6a Ensure that the public contact exixts before adding a user contact 2022-05-25 11:43:29 +00:00
0ff8ca8053 Trim the rid 2022-05-24 17:39:02 +00:00
49dab14215 Only use proxied image links with images 2022-05-21 06:58:26 +00:00
49c47008d1 Convert class calls into DI calls 2022-05-19 09:08:04 +00:00
b18880221a
Merge pull request #11531 from annando/display-polls
Improved poll texts for different conditions
2022-05-18 08:16:41 +02:00
0b50dc363b Caching of "noscrape" 2022-05-17 15:39:04 +00:00
c3fd8b39aa Caching for profiles removed 2022-05-17 12:53:31 +00:00
4e3e9dc763 Cache the profile as well 2022-05-17 12:46:55 +00:00
75534fa3f3 Fix warning " Trying to access array offset on value of type bool" 2022-05-17 12:38:39 +00:00
73019284ce Increase cache lifespan / clear cache upon changes 2022-05-17 12:32:25 +00:00
10cdefa232 Fix: Fetch media in shared posts 2022-05-17 07:58:41 +00:00
4daae255d8 Performance: Avoid queries where there is no media or category 2022-05-16 17:06:58 +00:00
62a1cf257e Improved poll texts for different conditions 2022-05-16 06:04:46 +00:00
2dc9b4eda2 Vote text changed 2022-05-16 05:31:53 +00:00
a63caefe3d Polls are now displayed 2022-05-16 04:55:15 +00:00
4829c240e9
Merge pull request #11516 from annando/issue-11472
Issue 11472: Store the "edit" history
2022-05-15 20:24:59 -04:00
2c511b8a23 Check the edit date before storing history 2022-05-15 21:15:31 +00:00
440b6d7956 Issue 11504: Abstract has to be plaintext 2022-05-15 21:04:01 +00:00
d77b043d9c Fixing tests 2022-05-15 20:26:14 +00:00
324cce7a19 Issue 11472: Store the "edit" history 2022-05-15 20:21:56 +00:00
30b9af10ac Fetch featured posts through a worker 2022-05-15 09:08:35 +00:00
a8839517fe Fix workerqueue entries with wrong priority 2022-05-14 06:36:43 +00:00
fab5ba39ff Failed post deliveries are now deleted via cron 2022-05-13 18:48:13 +00:00
a662245c74 We now store the receivers as well 2022-05-13 05:52:05 +00:00
b0b67f1fde Remove failing posts 2022-05-12 12:43:49 +00:00
a943dbb420 Introducing the "failed" counter 2022-05-12 06:54:58 +00:00
3d7ecb4fde Don't update the local avatar 2022-05-11 18:30:59 +00:00
47ee6fd009 Fix a warning because of an undefined array key 2022-05-11 16:01:37 +00:00
fae414fedd Fix local avatar, improve speed for fetching cached photos 2022-05-10 18:18:24 +00:00
7c3173a0ae Avoid endless loop when storing posts 2022-05-10 06:07:26 +00:00
006b7a95f0 More avatar handling isolation 2022-05-09 06:57:47 +00:00
53d064c283 Avatar handling is moved to a separate class 2022-05-09 06:27:46 +00:00
e3692c0105 Replaced check with hardwired path 2022-05-09 04:26:00 +00:00
f220e26f00 Use new function to check for a local avatar cache file 2022-05-08 10:32:29 +00:00
805dc8e6bd Fix config call 2022-05-08 09:34:30 +00:00
dd422a1e03 Fix contact field name 2022-05-08 08:57:41 +00:00
7b0187c4c5 Don't overwrite already replaced cache file paths 2022-05-08 08:53:18 +00:00
2d856f48b7 Use the default timeout 2022-05-08 05:51:18 +00:00
a31256412e Cache contact avatars locally as files 2022-05-08 05:37:17 +00:00
67c3a20c4f Issue 11440: Hashtags are now generated again 2022-05-06 17:03:51 +00:00
4d359b7de1 Move the plink functionality to the right function 2022-05-05 07:57:52 +00:00
10b453bfc2 Deprecated function removed 2022-05-04 07:49:37 +00:00
60532ee7e4 Fill the item cache when storing item 2022-05-04 06:17:34 +00:00
f6218427a4 Use the uri-id to fetch the contact 2022-05-03 21:51:56 +00:00
40aa67f8be Bulk transmission for AP posts 2022-05-02 05:15:27 +00:00
19c1b31ab2 Only add valid values to the worker 2022-05-01 07:03:10 +00:00
1f43332a1d Only fetch category when it exists 2022-04-30 06:57:22 +00:00
a2452b33eb Add missing fields to collection 2022-04-29 10:13:23 +00:00
d3de2497bc Use gsid for the network name 2022-04-29 07:47:24 +00:00
d44641e58c Fetch avatar by id 2022-04-29 07:30:13 +00:00
144c9f00f4 Fix: Show reshared posts on the contact page 2022-04-27 03:25:47 +00:00
171354181d Use central function to fetch the global directory 2022-04-26 18:33:58 +00:00
83e311decb Standards 2022-04-25 13:49:17 +00:00
990eea2c4e We now store uncommon endpoints 2022-04-25 13:45:03 +00:00
069a008ca4 Removed unused tag entries 2022-04-24 15:27:20 +00:00
4af6e730d3 Use different collections 2022-04-23 12:32:29 +00:00
0a3c5cc40c Add the function documentation 2022-04-23 11:43:30 +00:00
060597f619 Store the tag type for the post targets 2022-04-23 11:39:19 +00:00
9b646dad97 API: We can now display polls 2022-04-22 19:24:22 +00:00
8d25094719 Fix test 2022-04-20 06:33:14 +00:00
834844573b We can now store incoming questions 2022-04-20 06:28:02 +00:00
0380a3e216 Fix: The language detection only searched for farsi 2022-04-19 06:16:44 +00:00
0d8cf06e4a Experimental feature to enter a custom creation date 2022-04-13 05:31:32 +00:00
30e5ef928a Avoid wrong server type detection / Owncast added 2022-04-12 05:34:34 +00:00
62367923e0 Fix several notices 2022-04-11 18:57:30 +00:00
3842f02b02
Merge pull request #11402 from annando/featured-endpoint
We now offer an endpoint for featured posts
2022-04-11 11:17:56 -04:00
d7df0825db We now offer an endpoint for featured posts 2022-04-08 21:25:31 +00:00
4eecf733e1
Merge pull request #11389 from nupplaphil/feat/http_client_arg
Introduce explicit HttpClient "Accept" parameter
2022-04-08 15:05:40 -04:00
3033f79529
head fixings 2022-04-08 20:48:57 +02:00
8e2cc678dc
head fixings 2022-04-08 20:41:25 +02:00
Michael Vogel
b2b8b23ed6
Update src/Model/Contact.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2022-04-08 13:59:43 +02:00
69b7923df2 Use centralized function to fetch query results 2022-04-08 06:04:50 +00:00
6c8ea1d0d8 Updated messages.po / type added to query 2022-04-08 04:17:52 +00:00
75bc4eccb7 Display featured posts for contacts 2022-04-07 21:52:25 +00:00
65071ffc9e Issue 11393: Fix failing preview 2022-04-06 16:26:51 +00:00
5a3fe900f0 Fix test 2022-04-06 15:32:14 +00:00
a1dd299eb3 Preparations for "featured" posts 2022-04-06 13:34:11 +00:00
c0b3c527d6 Added processing of incoming block notices 2022-04-05 19:14:29 +00:00
61abc6377d Preparation for "Featured" collection added 2022-04-04 23:07:44 +00:00
04866195b4
Remove accept parameter for head/post again 2022-04-03 19:33:09 +02:00
029daef997 Only use and accept valid http links as links to an external resource 2022-04-03 07:21:36 +00:00
e299fc67c8
Introduce "accept_header" as specific argument to the http client 2022-04-02 21:16:53 +02:00
73c3b21665
Move ACCEPT constants to own "enum" class 2022-04-02 20:26:11 +02:00
2ca51f752d Use appropriate "accept" values 2022-03-30 14:39:53 +00:00
28e3eee91b Add "Accept" to "head" 2022-03-29 13:34:54 +00:00
1fae0123ec Some more "accept" parameters are added 2022-03-29 06:24:20 +00:00
ff70f74952 "accept" constants introduced and used 2022-03-28 10:33:06 +00:00
91905bea89 Don't create empty announce notifications 2022-03-19 17:53:41 +00:00
0aa229489f Improved function description 2022-03-18 07:24:45 -04:00
040abc7743 Use a nicer GUID style format 2022-03-18 07:24:44 -04:00
7b9e62198e Suppress a couple MemcachedException
- Replace URL by uri-id in apcontact
- Replace date with a space and nurl by nick and Zulu time in mod/poco
2022-03-15 10:54:00 -04:00
e6f745bcb1 Delete follow notification on unfollow
- Fix translation string typo
2022-03-14 07:58:39 -04:00
deafdcde95 Use public contact ID in Model\Post\UserNotification::insertNotification
- Add localRelationship dependency to Notification factory
- Remove dependencies from Factory\Notification->getMessageFromNotification method
2022-03-14 07:56:20 -04:00
12d7c99f46 Don't send notifications for activities caused by the community contact 2022-03-13 05:44:29 +00:00
073a6afaaf Reduce amount of notifications by communities 2022-03-12 04:20:19 +00:00
5eb647585d Issue 11315: Fix for all receivers in "to" 2022-03-11 20:39:03 +00:00
2f97d61a09 Estimate active server users when not provided by the system 2022-03-10 21:50:00 +00:00
903bc9b679 Improved support for Mastodon style content warnings 2022-03-06 11:49:55 +00:00
cddead2343 Move follow revoke protocol to worker task
- Switch to public contact for revoke_follow hook
2022-02-24 09:35:55 -05:00
6a1f9a7fa3 Move unfollow protocol to worker task
- Add uid parameter to unfollow hook
- Rework and unify Contact::unfollow, Contact::removeSharer and Contact::terminateFriendship
- Add missing twitterUser property to Twitter\Friendships\Destroy module
2022-02-24 09:35:54 -05:00
52f5d924b7 Replace remaining instances of DBA::update('contact') with Contact::update()
- This was breaking the synchronisation between the contact and user-contact tables
2022-02-24 09:35:54 -05:00
1d779c6193 Ensure the private message recipient is valid in Mail::send
- Arbitrary input could be used to circumvent most restrictions regarding recipients (except contact relationship)
2022-02-23 21:30:18 -05:00
c86cc83524
Merge pull request #11260 from mkljczk/develop
API: add list members editing
2022-02-20 09:45:25 -05:00
marcin mikołajczak
0209892631 Apply suggestions
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-20 14:10:57 +01:00
311c1fdd81 Avoid warning and notice 2022-02-20 05:14:36 +00:00
marcin mikołajczak
9c6f6bcb95 API: add list members editing
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-19 23:22:54 +01:00
c867581530 Store the receivers of a post in the tags 2022-02-19 13:31:49 +00:00
c03ff7833b
Merge pull request #11253 from annando/forum3
More rework to make private communities working
2022-02-18 12:19:57 -05:00
4c7d3a6371
Merge pull request #11255 from MrPetovan/task/11245-thread-completion-like
Relax comparison with pconfig system.accept_only_sharer value
2022-02-18 17:09:42 +01:00
c376081d0d Relax comparison with pconfig system.accept_only_sharer value
- DI::pConfig()->get returns a string value, not an integer
- Removed superfluous default values now that we aren't doing strict type checking
2022-02-18 09:32:30 -05:00
39724d5079 Add the mentions 2022-02-18 09:12:33 +00:00
ebb4c0f947 tests 2022-02-18 06:12:02 +00:00
0ce756596e Tests again 2022-02-18 05:56:17 +00:00
830a91e586 Avoid failed test 2022-02-18 05:34:18 +00:00
7a5a8c8d68 Improve look of reshared items on the forum profile 2022-02-17 23:06:57 +00:00
49dd97e5fd User lower case 2022-02-17 21:51:47 +00:00
234dac49b4 Rrepeat comments as well 2022-02-17 21:44:59 +00:00
1b6b6bcc6d Renamed function 2022-02-17 07:53:24 +00:00
51fb265621 Merge remote-tracking branch 'upstream/develop' into forum3 2022-02-17 07:11:50 +00:00
Michael Vogel
618dda7dd2
Merge pull request #11246 from MrPetovan/task/11245-thread-completion-like
Expand system.accept_only_sharer pconfig value to include previous behavior with likes
2022-02-17 08:02:19 +01:00
9ac24a0f36 More rework to make private communities working 2022-02-16 22:56:55 +00:00
33edfc6a5f Fix for private communities 2022-02-15 23:51:13 +00:00
99979019bf Expand system.accept_only_sharer pconfig value to include previous behavior with likes 2022-02-15 15:54:36 -05:00
361fdccdc7
Merge pull request #11242 from annando/private-forums
Private forums are now working via AP
2022-02-15 12:06:34 -05:00
d019ef57d2 Database version increased, code simplified 2022-02-15 15:44:44 +00:00
9ae0234bb5 Use expected order for post medias
- This fixes the wrong display order of post pictures
2022-02-15 09:53:24 -05:00
29d83c0ffb Block communication with Diaspora for communities 2022-02-15 07:08:02 +00:00
2b0518ac04 unset several table fields before distribution 2022-02-15 06:21:46 +00:00