Commit Graph

132 Commits

Author SHA1 Message Date
Michael Vogel 82e3163e5e Revert "Possible fix for #5470: (#5506)"
This reverts commit 1e20fd84f7.
2018-07-27 08:02:41 +02: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
Hypolite Petovan adc47fc8ea Fix Undefined index: nurl in Protocol\PortableContact 2018-07-24 07:55:42 -04:00
Hypolite Petovan 41fd5bef13 Fix by reference notice in Protocol\PortableContact 2018-07-24 07:54:12 -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
Michael Vogel 53876abfda And some more removed notices in the core (#5465) 2018-07-23 07:43:18 -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 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
Michael d2da5d63c7 Fix for PR 5199: Corrected check for empty object 2018-06-16 07:26:09 +00:00
Hypolite Petovan 0bcf7b7c39 Fix PHP 7.2 sizeof notice messages in Protocol\PortableContact 2018-06-12 22:01:50 -04: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 5d708fd9a9 Avaoid warning when no valid data could be read 2018-05-18 16:07:55 +00:00
Roland Häder 69ac6feff7
Continued:
- you can directly use constant($var) instead of this switch()

Signed-off-by: Roland Häder <roland@mxchange.org>
2018-05-14 22:50:05 +02:00
Michael 79a343a69a Only set the "updated" value when it contains a value 2018-05-11 10:44:28 +00:00
Michael 6d4f3e8ee2 Issue 4997: Avoid database duplicates 2018-05-10 12:49:28 +00:00
Michael 40d3e7982c Adopt the relay definition according to the suggestions from @jaywink 2018-05-10 11:04:18 +00:00
Michael d0dd5c44d9 Update or create relay contact from discovery / process new protocol values 2018-04-30 05:33:47 +00:00
Michael ed87e634ed Avoid duplicated multibyte tags 2018-04-18 05:00:28 +00:00
Michael 4fd4d277f0 Store in lowercase to avoid duplicates 2018-04-12 08:55:36 +00:00
Michael 75f97db4ec Issue-4816: Avoid SQL errors / Unarchive living relais servers 2018-04-11 18:56:22 +00:00
Michael 7868de529e Forgotten doxygen header 2018-03-27 15:12:19 +00:00
Michael 00c444a699 Only update when changed 2018-03-26 06:17:50 +00:00
Michael 6b84cb9715 Only add tags in the "tags" scope 2018-03-26 06:11:55 +00:00
Michael e65bd0325e Added server discovery for their relais configuration 2018-03-26 05:44:53 +00:00
Hypolite Petovan 27d94023ee Merge branch 'master' into develop 2018-03-23 06:15:55 -04:00
Michael 73efdb99e3 Fix for incorrect datetime values 2018-03-21 05:20:55 +00:00
Michael c42c121e51 Fewer Defaults 2018-03-17 20:54:56 +00:00
Michael 8700d2a8ad Avoid storing "null" values 2018-03-17 13:09:21 +00:00
Hypolite Petovan 789561c7a2 Remove/Update references to include/html2*.php 2018-03-07 16:34:17 -05:00
Hypolite Petovan b5666bd27f Replace html2bbcode calls by HTML::toBBCode 2018-03-07 16:24:13 -05:00
Hypolite Petovan d8e9ed5ff8 [Scrutinizer] Fix undeclared variables in src/Protocol/
- Use dba::selectFirst to remove intermediate variables `$r`
- Remove unused variable `$sender` in Protocol\Email
- Simplify Protocol\OStatus:fetchAuthor cascading queries
2018-02-13 23:58:46 -05:00
Michael Vogel dad58e0f6f
Merge pull request #4387 from MrPetovan/task/3878-move-datetime-to-src
Move include/datetime to src/ - Part 2
2018-02-04 21:05:27 +01:00
Hypolite Petovan 143b453c17 Use DateTimeFormat::utc on Atom feed dates
- Fix some formatting in Protocol\PortableContact
2018-02-03 21:39:35 -05:00
Hypolite Petovan f020292408 Remove references to include/datetime 2018-02-03 20:47:37 -05:00
Hypolite Petovan 5e7285b9ba Move Temporal::convert() to DateTimeFormat::convert() 2018-02-03 08:56:55 -05:00
Hypolite Petovan 8aff8a76eb Add Temporal::utcNow() 2018-02-03 08:56:52 -05:00
Hypolite Petovan 38ff1b455b Add Temporal::MYSQL constant
- Rename Temporal::convert() parameter names
2018-02-03 08:56:52 -05:00
Hypolite Petovan dc366bf1f7 Refactor datetime_convert into Temporal::convert
- Changed parameter order to save space
- Refactor select_timezone into Temporal::getTimezoneSelect
- Refactor field_timezone into Temporal::getTimezoneField
2018-02-03 08:56:51 -05:00
Michael 02ed22ba43 We now support querying nodeinfo 2.0 2018-02-02 13:53:40 +00:00
Adam Magness c6443572e3 Fix old function call
Fix missed fetch_url() call
2018-01-28 09:02:19 -05:00
Adam Magness f04d40a37e Review update
Rename function, move others
2018-01-27 11:13:41 -05:00
Adam Magness 0f1be37279 Remove old file
remove network.php and all require_once statements
2018-01-27 08:28:20 -05:00
Adam Magness 2f9642392d Move z_fetch_url
move z_fetch_url method
2018-01-26 23:18:38 -05:00
Adam Magness c67452f72e Move fetch_url
move fetch_url function
2018-01-26 23:09:48 -05:00
Hypolite Petovan e36f2bb1fb Use short form array syntax everywhere
- Add short form array syntax to po2php.php generation
2018-01-15 14:07:17 -05:00
Hypolite Petovan 5fc4927764 Improve dba::selectFirst calls
- Fix remaining $r[0] references
- Rename $r to meaningful names
2018-01-11 03:43:57 -05:00
Hypolite Petovan ae66bcaff3 Rename selectOne to selectFirst 2018-01-10 12:57:21 -05:00
Hypolite Petovan da60893590 Replace dba::select(limit => 1) by dba::selectOne
- Convert array declarations to new style
2018-01-10 12:57:21 -05:00
Michael 23178a17a7 Only locally used methods should always be private 2017-12-21 07:27:20 +00:00
Michael b935a2b6d9 Woraround for bad mastodon links 2017-12-19 11:54:02 +00:00
Michael bfb15f2b33 Workaround for servers that react strange 2017-12-19 09:57:24 +00:00
Michael 409b349011 forgotten $ 2017-12-19 09:18:45 +00:00
Michael 2b50f001b9 Added statistics 2017-12-19 07:39:21 +00:00
Michael ddc25583be Updated database calls 2017-12-19 06:47:39 +00:00
Michael dab83c8b40 We now fetch the number of registered users 2017-12-18 23:58:18 +00:00
Hypolite Petovan 872190dcb0 Fix missing variable in Worker\Directory
- Remove fixed comment in PortableContact
2017-12-17 16:25:32 -05:00
Hypolite Petovan b8e41906a4 Remove unused variable in Protocol\PortableContact 2017-12-17 16:22:58 -05:00
Hypolite Petovan 5926cd534a Add FIXME for unrecoverable missing variables 2017-12-17 15:35:38 -05:00
Hypolite Petovan 2978b1eef0 Fix undefined variable/wrong parameter count/unknown functions 2017-12-17 15:33:45 -05:00
Hypolite Petovan 10b72b0e9e PHPStan: Fix missing requires/namespaces 2017-12-17 15:26:43 -05:00
Hypolite Petovan bc58e8d3be Rename Model\GlobalContact to Model\GContact 2017-12-07 23:57:56 -05:00
Hypolite Petovan 6b60b89385 Move Object\Profile to Model\Profile 2017-12-07 23:55:05 -05:00
Hypolite Petovan 3fc3e67b70 Separate Object\Photo into Model\Photo and Object\Image
- Renamed a bunch of functions to shorter or clearer names
2017-12-07 23:54:51 -05:00
Michael Vogel 5747cfc79c
Revert "Move Objects to Model" 2017-12-08 05:21:51 +01:00
Hypolite Petovan cd84bf8963 Rename Model\GlobalContact to Model\GContact 2017-12-07 09:09:28 -05:00
Hypolite Petovan d4ca30a6db Move Object\Profile to Model\Profile 2017-12-07 08:57:35 -05:00
Hypolite Petovan 52bddd580c Separate Object\Photo into Model\Photo and Object\Image
- Renamed a bunch of functions to shorter or clearer names
2017-12-07 08:56:11 -05:00
Michael 925c03fda8 Retrieve data about Mastodon servers 2017-12-06 20:09:59 +00:00
Adam Magness 54827e7fed Photo to src
Move Photo to Friendica\Object namespace and replace require_once statments with use statements.
2017-11-29 07:52:27 -05:00
Hypolite Petovan 898fe2db1e Code cleanup
- Remove extraneous use statements
- Format require_once
2017-11-19 17:06:18 -05:00
Hypolite Petovan 5ee728972e Remove include/Contact.php
- Remove all mentions to include/Contact.php
2017-11-19 17:05:21 -05:00
Hypolite Petovan ec02af593d Change called method names
- Add GlobalContact::getRandomUrl
- Rename Contact::getIdForURL
- Rename Diaspora::sendUnshare
- Remove unused parameter $self in Contact::terminateFriendship
2017-11-19 17:03:39 -05:00
Hypolite Petovan b92fc24ff0 Add Contact Object
- Add Profile Object
- Add User Model
- Add use statements
2017-11-19 16:55:28 -05:00
Michael 1f28cbd2c6 And now DiscoverPoCo.php 2017-11-18 11:02:46 +00:00
Adam Magness 790d80c9fb Missed function call update
update_gcontact -> update
2017-11-15 11:49:20 -05:00
Adam Magness 259f91caa9 PortableContact created
Create PortableContact and remove socgraph, update references, and calls
2017-11-15 10:53:16 -05:00
Adam Magness 47db624105 GlobalContact created
Moved DirSearch and GlobalContact related functions to Friendica\Model namespace
2017-11-15 09:47:49 -05:00