Commit graph

203 commits

Author SHA1 Message Date
Philipp Holzer
cc7444d84d
Move internal recursion-counter to the end of all cur/fetchUrl parameters 2019-06-10 14:34:54 +02:00
Philipp
5c2cca432f
Merge pull request #7170 from MrPetovan/bug/6981-contact-request-blocked
Contact requests blocked
2019-05-25 20:20:36 +02:00
Hypolite Petovan
3114754f4b Refactor Model\Contact::addRelationship
- Remove unused parameter $item
- Replace q() call with DBA::insert
- Update check on $contact that can only be an array now
- Add moethod doc block
2019-05-20 15:29:20 -04:00
Hypolite Petovan
709eba6ce3 Move /viewcontacts to /profile/{nickname}/contacts[/{type}]
- Add contact relationship filter to profile contacts page
- Include feed contacts in contacts page and contact widget
2019-05-20 14:50:09 -04:00
Hypolite Petovan
42c06506ce Stop appending entry when parent is missing in OStatus
- Addresses https://github.com/friendica/friendica/issues/6338#issuecomment-455785854
2019-02-24 13:36:37 -05:00
Michael
ebb84f5e43 DFRN comments are now stored as comments again 2019-01-24 18:54:45 +00:00
Michael
7e31cebb67 Parameters redone 2019-01-23 22:04:14 +00:00
Michael
0fdab4ed10 Fix for several fatal errors 2019-01-23 21:54:20 +00:00
Hypolite Petovan
64847e7cc8 Fix types in doc blocks/prototypes 2019-01-23 09:06:58 -05:00
Hypolite Petovan
0cc1a07cfa Fix default value of contact parameter of OStatus::import in mod/salmon 2019-01-22 08:53:53 -05:00
Hypolite Petovan
604262a70e Extract title determination from OStatus::entryHeader logic 2019-01-22 01:59:22 -05:00
Hypolite Petovan
e7be87df93 Fix missing $ in front of variable names 2019-01-21 11:12:49 -05:00
Hypolite Petovan
7f2dc40601 Fix potential bugs without expected behavior change
- Fix uninitialized variables
- Fix potentially not set variables
- Fix wrong parameter default value
- Fix method scope
- Fix missing return value
2019-01-21 11:04:19 -05:00
Hypolite Petovan
3d839bb176 Move Contact::ACCOUNT_TYPE_* constants to User::ACCOUNT_TYPE_*
- Keep Contact::TYPE_* constants for comparison with contact.contact-type
2019-01-21 10:56:27 -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
3282ce5389 Fix PHPDoc comments project-wide 2019-01-21 10:35:51 -05:00
Hypolite Petovan
e447375cdd
Merge branch '2019.01-rc' into bug/6334-escape-get-app 2019-01-06 16:38:48 -05:00
Michael
d8d5031935 Prevent a notice ... again 2019-01-04 15:34:53 +00: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
b6e1571b1e Fix various notices 2018-12-15 04:32:47 -05:00
Hypolite Petovan
4874f7f8ab Remove useless rawurlencode calls for building hashtag bbcode
- Fix some formatting
2018-11-22 09:32:41 -05:00
Michael Vogel
9dfc970bd6
Merge pull request #6144 from Alkarex/ATOM-self
Correct self attribute in ATOM feeds
2018-11-18 12:31:15 +01:00
Alexandre Alapetite
bd19e93c09 Minor code relocation
https://github.com/friendica/friendica/pull/6144/files#r234385033
2018-11-17 01:36:54 +01:00
Alexandre Alapetite
dd65c5d150 Apply correct title encoding to all cases 2018-11-17 01:30:53 +01:00
Alexandre Alapetite
af38d22d38 Fix ATOM feed title encoding
Was HTML-encoded instead of plain Unicode.
Fixed only for feed_mode. Probably wrong as well for non_feed mode (not
sure how to test)
2018-11-16 23:52:36 +01:00
Alexandre Alapetite
d85e26d314 Refactor header with feed_mode
https://github.com/friendica/friendica/pull/6140#issuecomment-439475027
2018-11-16 23:29:26 +01:00
Alexandre Alapetite
97d164f69e Correct self attribute in ATOM feeds
Fix for
https://github.com/friendica/friendica/issues/6128#issuecomment-439016471
Special case for DFRN to reduce the risk of unintended side effects
2018-11-16 18:54:06 +01:00
Michael
c3b6727fad Some more feed simplification 2018-11-15 16:21:37 +00:00
Michael
5f258dac22 Make feeds look more like feeds 2018-11-15 13:21:58 +00:00
Michael
08433873f5 Issue 6128 again: We now use our regular feed that allows anonymous polling 2018-11-14 19:26:23 +00:00
Adam Magness
ffc406d819 normalise_link calls
implement normaliseLink function
2018-11-08 11:28:29 -05:00
Adam Magness
50da89d861 Logger Levels
update logger levels in calls
2018-10-30 09:58:45 -04:00
Adam Magness
14fde5dc9b Log function
implement log() function.
2018-10-30 09:57:14 -04: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
Philipp Holzer
2dec8895a9
Curl Response Refactoring
- extended Curl to parse Curl Response
- refactored Network::curl()
- replaced every Network::curl() execution with the new Curl container
2018-10-10 21:08:43 +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
Michael
518d461a8f Issue 5811: "objects" instead of "object" 2018-10-02 20:12:38 +00:00
Michael
f3814ae1fc Changed conversation url (used for AP) 2018-09-26 13:12:27 +00:00
Michael
6113fdc940 Issue 5733: Changing relationship values does work now again with DFRN 2018-09-06 09:20:45 +00:00
Michael
02da827560 and now for something completely different: A removed notice 2018-08-30 04:05:32 +00:00
Michael Vogel
7f3fb34c24 Some easy to replace "q" calls have been replaced by "DBA" calls (#5632)
* Some easy to replace "q" calls have been replaced by "DBA" calls

* Simplified the GUID creation

* And one in the API ...

* And OStatus has got some DBA calls more

* Just some more replaced database calls

* The event query is now simplified

* Events are now shown again

* subthread is now using the DBA calls as well

* Some more replaced database calls

* And some more replaced database calls and prevented notices

* Better use gravity

* Some more replaced database stuff

* Some more replaced database calls in DFRN.php

* The gcontact class now has got the new DBA functions as well

* The Contact class is now changed to new database functions as well

* Small correction

* We can now delete without cascade

* One more functionality is safe for future changes
2018-08-19 12:46:10 +00:00
Michael Vogel
1283b99c6f Removed notices in the frio theme (#5610)
* Removed notices in the frio theme

* And fixed notices in the notifications

* And some more in frio

* Null is the default value

* And some small notice in the probing removed

* Added note

* Clarified note

* And a removed notice in OStatus
2018-08-14 19:37:44 +00:00
Roland Häder
e06fc2aa69 Stopped using deprecated constants NETWORK_* (#5537)
* Rewrite:
- stopped using deprecated NETWORK_* constants, now Protocol::* should be used
- still left them intact for slow/lazy developers ...

* Removed deprecated NETWORK_* constants as per code reviewer's request.
2018-08-11 22:40:44 +02:00
Hypolite Petovan
c13dc549ed Rename PROTOCOL_* constants to Model\Conversation::PARCEL_*
- Remove unused Conversation::PROTOCOL_GS_CONVERSATION constant
- Remove now renamed PROTOCOL_* constant declarations
2018-08-05 12:24:42 +02:00
Hypolite Petovan
c9b756674a Add CW support to shared posts in Protocol\OStatus 2018-08-04 21:40:45 +02:00
Hypolite Petovan
36975d521f Remove plural from $activityobjects variable name in Protocol\OStatus 2018-08-04 21:39:54 +02:00
Michael Vogel
71b1638d9a Once again, notices ... (#5535) 2018-07-31 18:39:23 +02:00
Michael Vogel
b552b711ee And some more notices removed ... (#5533)
* Fix for vanishing notes

* The field needs to be part of the selected fields ...

* And some more notes ...
2018-07-31 07:54:25 +02:00
Roland Häder
4d39164c1e [WIP] Rewrite to Proxy class: (#5507)
* Rewrite to Proxy class:
- introduced new Friendica\Network\Proxy class for in exchange of proxy_*()
  functions
- moved also all PROXY_* constants there as Proxy::*
- removed now no longer needed mod/proxy.php loading as composer's auto-load
  will do this for us
- renamed those proxy_*() functions to better names:
  + proxy_init()           -> Proxy::init()         (public)
  + proxy_url()            -> Proxy::proxifyUrl()   (public)
  + proxy_parse_html()     -> Proxy::proxifyHtml()  (public)
  + proxy_is_local_image() -> Proxy::isLocalImage() (private)
  + proxy_parse_query()    -> Proxy::parseQuery()   (private)
  + proxy_img_cb()         -> Proxy::replaceUrl()   (private)

* Ops, need to set $a here ...

* CR request:
- moved Proxy class to Friendica\Module
- extended BaseModule

* Ops, no need for own instance of $a when self::getApp() is around.

* Proxy-rewrite:
- proxy_url() and proxy_parse_html() are both non-module functions (now
  methods)
- so they must be splitted into a seperate class
- also the SIZE_* and DEFAULT_TIME constants are both not relevant to module

* No instances from utility classes

* Fixed error:
- proxify*() is now located in `Friendica\Util\ProxyUtils`

* Moved back to original place, ops? How did they move here? Well, it was not
intended by me.

* Removed duplicate (left-over from split) constants and static array. Thank to
MrPetovan finding it.

* Renamed ProxyUtils -> Proxy and aliased it back to ProxyUtils.
2018-07-30 22:06:22 -04:00
Michael Vogel
a2cea16954 Some more notices (#5526)
* Some more notices

* Fixed nasty to find notice in DFRN and OStatus

* And more notices ...

* Yeah, some removed notices ... again ...
2018-07-30 06:41:20 +02:00
Roland Häder
4a22710b3b Moved global PAGE_* to Profile class (#5500)
* Rewrites:
- moved PAGE_* to Friendica\Model\Profile class

* Fixed more rewrites from plain (global namespace) PAGE_* to Friendica\Models\Profile class

* CR request:
- moved all PAGE_* constants to Friendica\Model\Contact class
- fixed all references of both classes

* CR request:
- moved ACCOUNT_TYPE_* constants from boot.php to Contact::ACCOUNT_TYPE_*

* Just copy-pasted this code from boot.php, needs to be changed to `const ACCOUNT_TYPE_FOO = x;`

* Ops, melting brain cells here ... :-/
2018-07-27 19:25:57 -04:00
Roland Häder
37253656e3 Moved CONTACT_* constants to Friendica\Model\Contact class, lesser in global namespace (#5490)
* Rewrite:
- moved all CONTACT_* constants from boot.php to Contact class

* CR request:
- renamed Contact::CONTACT_IS_* -> Contact::* ;-)
2018-07-24 22:53:46 -04: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
b685ef37c9
Fix Fatal errors in Protocol\OStatus (#5466) 2018-07-23 07:48:44 -04:00
Hypolite Petovan
a202962f03
Fix yet another Fatal Error in Protocol\OStatus (#5454) 2018-07-22 13:32:34 -04:00
Hypolite Petovan
d6ccba79e0
Fix another Fatal error in Protocol\OStatus (#5451)
* Fix Fatal error in Protocol\OStatus

* Fix another Fatal error in Protocol\OStatus
2018-07-22 12:57:33 -04:00
Hypolite Petovan
3500e50be9
Fix Fatal error in Protocol\OStatus (#5450) 2018-07-22 12:52:38 -04:00
Roland Häder
0a519f5001 Fixes/tye-hints (#5449)
- added type-hints for DOMDocument, DOMXPath and array
- added missing documentation about optional parameter
- `if ($foo['bar'])` is not a good choice, better use
  `if (!empty($foo['bar']))` instead
2018-07-22 12:35:20 -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
Michael Vogel
5af9596dde New item field "Post-type" and new table "permissionset" (#5408)
* "post-type" replaces "bookmark" and "type"

* Removed some more type

* Added index to permission set

* The permission set is now stored

* The permission set is now removed upon expiry

* Post update now stores the permission set

* New file

* Permissions are now sorted

* Changed documentation
2018-07-19 09:52:05 -04:00
Hypolite Petovan
762a786611 Replace direct accesses to App->config by Config::get/set calls 2018-07-16 19:38:16 -04:00
Michael Vogel
0360f7197a Several more warnings ... (#5340)
* Some more warnings removed

* Even more warnings ...

* Will it ever end? ;-)

* Avoid warning in dbstructure

* Origin and OStatus ...

* There are more warnings solved ... yeah!

* And again ...

* We are not done yet

* And more ...

* And some new places ...

* And more in the feeds

* Avoid some more

* And some backend stuff

* Notifications cleared

* Some more stuff

* and again ...

* It's getting fewer ...

* Some warnings had been hidden in the notifications

* Fix the fix

* And another missing one ...

* We need the owner here, not the user

* Forgotten user

* And more ...

* And some more warnings disappeared ...

* Some more frontend warnings

* Some backend warnings removed

* Fixed sidebar for "vier"

* And more ...

* Some more ...

* And something for "remote self"

* Am I stuck in an endless loop?

* Fix: Clear tag and file field on update

* Preset page content
2018-07-10 08:27:56 -04:00
Michael
1d745c25a7 Some more places ... 2018-07-08 12:58:43 +00:00
Michael
3e797547a3 Warnings fixed 2018-07-08 09:37:05 +00:00
Michael Vogel
ff5ee74ecf
Merge branch 'develop' into item-activities 2018-07-08 06:35:50 +02:00
Michael
32d398cc93 Unified content that is stored for a like 2018-07-06 05:39:25 +00:00
Philipp Holzer
e41e7d2edd
Fixings
- fixed test for semaphore
- fixed some issues
- changed namespace in Tests back to "src/"
- changed namings
2018-07-05 20:57:31 +02:00
Philipp Holzer
19209f6826
merged from develop and increased DB-version 2018-07-04 23:44:11 +02:00
Philipp Holzer
b07dfbb03f
Merge remote-tracking branch 'remotes/origin/develop' into lock_abstraction 2018-07-03 20:16:31 +02:00
Michael
9a9541809b Fix: Likes from OStatus got the gravity of comments 2018-07-03 04:58:34 +00:00
Philipp Holzer
3f7e4f5bb6
redesign of locking & caching
- New Factory "CacheDriverFactory" for Cache and Locks
- Adding Redis/Memcached Locking
- Moved Lock to Core
- other improvements
2018-06-28 22:57:17 +02:00
Michael
028c9f4da5 We now store the verb in the item-content as well 2018-06-27 19:37:13 +00:00
Michael
76dab3b2d7 Use gravity instead of verb 2018-06-27 18:09:33 +00:00
Philipp Holzer
a57e6cfa1b
Moved Lock.php back to Utils 2018-06-26 23:28:07 +02:00
Philipp Holzer
0218d16335
Lock abstraction (like the Cache)
- adding interface
- adding seperate drivers
- moving Lock to the Core package
2018-06-26 22:31:04 +02:00
Michael
d643e00d33 Standards and a new function to fetch content 2018-06-21 15:14:01 +00:00
Michael
962fbc9166 Many "fetch_first" had been replaced 2018-06-19 21:33:07 +00:00
Michael
ed00b63613 Typo 2018-06-19 13:26:03 +00:00
Michael
ebd76285d8 New item functions, improved feed cache behaviour 2018-06-19 05:39:56 +00:00
Michael
4714cb746b Use the item functions at many more places 2018-06-18 20:36:34 +00:00
Hypolite Petovan
93daf7883e Merge branch 'master' into develop
- Updated new develop version label
- Incremented database build number
2018-06-01 07:30:04 -04:00
Michael
8329705eba New function to delete items for users 2018-05-29 05:22:57 +00:00
Roland Häder
57e668d9e0
Continued:
- avoided else() block which reduces code complexibility
- used more x()
- added curly braces
- added known type-hints

Signed-off-by: Roland Häder <roland@mxchange.org>
2018-05-14 22:50:05 +02:00
Hypolite Petovan
09f04c1985 Add Image::getInfoFromURL return check 2018-03-24 20:03:55 -04:00
Hypolite Petovan
27d94023ee Merge branch 'master' into develop 2018-03-23 06:15:55 -04:00
Michael
d8824cc3bc Improved similarity to ostatus group feeds 2018-03-18 11:18:25 +00:00
Michael
3ff6520ed5 OStatus: Forum feeds now look like OStatus group feeds 2018-03-18 10:31:12 +00:00
Michael
972c2c86ef OStatus: Likes from Pleroma will now work 2018-03-15 21:33:28 +00:00
Michael
2bedead6f4 Remove commented code 2018-03-14 22:31:52 +00:00
Michael
5bd519efff There is now a "content-warning" field 2018-03-14 22:28:35 +00:00
Michael
6352aa112b Add the nsfw removal behind a config switch 2018-03-14 07:13:17 +00:00
Michael
f49391a21c "nsfw" at "content warning" content doesn't fit together 2018-03-13 22:39:08 +00:00
Michael
3f6fefaa9a Pleroma with the Mastodon UI handles content warning different 2018-03-13 21:58:05 +00:00
Michael
32ee4ca4b1 OStatus: Fixed communication issues with deleted contacts 2018-03-13 06:21:44 +00:00
Michael
23718aeae3 OStatus: Only posts from followers will be imported (Issue 4369) 2018-03-12 10:45:40 +00:00