Compare commits
119 commits
ac1ebac112
...
3a2461322d
Author | SHA1 | Date | |
---|---|---|---|
|
3a2461322d | ||
|
550b4ce420 | ||
|
28a7884ad9 | ||
|
a7bdcc1216 | ||
|
7d3723592b | ||
|
075915e3b7 | ||
|
931c73d3c1 | ||
|
3263a0b98e | ||
|
586a221eb9 | ||
|
63b958dcc6 | ||
|
976ec30417 | ||
|
0c8c03153b | ||
|
23b247d1c3 | ||
|
dd534919d7 | ||
|
8fc51cf63e | ||
|
f6335590c5 | ||
|
a60910be69 | ||
|
f83f61f7ac | ||
|
4c402f6af4 | ||
|
a0dec23f2d | ||
|
591f54f64d | ||
|
5a89cecc5e | ||
|
540b2b74cc | ||
|
d19181016f | ||
|
13d1576dad | ||
|
6cea1c3472 | ||
|
893c2e4fd3 | ||
|
9daf83ce9b | ||
|
9075d7f37d | ||
|
7a13d8b8ac | ||
|
60b81bb6ca | ||
|
faa1cbeaf6 | ||
|
a12fbf7ff3 | ||
|
a2f4b4cd3d | ||
|
7150faa09c | ||
|
5acfff1152 | ||
|
921bf15419 | ||
|
36c37e0c62 | ||
|
3b1d636322 | ||
|
d4c16b8704 | ||
|
02123bda98 | ||
|
5dc49352e8 | ||
|
1fc1e478f8 | ||
|
3a60229e5c | ||
|
98de6ad464 | ||
|
1eeef896fe | ||
|
e8c256bcff | ||
|
a30b9e6927 | ||
|
728130908e | ||
|
5cd5fa8403 | ||
|
62975b0ef2 | ||
|
cc0b16c0ae | ||
|
43d5409937 | ||
|
ad15b7b256 | ||
|
61555657c3 | ||
|
dfce85a09f | ||
|
b48467c3f8 | ||
|
b515292b1c | ||
|
60e1427ffe | ||
|
b2dd95affa | ||
|
a04dc06aab | ||
|
0b84e0d056 | ||
|
83c187e3ac | ||
|
7a680dd9b7 | ||
|
5dedf5e500 | ||
|
43fa22470c | ||
|
6fd057fd00 | ||
|
e6036b8266 | ||
|
7e8aee61ba | ||
|
d2a74d1936 | ||
|
c4b85ef25a | ||
|
08738e6551 | ||
|
da02df20c3 | ||
|
6e830f7774 | ||
|
bbd3e75399 | ||
|
6cd0e1e35f | ||
|
1550ce2764 | ||
|
4aedf7f650 | ||
|
aba4a482f0 | ||
|
811a9f01bc | ||
|
2b8126b780 | ||
|
26f4532d47 | ||
|
16b12e1545 | ||
|
4e1263c1f8 | ||
|
93dd1b5973 | ||
|
31b88da9d5 | ||
|
da3d390187 | ||
|
67a9f6269e | ||
|
bc67be2b91 | ||
|
4132e7a468 | ||
|
25fecc1945 | ||
|
a077418af0 | ||
|
2e81803a52 | ||
|
fe39ead790 | ||
|
d385296e0d | ||
|
7ecf143e4c | ||
|
ffad9c523b | ||
|
21b16ef822 | ||
|
80103bef38 | ||
|
6c023f832b | ||
|
73df36ca72 | ||
|
523247f0fe | ||
|
89e7420237 | ||
|
16d0d17169 | ||
|
9592292dba | ||
|
bf80001c80 | ||
|
4e7f0f9f04 | ||
|
85eb09806f | ||
|
8fc96477e7 | ||
|
0c68a53e1e | ||
|
ad1389b20a | ||
|
1564c297bb | ||
|
5b516b1dbb | ||
|
e88cd16644 | ||
|
40a1263066 | ||
|
2588ac1a16 | ||
|
8d4a16a71c | ||
|
ba760bb340 | ||
|
86a27b51ad |
1313 changed files with 6766 additions and 4501 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -83,8 +83,9 @@ venv/
|
|||
#Ignore temporary installed phpunit
|
||||
/bin/phpunit
|
||||
|
||||
#Ignore cache file
|
||||
#Ignore cache files
|
||||
.php_cs.cache
|
||||
.php-cs-fixer.cache
|
||||
|
||||
#ignore avatar picture cache path
|
||||
/avatar
|
||||
|
|
93
.php-cs-fixer.dist.php
Normal file
93
.php-cs-fixer.dist.php
Normal file
|
@ -0,0 +1,93 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->in(__DIR__)
|
||||
->notPath('addon')
|
||||
->notPath('bin/dev')
|
||||
->notPath('config')
|
||||
->notPath('doc')
|
||||
->notPath('images')
|
||||
->notPath('mods')
|
||||
->notPath('spec')
|
||||
->notPath('vendor')
|
||||
->notPath('view/asset')
|
||||
->notPath('lang')
|
||||
->notPath('view/smarty3/compiled');
|
||||
|
||||
$config = new PhpCsFixer\Config();
|
||||
return $config
|
||||
->setRules([
|
||||
'@PSR1' => true,
|
||||
'@PSR2' => true,
|
||||
'@PSR12' => true,
|
||||
'align_multiline_comment' => true,
|
||||
'array_indentation' => true,
|
||||
'array_syntax' => [
|
||||
'syntax' => 'short',
|
||||
],
|
||||
'binary_operator_spaces' => [
|
||||
'default' => 'single_space',
|
||||
'operators' => [
|
||||
'=>' => 'align_single_space_minimal',
|
||||
'=' => 'align_single_space_minimal',
|
||||
'??' => 'align_single_space_minimal',
|
||||
],
|
||||
],
|
||||
'blank_line_after_namespace' => true,
|
||||
'braces' => [
|
||||
'position_after_anonymous_constructs' => 'same',
|
||||
'position_after_control_structures' => 'same',
|
||||
'position_after_functions_and_oop_constructs' => 'next',
|
||||
],
|
||||
'elseif' => true,
|
||||
'encoding' => true,
|
||||
'full_opening_tag' => true,
|
||||
'function_declaration' => [
|
||||
'closure_function_spacing' => 'one',
|
||||
],
|
||||
'indentation_type' => true,
|
||||
'line_ending' => true,
|
||||
'list_syntax' => [
|
||||
'syntax' => 'long',
|
||||
],
|
||||
'lowercase_keywords' => true,
|
||||
'method_argument_space' => [],
|
||||
'no_closing_tag' => true,
|
||||
'no_spaces_after_function_name' => true,
|
||||
'no_spaces_inside_parenthesis' => true,
|
||||
'no_trailing_whitespace' => true,
|
||||
'no_trailing_whitespace_in_comment' => true,
|
||||
'no_unused_imports' => true,
|
||||
'single_blank_line_at_eof' => true,
|
||||
'single_class_element_per_statement' => true,
|
||||
'single_import_per_statement' => true,
|
||||
'single_line_after_imports' => true,
|
||||
'switch_case_space' => true,
|
||||
'ternary_operator_spaces' => false,
|
||||
'visibility_required' => [
|
||||
'elements' => ['property', 'method']
|
||||
],
|
||||
'new_with_braces' => true,
|
||||
])
|
||||
->setFinder($finder)
|
||||
->setIndent("\t");
|
|
@ -6,6 +6,7 @@ require_once __DIR__ . '/bin/dev/php-cs-fixer/vendor/autoload.php';
|
|||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->in(__DIR__)
|
||||
->notPath('addon')
|
||||
->notPath('bin/dev')
|
||||
->notPath('config')
|
||||
->notPath('doc')
|
||||
|
|
23
README.md
23
README.md
|
@ -3,27 +3,28 @@ Friendica - your open and free social network
|
|||
|
||||
Welcome to the free social web. Friendica is a platform for decentralised social communication linking to other independent social and corporate services.
|
||||
|
||||
Friendica connects you to a federated communications network of thousands of servers called the Fediverse. Through various protocols you can interact with anyone on [Friendica]( https://friendi.ca), [Mastodon](https://joinmastodon.org), [Lemmy](https://join-lemmy.org/), [Diaspora](https://diasporafoundation.org), [Misskey](https://join.misskey.page), [Peertube](https://joinpeertube.org/), [Pixelfed](https://pixelfed.org/), [Pleroma](https://pleroma.social) and many more. Receiving content from Tumblr, Wordpress and RSS is also possible. Friendica allows to import and mirror your content via add-ons such as ITTT and Buffer. You can customize and control how publicly or privately you want to share your content.
|
||||
Friendica connects you to a federated communications network of thousands of servers called the Fediverse.
|
||||
Through various protocols you can interact with anyone on [Friendica]( https://friendi.ca), [Mastodon](https://joinmastodon.org), [Lemmy](https://join-lemmy.org/), [Diaspora](https://diasporafoundation.org), [Misskey](https://join.misskey.page), [Peertube](https://joinpeertube.org/), [Pixelfed](https://pixelfed.org/), [Pleroma](https://pleroma.social) and many more.
|
||||
Receiving content from Tumblr, WordPress and RSS is also possible.
|
||||
Friendica allows to import and mirror your content via add-ons such as ITTT and Buffer.
|
||||
You can control the privacy scope of your content.
|
||||
|
||||
Being part of the Fediverse allows you to be free from data-harvesting corporations. Enjoy open social communication, independent of any specific provider.
|
||||
Being part of the Fediverse allows you to be free from data-harvesting corporations.
|
||||
Enjoy open social communication, independent of any specific provider.
|
||||
|
||||
[Join Friendica](https://dir.friendica.social/servers) today or setup [your own Friendica instance](doc/Install.md).
|
||||
[Join Friendica](https://dir.friendica.social/servers) today or set up [your own Friendica instance](doc/Install.md).
|
||||
|
||||
### Friendica on desktop
|
||||
|
||||
![Frio theme in desktop browser](images/screenshots/friendica-2023-10-frio-desktop.png?raw=true "Frio theme in desktop browser")
|
||||
![Frio theme in desktop browser](images/screenshots/friendica-2023-12-frio-desktop.png?raw=true "Frio theme in desktop browser")
|
||||
|
||||
### Friendica on mobile
|
||||
|
||||
<p float="left">
|
||||
<img src ="https://github.com/friendica/friendica/blob/2023.09-rc/images/screenshots/friendica-2023-10-frio-mobile-timeline-dark-blue.png" width="370" alt="frio on mobile, dark color scheme">
|
||||
<img src="https://github.com/friendica/friendica/blob/2023.09-rc/images/screenshots/friendica-2023-10-frio-mobile-options-light-blue.png" width="370" alt="frio on mobile, light color scheme">
|
||||
<img src="images/screenshots/friendica-2023-10-frio-mobile-timeline-dark-blue.png" width="370" alt="frio on mobile, dark color scheme">
|
||||
<img src="images/screenshots/friendica-2023-10-frio-mobile-options-light-blue.png" width="370" alt="frio on mobile, light color scheme">
|
||||
</p>
|
||||
|
||||
### Alternative Theme "Vier"
|
||||
|
||||
![Vier theme in desktop browser](images/screenshots/friendica-vier-community.png?raw=true "Vier theme in desktop browser")
|
||||
|
||||
## Endorsements
|
||||
|
||||
- [![Awesome Humane Tech](images/humane-tech-badge.svg)](https://codeberg.org/teaserbot-labs/delightful-humane-design) In August 2020 Friendica was added to the curated delightful humane design resources in the [Fediverse category](https://codeberg.org/teaserbot-labs/delightful-humane-design#fediverse).
|
||||
- Friendica is listed on [![Awesome Humane Tech](images/humane-tech-badge.svg)](https://codeberg.org/teaserbot-labs/delightful-humane-design) in the [Fediverse category](https://codeberg.org/teaserbot-labs/delightful-humane-design#fediverse).
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -29,12 +29,12 @@
|
|||
"ext-xml": "*",
|
||||
"asika/simple-console": "^1.0",
|
||||
"bacon/bacon-qr-code": "^2.0.0",
|
||||
"divineomega/password_exposed": "^2.8",
|
||||
"divineomega/password_exposed": "^3",
|
||||
"enyo/dropzone": "^5.9",
|
||||
"ezyang/htmlpurifier": "^4.7",
|
||||
"friendica/json-ld": "^1.0",
|
||||
"geekwright/po": "^2.0",
|
||||
"guzzlehttp/guzzle": "^6.5",
|
||||
"guzzlehttp/guzzle": "^7",
|
||||
"guzzlehttp/oauth-subscriber": "^0.6",
|
||||
"kornrunner/blurhash": "^1.2",
|
||||
"league/html-to-markdown": "^4.8",
|
||||
|
@ -135,7 +135,8 @@
|
|||
"mockery/mockery": "^1.3",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"phpunit/phpunit": "^9",
|
||||
"dms/phpunit-arraysubset-asserts": "^0.3.1"
|
||||
"dms/phpunit-arraysubset-asserts": "^0.3.1",
|
||||
"friendsofphp/php-cs-fixer": "^3.46"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "phpunit",
|
||||
|
@ -149,6 +150,8 @@
|
|||
"cs:fix": [
|
||||
"@cs:install",
|
||||
"bin/dev/php-cs-fixer/vendor/bin/php-cs-fixer fix"
|
||||
]
|
||||
],
|
||||
"cs:check-v3": "vendor/bin/php-cs-fixer check --diff",
|
||||
"cs:fix-v3": "vendor/bin/php-cs-fixer fix"
|
||||
}
|
||||
}
|
||||
|
|
2212
composer.lock
generated
2212
composer.lock
generated
File diff suppressed because it is too large
Load diff
42
database.sql
42
database.sql
|
@ -1,6 +1,6 @@
|
|||
-- ------------------------------------------
|
||||
-- Friendica 2024.03-dev (Yellow Archangel)
|
||||
-- DB_UPDATE_VERSION 1542
|
||||
-- DB_UPDATE_VERSION 1546
|
||||
-- ------------------------------------------
|
||||
|
||||
|
||||
|
@ -73,8 +73,6 @@ CREATE TABLE IF NOT EXISTS `user` (
|
|||
`blockwall` boolean NOT NULL DEFAULT '0' COMMENT 'Prohibit contacts to post to the profile page of the user',
|
||||
`hidewall` boolean NOT NULL DEFAULT '0' COMMENT 'Hide profile details from unknown viewers',
|
||||
`blocktags` boolean NOT NULL DEFAULT '0' COMMENT 'Prohibit contacts to tag the post of this user',
|
||||
`unkmail` boolean NOT NULL DEFAULT '0' COMMENT 'Permit unknown people to send private mails to this user',
|
||||
`cntunkmail` int unsigned NOT NULL DEFAULT 10 COMMENT '',
|
||||
`notify-flags` smallint unsigned NOT NULL DEFAULT 65535 COMMENT 'email notification options',
|
||||
`page-flags` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'page/profile type',
|
||||
`account-type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '',
|
||||
|
@ -506,6 +504,9 @@ CREATE TABLE IF NOT EXISTS `channel` (
|
|||
`exclude-tags` varchar(1023) COMMENT 'Comma separated list of tags that aren\'t allowed in the channel',
|
||||
`full-text-search` varchar(1023) COMMENT 'Full text search pattern, see https://mariadb.com/kb/en/full-text-index-overview/#in-boolean-mode',
|
||||
`media-type` smallint unsigned COMMENT 'Filtered media types',
|
||||
`languages` mediumtext COMMENT 'Desired languages',
|
||||
`publish` boolean COMMENT 'publish channel content',
|
||||
`valid` boolean COMMENT 'Set, when the full-text-search is valid',
|
||||
PRIMARY KEY(`id`),
|
||||
INDEX `uid` (`uid`),
|
||||
FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE
|
||||
|
@ -1236,6 +1237,23 @@ CREATE TABLE IF NOT EXISTS `post-category` (
|
|||
FOREIGN KEY (`tid`) REFERENCES `tag` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT
|
||||
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='post relation to categories';
|
||||
|
||||
--
|
||||
-- TABLE post-counts
|
||||
--
|
||||
CREATE TABLE IF NOT EXISTS `post-counts` (
|
||||
`uri-id` int unsigned NOT NULL COMMENT 'Id of the item-uri table entry that contains the item uri',
|
||||
`vid` smallint unsigned NOT NULL COMMENT 'Id of the verb table entry that contains the activity verbs',
|
||||
`reaction` varchar(1) NOT NULL COMMENT 'Emoji Reaction',
|
||||
`parent-uri-id` int unsigned COMMENT 'Id of the item-uri table that contains the parent uri',
|
||||
`count` int unsigned DEFAULT 0 COMMENT 'Number of activities',
|
||||
PRIMARY KEY(`uri-id`,`vid`,`reaction`),
|
||||
INDEX `vid` (`vid`),
|
||||
INDEX `parent-uri-id` (`parent-uri-id`),
|
||||
FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE,
|
||||
FOREIGN KEY (`vid`) REFERENCES `verb` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT,
|
||||
FOREIGN KEY (`parent-uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE
|
||||
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Original remote activity';
|
||||
|
||||
--
|
||||
-- TABLE post-collection
|
||||
--
|
||||
|
@ -1327,7 +1345,7 @@ CREATE TABLE IF NOT EXISTS `post-engagement` (
|
|||
`owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Item owner',
|
||||
`contact-type` tinyint NOT NULL DEFAULT 0 COMMENT 'Person, organisation, news, community, relay',
|
||||
`media-type` tinyint NOT NULL DEFAULT 0 COMMENT 'Type of media in a bit array (1 = image, 2 = video, 4 = audio',
|
||||
`language` varbinary(128) COMMENT 'Language information about this post',
|
||||
`language` varchar(128) COMMENT 'Language information about this post',
|
||||
`searchtext` mediumtext COMMENT 'Simplified text for the full text search',
|
||||
`created` datetime COMMENT '',
|
||||
`restricted` boolean NOT NULL DEFAULT '0' COMMENT 'If true, this post is either unlisted or not from a federated network',
|
||||
|
@ -2008,6 +2026,20 @@ CREATE VIEW `circle-member-view` AS SELECT
|
|||
INNER JOIN `contact` ON `group_member`.`contact-id` = `contact`.`id`
|
||||
INNER JOIN `group` ON `group_member`.`gid` = `group`.`id`;
|
||||
|
||||
--
|
||||
-- VIEW post-counts-view
|
||||
--
|
||||
DROP VIEW IF EXISTS `post-counts-view`;
|
||||
CREATE VIEW `post-counts-view` AS SELECT
|
||||
`post-counts`.`uri-id` AS `uri-id`,
|
||||
`post-counts`.`vid` AS `vid`,
|
||||
`verb`.`name` AS `verb`,
|
||||
`post-counts`.`reaction` AS `reaction`,
|
||||
`post-counts`.`parent-uri-id` AS `parent-uri-id`,
|
||||
`post-counts`.`count` AS `count`
|
||||
FROM `post-counts`
|
||||
INNER JOIN `verb` ON `verb`.`id` = `post-counts`.`vid`;
|
||||
|
||||
--
|
||||
-- VIEW post-timeline-view
|
||||
--
|
||||
|
@ -2936,8 +2968,6 @@ CREATE VIEW `owner-view` AS SELECT
|
|||
`user`.`blockwall` AS `blockwall`,
|
||||
`user`.`hidewall` AS `hidewall`,
|
||||
`user`.`blocktags` AS `blocktags`,
|
||||
`user`.`unkmail` AS `unkmail`,
|
||||
`user`.`cntunkmail` AS `cntunkmail`,
|
||||
`user`.`notify-flags` AS `notify-flags`,
|
||||
`user`.`page-flags` AS `page-flags`,
|
||||
`user`.`account-type` AS `account-type`,
|
||||
|
|
|
@ -61,6 +61,7 @@ Database Tables
|
|||
| [post-category](help/database/db_post-category) | post relation to categories |
|
||||
| [post-collection](help/database/db_post-collection) | Collection of posts |
|
||||
| [post-content](help/database/db_post-content) | Content for all posts |
|
||||
| [post-counts](help/database/db_post-counts) | Original remote activity |
|
||||
| [post-delivery](help/database/db_post-delivery) | Delivery data for posts for the batch processing |
|
||||
| [post-delivery-data](help/database/db_post-delivery-data) | Delivery data for items |
|
||||
| [post-engagement](help/database/db_post-engagement) | Engagement data per post |
|
||||
|
|
|
@ -18,6 +18,9 @@ Fields
|
|||
| exclude-tags | Comma separated list of tags that aren't allowed in the channel | varchar(1023) | YES | | NULL | |
|
||||
| full-text-search | Full text search pattern, see https://mariadb.com/kb/en/full-text-index-overview/#in-boolean-mode | varchar(1023) | YES | | NULL | |
|
||||
| media-type | Filtered media types | smallint unsigned | YES | | NULL | |
|
||||
| languages | Desired languages | mediumtext | YES | | NULL | |
|
||||
| publish | publish channel content | boolean | YES | | NULL | |
|
||||
| valid | Set, when the full-text-search is valid | boolean | YES | | NULL | |
|
||||
|
||||
Indexes
|
||||
------------
|
||||
|
|
35
doc/database/db_post-counts.md
Normal file
35
doc/database/db_post-counts.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
Table post-counts
|
||||
===========
|
||||
|
||||
Original remote activity
|
||||
|
||||
Fields
|
||||
------
|
||||
|
||||
| Field | Description | Type | Null | Key | Default | Extra |
|
||||
| ------------- | ----------------------------------------------------------- | ----------------- | ---- | --- | ------- | ----- |
|
||||
| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | PRI | NULL | |
|
||||
| vid | Id of the verb table entry that contains the activity verbs | smallint unsigned | NO | PRI | NULL | |
|
||||
| reaction | Emoji Reaction | varchar(1) | NO | PRI | NULL | |
|
||||
| parent-uri-id | Id of the item-uri table that contains the parent uri | int unsigned | YES | | NULL | |
|
||||
| count | Number of activities | int unsigned | YES | | 0 | |
|
||||
|
||||
Indexes
|
||||
------------
|
||||
|
||||
| Name | Fields |
|
||||
| ------------- | --------------------- |
|
||||
| PRIMARY | uri-id, vid, reaction |
|
||||
| vid | vid |
|
||||
| parent-uri-id | parent-uri-id |
|
||||
|
||||
Foreign Keys
|
||||
------------
|
||||
|
||||
| Field | Target Table | Target Field |
|
||||
|-------|--------------|--------------|
|
||||
| uri-id | [item-uri](help/database/db_item-uri) | id |
|
||||
| vid | [verb](help/database/db_verb) | id |
|
||||
| parent-uri-id | [item-uri](help/database/db_item-uri) | id |
|
||||
|
||||
Return to [database documentation](help/database)
|
|
@ -12,7 +12,7 @@ Fields
|
|||
| owner-id | Item owner | int unsigned | NO | | 0 | |
|
||||
| contact-type | Person, organisation, news, community, relay | tinyint | NO | | 0 | |
|
||||
| media-type | Type of media in a bit array (1 = image, 2 = video, 4 = audio | tinyint | NO | | 0 | |
|
||||
| language | Language information about this post | varbinary(128) | YES | | NULL | |
|
||||
| language | Language information about this post | varchar(128) | YES | | NULL | |
|
||||
| searchtext | Simplified text for the full text search | mediumtext | YES | | NULL | |
|
||||
| created | | datetime | YES | | NULL | |
|
||||
| restricted | If true, this post is either unlisted or not from a federated network | boolean | NO | | 0 | |
|
||||
|
|
|
@ -34,8 +34,6 @@ Fields
|
|||
| blockwall | Prohibit contacts to post to the profile page of the user | boolean | NO | | 0 | |
|
||||
| hidewall | Hide profile details from unknown viewers | boolean | NO | | 0 | |
|
||||
| blocktags | Prohibit contacts to tag the post of this user | boolean | NO | | 0 | |
|
||||
| unkmail | Permit unknown people to send private mails to this user | boolean | NO | | 0 | |
|
||||
| cntunkmail | | int unsigned | NO | | 10 | |
|
||||
| notify-flags | email notification options | smallint unsigned | NO | | 65535 | |
|
||||
| page-flags | page/profile type | tinyint unsigned | NO | | 0 | |
|
||||
| account-type | | tinyint unsigned | NO | | 0 | |
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.2 MiB |
BIN
images/screenshots/friendica-2023-12-frio-desktop.png
Normal file
BIN
images/screenshots/friendica-2023-12-frio-desktop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1,011 KiB |
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
@ -215,14 +215,14 @@ function photos_post(App $a)
|
|||
// get the list of photos we are about to delete
|
||||
if ($visitor) {
|
||||
$r = DBA::toArray(DBA::p(
|
||||
"SELECT distinct(`resource-id`) as `rid` FROM `photo` WHERE `contact-id` = ? AND `uid` = ? AND `album` = ?",
|
||||
"SELECT distinct(`resource-id`) AS `rid` FROM `photo` WHERE `contact-id` = ? AND `uid` = ? AND `album` = ?",
|
||||
$visitor,
|
||||
$page_owner_uid,
|
||||
$album
|
||||
));
|
||||
} else {
|
||||
$r = DBA::toArray(DBA::p(
|
||||
"SELECT distinct(`resource-id`) as `rid` FROM `photo` WHERE `uid` = ? AND `album` = ?",
|
||||
"SELECT distinct(`resource-id`) AS `rid` FROM `photo` WHERE `uid` = ? AND `album` = ?",
|
||||
DI::userSession()->getLocalUserId(),
|
||||
$album
|
||||
));
|
||||
|
@ -762,7 +762,7 @@ function photos_content(App $a)
|
|||
|
||||
$total = 0;
|
||||
$r = DBA::toArray(DBA::p(
|
||||
"SELECT `resource-id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = ? AND `album` = ?
|
||||
"SELECT `resource-id`, MAX(`scale`) AS `scale` FROM `photo` WHERE `uid` = ? AND `album` = ?
|
||||
AND `scale` <= 4 $sql_extra GROUP BY `resource-id`",
|
||||
$owner_uid,
|
||||
$album
|
||||
|
@ -782,9 +782,9 @@ function photos_content(App $a)
|
|||
}
|
||||
|
||||
$r = DBA::toArray(DBA::p(
|
||||
"SELECT `resource-id`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`filename`) AS `filename`,
|
||||
ANY_VALUE(`type`) AS `type`, max(`scale`) AS `scale`, ANY_VALUE(`desc`) as `desc`,
|
||||
ANY_VALUE(`created`) as `created`
|
||||
"SELECT `resource-id`, MIN(`id`) AS `id`, MIN(`filename`) AS `filename`,
|
||||
MIN(`type`) AS `type`, MAX(`scale`) AS `scale`, MIN(`desc`) AS `desc`,
|
||||
MIN(`created`) AS `created`
|
||||
FROM `photo` WHERE `uid` = ? AND `album` = ?
|
||||
AND `scale` <= 4 $sql_extra GROUP BY `resource-id` ORDER BY `created` $order LIMIT ? , ?",
|
||||
intval($owner_uid),
|
||||
|
@ -1167,11 +1167,11 @@ function photos_content(App $a)
|
|||
}
|
||||
|
||||
if (!empty($conv_responses['like'][$link_item['uri']])) {
|
||||
$like = DI::conversation()->formatActivity($conv_responses['like'][$link_item['uri']]['links'], 'like', $link_item['id']);
|
||||
$like = DI::conversation()->formatActivity($conv_responses['like'][$link_item['uri']]['links'], 'like', $link_item['id'], '', []);
|
||||
}
|
||||
|
||||
if (!empty($conv_responses['dislike'][$link_item['uri']])) {
|
||||
$dislike = DI::conversation()->formatActivity($conv_responses['dislike'][$link_item['uri']]['links'], 'dislike', $link_item['id']);
|
||||
$dislike = DI::conversation()->formatActivity($conv_responses['dislike'][$link_item['uri']]['links'], 'dislike', $link_item['id'], '', []);
|
||||
}
|
||||
|
||||
if (($can_post || Security::canWriteToUserWall($owner_uid))) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
@ -58,7 +58,7 @@ class User extends \Asika\SimpleConsole\Console
|
|||
console user - Modify user settings per console commands.
|
||||
Usage
|
||||
bin/console user password <nickname> [<password>] [-h|--help|-?] [-v]
|
||||
bin/console user add [<name> [<nickname> [<email> [<language>]]]] [-h|--help|-?] [-v]
|
||||
bin/console user add [<name> [<nickname> [<email> [<language> [<avatar_url>]]]]] [-h|--help|-?] [-v]
|
||||
bin/console user delete [<nickname>] [-y] [-h|--help|-?] [-v]
|
||||
bin/console user allow [<nickname>] [-h|--help|-?] [-v]
|
||||
bin/console user deny [<nickname>] [-h|--help|-?] [-v]
|
||||
|
@ -228,10 +228,11 @@ HELP;
|
|||
*/
|
||||
private function addUser()
|
||||
{
|
||||
$name = $this->getArgument(1);
|
||||
$nick = $this->getArgument(2);
|
||||
$email = $this->getArgument(3);
|
||||
$lang = $this->getArgument(4);
|
||||
$name = $this->getArgument(1);
|
||||
$nick = $this->getArgument(2);
|
||||
$email = $this->getArgument(3);
|
||||
$lang = $this->getArgument(4);
|
||||
$avatar = $this->getArgument(5);
|
||||
|
||||
if (empty($name)) {
|
||||
$this->out($this->l10n->t('Enter user name: '));
|
||||
|
@ -262,10 +263,15 @@ HELP;
|
|||
$lang = CliPrompt::prompt();
|
||||
}
|
||||
|
||||
if (empty($avatar)) {
|
||||
$this->out($this->l10n->t('Enter URL of an image to use as avatar (optional): '));
|
||||
$avatar = CliPrompt::prompt();
|
||||
}
|
||||
|
||||
if (empty($lang)) {
|
||||
return UserModel::createMinimal($name, $email, $nick);
|
||||
} else {
|
||||
return UserModel::createMinimal($name, $email, $nick, $lang);
|
||||
return UserModel::createMinimal($name, $email, $nick, $lang, $avatar);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
@ -80,7 +80,7 @@ class Avatar
|
|||
return $fields;
|
||||
}
|
||||
|
||||
$img_str = $fetchResult->getBody();
|
||||
$img_str = $fetchResult->getBodyString();
|
||||
if (empty($img_str)) {
|
||||
Logger::debug('Avatar is invalid', ['avatar' => $avatar]);
|
||||
return $fields;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
@ -656,10 +656,6 @@ class Conversation
|
|||
* But for now, this array respects the old style, just in case
|
||||
*/
|
||||
foreach ($items as $item) {
|
||||
if (in_array($item['author-id'], $this->getBlocklist())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Can we put this after the visibility check?
|
||||
$this->builtinActivityPuller($item, $conv_responses);
|
||||
|
||||
|
@ -694,29 +690,6 @@ class Conversation
|
|||
return $threads;
|
||||
}
|
||||
|
||||
private function getBlocklist(): array
|
||||
{
|
||||
if (!$this->session->getLocalUserId()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$str_blocked = str_replace(["\n", "\r"], ",", $this->pConfig->get($this->session->getLocalUserId(), 'system', 'blocked') ?? '');
|
||||
if (empty($str_blocked)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$blocklist = [];
|
||||
|
||||
foreach (explode(',', $str_blocked) as $entry) {
|
||||
$cid = Contact::getIdForURL(trim($entry), 0, false);
|
||||
if (!empty($cid)) {
|
||||
$blocklist[] = $cid;
|
||||
}
|
||||
}
|
||||
|
||||
return $blocklist;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds some information (Causer, post reason, direction) to the fetched post row.
|
||||
*
|
||||
|
@ -893,6 +866,7 @@ class Conversation
|
|||
|
||||
$emojis = $this->getEmojis($uriids);
|
||||
$quoteshares = $this->getQuoteShares($uriids);
|
||||
$counts = $this->getCounts($uriids);
|
||||
|
||||
if (!$this->config->get('system', 'legacy_activities')) {
|
||||
$condition = DBA::mergeConditions($condition, ["(`gravity` != ? OR `origin`)", ItemModel::GRAVITY_ACTIVITY]);
|
||||
|
@ -900,7 +874,7 @@ class Conversation
|
|||
|
||||
$condition = DBA::mergeConditions(
|
||||
$condition,
|
||||
["`uid` IN (0, ?) AND (NOT `vid` IN (?, ?, ?) OR `vid` IS NULL)", $uid, Verb::getID(Activity::FOLLOW), Verb::getID(Activity::VIEW), Verb::getID(Activity::READ)]
|
||||
["`uid` IN (0, ?) AND (NOT `verb` IN (?, ?, ?) OR `verb` IS NULL)", $uid, Activity::FOLLOW, Activity::VIEW, Activity::READ]
|
||||
);
|
||||
|
||||
$condition = DBA::mergeConditions($condition, ["(`uid` != ? OR `private` != ?)", 0, ItemModel::PRIVATE]);
|
||||
|
@ -1017,6 +991,7 @@ class Conversation
|
|||
|
||||
foreach ($items as $key => $row) {
|
||||
$items[$key]['emojis'] = $emojis[$key] ?? [];
|
||||
$items[$key]['counts'] = $counts[$key] ?? 0;
|
||||
$items[$key]['quoteshares'] = $quoteshares[$key] ?? [];
|
||||
|
||||
$always_display = in_array($mode, [self::MODE_CONTACTS, self::MODE_CONTACT_POSTS]);
|
||||
|
@ -1050,6 +1025,16 @@ class Conversation
|
|||
*/
|
||||
private function getEmojis(array $uriids): array
|
||||
{
|
||||
$emojis = [];
|
||||
|
||||
foreach (Post\Counts::get(['parent-uri-id' => $uriids]) as $count) {
|
||||
$emojis[$count['uri-id']][$count['reaction']]['emoji'] = $count['reaction'];
|
||||
$emojis[$count['uri-id']][$count['reaction']]['verb'] = Verb::getByID($count['vid']);
|
||||
$emojis[$count['uri-id']][$count['reaction']]['total'] = $count['count'];
|
||||
$emojis[$count['uri-id']][$count['reaction']]['title'] = [];
|
||||
}
|
||||
|
||||
// @todo The following code should be removed, once that we display activity authors on demand
|
||||
$activity_emoji = [
|
||||
Activity::LIKE => '👍',
|
||||
Activity::DISLIKE => '👎',
|
||||
|
@ -1058,42 +1043,49 @@ class Conversation
|
|||
Activity::ATTENDNO => '❌',
|
||||
Activity::ANNOUNCE => '♻',
|
||||
Activity::VIEW => '📺',
|
||||
Activity::READ => '📖',
|
||||
];
|
||||
|
||||
$index_list = array_values($activity_emoji);
|
||||
$verbs = array_merge(array_keys($activity_emoji), [Activity::EMOJIREACT, Activity::POST]);
|
||||
|
||||
$verbs = array_merge(array_keys($activity_emoji), [Activity::EMOJIREACT, Activity::POST]);
|
||||
$condition = DBA::mergeConditions(['parent-uri-id' => $uriids, 'gravity' => [ItemModel::GRAVITY_ACTIVITY, ItemModel::GRAVITY_COMMENT], 'verb' => $verbs], ["NOT `deleted`"]);
|
||||
$separator = chr(255) . chr(255) . chr(255);
|
||||
|
||||
$sql = "SELECT `thr-parent-id`, `body`, `verb`, `gravity`, COUNT(*) AS `total`, GROUP_CONCAT(REPLACE(`author-name`, '" . $separator . "', ' ') SEPARATOR '" . $separator . "' LIMIT 50) AS `title` FROM `post-view` WHERE " . array_shift($condition) . " GROUP BY `thr-parent-id`, `verb`, `body`, `gravity`";
|
||||
|
||||
$emojis = [];
|
||||
$sql = "SELECT `parent-uri-id`, `thr-parent-id`, `body`, `verb`, `gravity`, GROUP_CONCAT(REPLACE(`author-name`, '" . $separator . "', ' ') SEPARATOR '" . $separator . "' LIMIT 50) AS `title` FROM `post-view` WHERE " . array_shift($condition) . " GROUP BY `parent-uri-id`, `thr-parent-id`, `verb`, `body`, `gravity`";
|
||||
|
||||
$rows = DBA::p($sql, $condition);
|
||||
while ($row = DBA::fetch($rows)) {
|
||||
if ($row['gravity'] == ItemModel::GRAVITY_ACTIVITY) {
|
||||
$row['verb'] = $row['body'] ? Activity::EMOJIREACT : $row['verb'];
|
||||
$emoji = $row['body'] ?: $activity_emoji[$row['verb']];
|
||||
$emoji = $row['body'] ?: $activity_emoji[$row['verb']];
|
||||
} else {
|
||||
$emoji = '';
|
||||
}
|
||||
|
||||
if (!isset($index_list[$emoji])) {
|
||||
$index_list[] = $emoji;
|
||||
if (isset($emojis[$row['thr-parent-id']][$emoji]['title'])) {
|
||||
$emojis[$row['thr-parent-id']][$emoji]['title'] = array_unique(array_merge($emojis[$row['thr-parent-id']][$emoji]['title'] ?? [], explode($separator, $row['title'])));
|
||||
}
|
||||
$index = array_search($emoji, $index_list);
|
||||
|
||||
$emojis[$row['thr-parent-id']][$index]['emoji'] = $emoji;
|
||||
$emojis[$row['thr-parent-id']][$index]['verb'] = $row['verb'];
|
||||
$emojis[$row['thr-parent-id']][$index]['total'] = ($emojis[$row['thr-parent-id']][$index]['total'] ?? 0) + $row['total'];
|
||||
$emojis[$row['thr-parent-id']][$index]['title'] = array_unique(array_merge($emojis[$row['thr-parent-id']][$index]['title'] ?? [], explode($separator, $row['title'])));
|
||||
}
|
||||
DBA::close($rows);
|
||||
|
||||
return $emojis;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch comment counts from the conversation
|
||||
*
|
||||
* @param array $uriids
|
||||
* @return array
|
||||
*/
|
||||
private function getCounts(array $uriids): array
|
||||
{
|
||||
$counts = [];
|
||||
|
||||
foreach (Post\Counts::get(['parent-uri-id' => $uriids, 'verb' => Activity::POST]) as $count) {
|
||||
$counts[$count['parent-uri-id']] = ($counts[$count['parent-uri-id']] ?? 0) + $count['count'];
|
||||
}
|
||||
|
||||
return $counts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch quote shares from the conversation
|
||||
*
|
||||
|
@ -1274,16 +1266,10 @@ class Conversation
|
|||
return $parents;
|
||||
}
|
||||
|
||||
$blocklist = $this->getBlocklist();
|
||||
|
||||
$item_array = [];
|
||||
|
||||
// Dedupes the item list on the uri to prevent infinite loops
|
||||
foreach ($item_list as $item) {
|
||||
if (in_array($item['author-id'], $blocklist)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$item_array[$item['uri-id']] = $item;
|
||||
}
|
||||
|
||||
|
@ -1472,10 +1458,6 @@ class Conversation
|
|||
continue;
|
||||
}
|
||||
|
||||
if (in_array($item['author-id'], $this->getBlocklist())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// prevent private email from leaking.
|
||||
if ($item['network'] === Protocol::MAIL && $this->session->getLocalUserId() != $item['uid']) {
|
||||
continue;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2023, the Friendica project
|
||||
* @copyright Copyright (C) 2010-2024, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue