Merge branch '2023.03-rc' into stable

This commit is contained in:
Tobias Diekershoff 2023-04-23 15:12:51 +02:00
commit 4eec2804de
1438 changed files with 141572 additions and 118170 deletions

View file

@ -4,12 +4,12 @@ Friendica mods files
## `bookmarklet-share2friendica`
Browser bookmarklet to share any page with your Friendica account.
Please see `bookmarklet-share2friendica/README.md` for detailed instruction.
Please see `bookmarklet-share2friendica/README.md` for detailed instruction.
## `fpostit`
Node-agnostic Friendica bookmarklet by Devlon Duthie.
Unmaintained and unsupported.
Unmaintained and unsupported.
## `home.css` and `home.html`
@ -30,7 +30,11 @@ Please check software documentation to know how modify these examples to make th
## `sample-systemd.timer` and `sample-systemd.service`
Sample systemd unit files to start worker.php periodically.
Please place them in the correct location for your system, typically this is `/etc/systemd/system/friendicaworker.timer` and `/etc/systemd/system/friendicaworker.service`.
Please report problems and improvements to `!helpers@forum.friendi.ca` and `@utzer@social.yl.ms` or open an issue in [the Github Friendica page](https://github.com/friendica/friendica/issues).
Please report problems and improvements to `!helpers@forum.friendi.ca` and `@utzer@social.yl.ms` or open an issue in [the GitHub Friendica page](https://github.com/friendica/friendica/issues).
This is for usage of systemd instead of cron to start the worker periodically, the solution is a work-in-progress and can surely be improved.
## `phpstorm-code-style.xml`
PHP Storm Code Style settings, used for this codebase

View file

@ -1,12 +1,12 @@
# Bookmarklet-share2friendica
Javascript bookmarklet to share websites with your friendica account
JavaScript bookmarklet to share websites with your friendica account
## Getting Started
### Installing
Open the file bookmarklet-share2friendica.js and change 'YourFriendicaDoomain.tld" with your friendica domain
Open the file bookmarklet-share2friendica.js and change 'YourFriendicaDomain.tld" with your friendica domain
If you friendica is at https://myfriend.myfami.ly/ , the original ...
```javascript
@ -20,7 +20,7 @@ javascript:(function(){f='https://myfriend.myfami.ly/bookmarklet/?url='+encodeUR
*Please copy the whole script, not only the part mentioned here!*
Then create a new bookmark, give it a name like "share2Friendica" and paste the script in the address field. Save it. Now you can click on that bookmarklet every time you want to share a website, you are currently reading. A new small window will open where title is prefilled and the website you want to share is put as attachement in the body of the new post.
Then create a new bookmark, give it a name like "share2Friendica" and paste the script in the address field. Save it. Now you can click on that bookmarklet every time you want to share a website, you are currently reading. A new small window will open where title is prefilled and the website you want to share is put as attachment in the body of the new post.
## Additional notes if it doesn't work

View file

@ -1,6 +1,6 @@
<?php
/**
* @copyright Copyright (C) 2010-2022, the Friendica project
* @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*

View file

@ -1,6 +1,6 @@
<!-- styling for this page is done in the home.css file //-->
<!-- Some node specifiv welcome message //-->
<!-- Some node specific welcome message //-->
<p>Welcome to this <a href="https://friendi.ca">Friendica</a> node!</p>
<!-- Some general notes about Friendica, the other networks and difficulty to run //-->
@ -17,7 +17,7 @@
</div>
<div id="c3" class="homeinfobox">
<h4>Is it hard to run Friendica?</h4>
<p>No, not at all! You need a LAMP server, most shared hosting services that offer MySQL, PHP and the ability to run cron jobs will do just fine. If you have your own (virtual) server, for a small Friendica server something like a Raspberry2B is sufficenent from the specs.</p>
<p>No, not at all! You need a LAMP server, most shared hosting services that offer MySQL, PHP and the ability to run cron jobs will do just fine. If you have your own (virtual) server, for a small Friendica server something like a Raspberry2B is sufficient from the specs.</p>
<p><a href="https://github.com/friendica/friendica">Get the source</a></p>
</div>
</div>

50
mods/local.config.ci.php Normal file
View file

@ -0,0 +1,50 @@
<?php
/**
* @copyright Copyright (C) 2010-2023, 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/>.
*
*/
return [
'database' => [
'hostname' => 'localhost',
'username' => 'friendica',
'password' => 'friendica',
'database' => 'friendica',
'charset' => 'utf8mb4',
],
// ****************************************************************
// The configuration below will be overruled by the admin panel.
// Changes made below will only have an effect if the database does
// not contain any configuration for the friendica system.
// ****************************************************************
'config' => [
'admin_email' => 'admin@friendica.local',
'sitename' => 'Friendica Social Network',
'register_policy' => \Friendica\Module\Register::OPEN,
'register_text' => '',
],
'system' => [
'default_timezone' => 'UTC',
'language' => 'en',
'url' => 'https://friendica.local',
// don't start unexpected worker.php processes during test!
'worker_dont_fork' => true,
],
];

View file

@ -29,7 +29,6 @@ return [
// ****************************************************************
'config' => [
'hostname' => '192.168.56.10',
'admin_email' => 'admin@friendica.local',
'sitename' => 'Friendica Social Network',
'register_policy' => \Friendica\Module\Register::OPEN,
@ -39,6 +38,6 @@ return [
'default_timezone' => 'UTC',
'language' => 'en',
'basepath' => '/vagrant',
'ssl_policy' => \Friendica\App\BaseURL::SSL_POLICY_SELFSIGN,
'url' => 'https://192.168.56.10',
],
];

View file

@ -0,0 +1,34 @@
<code_scheme name="Default" version="173">
<Markdown>
<option name="WRAP_TEXT_IF_LONG" value="false" />
<option name="WRAP_TEXT_INSIDE_BLOCKQUOTES" value="false" />
</Markdown>
<PHPCodeStyleSettings>
<option name="ALIGN_KEY_VALUE_PAIRS" value="true" />
<option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" />
<option name="ALIGN_PHPDOC_COMMENTS" value="true" />
<option name="ALIGN_ASSIGNMENTS" value="true" />
<option name="COMMA_AFTER_LAST_ARRAY_ELEMENT" value="true" />
<option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
<option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
<option name="PHPDOC_WRAP_LONG_LINES" value="true" />
<option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
<option name="LOWER_CASE_NULL_CONST" value="true" />
<option name="ELSE_IF_STYLE" value="SEPARATE" />
<option name="VARIABLE_NAMING_STYLE" value="CAMEL_CASE" />
<option name="ALIGN_CLASS_CONSTANTS" value="true" />
<option name="FORCE_SHORT_DECLARATION_ARRAY_STYLE" value="true" />
</PHPCodeStyleSettings>
<codeStyleSettings language="PHP">
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
<option name="ALIGN_MULTILINE_CHAINED_METHODS" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="ALIGN_MULTILINE_BINARY_OPERATION" value="true" />
<option name="ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION" value="true" />
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
<option name="ARRAY_INITIALIZER_WRAP" value="1" />
<indentOptions>
<option name="USE_TAB_CHARACTER" value="true" />
</indentOptions>
</codeStyleSettings>
</code_scheme>

View file

@ -22,7 +22,7 @@ the requested URL.
Enjoy!
On Debian Jessie with lighttpd 1.4.35-4 there was a problem encountered
between curl (which is used by Friendica in the background) and lighttp.
between curl (which is used by Friendica in the background) and lighttpd.
This problem caused requests being served with an error code of 417 in
the logs and no delivery of postings from the contacts.
@ -30,7 +30,7 @@ One can solve the issue by adding
server.reject-expect-100-with-417 = "disable"
to the lighttpd configuratiion file (e.g. in the beginning with the
to the lighttpd configuration file (e.g. in the beginning with the
other 'server.xxx' settings.
---------------( config starts )-----------------

View file

@ -30,12 +30,29 @@
##
# This configuration assumes your domain is example.net
# You have a separate subdomain friendica.example.net
# You want all Friendica traffic to be https using letsencrypt with cerbot
# You want all Friendica traffic to be https using letsencrypt with certbot
# You have an SSL certificate and key for your subdomain
# You have PHP FastCGI Process Manager (php7.4-fpm) running on localhost
# You have Friendica installed in /var/www/friendica
##
##
# by https://syshero.org/2018-04-13-nginx-unique-request-identifier/
# if X-Request-ID is set, NGINX will forward the same value to the next upstream
# if the header is not set, NGINX will generate a random request identifier and add it to the request.
#
# To guarantee backward compatibility, map to format the $request_id variable to a format that matches any old setups.
##
map $request_id $formatted_id {
"~*(?<p1>[0-9a-f]{8})(?<p2>[0-9a-f]{4})(?<p3>[0-9a-f]{4})(?<p4>[0-9a-f]{4})(?<p5>.*)$" "${p1}-${p2}-${p3}-${p4}-${p5}";
}
map $http_x_request_id $uuid {
default "${request_id}";
~* "${http_x_request_id}";
}
server {
listen 80;
server_name friendica.example.net;
@ -59,6 +76,9 @@ server {
# allow uploads up to 20MB in size
client_max_body_size 20m;
client_body_buffer_size 128k;
# add the request id header to show it in the HTTP header output
add_header X-Request-ID $uuid;
# rewrite to front controller as default rule
location / {
@ -105,6 +125,8 @@ server {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_X_REQUEST_ID $uuid;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;

View file

@ -15,6 +15,25 @@
# -----
...
##
# by https://syshero.org/2018-04-13-nginx-unique-request-identifier/
# if X-Request-ID is set, NGINX will forward the same value to the next upstream
# if the header is not set, NGINX will generate a random request identifier and add it to the request.
#
# To guarantee backward compatibility, map to format the $request_id variable to a format that matches any old setups.
##
map $request_id $formatted_id {
"~*(?<p1>[0-9a-f]{8})(?<p2>[0-9a-f]{4})(?<p3>[0-9a-f]{4})(?<p4>[0-9a-f]{4})(?<p5>.*)$" "${p1}-${p2}-${p3}-${p4}-${p5}";
}
map $http_x_request_id $uuid {
default "${request_id}";
~* "${http_x_request_id}";
}
server {
...
@ -30,6 +49,7 @@ server {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Forwarded "for=$proxy_add_x_forwarded_for; proto=$scheme";
proxy_set_header X-Request-ID $uuid;
}
...

View file

@ -20,6 +20,24 @@
# http://wiki.nginx.org/Configuration
##
##
# by https://syshero.org/2018-04-13-nginx-unique-request-identifier/
# if X-Request-ID is set, NGINX will forward the same value to the next upstream
# if the header is not set, NGINX will generate a random request identifier and add it to the request.
#
# To guarantee backward compatibility, map to format the $request_id variable to a format that matches any old setups.
##
map $request_id $formatted_id {
"~*(?<p1>[0-9a-f]{8})(?<p2>[0-9a-f]{4})(?<p3>[0-9a-f]{4})(?<p4>[0-9a-f]{4})(?<p5>.*)$" "${p1}-${p2}-${p3}-${p4}-${p5}";
}
map $http_x_request_id $uuid {
default "${request_id}";
~* "${http_x_request_id}";
}
##
# This configuration assumes your domain is example.net
# You have a separate subdomain friendica.example.net
@ -80,6 +98,9 @@ server {
client_max_body_size 20m;
client_body_buffer_size 128k;
# add the request id header to show it in the HTTP header output
add_header X-Request-ID $uuid;
# rewrite to front controller as default rule
location / {
try_files $uri /index.php?pagename=$uri&$args;
@ -125,6 +146,7 @@ server {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_X_REQUEST_ID $uuid;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;