Commit graph

213 commits

Author SHA1 Message Date
Michael 543cc7f51f Moved tests, changes after review 2022-01-06 20:13:32 +00:00
Michael 9414edd64a API: Functionality moved to new places 2022-01-06 07:34:16 +00:00
Balázs Úr e56a53647b Update copyright 2022-01-02 08:27:47 +01:00
Michael 63da4a75e9 The boot.php had been cleared of most functions 2021-11-04 20:29:59 +00:00
Philipp Holzer 2ab0d06996
Restructure Storage to new paradigm 2021-10-27 20:00:19 +02:00
Philipp Holzer 68046573a4
Restructure Cache to follow new paradigm 2021-10-26 22:11:06 +02:00
Michael 3781b34272 PROFILE_PHOTOS is mostly removed and replaced 2021-10-19 19:15:28 +00:00
Michael a33185f835 Use a constant for the profile photo album 2021-10-14 04:12:00 +00:00
Michael 13827edd2c New photo field "photo-type" as preparation for banners 2021-10-11 14:21:10 +00:00
Michael 2c134c5229 q is now completely removed 2021-10-09 21:16:15 +00:00
Michael a32c10b354 Simplifid query 2021-10-08 04:24:59 +00:00
Michael 3972fe62fe More replaced "q" calls 2021-10-08 04:10:45 +00:00
Hypolite Petovan 7cdd2d1336 Refactor User::getAvatarUrlForId into getAvatarUrl
- Use user/owner array as parameter instead of uid
- Rename $profile variables to $owner when it's the result of User::getOwnerDataByNick
- Replace Module\Photo::stripExtension with native pathinfo() calls
2021-10-02 19:06:25 -04:00
Philipp Holzer fc46744183
Fix Photo::delete() 2021-09-05 19:20:43 +02:00
Philipp Holzer 13a91e63aa
Rename DI::httpRequest() into DI::httpClient() 2021-08-25 21:54:54 +02:00
Philipp Holzer 06371d29a6
Cleanup 2021-08-20 20:03:42 +02:00
Philipp Holzer 26401e88b8
IHTTPResult::getContentType is now a string again 2021-08-20 19:58:42 +02:00
Philipp Holzer 803c1d71de
Fix IHTTPResult::getHeader()
- Now returns a string array, like expected
- Fix usages
- Fix dataset
2021-08-20 19:58:42 +02:00
Philipp Holzer 02a4d30f7d
Add todo for later 2021-08-16 23:27:43 +02:00
Philipp Holzer c17bc55158
Introduce InvalidClassStorageException and adapt the code for it 2021-08-16 23:27:42 +02:00
Philipp Holzer d0536ebea7
Rename ISelectableStorage to IWritableStorage 2021-08-16 23:27:42 +02:00
Philipp Holzer eb035771f1
Revert Photo::getImageDataForPhoto return-type change 2021-08-16 23:27:42 +02:00
Philipp Holzer 29c7552df5
Refactor IStorage 2021-08-16 23:27:42 +02:00
Michael 929de9081e All needed fields are now filled 2021-07-30 13:22:06 +00:00
Michael 2647514603 Detection of local requests 2021-07-19 06:14:14 +00:00
Michael ec49afa116 Guess the mimetype in advance 2021-06-30 04:28:03 +00:00
Michael 2f06d271bb Use a default value for "uid" 2021-06-28 13:58:06 +00:00
Michael a1a584f444 External resources are cacheable 2021-06-28 13:09:00 +00:00
Michael 6f350c1e59 Use signed requests for fetching private images 2021-06-28 10:08:51 +00:00
Michael 9276f6823b New class for external resources 2021-06-24 17:30:22 +00:00
Michael 14c1f7167a API: We now can upload photos 2021-05-16 09:56:02 +00:00
Michael 4b12c54345 API: photos are now directly stored as attached data and not in the body anymore 2021-05-01 15:48:19 +00:00
Michael 087a17b43d Issue 10105: Use legacy photo data field if used 2021-04-01 04:51:55 +00:00
Balázs Úr 054c301ef0 Update copyright 2021-03-29 08:40:20 +02:00
Michael Vogel 0539c788ef
Update src/Model/Photo.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2021-03-26 15:51:26 +01:00
Michael e98d11a9ae Limit the size of contact avatars 2021-03-26 06:56:08 +00:00
Michael 49919b5b1d Issue 10050: Improve photo deletions 2021-03-19 11:42:29 +00:00
Michael 997319a41f Use the raw data instead of an object 2020-12-26 19:31:39 +00:00
Michael 7f56e2e7a9 Improve photo loading speed 2020-12-26 18:51:36 +00:00
Michael a49a35f459 Centralized fetching of the default avatar 2020-12-07 06:43:43 +00:00
Philipp Holzer a6fc9cd32e
Remove $binary flag for HTTPRequest::get(), HTTPRequest::fetch(), HTTPRequest::fetchAll() (deprecated since PHP 5.1.3) 2020-10-18 20:56:31 +02:00
Philipp Holzer 0449077126
Revert "Fix IHTTPResult::getHeader() - Now returns a string array, like expected - Fix usages - Fix dataset"
This reverts commit 80bd0a4d
2020-10-11 23:25:40 +02:00
Philipp Holzer 40349bfdc4
Revert "IHTTPResult::getContentType is now a string again"
This reverts commit 40b11442
2020-10-11 23:25:29 +02:00
Philipp Holzer 40b11442c2
IHTTPResult::getContentType is now a string again 2020-10-10 23:11:30 +02:00
Philipp Holzer 80bd0a4d5a
Fix IHTTPResult::getHeader()
- Now returns a string array, like expected
- Fix usages
- Fix dataset
2020-10-10 23:11:30 +02:00
Philipp Holzer 8318a0b640
Move ExAuth, FKOAuth1 & FKOAuthDataStore to own namespace Friendica\Security 2020-09-30 11:14:01 +02:00
Michael ce2af84cba Use a constant for the contact photos / dom't cache them 2020-08-18 22:18:48 +00:00
Michael d9fc0ae0ea Using a constant value for the default avatar 2020-08-18 20:30:24 +00:00
nupplaPhil 7029012f27 Rename "HTTPRequest::curl()" to HTTPRequest::get() 2020-07-21 03:14:01 -04:00
nupplaPhil 2973ed6448 Make "HTTPRequest::curl" dynamic 2020-07-21 03:01:12 -04:00
nupplaPhil 5344efef71 Move post/curl/fetchUrl/fetchUrlFull to own class "Network\HTTPRequest" 2020-07-21 02:56:10 -04:00
Michael d3722c945b Improved Mime Type detection 2020-04-01 05:42:44 +00:00
Michael fc7ac75ba4 Issue 8371: More enhanced logging 2020-03-22 12:51:37 +00:00
Michael f8d20b365f We should use "self" 2020-03-22 09:59:06 +00:00
Michael 2c6c6579af Issue 8371: Enhanced logging for picture problem 2020-03-22 09:57:46 +00:00
Michael 6de2b0f6d4 Reworked permission stuff 2020-03-21 18:30:40 +00:00
Michael 7863406080 Prevent "null" permissions on photos 2020-03-12 06:20:49 +00:00
Michael 88522fc832 Set the picture accesibility separate from the permissions 2020-03-11 21:36:29 +00:00
Michael c514da1738 Fix fatal error (TypeError) 2020-03-09 08:59:56 +00:00
Michael 37376fa715 Issue 8371: Improvements for picture permissions 2020-03-08 13:16:59 +00:00
nupplaPhil 23c64b9a11
Add license info at Friendica classes 2020-02-09 15:45:36 +01:00
Philipp Holzer ed9392469e
Remove unneeded Config namespace usages 2020-01-19 22:50:44 +01:00
Philipp Holzer 6c36fd9e01
Move Config::get() to DI::config()->get() 2020-01-19 21:21:13 +01:00
Philipp Holzer d6efc90194
cleanup namespace usages for L10n 2020-01-19 16:31:33 +01:00
Philipp Holzer 5dfee31108
Move L10n::t() calls to DI::l10n()->t() calls 2020-01-19 16:31:16 +01:00
Michael 0a4119adaf @brief is removed completely 2020-01-19 06:05:23 +00:00
Philipp Holzer 424c87195b
CleanUp Cache namespace
- Introduce enum "Duration"
- Introduce enum "Type"
- Move "Cache\Cache" to "BaseCache"
2020-01-18 15:41:19 +01:00
Philipp 4e3849c18b
Merge pull request #8089 from mexon/mat/repair-contact-photo
updateAvatar automatically repairs avatars when photos are deleted
2020-01-11 18:30:34 +01:00
Matthew Exon e002365d7f Add type declaration to parameter 2020-01-11 16:27:01 +01:00
Matthew Exon 5d0a3be4f6 Implement code review from nupplaphil 2020-01-11 16:01:58 +01:00
Philipp Holzer 86320317f4
Fix missing storage class 2020-01-10 22:27:05 +01:00
Matthew Exon dee6a63841
Qualify call to ridFromURI
Co-Authored-By: Hypolite Petovan <hypolite@mrpetovan.com>
2020-01-10 20:29:15 +01:00
Hypolite Petovan 36190d1e79
Merge pull request #8072 from nupplaphil/task/Cache_to_DI
Replace Core\Cache wrapper with DI::cache() method
2020-01-10 08:46:03 -05:00
Philipp Holzer 016cfcd846
Fixings
- Rename "facStorage" to "storageManager"
- Fix indentation
- Fix tests
2020-01-10 13:22:03 +01:00
Philipp Holzer 1b2ff54f66
Fix attach model 2020-01-10 13:22:00 +01:00
Philipp Holzer 1bce3fd0f1
fix Photo model 2020-01-10 13:21:59 +01:00
Philipp Holzer dbd5b5bb6e
- Fixing SystemResource
- Adding tests for StorageManager
- Updating doc
2020-01-10 13:21:58 +01:00
Philipp Holzer 08edeae2f9
Make Storage testable & add tests
- Making StorageManager dynamic (DI::facStorage())
- Making concrete Storage dynamic (DI::storage())
- Add tests for Storage backend and failure handling
- Bumping Level-2/Dice to "dev-master" until new release
- Using Storage-Names instead of Storage-Classes in config (includes migration)
2020-01-10 13:21:57 +01:00
Matthew Exon 95e65e37ee Refactor duplicate code for parsing photo URL 2020-01-09 21:48:37 +01:00
Philipp Holzer a38b0f7eaf
Move remaining namespaces and delete Core\Cache.php 2020-01-07 00:51:02 +01:00
Philipp Holzer fe078410a1
Move Cache::get() to DI::cache()->get() 2020-01-07 00:45:49 +01:00
Philipp Holzer f68929633b
Move Cache::set() to DI::cache()->set() 2020-01-07 00:41:20 +01:00
Philipp Holzer f0eea6f875
Remove get_app() in favor of DI::app() 2020-01-04 23:42:01 +01:00
Philipp Holzer 3f34229752
Move redundant System::baseUrl() to DI::baseUrl() calls 2019-12-30 23:00:08 +01:00
Philipp Holzer e944d7bed6
Remove deprecated App::getBaseURL() - process methods to DI::baseUrl()->get() 2019-12-29 20:17:48 +01:00
Philipp Holzer 388b963714
Replace BaseObject class with DI::* calls 2019-12-29 20:17:38 +01:00
Philipp Holzer 1de3f186d7
Introduce new DI container
- Adding Friendica\DI class for getting dynamic classes
- Replacing BaseObject::getApp() with this class
2019-12-29 20:16:55 +01:00
Michael 8997361609 Better function name 2019-11-11 23:13:36 +00:00
Michael 1b5fa55bdc Fix image links with descriptions in API and AP transmission 2019-11-11 22:37:50 +00:00
Hypolite Petovan 26b5de9a76 Rename Photo::newResource() result variable from $hash to $resource_id 2019-11-02 07:48:45 -04:00
Hypolite Petovan 03bf1dcbd3 Move Object\Image static methods to Util\Images
- Optimize imports in modified files
2019-11-02 07:48:45 -04:00
Michael 11194d6679 Fix: The getGUID function hadn't fetched the GUID from pictures with scale "0" 2019-10-08 04:42:51 +00:00
Michael 1ddd2df4b8 Removed obsolete code 2019-09-28 05:37:24 +00:00
Michael 8fc8e26e23 Replace not working "redir" link with a working one 2019-09-09 21:37:26 +00:00
Michael bdc07b4213 Added support for image descriptions and multiple image posts to external services 2019-08-05 16:27:45 +00:00
Michael cb77b1af8c API: We now transmit the text description there as well 2019-08-04 03:45:23 +00:00
Michael 7c10807d1d Clarified description 2019-08-02 16:59:26 +00:00
Michael 01ef630322 Fixed description 2019-08-02 16:42:24 +00:00
Michael d95ef96cca Fix issue 7449: Image permissions are now set like before 2019-08-02 16:38:50 +00:00
Michael f48452dd29 Some more 2019-07-27 16:57:00 +00:00