Commit Graph

1680 Commits

Author SHA1 Message Date
Michael Vogel 8c2efa6df4 Facebook and App.net is removed from nearly all places (#5581)
* Facebook is removed from nearly all places

* Remove app.net as well - it's dead for some time now
2018-08-07 17:06:51 +02:00
Michael 4921303133 Issue 5541: Don't do magic things when the remote site doesn't support it 2018-08-06 19:59:41 +00:00
Michael 3f612e0641 Issue 5436: Don't store tags that are too long 2018-08-06 17:11:40 +00:00
Michael Vogel c032011143 Post update script for setting the uri-id (#5573)
* Post update is working now

* Changed text.
2018-08-06 18:40:41 +02:00
Michael Vogel 5e61caa34f Fix for not loading the translation / some more notice removed (#5569) 2018-08-06 12:11:17 +02:00
Michael Vogel ef1c73fb6b
Merge pull request #5561 from MrPetovan/bug/4584-fix-twitter-gif-still-image
Restore source storing for Twitter conversations
2018-08-05 14:00:19 +02:00
Hypolite Petovan ea45a78218 Increase Twitter parcel constant value 2018-08-05 13:59:33 +02:00
Michael Vogel fa46e97f27 We now store the uri data in a separate table (#5560)
* We now have a item-uri table

* Fixing line endings

* New item uri table

* Rescued ItemURI.php file

* Reverting some git problem

* Corrected the dbstructure file

* Updated database.sql / we now store content in the new id fields
2018-08-05 13:09:59 +02:00
Hypolite Petovan c4e69b7766 Add conversation storage for Twitter 2018-08-05 12:34:33 +02:00
Hypolite Petovan 6678208915 Add new Conversation::PARCEL_TWITTER constant 2018-08-05 12:25:47 +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
Michael Vogel 8dea36bd8f We shouldn't cascade this deletion as well (#5558) 2018-08-05 11:02:36 +02:00
Michael Vogel 2f2b134e58 Fixes issue 5321: Likes can be undone and comments can be deleted again (#5557) 2018-08-05 06:35:11 +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 810c108297 Fix: Notes can be posted again. Never use "defaults" with "false" (#5551) 2018-08-04 16:06:36 +02:00
Hypolite Petovan 6a6695b167 Change DBStructure::definition to use config/dbstructure.json 2018-08-04 13:24:04 +02:00
Michael Vogel 2c8c803d64 Avid notices and warnings (#5546) 2018-08-02 19:07:20 +02:00
Michael Vogel 65d752d03c Notices what else? (#5545)
* Poco isn't filled, so we cannot store it

* We should initialize our variables
2018-08-02 16:11:21 +02:00
Michael Vogel c72c64a6d8 Notices again (#5543)
* And again notices

* Notices in the directory

* Much more places

* Fix some double $

* Notice in ping

* Missing field

* Fix: We now remove deleted users from the directory

* Some more stuff

* Notices when removing users

* Added logging

* More logging

* Two more
2018-08-02 07:21:01 +02:00
Hypolite Petovan 4d17fb36d1 Fix missing fields in event reminder (#5540) 2018-08-01 09:27:13 +02:00
Michael Vogel 1afc0ab028 Added logging and one more reason for a notice found (#5538)
* Added logging and one more reason for a notice found

* And one more
2018-08-01 08:47:18 +02:00
Michael Vogel 9d0f18c0b3 Yeah, and again notices ... (#5536)
* Yeah, and again notices ...

* And some more

* Block access without given user name

* Reformatting
2018-08-01 07:29:58 +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
Michael Vogel c39e0dcf2a Fix for vanishing notes (#5531)
* Fix for vanishing notes

* The field needs to be part of the selected fields ...
2018-07-30 22:23:48 -04: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
Roland Häder bf87ad4fcf Fixed E_NOTICE in listing worker queue and new utilities class added (#5521)
* Fixes for E_NOTICE in workqueue:
- introduced class `Friendica\Util\Arrays` which will hold static methods for
  handling arrays that cannot be done with PHP's functions, like implode() on
  multi-dimensional arrays
- rewrote old-school for() loop to foreach()

* Added intial unit test with some tests on empty delimiters and/or sinle and
multi-dim array.

* Added test for for 3-dimensional arrays, thanks to  nupplaphil's feedback.
2018-07-30 21:24:26 -04:00
Michael Vogel 1eb8f04274 Fixing SQL error when receiving DFRN posts (#5527)
* Some more notices

* Fixed nasty to find notice in DFRN and OStatus

* And more notices ...

* Yeah, some removed notices ... again ...

* Fixing bad SQL query
2018-07-30 07:06:32 +02: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 650c3c18e1
Fixed fatal error about when returned 'body' field is empty:
````
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Friendica\Protocol\PortableContact::discoverServer() must be of the type array, null given, called in /var/www/../src/Protocol/PortableContact.php on line 1664 and defined in /var/www/../src/Protocol/PortableContact.php:1765
Stack trace:
````
2018-07-29 17:34:20 +02:00
Tobias Diekershoff 02d4b1098e
Merge pull request #5519 from annando/test-2
Moved expiring of item content
2018-07-29 11:45:50 +02:00
Michael 6add589c3f Removed some test logging 2018-07-29 04:38:14 +00:00
Michael bc38420801 Some more notices removed 2018-07-29 04:04:23 +00:00
Michael dc9b10fb09 Moved expiring of item content 2018-07-29 03:54:34 +00:00
Michael Vogel 489d3daa94 Trying to clean up a little bit more (#5517)
* "post-type" replaces "bookmark" and "type"

* The permission set is now removed upon expiry

* Post update now stores the permission set

* We don't store the permissions in the item table anymore

* Postupdate now handles "postopts" as well

* "post-type" replaces "bookmark" and "type"

* "post-type" replaces "bookmark" and "type"

* "post-type" replaces "bookmark" and "type"

* The permission set is now removed upon expiry

* The permission set is now removed upon expiry

* We don't store the permissions in the item table anymore

* Postupdate now handles "postopts" as well

* Multiplicated update functions

* And some more duplicated functions ...

* Removed duplicate functions
2018-07-28 16:04:56 -04:00
Michael Vogel 91db91d315 Fix for post update (#5513)
* "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

* The permission set is now used for item permissions

* Check for allow_cid, ... is superfluous. Checking for "private" is enough

* We query the permissionset

* Permissions are displayed correctly

* Changed index

* We don't store the permissions in the item table anymore

* Permission fields are now deprecated

* Reversed ...

* Postupdate now handles "postopts" as well

* Set deprecated fields to "null" if empty

* Postupdates are enabled again

* Fix for post update
2018-07-28 13:12:35 -04:00
Michael Vogel 36d4516e7a Missing stuff in "develop"? (#5516)
* "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

* The permission set is now used for item permissions

* Check for allow_cid, ... is superfluous. Checking for "private" is enough

* We query the permissionset

* Permissions are displayed correctly

* Changed index

* We don't store the permissions in the item table anymore

* Permission fields are now deprecated

* Reversed ...

* Postupdate now handles "postopts" as well

* Set deprecated fields to "null" if empty

* Postupdates are enabled again

* "post-type" replaces "bookmark" and "type"

* The permission set is now stored

* The permission set is now removed upon expiry

* Postupdate now handles "postopts" as well
2018-07-28 13:11:46 -04:00
Hypolite Petovan 0902ea508d
Fix parse error in Protocol\PortableContact (#5515) 2018-07-28 08:52:57 -04:00
Roland Häder c30ac30f29 Possible fix for #5470 - json_decode() (#5511)
* Possible fix for #5470:
- $data is not an object like stdClass but an array
- newer PHP versions doesn't allow cross-access like following:

  $object['foo'] = 123;
  $array->foo = 123;

- added type-hints for private methods for above cases
- used `if (empty($foo)) instead of just `if ($foo)` preventing some nasty
  E_NOTICE
- added some empty lines for better readability

* Rewrite:
- mixture of object/array was here, causing under newer PHP versions some E_NOTICE
- this has been now finally fixed by converting any `object` type to an
  associative `array`
- also changed `is_object()` to `is_array()`
2018-07-28 01:35:27 -04: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
Michael Vogel 5f77e98d76 Postupdate is now working again (#5512)
* "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

* The permission set is now used for item permissions

* Check for allow_cid, ... is superfluous. Checking for "private" is enough

* We query the permissionset

* Permissions are displayed correctly

* Changed index

* We don't store the permissions in the item table anymore

* Permission fields are now deprecated

* Reversed ...

* Postupdate now handles "postopts" as well

* Set deprecated fields to "null" if empty

* Postupdates are enabled again
2018-07-27 19:24:26 -04:00
Michael Vogel 1e83261a88
Merge pull request #5509 from friendica/revert-5506-fixes/portable-contact
Revert "Possible fix for #5470 and empty() usage"
2018-07-27 08:04:19 +02:00
Michael Vogel 82e3163e5e Revert "Possible fix for #5470: (#5506)"
This reverts commit 1e20fd84f7.
2018-07-27 08:02:41 +02:00
Roland Häder 592190892c Continued: (#5508)
- `App` is now "imported" to avoid having \Friendica\App::* everywhere
2018-07-26 22:27:28 -04:00
Roland Häder 1e20fd84f7 Possible fix for #5470: (#5506)
- $data is not an object like stdClass but an array
- newer PHP versions doesn't allow cross-access like following:

  $object['foo'] = 123;
  $array->foo = 123;

- added type-hints for private methods for above cases
- used `if (empty($foo)) instead of just `if ($foo)` preventing some nasty
  E_NOTICE
- added some empty lines for better readability
2018-07-26 18:27:12 -04:00
Michael Vogel 986106a8f7 Item storage: Permissions aren't stored in the items anymore (#5495)
* The permission set is now used for item permissions

* Check for allow_cid, ... is superfluous. Checking for "private" is enough

* We query the permissionset

* Permissions are displayed correctly

* Changed index

* We don't store the permissions in the item table anymore

* Permission fields are now deprecated

* Reversed ...
2018-07-25 19:14:55 -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
Michael Vogel 69af69d1a0 Fallback to Diaspora if DFRN transmission fails (#5487) 2018-07-24 14:12:09 -04:00
Michael Vogel 5a8654194a
Merge pull request #5452 from MrPetovan/bug/5443-fix-worker-notices
Fix notices in OEmbed et al.
2018-07-24 17:11:53 +02:00