Commit Graph

18566 Commits

Author SHA1 Message Date
Alexei Sorokin
4e02cb437a [API] Fix /api/statuses/update reporting a failure 2021-07-16 19:44:41 +01:00
Alexei Sorokin
9efbef720d Avoid use of assignments bare inside statements
Either use them in a subroutine call or put parentheses around the assignment.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
7c2cf605f4 [Profile] Extend the allowed length of nicknames to 191 characters 2021-07-16 19:44:41 +01:00
Alexei Sorokin
7fa4d56f05 Implement a class for automatic temporary file handling
And adopt it all over the code.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
590891139f [Memcached_DataObject] Change how multiGet achieves an ordered result
The previous approach sent the key values twice, which for large sets is
twice as bad.

As an optional feature of this approach multiGet now allows retrieving tuples
in exact order and amount of the requested key values.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
b2e009bcd3 [DirectMessage] Simplify the inbox query 2021-07-16 19:44:41 +01:00
Alexei Sorokin
6cb3a0c390 [ActivityPub] Check if a Notice is public via CC as well 2021-07-16 19:44:41 +01:00
Diogo Cordeiro
238652b15d [ActivityPub] Fix note URIs 2021-07-16 19:44:41 +01:00
Diogo Cordeiro
c3cdde0873 [ActivityPub] Tombstones now have datetimes 2021-07-16 19:44:41 +01:00
Diogo Cordeiro
cb78573f59 [TheFreeNetwork] Fix invalid index on lookup 2021-07-16 19:44:41 +01:00
Diogo Cordeiro
82f1fc7ca2 [ActivityPub] Implement Failed Queue 2021-07-16 19:44:41 +01:00
Diogo Cordeiro
751b23f6fe [ActivityPub] Fix DELETE 2021-07-16 19:44:41 +01:00
Diogo Cordeiro
af0366ed58 [ActivityPub] Fix issues concerning Activity URIs
And some other minor bugs.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
d71eea1ba4 [DATABASE] Fix use of ORDER BY with DISTINCT
statuses/retweets_of_me has performance fixed, so it is also stripped of its
"bad query" status.
2021-07-16 19:44:41 +01:00
Diogo Cordeiro
300c4e3d04 [ActivityPub] Revert moving Disfavor to Queues
It seems this kind of notice isn't queued?
2021-07-16 19:44:41 +01:00
Diogo Cordeiro
5f35d9633d [ActivityPub][Queues] Fix Like 2021-07-16 19:44:41 +01:00
Diogo Cordeiro
c834d27dd6 [TheFreeNetwork] Do not allow lower priority protocols to handle remote actors already handled by the higher ones 2021-07-16 19:44:41 +01:00
Alexei Sorokin
a0a37352c8 [Directory] Fix SQL string quotation 2021-07-16 19:44:41 +01:00
Alexei Sorokin
6e5217dc3a [Foreign_link] Change the type of "credentials" to blob
TwitterOAuthClient::packToken uses \0 as a delimeter which can cause issues on
TEXT or VARCHAR.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
912a0cb16c [OpenID] Correct table definition types
"server_url" should not be blob.
Lengths are adjusted to Auth/OpenID/(PostgreSQL|MySQL)Store.php.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
3b514abd6b [Queue_item] Let DataObject construct WHERE IN 2021-07-16 19:44:41 +01:00
Alexei Sorokin
8290b137fa [TwitterBridge][DAEMONS] Fix database connection clean-up 2021-07-16 19:44:40 +01:00
Alexei Sorokin
681aa5b326 [NOTICES] Condition pushdown in the subquery in inboxnoticestream
This improves performance on PostgreSQL.
2021-07-16 19:44:40 +01:00
Alexei Sorokin
47c9bea46f [DATABASE][PostgreSQL] Ignore index prefix length 2021-07-16 19:44:40 +01:00
Alexei Sorokin
2d8f320586 [PostgreSQL] Set timezone to UTC
And remove some redundant neighbouring cruft:
utf8mb4 is already set in mysqlschema more than enough times.
2021-07-16 19:44:40 +01:00
Alexei Sorokin
1f3edd8fdf Rename the mysql_foreign_keys option to foreign_keys
And apply it universally.
2021-07-16 19:44:40 +01:00
Alexei Sorokin
ed68659ece [SESSION] Session ID can be as long as 128 characters 2021-07-16 19:44:40 +01:00
Alexei Sorokin
ddc3371b43 [NOTICE] Store "url" as TEXT and not VARCHAR(191) 2021-07-16 19:44:40 +01:00
Alexei Sorokin
3075cffcd7 [DATABASE] Change collation handling
Before now table definitions could define collations only for MariaDB using the
MariaDB's collation names directly.
Now instead definitions get a slightly more abstract collation name syntax, but
only supporting the collations utf8mb4_bin and utf8mb4_unicode_(cs|ci) (wrapped
as utf8_bin, utf8_general_(cs|ci)), because those are the ones that have
practical use for GNU social.

Which also means that on MariaDB the formerly used utf8mb4_general_(cs|ci) have
been superseded by utf8mb4_unicode_(cs|ci), as they are the more modern
replacement.

Introduce collation support on PostgreSQL which results in use of the C (POSIX)
collation as utf8_bin and the und-x-icu collation as utf8_general_cs.
utf8_general_ci is also mapped to und-x-icu, which makes it case-sensitive,
unfortunately.
2021-07-16 19:44:40 +01:00
Alexei Sorokin
86826a1a68 [SEARCH][PostgreSQL] Make LIKE search case-insensitive 2021-07-16 19:44:40 +01:00
Alexei Sorokin
598e8e4d56 [TwitterBridge] Create Foreign_user before Foreign_link
To keep foreign key constraints intact.
2021-07-16 19:44:40 +01:00
Alexei Sorokin
c11629035b [SEARCH][MariaDB] Change user-facing fulltext search syntax
Now analogous to the simple and safe PostgreSQL's websearch_to_tsquery syntax.
MariaDB's full-text boolean search queries will fail on input such as "@user"
(unquoted) which is particularly noticeable to the user.
2021-07-16 19:44:40 +01:00
Alexei Sorokin
2d6e4e3912 [SEARCH] Exclude message scope 2021-07-16 19:44:40 +01:00
tenma
b7cf60c7b4 [FFmpeg] Add FFmpeg plugin
FFmpeg plugin serves as a better performant/quality alternative to
resize animated GIFs than the ImageMagick plugin.
2021-07-16 19:44:40 +01:00
tenma
4a50579ef1 [MEDIA] Add WebP support
WebP format is now the default image format for anything that
is not an animated GIF. Image Intervention doesn't support
animated WebPs so we don't convert animated GIFs.

ImageFile:
MediaFile:
default:
- Add WebP support
2021-07-16 19:44:40 +01:00
tenma
228e7c423e [ImageMagick] Remove unnecessary code
ImageMagickPlugin:
- Remove animated thumbnail setting, we'll be able to use FFmpeg for performance
- Remove onFillImageFileMetadata and onCreateFileImageThumbnailSource(), these
  are handled just fine by ImageFile
- Bump minor version number

README:
- Update
2021-07-16 19:44:40 +01:00
Alexei Sorokin
e62e429302 [File] Fix file deletion violating foreign keys 2021-07-16 19:44:40 +01:00
Alexei Sorokin
8fc807343b [RedisCache] Connections should not be shared by daemon threads 2021-07-16 19:44:40 +01:00
Alexei Sorokin
a9ae96fa4c [Memcached] Do not set persistent connections for daemons 2021-07-16 19:44:40 +01:00
Alexei Sorokin
1e36ceb5b1 [Embed] Fix a query typo in fixup_files.php
Regression introduced in ec86de2bc4
2021-07-16 19:44:40 +01:00
Alexei Sorokin
668bdc7a6d [Memcached_DataObject] Thorough check of pivotGetClass arguments 2021-07-16 19:44:40 +01:00
Alexei Sorokin
dd8612c39a [Bookmark] Silence a warning when no tags in BookmarkForm 2021-07-16 19:44:40 +01:00
Alexei Sorokin
df03e5311b [Bookmark] Fix undefined variable "rendered" in Activity options 2021-07-16 19:44:40 +01:00
Alexei Sorokin
60c82bc9a0 [EXTLIB][VALIDATE] Declare everything as static
As was originally intended by the author and is expected.
2021-07-16 19:44:40 +01:00
Alexei Sorokin
fc7925f4c8 [RSSCloud] Avoid the deprecated in PHP each() function 2021-07-16 19:44:40 +01:00
Alexei Sorokin
d045bf6f5c [Managed_DataObject] Remove the "timestamp" type
It is converted to "datetime" in lib/database/schema.php
2021-07-16 19:44:40 +01:00
Alexei Sorokin
1095475645 [RSSCloud] Update schema definition 2021-07-16 19:44:40 +01:00
Alexei Sorokin
e051572f84 [Profile] Allow grantRole to work when role exists 2021-07-16 19:44:40 +01:00
Alexei Sorokin
cce2c763d3 [RedisCache][DiskCache] Check if unserialize succeeded 2021-07-16 19:44:40 +01:00
Alexei Sorokin
ed08b46c0b [TwitterBridge] Check if Notice::$lat and Notice::$lon are defined 2021-07-16 19:44:40 +01:00