This was introduced in 11ebb98919f56f7dcf888adfbebf9e8826f995b4#diff-96141878409d7418ea5a9eefbde509b43482c01R70
The arg number should have been one, as there's only one...
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.
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.
[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...
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...
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
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.
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`.
"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.
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.