Commit graph

545 commits

Author SHA1 Message Date
Philipp Holzer 1c789d487b
Include DBA definitions from Hooks again 2022-12-16 21:59:32 +01:00
Hypolite Petovan 818cdf83ca [Database version 1500] Remove obsolete table fcontact 2022-12-05 00:00:50 -05:00
Hypolite Petovan ce69026964 [Database version 1499] Create new paradigm classes for Diaspora Contact
- Switch table fcontact for dcontact in views
2022-12-05 00:00:50 -05:00
Hypolite Petovan 0ec7238da4 Fix null value passed to string functions deprecation notices
- Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1321796513
2022-11-25 08:13:05 -05:00
Marek Bachmann 18f0d3d31e removed double blank 2022-11-25 01:03:34 +01:00
Marek Bachmann f4e2c7a11d corrected typos in DocBlocks 2022-11-25 00:59:24 +01:00
Hypolite Petovan 2a4985cd46 Fix database connection with sockets
- Reformat Database\Database.php file
- Reformat and fix spelling in static/defaults.config.php file
2022-11-19 19:15:43 -05:00
Michael deccea0228 More functions moved to content class 2022-10-27 05:44:44 +00:00
Roland Häder 26e0469de7
Merge branch 'develop' into rewrite/gravity-constants 2022-10-18 16:34:40 +02:00
Michael 6f68679375 The EOL constant is removed 2022-10-18 12:29:50 +00:00
Philipp Holzer 497fc4e432
Move Monolog to Addons 2022-10-17 22:22:00 +02:00
Roland Häder da66730e4f
Rewrite:
- moved constants GRAVITY_* from boot.php to Friendica\Model\Item
- also rewrote some array initialization:

From:
````
<?php
$arr = [];
$arr['foo'] = "FOO";
````

To:
````
<?php
$arr['foo'] = "FOO";
````
- added a few type-hints
2022-10-15 00:44:06 +02:00
Michael 4552d36373 Issue 11975: Don't call the postupdate if the table is missing 2022-10-08 14:42:11 +00:00
Michael bca9069b22 Add the uri-id if missing 2022-09-24 21:53:27 +00:00
Michael 79b64cc44f Detect and remove contact duplicates 2022-09-16 05:00:06 +00:00
Michael 0121c2845a Test stuff removed 2022-09-06 22:56:56 +00:00
Michael d7212cbbbc Function only needn't to be public 2022-09-06 20:47:18 +00:00
Michael ec8377a8c7 Issue 11893: Postupdate to fix wrong parents 2022-09-06 20:00:06 +00:00
Michael 2173fb38e0 Issue 11853/11867: Fix reshare of public posts 2022-08-27 21:22:49 +00:00
Hypolite Petovan e445975c20 Use DBA::quoteIdentifier in Database::escapeFields 2022-07-28 05:37:22 -04:00
Michael 86105635ca Improved message handling / new activity relay handling 2022-07-27 17:39:00 +00:00
Philipp Holzer d74e57ef2c
include suggested changes 2022-07-13 00:23:12 +02:00
Philipp Holzer a910fd8864
Split DBStructure & View to avoid DB-calls and dependencies for basic operations
- new "Definition" classes vor DB and Views
- new "Writer" classes to create SQL definitions for DB and Views
- DBStructure & View are responsible to execute DB-querys
2022-07-12 23:40:31 +02:00
Roland Häder e33f5612ab
Changes:
- added some type-hints
- added some documentation
- changed some double-quotes to single
2022-06-27 15:16:18 +02:00
Roland Häder e10dd20036
Made @TODO more clear? 2022-06-25 17:58:27 +02:00
Roland Häder 804b759df1
Changes:
- let's get rid of that `Database::exists()` is being misused for checking table existence
- reformatted array
2022-06-25 16:48:37 +02:00
Roland Häder f689faca99
Changed double-quotes to single 2022-06-25 16:48:36 +02:00
Roland Häder 202857ba7d
No need to log $tid here 2022-06-23 17:30:17 +02:00
Hypolite Petovan 7295138f8d Remove type-hint inconsistent with expected return value in Database->getVariable 2022-06-22 07:47:15 -04:00
Roland Häder 80c8ec17c2
Fixed documentation 2022-06-21 18:43:25 +02:00
Roland Häder 0332a57bfd
Rewrote to suggestions from @MrPetovan (I tried to maintain the old way of
['scheme' => 'table'] with my version).
2022-06-21 18:13:01 +02:00
Roland Häder 1080a840f5
Changes:
- Database->$driver can no longer be NULL, an empty string is fine anyway
2022-06-21 13:47:39 +02:00
Roland Häder 945cd1a2c2
Fixed:
- since $table can be now schema.table, this needs being taken care off
- maybe this foreach(explode()) is a bit an overkill as only 1 or 2 entries
  can be found in it
2022-06-21 13:47:39 +02:00
Roland Häder 0d81a08e3c
WIP: Properly some fixes? Also why is DROP VIEW IF EXISTS is being killed? 2022-06-21 13:47:39 +02:00
Roland Häder 44a9ec9b17
Rewrite:
- avoid having array|string for $table to have a "string" type-hint for $table
- you now have to do it for yourself by giving 'schema.table' as parameter
2022-06-21 13:47:38 +02:00
Roland Häder f62c28008a
Removed comment 2022-06-21 13:47:38 +02:00
Roland Häder cefffde691
Changes:
- added type-hints
- added some missing documentation
2022-06-21 13:47:37 +02:00
Hypolite Petovan d2ca812647
Merge pull request #11660 from Quix0r/fixes/more-type-hints-003
More type-hints - Batch 003
2022-06-20 21:53:17 -04:00
Roland Häder feb87e8dc3
Changes:
- let's start throwing exceptions on e.g. invalid arguments instead of returning
  FALSE
2022-06-20 19:09:08 +02:00
Roland Häder 6743de63f5
Changed:
- DBA::exists() should only be used for checking if records exists.
- if you want to check if a table exists, please ALWAYS use
  DBStructure::existsTable() instead
2022-06-20 08:20:07 +02:00
Roland Häder 9c80dd35e5
Both declarations must be the same 2022-06-20 08:07:12 +02:00
Roland Häder cd3b01fd82
Changed:
- cannot have type-hints :-(
2022-06-20 03:48:34 +02:00
Roland Häder ec96f2252e
Changes:
- added type-hints
- added some missing documentation
2022-06-20 03:10:23 +02:00
Roland Häder 97904ea7dd
Changes:
- added type-hints
- added missing documentation
2022-06-20 02:48:02 +02:00
Hypolite Petovan d48e40c1bf Add missing identifier quote in Database->replaceInTableFields
- This caused hyphenated table names to fail the replace query
2022-06-19 20:06:12 -04:00
Roland Häder 60f8c2d795
Changes:
- added missing type-hints
- added documentation for a method
2022-06-19 10:50:09 +02:00
Roland Häder f3599fa3e9
Changes:
- dbstructure(null) is no longer possible, an empty string does it
2022-06-19 09:13:10 +02:00
Roland Häder b6bfe72083
Wrong returned type, has to be array 2022-06-19 02:40:07 +02:00
Roland Häder 7bb0cb5323
Changes:
- added more type-hints
- DBStructure::existsTable() does no longer need array support for table name
  because this is no longer used (good work!)
2022-06-19 02:11:12 +02:00
Roland Häder 33768ea1c6 Some fixes:
- $gsid's default value cannot sadly be 0, it now must be null to allow some
  code work
- added some more type-hints
- documented a bit more
2022-06-17 17:18:31 +02:00
Roland Häder 4e53666c70 Added more type-hints 2022-06-17 17:18:31 +02:00
Roland Häder e9af4b5bb9
Shorter code, thanks to @annando pointing this out 2022-06-16 13:29:30 +02:00
Roland Häder 65da5246ca
Fixed possibble "Trying to access array offset on value of type bool" E_NOTICE
Signed-off-by: Roland Häder <roland@mxchange.org>
2022-06-16 10:07:41 +02:00
Michael e46354a522 New command to merge duplicated contacts 2022-06-01 22:11:03 +00:00
Hypolite Petovan f1630ebb05 Add relocate console command 2022-05-29 13:13:59 -04:00
Hypolite Petovan 7d09ce86c4 Move relocation feature in its separate class
- Create Database->replaceInTableFields method
2022-05-29 12:11:18 -04:00
Michael 0b10806ce3 Fix the problem that the post update never stopped on larger systems 2022-03-16 22:00:34 -04:00
Hypolite Petovan 419fe67c6c
Merge pull request #11265 from k-alin/6606-k-alin-mysql-unix-socket
Enable MySQL unix socket connection
2022-02-25 10:36:43 -05:00
k-alin e4cfd4a7c3
Update src/Database/Database.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2022-02-25 16:09:54 +01:00
k-alin 33c4fbf2a6
Update src/Database/Database.php
Correct indent

Co-authored-by: Philipp <admin+Github@philipp.info>
2022-02-25 12:09:54 +01:00
k-alin 470be2b5e4
Update src/Database/Database.php
Correct indent

Co-authored-by: Philipp <admin+Github@philipp.info>
2022-02-25 12:09:30 +01:00
k-alin 335be6f032
Update src/Database/Database.php
Correct indent

Co-authored-by: Philipp <admin+Github@philipp.info>
2022-02-25 12:09:12 +01:00
Michael 2321c7a55b Updated messages.po 2022-02-20 20:47:08 +00:00
k-alin ff439272b9 mysql connection via socket if location of mysqld.sock was specified 2022-02-20 17:45:51 +01:00
k-alin 50580fd04c
Merge branch 'friendica:develop' into 6606-k-alin-mysql-unix-socket 2022-02-20 17:27:03 +01:00
Michael c867581530 Store the receivers of a post in the tags 2022-02-19 13:31:49 +00:00
k-alin 31ff583c5e mysql connection via unix sockets (mysqli + PDO) 2022-02-14 23:18:41 +01:00
Michael 14f0a1a1ed Don't throw an exception when the database query fails 2022-02-08 21:28:42 +00:00
Michael a46b21590d use "ANY_VALUE" instead of "MAX" 2022-01-18 06:59:02 +00:00
Michael 615c6ca696 Issue 10935: Improved "GROUP BY" handling 2022-01-18 06:35:18 +00:00
Balázs Úr 733f3de9ed Add missing copyright text 2022-01-02 10:49:50 +01:00
Philipp 322b7c856c
Merge pull request #11129 from urbalazs/copyright-2022
Update copyright
2022-01-02 09:45:35 +01:00
Balázs Úr e56a53647b Update copyright 2022-01-02 08:27:47 +01:00
Michael 92fe3d9213 Issue 11120: Delete tables in the correct order 2021-12-26 05:08:59 +00:00
Philipp Holzer 5350e0852d
Add hostname to Process entity 2021-11-06 20:21:01 +01:00
Michael 516018861e Merge remote-tracking branch 'upstream/develop' into error-handling 2021-10-31 05:25:39 +00:00
Michael 4236a9a105 Improved http error handling 2021-10-29 23:21:07 +00:00
Philipp Holzer b216317477
Refactoring Core class structures ... 2021-10-26 22:11:09 +02:00
Philipp Holzer ab83d0dd27
Restructure (P)Config to follow new paradigm 2021-10-26 22:11:06 +02:00
Hypolite Petovan 24734b05fe Cast object parameters to string in Database\Database
- This makes string casting in Depository->save unnecessary
2021-10-03 15:35:47 -04:00
Michael Vogel 3d97149007
Merge pull request #10722 from MrPetovan/task/refactor-notifications
Move notify, notifications and introduction notifications to new paradigm
2021-10-03 14:13:28 +02:00
Michael 9961943b73 Code Style: Replace "AS" with "as" 2021-10-03 10:34:41 +00:00
Hypolite Petovan dae5703e5c Improve accuracy of accepted parameter types in phpDoc of Database->fetch
- Suppresses an unwarranted type error raised by static analyzers
2021-10-02 18:15:43 -04:00
Michael e4b8536c75 Removing MySQL workaround 2021-09-26 18:30:44 +00:00
Michael f26226229a Issue 10768: Avoid MySQL problems when upgrading both index and structure 2021-09-26 17:13:26 +00:00
Philipp Holzer c00da77c67
Add feedback 2021-09-18 12:55:17 +02:00
Philipp Holzer 6893e2c3f7
Add feedback / revert fix for $item['post-type'] 2021-09-18 12:51:09 +02:00
Philipp Holzer 462f76352e
Add feedback :-) 2021-09-18 12:51:09 +02:00
Philipp Holzer 89a085a12c
Check DBA::count() result 2021-09-18 12:51:08 +02:00
Hypolite Petovan 7ee88c3457 Improve documentation of $old_fields possible values in DBA::update and Database->update 2021-09-05 14:54:50 -04:00
Michael c89533a70b Support for stacked profiler analysis 2021-07-27 04:57:29 +00:00
Michael c1f849c389 Unneeded legacy DFRN table removed 2021-07-22 07:11:26 +00:00
Michael 6668066099 The legacy OAuth server is removed 2021-07-20 17:41:04 +00:00
Michael 3a5523820c Legacy DFRN transport layer is removed 2021-07-15 13:28:32 +00:00
Michael d267ba999c We now use the new account-user-view (and fixed the function name) 2021-07-11 09:39:34 +00:00
Michael b46b88cc10 Fix fatal error 2021-07-10 21:08:55 +00:00
Michael 161fa4a795 Post update: Set "uri-id" in the contact tables 2021-07-10 01:41:26 +00:00
Tobias Diekershoff 2b95a7e7cd Merge branch 'stable' into develop 2021-07-04 20:52:22 +02:00
Michael ae5f57233e Issue 10392: Avoid "Friendica can't display this page at the moment" 2021-06-16 13:23:07 +00:00
Michael 7106106f11 Formatted index list 2021-06-14 12:15:10 +00:00