Commit Graph

166 Commits

Author SHA1 Message Date
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
nupplaPhil ed9392469e
Remove unneeded Config namespace usages 2020-01-19 22:50:44 +01:00
nupplaPhil 6c36fd9e01
Move Config::get() to DI::config()->get() 2020-01-19 21:21:13 +01:00
nupplaPhil d6efc90194
cleanup namespace usages for L10n 2020-01-19 16:31:33 +01:00
nupplaPhil 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
nupplaPhil 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
nupplaPhil 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
nupplaPhil 016cfcd846
Fixings
- Rename "facStorage" to "storageManager"
- Fix indentation
- Fix tests
2020-01-10 13:22:03 +01:00
nupplaPhil 1b2ff54f66
Fix attach model 2020-01-10 13:22:00 +01:00
nupplaPhil 1bce3fd0f1
fix Photo model 2020-01-10 13:21:59 +01:00
nupplaPhil dbd5b5bb6e
- Fixing SystemResource
- Adding tests for StorageManager
- Updating doc
2020-01-10 13:21:58 +01:00
nupplaPhil 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
nupplaPhil a38b0f7eaf
Move remaining namespaces and delete Core\Cache.php 2020-01-07 00:51:02 +01:00
nupplaPhil fe078410a1
Move Cache::get() to DI::cache()->get() 2020-01-07 00:45:49 +01:00
nupplaPhil f68929633b
Move Cache::set() to DI::cache()->set() 2020-01-07 00:41:20 +01:00
nupplaPhil f0eea6f875
Remove get_app() in favor of DI::app() 2020-01-04 23:42:01 +01:00
nupplaPhil 3f34229752
Move redundant System::baseUrl() to DI::baseUrl() calls 2019-12-30 23:00:08 +01:00
nupplaPhil e944d7bed6
Remove deprecated App::getBaseURL() - process methods to DI::baseUrl()->get() 2019-12-29 20:17:48 +01:00
nupplaPhil 388b963714
Replace BaseObject class with DI::* calls 2019-12-29 20:17:38 +01:00
nupplaPhil 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
Michael 580f9cf6c7 Replaced some " with ' 2019-07-27 16:53:48 +00:00
Michael 89454fabdb Changed "Photo::select(" to "Photo::selectToArray(" 2019-07-27 15:52:02 +00:00
Dean Townsley fdbd160141 Add spaces for standards compliance 2019-06-24 21:37:44 -05:00
Dean Townsley 59553ab978 Don't try to auth for public images 2019-06-24 19:45:50 -05:00
Dean Townsley b5e195b415 Add auth to load sequence for photos
This allows private photos to load on any page.  Previously auth
depended on some other thing like the enclosing page triggering the
authentication of the specific contact for the photo owner.
2019-06-22 12:24:30 -05:00
Michael 14c28868eb Issue 6477: Use the correct content-type to resize the images 2019-06-20 20:09:33 +00:00
Michael 76a420fbe9 Avoid fatal error when AP contact has no photo 2019-06-11 05:26:16 +00:00
Philipp Holzer 8c3aebc376
Bugfixings in Config
- replaced usage of "!<unset>!" with null-returns
- fixed bool settings (0/1)
- fixed overriding config-values
- fixed basepath problems
2019-02-22 23:51:13 +01:00
Roland Häder 9fa812b35d
Rewrites:
- converted single-line if() block to multi-line and with curly braces
- "imported" SPL classes to have unified code style
- always initialize your variables ... :-/
- added some empty lines/spaces for better readability

Signed-off-by: Roland Häder <roland@mxchange.org>
2019-02-19 01:56:41 +01:00
Hypolite Petovan 64847e7cc8 Fix types in doc blocks/prototypes 2019-01-23 09:06:58 -05:00
Hypolite Petovan 57ab858486 Fix calls to DBA::select missing parameters 2019-01-21 11:12:50 -05:00
Hypolite Petovan 4a95ca280d Remove unused code
- Remove commented code
- Remove unused/immediately overwritten variables
- Remove extraneous parameters
- Remove unreachable code
- Remove duplicate array keys
2019-01-21 10:48:40 -05:00
Hypolite Petovan cb3f09ae4f Refactor namespaces
- Remove unused use statements
- Add required use statements
- Escape global classes
2019-01-21 10:43:42 -05:00
Hypolite Petovan 3282ce5389 Fix PHPDoc comments project-wide 2019-01-21 10:35:51 -05:00
fabrixxm 15b0a7a4d8 Photo model. Small fix to update()
pass `$old_fields` param to `DBA::update()`
2019-01-21 10:00:45 -05:00
fabrixxm bbbc15a5eb Method getPhoto of Photo model should return false on error
Instead of red circle image, which breaks proxy module
2019-01-21 09:12:31 -05:00
fabrixxm 4e38bc8a0d Use DBA::exists() in Photo::exists() 2019-01-21 09:12:31 -05:00
fabrixxm 55292c954b Remove resourceid parameter from Photo::exists() 2019-01-21 09:12:29 -05:00
fabrixxm 15a3fc05d3 Photo model: set edited and updated on update, fix exists(), docs 2019-01-21 09:11:40 -05:00
fabrixxm 6a0ed7c298 Add storage backend manager class 2019-01-21 09:11:34 -05:00
fabrixxm 7df3f117ac Photo model: fix docs, don't update "created" field
in store() if photo exists, don't update "created" timestamp
2019-01-21 09:10:47 -05:00
fabrixxm 6f59c82978 Code standards 2019-01-21 09:10:46 -05:00
fabrixxm 69fcdaf9ab Photo model: set updated field in update() 2019-01-21 09:10:45 -05:00
fabrixxm 3e13799e70 Add update() to Photo model
Edit mod/photos.php to use Photo model
2019-01-21 09:10:45 -05:00
fabrixxm cbb5124d59 Code standards 2019-01-21 09:02:57 -05:00
fabrixxm 234c110d38 Model/Photo: use self select functions, reuse backend, fix quotes, add delete() 2019-01-21 09:01:52 -05:00
fabrixxm 9317a1c054 Address code standards issues 2019-01-21 08:57:30 -05:00
fabrixxm 12dd7b552f Add Filesystem storage backend and store photo via backend 2019-01-21 08:57:29 -05:00
fabrixxm 3b3c4e8cc7 Pluggable storage backends: first steps
- add backend related columns in photo table
- add system resource storage class
- add code to load image data from backend class
- return "nosign" image as photo meta with SystemResource backend
2019-01-21 08:57:28 -05:00
fabrixxm b96dbcd4cb Move Photo module, update Photo model 2019-01-21 08:40:47 -05:00
Hypolite Petovan 5e1ceb57de Escape global namespaced get_app() calls
- Add deprecated status
2019-01-03 21:27:36 -05:00
Hypolite Petovan acaee626f5 Remove include/ requires that are now done directly from Composer 2018-12-24 09:56:25 -05:00
Hypolite Petovan 458981f75c Replace x() by isset(), !empty() or defaults()
- Remove extraneous parentheses around empty() calls
- Remove duplicate calls to intval(), count() or strlen() after empty()
- Replace ternary operators outputting binary value with empty() return value
- Rewrite defaults() without x()
2018-11-30 09:06:22 -05:00
vinzv cb75c40f4e adapted profile pic resize to 300px for whole system 2018-10-23 16:36:57 +02:00
Philipp Holzer 4392858662
Move Global Functions - Part 3
- Replaced every CACHE definition
- Moved check_url to App->checkURL()
- Removed unused definition "ZCURL_TIMEOUT"
2018-10-20 18:19:55 +02:00
Jonny Tischbein f3fc1f36ca Renaming functions + moving functions from security to Model/Item and BaseModule + fix multiline comments 2018-10-17 21:30:41 +02:00
Jonny Tischbein 05be2db725 Move include/security tp /src/Core/Authentication and /src/Util/Security 2018-10-17 14:19:58 +02:00
Philipp Holzer 5a02e39a65
Rename App Methods
- renamed a lot of App methods to CamelCase
- replaced direct public variables with get-/set-Methods
2018-10-10 00:16:06 +02:00
Hypolite Petovan a6fb3568f9 Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
Hypolite Petovan ecea7425f8 Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
Hypolite Petovan 0ec44f3e8a Rename DBM method calls to DBA method calls 2018-07-23 11:02:24 -04:00
Hypolite Petovan af6dbc654f Rename Friendica\Database\dba to Friendica\Database\DBA 2018-07-20 08:19:26 -04:00
Hypolite Petovan daa1177e3a Update use statement lists with new Friendica\Database\dba class
- Remove unused use statement
- Remove superfluous use statements (classes in the same namespace)
- Add missing use statements
2018-07-19 22:15:21 -04:00
Philipp Holzer c829e43725
moved get_guid to System::createGUID 2018-07-09 21:38:16 +02:00
Michael 3e46382459 Standard stuff 2018-02-20 11:20:28 +00:00
Michael a3af6807ac Improved resource id creation 2018-02-20 10:02:07 +00:00
Hypolite Petovan d419d07f73 [Scrutinizer] Fix undeclared variables in src/ (except Protocol/)
- Use dba::selectFirst to remove intermediate variables `$r`
- Remove unused variable `$url_recipients` in Worker\Dellivery
2018-02-14 00:05:00 -05:00