Commit Graph

118 Commits

Author SHA1 Message Date
Hypolite Petovan cef6757c92 Replace REGISTER_* constants by Module\Register::* ones 2019-01-22 22:24:15 -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 070aa016e0 Update more PHPDoc, including in include/ 2019-01-21 10:39:28 -05:00
Hypolite Petovan 3282ce5389 Fix PHPDoc comments project-wide 2019-01-21 10:35:51 -05:00
Michael c359c162a7 Issue 6282: Update the contact data regularly (including the network) 2019-01-16 21:39:56 +00:00
Hypolite Petovan 5e1ceb57de Escape global namespaced get_app() calls
- Add deprecated status
2019-01-03 21:27:36 -05:00
Michael Vogel 94eca77041
Merge pull request #6315 from MrPetovan/bug/6309-add-fulltext-index-profile
Rework mod/match and mod/msearch
2018-12-27 18:04:06 +01:00
Michael ccb9be8f28 Issue 6316: Do not double encode / Avoid notice 2018-12-25 12:12:59 +00:00
Hypolite Petovan acaee626f5 Remove include/ requires that are now done directly from Composer 2018-12-24 09:56:25 -05:00
Jeroen De Meerleer 2d9f4b560f Too fast 2018-12-22 17:23:18 +01:00
Jeroen De Meerleer 27eddfee27 Fixed bug
$curlResult is not an array
2018-12-22 17:19:34 +01:00
Hypolite Petovan b6e1571b1e Fix various notices 2018-12-15 04:32:47 -05:00
Michael 6733b77b73 Make it simpler 2018-12-03 19:29:06 +00:00
Michael d76003797a Fix for notice 2018-12-03 16:32:03 +00: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
Michael 7458d793ed Removing some notices again 2018-11-11 12:15:17 +00:00
Adam Magness ffc406d819 normalise_link calls
implement normaliseLink function
2018-11-08 11:28:29 -05:00
fabrixxm 0441a169a9 Fix code style 2018-11-06 16:37:58 +01:00
fabrixxm 1858204cbd
Stop PortableContacts to raise warning on malformed register_policy 2018-11-06 12:10:23 +01: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
Hypolite Petovan e511790d62 Move NULL_DATE from boot.php to DBA::NULL_DATETIME
- Add DBA::NULL_DATE constant
2018-10-22 16:50:55 -04:00
Philipp Holzer ffbc688797
Curl Response Refactoring
- refactored Network::getCurl()
- replaced every Network::getCur() execution with a Curl Response
2018-10-10 21:50:13 +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 e45206ae5d Merge remote-tracking branch 'upstream/2018.08-rc' into ap1 2018-09-15 20:49:46 +00:00
Michael 61e2c7d20d Added AP to many network conditions / enabling inbox processing 2018-09-14 16:51:32 +00:00
Michael f566db52d3 And more notices ... 2018-09-11 08:04:14 +00:00
Michael b3931d066c Issue-5605: Fixes notice 2018-08-12 08:00:37 +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 3f612e0641 Issue 5436: Don't store tags that are too long 2018-08-06 17:11:40 +00:00
Michael Vogel 2c8c803d64 Avid notices and warnings (#5546) 2018-08-02 19:07:20 +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
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
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
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