Commit graph

321 commits

Author SHA1 Message Date
Hypolite Petovan
e254ace9d5
Merge pull request #5947 from annando/uri-id
Use "uri-id" for item relations
2018-10-17 14:45:40 -04:00
Michael
62ad755980 Use "uri-id" for item relations 2018-10-17 18:34:24 +00:00
Jonny Tischbein
05be2db725 Move include/security tp /src/Core/Authentication and /src/Util/Security 2018-10-17 14:19:58 +02:00
Hypolite Petovan
c50be325bd Remove unused parameter $selected in Model\Item::fieldlist 2018-10-16 18:30:24 -04:00
Michael
8d0f4710a4 Signed Diaspora posts should now be stored more reliable 2018-10-15 21:42:55 +00:00
Michael
4d4dd1a99c Some beautification 2018-10-12 20:52:22 +00:00
Michael
1b18be6715 The virtuel fields for the diaspora signatures have to be removed at any time 2018-10-12 18:47:32 +00: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
510032444f The owner of a "like" should be the author 2018-10-06 08:51:52 +00:00
Michael
518d461a8f Issue 5811: "objects" instead of "object" 2018-10-02 20:12:38 +00:00
Michael
82987d018a Some changes for better code quality 2018-09-30 07:21:57 +00:00
Michael
cb9be8a7ab UUID is now createUUID 2018-09-27 11:52:15 +00:00
Michael
60b0759b50 UUID instead of GUID 2018-09-26 20:03:46 +00:00
Michael
834422d52f Merge remote-tracking branch 'upstream/develop' into ap1 2018-09-24 21:48:40 +00:00
Hypolite Petovan
a6996601d5
Merge pull request #5789 from friendica/master
Update develop from master-2019.09
2018-09-23 18:55:20 -04:00
Michael
6df6d82427 We can now like and dislike 2018-09-23 08:52:07 +00:00
Michael
f772ece86f New delivery module for ap 2018-09-17 21:13:08 +00:00
Michael
6f3b2b6586 Handling of unlisted posts, better uid detection 2018-09-16 09:06:09 +00:00
Michael
6a8ebc8639 Contact follow and unfollow workd partially 2018-09-15 18:54:45 +00:00
Michael
fb5b6e4a14 New uri format for our posts that is AP compatible 2018-09-15 07:37:34 +00:00
Michael
61e2c7d20d Added AP to many network conditions / enabling inbox processing 2018-09-14 16:51:32 +00:00
Philipp Holzer
bd2b3b1ef5
LockDriverFixings
- release Locks in case of failures
- adding some cache tests
2018-09-06 08:11:18 +02:00
Michael
c72d1bc8fd Issue 5653: The mastodonemoji addon hadn't got all needed data. 2018-08-29 20:46:52 +00:00
Michael Vogel
edcd0a3744 Issue 4960: Ignoring and blocking of contacts should work again (#5657)
* Issue 4960: Ignoring and blocking of contacts should work again

* Renamed functions

* This function should be renamed as well.

* We now have a frontend to block and ignore public contacts

* Hide some parts for public contacts

* Removed notices, public contact is now accessible from dirfind as well

* We now show contact conversations and contact posts

* We now use a new conversation mode

* The update functionality is disabled until it will work completely

* Fixing tabs chaos

* Update after posts on the contacts page will now work

* Show connect link
2018-08-25 09:48:00 -04: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
bb0cf93374 Fix for storing posts of private forums 2018-08-15 20:13:10 +00:00
Michael
e8334c4655 Use the Item class instead of DBA calls when possible 2018-08-15 04:41:49 +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
Michael Vogel
276abfaba6 Issue 5158: Ignore all threads, even public ones (#5588)
* Issue 5158: Ignore all threads, even public ones

* Remove some notice

* Now it really should work

* Using "defaults"
2018-08-08 22:32:11 +02: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
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
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
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
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
Michael
dc9b10fb09 Moved expiring of item content 2018-07-29 03:54:34 +00: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
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
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
Hypolite Petovan
b6e3da8443 Move addLanguageToItemArray call when body is ensured 2018-07-24 08:52:25 -04:00
Hypolite Petovan
4e9ba728c4 Fix undefined index body in Model\Item 2018-07-24 07:54:12 -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
415b982d39 Rename DBA::num_rows to DBA::numRows 2018-07-22 19:27:35 -04:00
Hypolite Petovan
f051ae1698 Rename DBA::fetch_first to DBA::fetchFirst 2018-07-22 19:27:34 -04:00
Hypolite Petovan
e42cf4d4fc Rename DBA::affected_rows to DBA::affectedRows 2018-07-22 19:27:34 -04:00
Michael Vogel
7382be2766 Some more notices (#5424) 2018-07-20 14:07:54 -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
ec49d004e3 We now store the item delivery data in a separate table (#5413)
* We now store the item delivery data in a separate table

* Reorganized table structure
2018-07-19 17:56:52 -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
Roland Häder
346790cbbc According to @annando and @MrPetovan, $emailcc is no item field (column) and (#5401)
should be initialized empty (I did it above the `if()` block).

Signed-off-by: Roland Häder <roland@mxchange.org>
2018-07-18 17:26:14 -04:00
Roland Häder
a41e49c84a Fixes for E_NOTICE in mod/item.php (#5393)
* Fixes applied:
- `if (is_array($some_array))` is better code style than `if ($some_array)` as
  the `if()` block really needs an array to be found
- same with `if ($some_id)`, maybe `if ($some_id > 0)` is a more proper check
- added missing field 'emailcc' to Item::ITEM_FIELDLIST

Signed-off-by: Roland Häder <roland@mxchange.org>

* Fixes E_NOTICE of missing variable (PHP's lazyness again).

Signed-off-by: Roland Häder <roland@mxchange.org>

* Use !empty() to avoid accessing empty array.

Signed-off-by: Roland Häder <roland@mxchange.org>
2018-07-17 18:18:42 -04:00
Michael Vogel
d3a2ed85fe Next item structure works (#5380)
* Use "LEFT JOIN" to always fetch the item. Needed for update routines.

* New conversion routine that now covers every item

* Post update is now activated

* We now use a hash based upon RIPEMD-320 for content and activity

* The hash doesn't contain the plink anymore

* Legacy item fields are now "null"able

* New hash function for a server unique item hash

* Introduction of the legacy mode (usage of old item fields)

* Code simplification

* We don't need the "uri" fields anymore in item-activity and item-content

* Use the "created" and not the "received" date for the hash

* Avoiding several notices

* Some more warnings removed

* Improved uri-hash / Likes on Diaspora are now getting a creation date

* Corrected the post update version

* Ensure an unique uri-hash

* Don't delete orhaned item data at the moment

* Partly reworked, due to strange behaviour

* Some more parts reworked

* Using the uri currently seems to be more reliable

* Using the uri here as well

* Use the hash values again

* Grouped item fields in different categories

* Notices again

* use the gravity (we always should)

* Added hint for disabled post updates

* Notices ...

* Issue #5337: Personal notes are displayed again

* Use the gravity again
2018-07-15 14:36:20 -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
Philipp Holzer
c829e43725
moved get_guid to System::createGUID 2018-07-09 21:38:16 +02:00
Michael
7d6933c898 Avoid "Trying to get property of non-object" 2018-07-08 11:46:05 +00:00
Michael
3e797547a3 Warnings fixed 2018-07-08 09:37:05 +00:00
Michael
c25c3b5981 urgent bugfix: Wrong function name for locks 2018-07-08 08:32:50 +00:00
Michael
c2d4b557ae Only build tag and file when really needed 2018-07-08 05:44:35 +00:00
Michael
74d5eec571 Merge branch 'item-activities' of github.com:annando/friendica into item-activities 2018-07-08 04:56:35 +00:00
Michael
5ee2db8a16 Avoid undefined index 2018-07-08 04:55:45 +00:00
Michael Vogel
ff5ee74ecf
Merge branch 'develop' into item-activities 2018-07-08 06:35:50 +02:00
Michael
75aa831b32 Better not check too strict 2018-07-07 23:31:30 +00:00
Michael
4673560c55 Don't use isset 2018-07-07 23:19:28 +00:00
Michael
4467dd4972 Clear legacy item fields 2018-07-07 23:03:28 +00:00
Michael
afa194200b Fix: Ensure that the value is set. 2018-07-07 19:39:00 +00:00
Michael
d6af9515ba Avoid storing an icid value when iaid is stored/Fix item retraction 2018-07-07 16:38:01 +00:00
Michael
575662c2d7 Just some code cleanup 2018-07-07 11:39:37 +00:00
Michael
3389e9b213 Removing of likes should work now on comments as well 2018-07-07 10:43:43 +00:00
Michael
9e262e6157 Better handling of empty content 2018-07-06 22:08:41 +00:00
Michael Vogel
3eec97aa6e
Merge pull request #5314 from MrPetovan/task/4889-fix-tests
Fix tests after enabling PHP Notices
2018-07-06 22:14:01 +02:00
Michael
5a07042560 Added warning 2018-07-06 06:37:33 +00:00
Michael
f33bd5fc8e Update does work now 2018-07-06 05:16:40 +00:00
Michael
5203f41d42 Set iaid after update 2018-07-05 22:50:33 +00:00
Michael
014eea8e12 Improve expire for item-content and item-activity 2018-07-05 22:07:50 +00:00
Michael
44e405d22b We now store activities in a separate table 2018-07-05 22:00:38 +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
Michael
f60da34357 Fix unliking liked 2018-07-04 19:07:53 +00:00
Michael
4b3ae6a862 Only use query conditions in user mode 2018-07-02 18:22:27 +00:00
Hypolite Petovan
633a71ec97 Fix notice in Item::deleteById 2018-07-02 07:49:35 -04:00
Hypolite Petovan
a380bcd1c1 Fix more undefined variable/index notice in tests 2018-07-02 07:45:25 -04:00
Michael
717ca0b7eb Use already fetched data for magiclink 2018-07-02 05:41:55 +00:00
Michael
38160a48b0 Post update script to move old content from the item table 2018-07-01 19:02:29 +00:00
Michael
32a639891f Improved logging for expired items 2018-07-01 09:08:58 +00:00
Michael
bffdf96d87 The "file" variable isn't stored anymore in the item table 2018-07-01 07:57:59 +00:00
Michael
60dcdd0b27 Preparation for not storing the file field into the item table. 2018-06-30 21:15:24 +00:00
Michael
5ba1427806 We don't store tags in the item table anymore 2018-06-30 15:21:32 +00:00
Michael
0ab9f2e265 Preparations to not store the tags in the item table anymore 2018-06-30 13:54:01 +00:00
Michael
a8a189eec4 The detected language now moved to "item-content" as well 2018-06-30 05:18:43 +00:00
Michael
59f8cb16e5 Add item content before the transaction 2018-06-29 11:10:36 +00:00
Michael
a82cf2ae29 Delete item content for older item records 2018-06-29 06:51:48 +00:00
Michael
6b31e72905 Fix for: empty posts and comments that hadn't been transmitted to Diaspora 2018-06-29 06:20:04 +00:00
Michael
51a58ec2e2 Fix for fetching false fer... (sorry) verbs 2018-06-27 20:25:24 +00: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
Michael
f74a54b9bf Standard stuff 2018-06-26 03:58:12 +00:00
Michael
7aa880543f Fix shadow posts 2018-06-25 20:38:32 +00:00
Michael
89f0eec261 Use a constant fieldlist 2018-06-25 18:49:36 +00:00
Michael
c07b81c5b9 Added workarounds to fetch the complete item content 2018-06-25 16:11:27 +00:00
Michael
5f3f349006 "author-link" and "owner-link" aren't stored anymore in the item table 2018-06-25 06:45:05 +00:00
Michael
6dbbeaf8f6 Remove unneeded code 2018-06-25 06:33:12 +00:00
Michael
89fb28ae9b Content is now stored exclusively in item-content, connected via "icid" field 2018-06-25 04:56:32 +00:00
Michael
941bab1096 We now only store the content in item-content 2018-06-24 23:09:13 +00:00
Michael
58d61810ea We now store item content centrally 2018-06-24 21:41:49 +00:00
Michael
b03db4643f The fetch function now centrally controls the content 2018-06-24 10:48:29 +00:00
Michael
d643e00d33 Standards and a new function to fetch content 2018-06-21 15:14:01 +00:00
Michael
c540154f8e "shadow" does not exist 2018-06-19 21:41:38 +00:00
Michael
139d35438d Fix: network had been empty 2018-06-19 21:32:42 +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
Michael
23aa9dffa0 New item functions are now used in the delivery process as well 2018-06-17 21:35:33 +00:00
Michael
e42b934807 Item field list structure is unified 2018-06-17 17:14:52 +00:00
Michael
6e10de9284 New function to fetch item data especially for users 2018-06-17 17:05:17 +00:00
Michael
0280a46ab4 Use predefined field lists 2018-06-17 06:27:52 +00:00
Michael
1aec8f620d More item abstractions for DFRN and Diaspora 2018-06-16 22:32:57 +00:00
Michael
14cb128264 New function for generating item URI 2018-06-16 06:44:19 +00:00
Michael
bb79b8f4ac More item calls have been replaced with the new functions 2018-06-15 22:30:49 +00:00
Michael
02fef0bcf5 Reworked notifications ("alt pager" added) / use of Item class to fetch data 2018-06-15 05:50:28 +00:00
Michael
446a45003d Added documentation, some indention fixes 2018-06-09 19:12:13 +00:00
Michael
baf316e898 The central item fetch does work now and the API now uses these functions 2018-06-09 16:56:37 +00:00
Michael
4874e589f1 New class function to fetch items 2018-06-07 06:03:12 +00:00
Michael
b654af28fa We need "global" 2018-06-03 09:40:32 +00:00
Michael
3f07d01dd1 Get rid of unneeded or redundant fields 2018-06-03 07:42:56 +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
Michael
708ddf2b02 Preparation for new deletion functionality 2018-05-26 20:23:49 +00:00
Michael
a6396dde55 Removed useless line 2018-05-26 20:08:42 +00:00
Michael
a50805c371 Grammar fix 2018-05-26 20:07:30 +00:00
Michael
bdbc51229a Fix for not being able to delete items 2018-05-26 18:07:27 +00:00
Michael
3fe07cca57 Issue 2880: Editing post doesn't destroy mentions or hashtags anymore 2018-05-19 14:55:27 +00:00
Michael
b333c7ae2e Bugfix: Only send a notifier when the item was really edited 2018-05-17 05:49:55 +00:00
Michael
84248ac4c1 Grammar stuff 2018-05-16 03:54:08 +00:00
Michael
fe8a4d50c8 Merge branch 'item-delete' of github.com:annando/friendica into item-delete 2018-05-15 19:31:05 +00:00
Michael
4a1bbd114c Lower priority for "remote self" 2018-05-15 19:29:14 +00:00
Michael
82937189ba Only delete undeleted items 2018-05-15 19:25:35 +00:00
Michael
fc60e23314 Added comments / hourly workerqueue deletion 2018-05-15 17:50:29 +00:00
Michael
3e475f3b82 Delete the shadow post when it is the last one 2018-05-15 16:40:13 +00:00
Michael
4a7bf95926 Fix: Delete all item copies if it is an original item 2018-05-15 15:51:58 +00:00
Michael
8564eeec4e Fix: public comments weren't distributed to the followers. 2018-05-15 04:33:28 +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
Michael
f9c695e78d Fix SQL error during postupdate 2018-05-11 09:20:59 +00:00
Michael
3eb0b795fc Bugfix: Avoid empty avatar photos when a public contact is created 2018-05-09 06:53:57 +00:00
Michael
08bf19082c Ensure that there will always be an author-id and owner-id in the items 2018-05-08 20:20:15 +00:00
Michael
6c35f8ebf3 Update script for setting author-id and owner-id in item and thread table 2018-05-08 17:50:06 +00:00
Michael
1230ff146a "remote-self" is now working for Diaspora and Twitter as well 2018-05-04 21:12:13 +00:00
Hypolite Petovan
bd21fc3751 Import posts from ignored contacts 2018-04-27 21:08:19 -04:00
Michael
1e2bc1e6cf Ensure local delivery of Diaspora comments 2018-04-27 04:11:33 +00:00