Commit Graph

18562 Commits

Author SHA1 Message Date
983478aeec [PEAR] Force using extlib's patched version 2021-07-16 19:44:42 +01:00
56ece91f4c [ActivityPub][POSTMAN] Do not die on network errors 2021-07-16 19:44:42 +01:00
5396f3c9d1 [DirectMessage] Fix some wrong calls after MessageModel introduction in d9a9a3746b 2021-07-16 19:44:42 +01:00
68dfaff413 [ActivityPub][INBOX] CREATE NOTE Attachments, we handle enclosures elsewhere
It was trying to make enclosures with objects instead of strings, also attachments don't use this, only links
2021-07-16 19:44:42 +01:00
1b69d02875 [MEDIA][MediaFile] Prevent issues with huge original filenames 2021-07-16 19:44:42 +01:00
4cc3a779b5 [ActivityPub][INBOX] CREATE NOTE now accepts <br> tag 2021-07-16 19:44:42 +01:00
28a044077f [StoreRemoteMedia][SCRIPTS] Fix typo in query
This was introduced in 11ebb98919f56f7dcf888adfbebf9e8826f995b4#diff-96141878409d7418ea5a9eefbde509b43482c01R70
The arg number should have been one, as there's only one...
2021-07-16 19:44:42 +01:00
Alexei Sorokin
c5e433d577 Update the project homepage and IRC channel 2021-07-16 19:44:42 +01:00
76a1facd55 [INSTALL] Update mailing list URL, as recommended by @Gijs
Closes notabug issue #327
2021-07-16 19:44:42 +01:00
761ce7fd81 [StoreRemoteMedia] Fix failing to show remote thumbnails on first load
imgPath onCreateFileImageThumbnailSource would throw FileNotFoundException
2021-07-16 19:44:42 +01:00
0eb96d4805 [Embed] Apply encoding and increased type strictness patches from StoreRemoteMedia 2021-07-16 19:44:42 +01:00
5582ccfcb7 [StoreRemoteMedia] Gracefully recover from poorly encoded images 2021-07-16 19:44:42 +01:00
b96a44c73f [StoreRemoteMedia] Increase type strictness 2021-07-16 19:44:42 +01:00
a500277dca [Embed] Revert defaults and fix Readme example 2021-07-16 19:44:42 +01:00
bcae2f26b5 [StoreRemoteMedia][SCRIPTS] Move removeRemoteMedia deleteRemoteMedia 2021-07-16 19:44:42 +01:00
422b82d3be [MEDIA] Allow thumbnail only entries 2021-07-16 19:44:42 +01:00
4deaaa8dbe [StoreRemoteMedia][SCRIPTS] Update removeRemoteMedia 2021-07-16 19:44:42 +01:00
890f3bd91e [SCRIPTS] Update clean_file_table 2021-07-16 19:44:42 +01:00
f8e6ad416b [MEDIA][SCRIPTS] clean_thumbnails Allow to delete remote thumbs as well
If the sysadmin decides that StoreRemoteMedia plugin should store
original, then its thumbs will be regenerated as well, making it safe to
delete them if needed. Beware that Embed plugin never stores the original tho.
2021-07-16 19:44:42 +01:00
ee872b5e44 [Media] Document recently added settings and add some more
Fix some buggy ones, especially Embed crop
2021-07-16 19:44:42 +01:00
5e3fa2bba1 [StoreRemoteMedia][Embed] Bump plugins version 2021-07-16 19:44:42 +01:00
4fec13eb20 [Media] Upload of previously uploaded files now works (bug fix)
This bug was introduced with the commit "[Media] Fix issues with database file storage"
due to the API change "File::getByHash now returns a yield of files".

I had updated this function on that commit but had missed this little detail.
2021-07-16 19:44:42 +01:00
cab2112f1c [StoreRemoteMedia] Remote images are now stored exactly on the necessary size for the thumb 2021-07-16 19:44:42 +01:00
5077b65d71 [Media] Fix several issues
[StoreRemoteMedia] Upgrade plugin to use the new Media system

API Changes:
- Added getters to File to better formalize the ideas of the commit "[Media] Fix issues with database file storage"

UI Changes:
- Now presented thumbnails are actual thumbnails (bug fix)
- Attachment actions have a slightly more extended behaviour

Many other minor bug fixes...
2021-07-16 19:44:42 +01:00
c2d2f90312 [ActivityPub] Attachment fetch should happen on StoreRemoteMedia 2021-07-16 19:44:42 +01:00
96197d16b5 [Core] Add an event for StoreRemoteMedia and Embed 2021-07-16 19:44:42 +01:00
8bbbb890e3 [Media] Fix issues with database file storage
Fixed file quota as well.

There can be more than one file for the same filehash IF the url are different.

Possible states:
  - A file with no url and with filename is a local file.
  - A file with an url but no filename is a remote file that wasn't fetched,
    not even the thumbnail.
  - A file with an url and filename is a fetched remote file (maybe just a
    thumbnail of it).
  - A file with no filename nor url is a redirect.

Routes:
  Given these states, updated routes so that an attachment can only be
  retrieved by id and a file by filehash.

Major API changes:
  File::getByHash now returns a yield of files

Major UI changes:
  - Now remote non stored files are presented.
  - /view became preferred
  - Redirects to remote originals are preferred.

Many other minor bug fixes...
2021-07-16 19:44:42 +01:00
11fa4b617a [DOCUMENTATION] git clone with https so people don't need an account 2021-07-16 19:44:42 +01:00
eacbd81dfa [i18n] Re-add gettext emulation
Removed by mistake with 9cc7df51d6#L50
2021-07-16 19:44:42 +01:00
8d84451200 [ActivityPub] Re-implement Delete Actor 2021-07-16 19:44:42 +01:00
Andrew Tokarskiy
c7cee7fe1a Added some ukr translations 2021-07-16 19:44:41 +01:00
Andrew Tokarskiy
058614866b Fixed some ukrainian translation errors 2021-07-16 19:44:41 +01:00
Alexei Sorokin
ebfc248ff6 Various fixes
Fix OAuth and Realtime issues introduced in 9a515b9234

[DATABASE] Fix an empty default value mistake introduced in
fde929b151

[DATABASE][PostgreSQL] Avoid use of pg_constraint.consrc, which was removed in
PostgreSQL 12.

[DATABASE][MariaDB] Fix a typo introduced in aed2344bd4

[DAEMON] Wrap an assignment inside "switch":
a follow-up to adc689cb15
2021-07-16 19:44:41 +01:00
Alexei Sorokin
a67953b840 [XMPP] Respond to ping and track time monotonically
This also fetches a necessary update from the XMPPHP upstream.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
8181b28441 Clear out potential duplicates when semi-joining a union
Using a left outer join as a semi-join is not a valid approach.
Can still be used for an anti-semi-join.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
318d2cb6ca Set the character set before making a connection
Ideally the character set should be set with the connection, and so this is
exactly what's being done now.

And now the character set code is attempted to be generalised.
2021-07-16 19:44:41 +01:00
SENOO, Ken
0b4a49d262 Change required MySQL database character set variable
Changing `character_set_server` requires root permissions and rebooting
the server.

Which is impossible on shared web hosting services.

So use `character_set_database`. This variable can be changed with
user permissions using `ALTER DATABASE`.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
a0f72fe5c6 Avoid ordering just by a timestamp
Try to also employ an id when possible.
Involves reworking some of the indices.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
ae4f3176b1 Remove "magic quotes" code and avoid wrong order implode
"Magic quotes" were removed in PHP 5.4, no need to mitigate it anymore.

Avoid implode() with the join()-like order of arguments which was deprecated
since PHP 7.4 and implicitly since PHP 5.3.
Also avoid implode() with an implicit separator for stylistic reasons.

mktime() with no arguments has been deprecated since PHP 5.1.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
22f6d3ce14 [UTIL] Sanitise instead of validate in common_copy_args()
And remove common_validate_utf8() which is now unused.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
9e94b7f145 [DATABASE] Switch from PEAR DB to MDB2 2021-07-16 19:44:41 +01:00
Alexei Sorokin
2f7d6ef07b [ActivityPub][INBOX][Delete] Stop if the ID is not present 2021-07-16 19:44:41 +01:00
Alexei Sorokin
04018ea4ca [ActivityPub] Fix use of ActivityPubPlugin::pull_remote_profile
It does not throw but return null.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
160b6ccd94 Fix "Implement a class for automatic temporary file handling"
TemporaryFile::commit throws instead of returning a bool.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
d7e7396d17 [Memcached_DataObject] Do not encache on insert
This resulted in N=0 and empty "modified" in cache.
2021-07-16 19:44:41 +01:00
Alexei Sorokin
7e1091eb8c [DATABASE] Make sure the session always uses UTF-8 and UTC 2021-07-16 19:44:41 +01:00
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