diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 7484a8362..e65d39709 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -13,7 +13,7 @@ assignees: '' ### Describe the feature you'd like - + ### Describe alternatives you've considered diff --git a/CHANGELOG b/CHANGELOG index 5cccb7d0a..ee423ed44 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -714,13 +714,13 @@ Version 2020.07 (2020-07-12) blockbot: The list of accepted user agents was enhanced [annando] Diaspora*: - Enhanced conntector settings [MrPetovan] + Enhanced connector settings [MrPetovan] PHP Mailer SMTP: Updated phpmailer version [dependabot] showmore_dyn: New addon to collapse long post depending on their actual height [wiwie] twitter: - Enhaceed the handling of mobile twitter URLs [annando] + Enhanced the handling of mobile twitter URLs [annando] Enhanced the handling of quoted tweets [MrPetovan] added HTML error code handling [MrPetovan] various: @@ -958,7 +958,7 @@ Version 2019.09 (2019-09-29) Version 2019.06 (2019-06-23) Friendica Core: - Update to the tranlation (CS, DE, EN-GB, EN-US, ET, FR, IT, PL, PT-BR, SV) [translation teams] + Update to the translation (CS, DE, EN-GB, EN-US, ET, FR, IT, PL, PT-BR, SV) [translation teams] Update to the documentation [nupplaphil, realkinetix, MrPetovan] Update to the themes (frio, vier) [BinkaDroid, MrPetovan, tobiasd] Enhancements to the API [annando, MrPetovan] @@ -978,7 +978,7 @@ Version 2019.06 (2019-06-23) Fixed an issue with the File to Folder feature [MrPetovan] Fixed an issue with the legacy storage engine [fabrixxm] Fixed an issue with the theme and addon path items [MrPetovan] - Fixed an issue occuring when the BasePath was not set [tobiasd] + Fixed an issue occurring when the BasePath was not set [tobiasd] Fixed an issue with additionally opened Sessions [MrPetovan] Fixed an issue with legacy loglevel mapping [nupplaphil] Fixed contact suggestions [annando] @@ -1004,7 +1004,7 @@ Version 2019.06 (2019-06-23) Remove support for defunct F-Droid Friendica app [MrPetovan] Friendica Addons: - Update to the tranlation (ET, SV, ZH_CN) [translation teams] + Update to the translation (ET, SV, ZH_CN) [translation teams] botdetection: Added a new addon for preventing access by bots [nupplaphil, annando] buffer: @@ -1042,7 +1042,7 @@ Version 2019.03 (2019-03-22) Update to the themes (duepuntozero, frio, smoothy, quattro, vier) [lxiter, MrPetovan, nupplaphil, rabuzarus, tobiasd] Enhancements to the API [jasonscheng] Enhancements to the Vagrant development VM [JeroenED] - Enhancements to the storage of gender, sexual preferences and maritial status [JeroenED] + Enhancements to the storage of gender, sexual preferences and marital status [JeroenED] Enhancements to the wording of notifications [MrPetovan] Enhancements to the display of contacts in the profile [MrPetovan] Enhancements to the handling of local links [lxiter] @@ -1071,7 +1071,7 @@ Version 2019.03 (2019-03-22) Fixed an issue with sending out notification mails to the admin [nupplaphil] Fixed an the issue, that the API was ignoring the globalsilence setting [nupplaphil] Fixed issues with the autolinker of URLs in postings [MrPetovan] - Fixed an issue resulting in multible emails after successful updates of the database [nupplaphil] + Fixed an issue resulting in multiple emails after successful updates of the database [nupplaphil] Fixed a timeout issue during detection process of the remote profile [annando] Fixed an issue with postings from blocked servers [annando, MrPetovan] Fixed an issue with the paging of stored folders [MrPetovan] @@ -1103,7 +1103,7 @@ Version 2019.03 (2019-03-22) forumdirectory: Fixed a theming issue with frio [rabuzarus] js_upload: - Fixed a missing extionsion index [nupplaphil] + Fixed a missing extension index [nupplaphil] mailstream: Fixed a curl issue [MrPetovan] piwik: @@ -1323,7 +1323,7 @@ Version 2018.09 (2018-09-23) added addons: mastodoncustomemojis [MrPetovan] deprecated addons: - notimeline, retriver, remote_permissions, widgets + notimeline, retriever, remote_permissions, widgets Directory: Enhancements of the health summary [andyhee] @@ -1349,7 +1349,7 @@ Version 2018.05 (2018-06-01) Enhancements to the relay system [annando] Enhancements to the handling of URL that contain unicode characters [annando] Enhancements to the Vagrant VM configuration [fabrixxm, tobiasd] - Enhancementa to the Babel module [MrPetovan] + Enhancements to the Babel module [MrPetovan] Enhancements to the display of the [code] elements [MrPetovan] Enhancements to the federation (OStatus, diaspora) [annando] Enhancements to the PHP7.2 compatibility [Alkarex, MrPetovan, Quix0r] @@ -1378,7 +1378,7 @@ Version 2018.05 (2018-06-01) Fixed a bug that made edited mentions and hashtags plaintext [annando] Fixed a bug that caused the /display page to receive constandly new updates [annando] Fixed wrong version of a dependency preventing the usage of PHP 5.6 [MrPetovan] - Fixed a bug in OpenID authentification [Quix0r] + Fixed a bug in OpenID authentication [Quix0r] Fixed a bug in the item deletion [annando] Fixed a bug that prevented public comments from being distributed [annando] Fixed a bug that caused empty profile pictures for public contacts [annando] @@ -1477,7 +1477,7 @@ Version 3.6 (2018-03-23) Enhancements to the probing of pump.io profiles [annando] Enhancements to the handling of BBCode tags [MrPetovan] Enhancements to the OEmbed handling [MrPetovan] - Fixed a bug that triggered the display of activities on the cummunity page [annando] + Fixed a bug that triggered the display of activities on the community page [annando] Fixed a bug with personal notes [annando] Fixed a display issue of long postings when using the showmore option [annando] Fixed a bug that caused Twidere to crash on reload [annando] @@ -1485,7 +1485,7 @@ Version 3.6 (2018-03-23) Fixed a bug in URL completion for feed fragments [annando] Fixed a bug in the notification system about new registrations [annando] Fixed the display of dislikes [annando] - Fixed the display of orphans childs in threads [MrPetovan] + Fixed the display of orphan children in threads [MrPetovan] Fixed some SQL problems [annando] Fixed the CLI config script [tobiasd] Fixed the forum selection on the network display [annando] @@ -1539,7 +1539,7 @@ Version 3.6 (2018-03-23) all bridges don't relay postings anymore that are posted to a public forum [annando] DAV addon marked unsupported [tobiasd] communityhome addon marked unsupported [MrPetovan] - yourls addon makrked unsupported [MrPetovan] + yourls addon marked unsupported [MrPetovan] Current Weather: fixing a problem with the weathermap link [zeroadam] NSFW added config examples, reworked the description, now ignores the CW from Mastodon [andyhee, annando, rebeka-catalina] Twitter support 280 chars limit [annando] @@ -1734,7 +1734,7 @@ Version 3.5.1 (2017-03-12) Improvements to the documentation [Hypolite, tobiasd, rabuzarus, beardyunixer, eelcomaljaars] Improvements to the BBCode / Markdown conversation [Hypolite] Improvements to the OStatus protocol implementation [annando] - Improvements to the installation wizzard [tobiasd] + Improvements to the installation wizard [tobiasd] Improvements to the Diaspora connectivity [annando, Hypolite] Work on PHP7 compatibility [ddorian1] Code cleanup [Hypolite, Quix0r] @@ -1796,11 +1796,11 @@ Version 3.5 (2016-09-13) Improvements on the themes (quattro, vier, frost) [rabuzarus, fabrixxm, stieben, annando, Quix0r, tobiasd] Improvements to the ACL dialog [fabrixxm, rabuzarus] Improvements to the database structure and optimization of queries [annando] - Improvements to the UI (contacts, hotkeys, remember me, ARIA, code hightlighting) [rabuzarus, annando, tobiasd] + Improvements to the UI (contacts, hotkeys, remember me, ARIA, code highlighting) [rabuzarus, annando, tobiasd] Improvements to the background process (poller, worker) [annando] Improvements to the admin panel [tobiasd, annando, fabrixxm] Improvements to the performance [annando] - Improvements to the installation wizzard (language selection, RINO version, check required PHP modules, default theme is now vier) [tobiasd] + Improvements to the installation wizard (language selection, RINO version, check required PHP modules, default theme is now vier) [tobiasd] Improvements to the relocation of nodes and accounts [annando] Improvements to the DDoS detection [annando] Improvements to the calendar/events module [annando, rabuzarus] @@ -1825,7 +1825,7 @@ Version 3.5 (2016-09-13) GNU Social Connector [annando] LDAP [Olivier Mehani] smileybutton [rabuzarus] - retriver [mexon] + retriever [mexon] mailstream [mexon] forumdirectory [tobiasd] NEW notifyall (port from Hubzilla) [rabuzarus, tobiasd] @@ -1880,7 +1880,7 @@ Version 3.4.3 (2015-12-22) 'Reload active themes' in theme admin page (fabrixxm) Install routine checks for ImageMagick and GIF support (fabrixxm) Install routine checks for availability of "mcrypt_create_iv()" function, needed for RINO2 (fabrixxm) - Only suported themes are shown in admin page (annando) + Only supported themes are shown in admin page (annando) Optimized SQL queries (annando) System perform an optimize pass on tables in cron, with maximum table size and minimum fragmentation level settings (annando) New access keys in profile and contact pages (rabuzarus, annando) @@ -1895,9 +1895,9 @@ Version 3.4.3 (2015-12-22) New hook 'template_vars' (fabrixxm) $baseurl variable is passed to all templates by default (fabrixxm) OStatus delivery code is moved in new function (annando) - Doxygen config file and initial documetation of code (rabuzarus) + Doxygen config file and initial documentation of code (rabuzarus) Full rewrite of util/php2po.php (fabrixxm) - Bugfixs: + Bugfixes: Remote self works again (annando) Fix feeds mistakenly recognized as OStatus (issue #1914) (annando) Report invalid feeds to user (issue #1913) (annando) @@ -1912,8 +1912,8 @@ Version 3.4.3 (2015-12-22) Fix rapid repeated requests to GNUSocial instance (issue #2038) (annando) Fix install routine css when mod_rewrite doesn't works (issue #2071) (fabrixxm) Fix code to be compliant with minimum required PHP version (issue #2066) (fabrixxm, rabuzarus) - Fix feedback after succesfull registration (issue #2060) (annando) - Fix mention completition popup with TinyMCE (issue #1920) (fabrixxm) + Fix feedback after successful registration (issue #2060) (annando) + Fix mention completion popup with TinyMCE (issue #1920) (fabrixxm) Fix photo cache and proxy when installed in subfolder (ddorian1) Fix bbcode conversion of the about text for the profile (issue #1607) (annando) @@ -1923,7 +1923,7 @@ Version 3.4.2 (2015-09-29) Updates to the documentation (tobiasd, silke, annando) Updates to the translations (tobiasd & translation teams) Updates to themes frost-mobile, vier, duepuntozero, quattro (annando, tobiasd) - Enancements of the communications via OStatus and Diaspora protocols (annando) + Enhancements of the communications via OStatus and Diaspora protocols (annando) Option to automatically follow OStatus contacts was moved from addon to the core (annando) Add tool to import OStatus contacts from an old account (annando) SALMON slaps with OStatus were reworked (annando) @@ -1940,7 +1940,7 @@ Version 3.4.2 (2015-09-29) The global directory is queried in the background to update local DB and improve similar searches in the future. (annando) By communication over the Diaspora protocol, red#matrix sources are now correctly identified, hubzilla is detected (annando) Adopt limitation of usage of "-" in username to avoid conflicts with GNU Social and Diaspora (annando) - The [url] tag now also suppots ftp, mailto, gopher links (annando) + The [url] tag now also supports ftp, mailto, gopher links (annando) An "inspect queue" module was added to the admin panel (tobiasd) Fix some missing SQL data escapes (fabrixxm) Improved the accessibility of the web UI for better screen reader compatibility (annando) @@ -1968,7 +1968,7 @@ Version 3.4.1 (2015-07-06) Implement server-to-server encryption (RINO) using php-encryption library as "RINO 2", deprecate "RINO 1" (issue #1655) (fabrixxm) Fix connection with Diaspora "freelove" account (issue #1572) (annando) Various SQL speedups (annando) - Port of Javascript DatePicker input from RedMatrix (rabuzarus) + Port of JavaScript DatePicker input from RedMatrix (rabuzarus) Port of RedMatrix archive widget (rabuzarus) Load profile owner settings for theme on profile page (rabuzarus) Move HTML code from php into templates (rabuzarus) @@ -1981,7 +1981,7 @@ Version 3.4.1 (2015-07-06) use correct contact when automatically add @-replies add attachment links as enclosures send salmon notifications to every mentioned person - better thread completition + better thread completion support for bookmarks support for events and questions link to items using GUID @@ -1992,7 +1992,7 @@ Version 3.4.1 (2015-07-06) Add fake fields to API response for better Twitter API compatibility (annando) Fix search in local directory (issue #1657) (annando) Improve OEmbed (issue #1640) (annando) - Fix double html encodig in site administration page for sitename and register text (issue #1628) (annando) + Fix double html encoding in site administration page for sitename and register text (issue #1628) (annando) Fix remote subscription from GNU Social (annando) Fix "{0}" in notifications (issue #1642) (annando) Fix desktop notification (fabrixxm) @@ -2001,7 +2001,7 @@ Version 3.4.1 (2015-07-06) Fix emoticons alt text (tobias) Improve threaded display in Vier theme (annando) Use field templates in photo edit form (fabrixxm) - Alllow deletion of any user but yourself (issue #1625) (fabrixxm) + Allow deletion of any user but yourself (issue #1625) (fabrixxm) Install wizard load htconfig template from template/ folder, remove localized htconfig templates (fabrixxm) Add contact detail to non-js contact drop confirm dialog (issue #1629) (fabrixxm) Return geo coord in API (annando) @@ -2020,7 +2020,7 @@ Version 3.4 (2015-04-05) Optionally, "like" and "dislike" activities don't update thread timestamp (annando) Updated markdown libraries (annando) Updated jQuery (StefOfficiel) - Cache zrl verification requests to prevent DSoS (issue #1453) (annando) + Cache zrl verification requests to prevent DDoS (issue #1453) (annando) "Verify SSL" options affects also VERIFYHOST (annando) Better handling of hashtags (annando) Updated translations (translation teams, tobias) @@ -2058,7 +2058,7 @@ Version 3.3.3 (2015-02-24) Share-it button support (annando) More reliable reshare from Diaspora (annando) Load more images via proxy (annando) - util/typo.php uses "php -l" insead of "eval()" to validate code (fabrixxm) + util/typo.php uses "php -l" instead of "eval()" to validate code (fabrixxm) Use $_SERVER array in cli script instead of $argv/$argc (issue #1218) (annando) Updated vagrant setup script (silke) API: support to star/unstar items (fabrixxm) @@ -2079,7 +2079,7 @@ Version 3.3.3 (2015-02-24) Version 3.3.2 (2014-12-26) - Set default value for all not-null fields (fixes SQL warinigs) (annando) + Set default value for all not-null fields (fixes SQL warnings) (annando) Fix item filters in network page (issue #1222) (fabrixxm) Remove reference to an ex Friendica hub from documentation (beardyunixer, tobiasd) API throttling (annando) @@ -2125,7 +2125,7 @@ Version 3.3 (2014-10-06) Interaction ignoring of threads - for selected contects one can now get notifications when they post something, useful e.g. for forums + for selected contacts one can now get notifications when they post something, useful e.g. for forums After a new friendica contact is added, the user is directed to the contact page of the new contact. (Instead of the remote profile) many improvement on all connectors, new app.net connector the algorithm for shortening postings when posting to limited platforms was improved @@ -2137,7 +2137,7 @@ Version 3.3 (2014-10-06) updated the following libraries: smarty 3.1.19, fullcalendar 1.6.4, jquery 1.11, jgrowl 1.3.0 added modernizer 2.8.3, better browser support updates to the DB structure for better performance - preperations to use PDO in a later release + preparations to use PDO in a later release new notification system web interface translations updated, addon translations now also possible separately from the main UI and done for CS, IT, RO, DE vagrant support added for developers @@ -2175,7 +2175,7 @@ Version 3.2 small fixed edit profile photo link better caching of pictures - threadening for outgoing emails + threading for outgoing emails mail import oembed thumbnails SN subscriptions & more SN like behaviour if snautofollow addon is used @@ -2195,7 +2195,7 @@ Version 3.2 improving the install.php script addons now can be members only item object now contains the "edited" information left for the theme designers to show this info in a pretty way - improvments to the user-import from exported account files + improvements to the user-import from exported account files It's now possible to authenticate an ejabberd server against friendica. bugtracker moved to github improvements to MySQL queries diff --git a/README.md b/README.md index 42f76c3af..cbd801b5d 100644 --- a/README.md +++ b/README.md @@ -17,18 +17,18 @@ Have a look at the [installation documentation](doc/Install.md) for further info ### Friendica Screenshots -| ![Frio theme in mobile browser](images/screenshots/friendica-frio-mobile-profle-1.png?raw=true "Frio theme in mobile browser") ![Frio theme in mobile browser](images/screenshots/friendica-frio-mobile-profle-2.png?raw=true "Frio theme in mobile browser") +| ![Frio theme in mobile browser](images/screenshots/friendica-frio-mobile-profile-1.png?raw=true "Frio theme in mobile browser") ![Frio theme in mobile browser](images/screenshots/friendica-frio-mobile-profile-2.png?raw=true "Frio theme in mobile browser") |:--:| |*Frio theme, mobile browser. Timeline and composer view.*| -|![Frio theme in desktop browser](images/screenshots/friendica-frio-green-profle-1.png?raw=true "Frio theme in desktop browser") +|![Frio theme in desktop browser](images/screenshots/friendica-frio-green-profile-1.png?raw=true "Frio theme in desktop browser") |*Frio theme, desktop browser. Timeline view, contact info popped up, control menu open.*| -|![Frio theme in desktop browser](images/screenshots/friendica-frio-green-profle-2.png?raw=true "Frio theme in desktop browser") +|![Frio theme in desktop browser](images/screenshots/friendica-frio-green-profile-2.png?raw=true "Frio theme in desktop browser") |*Frio theme, desktop browser. Menu open for controlling individual posts.*| -|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profle-3.png?raw=true "Frio theme in desktop browser") +|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profile-3.png?raw=true "Frio theme in desktop browser") |*Frio theme, desktop browser. Profile view, notification menu open.*| -|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profle-2.png?raw=true "Frio theme in desktop browser") +|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profile-2.png?raw=true "Frio theme in desktop browser") |*Number of new posts, in total and by group.*| -|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profle-1.png?raw=true "Frio theme in desktop browser") +|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profile-1.png?raw=true "Frio theme in desktop browser") |*Calender with popup of event.*| |![Frio theme default colour in standard browser on tablet](images/screenshots/friendica-frio-default-profile-1.png?raw=true "Frio theme default colour in standard browser on tablet") |*Notifications menu and private messages counter, standard browser on tablet.*| diff --git a/bin/console b/bin/console index 4d76bdc42..79b6c8d3b 100755 --- a/bin/console +++ b/bin/console @@ -3,7 +3,7 @@ dir=$(cd "${0%[/\\]*}" > /dev/null; pwd) if [[ -d /proc/cygdrive && $(which php) == $(readlink -n /proc/cygdrive)/* ]]; then - # We are in Cgywin using Windows php, so the path must be translated + # We are in Cygwin using Windows php, so the path must be translated dir=$(cygpath -m "$dir"); fi diff --git a/bin/dev/autotest.sh b/bin/dev/autotest.sh index a3367db1e..b6f67cf11 100755 --- a/bin/dev/autotest.sh +++ b/bin/dev/autotest.sh @@ -46,7 +46,7 @@ function show_syntax() { echo -e "\t\"testfile\" is the name of a test file, for example lib/template.php" >&2 echo -e "\nDatabase environment variables:\n" >&2 echo -e "\t\"MYSQL_HOST\" Mysql Hostname (Default: localhost)" >&2 - echo -e "\t\"MYSQL_USDRNAME\" Mysql Username (Default: friendica)" >&2 + echo -e "\t\"MYSQL_USERNAME\" Mysql Username (Default: friendica)" >&2 echo -e "\t\"MYSQL_DATABASE\" Mysql Database (Default: test)" >&2 echo -e "\nOther environment variables:\n" >&2 echo -e "\t\"TEST_SELECTION\" test a specific group of tests, can be one of: $TESTS" >&2 @@ -65,7 +65,7 @@ else exit 3 fi -echo "Installing depdendencies" +echo "Installing dependencies" ${PHP} "$COMPOSER" install PHPUNIT="${BASEDIR}/vendor/bin/phpunit" diff --git a/database.sql b/database.sql index ec4f86309..eefd38984 100644 --- a/database.sql +++ b/database.sql @@ -71,7 +71,7 @@ CREATE TABLE IF NOT EXISTS `user` ( `verified` boolean NOT NULL DEFAULT '0' COMMENT 'user is verified through email', `blocked` boolean NOT NULL DEFAULT '0' COMMENT '1 for user is blocked', `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 unkown viewers', + `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 '', @@ -608,7 +608,7 @@ CREATE TABLE IF NOT EXISTS `diaspora-contact` ( `gsid` int unsigned COMMENT 'Global Server ID', `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '', - `interacting_count` int unsigned DEFAULT 0 COMMENT 'Number of contacts this contact interactes with', + `interacting_count` int unsigned DEFAULT 0 COMMENT 'Number of contacts this contact interacts with', `interacted_count` int unsigned DEFAULT 0 COMMENT 'Number of contacts that interacted with this contact', `post_count` int unsigned DEFAULT 0 COMMENT 'Number of posts and comments', PRIMARY KEY(`uri-id`), @@ -880,7 +880,7 @@ CREATE TABLE IF NOT EXISTS `mail` ( `guid` varbinary(255) NOT NULL DEFAULT '' COMMENT 'A unique identifier for this private message', `from-name` varchar(255) NOT NULL DEFAULT '' COMMENT 'name of the sender', `from-photo` varbinary(383) NOT NULL DEFAULT '' COMMENT 'contact photo link of the sender', - `from-url` varbinary(383) NOT NULL DEFAULT '' COMMENT 'profile linke of the sender', + `from-url` varbinary(383) NOT NULL DEFAULT '' COMMENT 'profile link of the sender', `contact-id` varbinary(255) COMMENT 'contact.id', `author-id` int unsigned COMMENT 'Link to the contact table with uid=0 of the author of the mail', `convid` int unsigned COMMENT 'conv.id', diff --git a/doc/API-Friendica.md b/doc/API-Friendica.md index a33cd53b8..197a5033e 100644 --- a/doc/API-Friendica.md +++ b/doc/API-Friendica.md @@ -135,7 +135,7 @@ Alias of [`api/conversation/show`](#GET+api%2Fconversation%2Fshow). ### GET api/statusnet/config -Returns the public Friendica node configuration. +Returns the public Friendica node configuration. ### GET api/gnusocial/config @@ -163,7 +163,7 @@ Add or remove an activity from an item. * `attendmaybe` To remove an activity, prepend the verb with "un", eg. "unlike" or "undislike" -Attend verbs disable eachother: that means that if "attendyes" was added to an item, adding "attendno" remove previous "attendyes". +Attend verbs disable each other: that means that if "attendyes" was added to an item, adding "attendno" remove previous "attendyes". Attend verbs should be used only with event-related items (there is no check at the moment). #### Parameters @@ -305,7 +305,7 @@ Returns [Private Messages](help/API-Entities#Private+message) matching the provi #### Parameters * `searchstring`: string for which the API call should search as '%searchstring%' in field 'body' of all messages of the authenticated user (caption ignored) -* `getText` (optional): `plain`|`html` If ommited, the title is prepended to the plaintext body in the `text` attribute of the private message objects. +* `getText` (optional): `plain`|`html` If omitted, the title is prepended to the plaintext body in the `text` attribute of the private message objects. * `getUserObjects` (optional): `true`|`false` If `false`, the `sender` and `recipient` attributes of the private message object are absent. #### Return values @@ -604,7 +604,7 @@ Sets item table entries for this photo to deleted = 1. On success: -* JSON return +* JSON return ```json { @@ -633,7 +633,7 @@ Deletes all images with the specified album name, is not reversible -> ensure th On success: -* JSON return +* JSON return ```json { @@ -646,7 +646,7 @@ On error: * 403 FORBIDDEN: if not authenticated * 400 BADREQUEST: "no albumname specified", "album not available" -* 500 INTERNALSERVERERROR: "problem with deleting item occured", "unknown error - deleting from database failed" +* 500 INTERNALSERVERERROR: "problem with deleting item occurred", "unknown error - deleting from database failed" ### POST api/friendica/photoalbum/update @@ -682,7 +682,7 @@ Get a list of photo albums for the user #### Parameters -None +None #### Return values On success a list of photo album objects: @@ -839,7 +839,8 @@ A Mastodon [Status Entity](https://docs.joinmastodon.org/entities/Status/) "poll": null, "friendica": { "title": "", - "dislikes_count": 1 + "dislikes_count": 1, + "disliked": true } } ``` @@ -886,7 +887,7 @@ Removes the dislike mark (if it exists) on this status for this user A Mastodon [Status Entity](https://docs.joinmastodon.org/entities/Status/) #### Example: -`https:///api/friendica/statuses/341/dislike` +`https:///api/friendica/statuses/341/undislike` ```json { @@ -913,7 +914,8 @@ A Mastodon [Status Entity](https://docs.joinmastodon.org/entities/Status/) "poll": null, "friendica": { "title": "", - "dislikes_count": 0 + "dislikes_count": 0, + "disliked": false } } ``` diff --git a/doc/API-Mastodon.md b/doc/API-Mastodon.md index 5fcb4782c..18a783720 100644 --- a/doc/API-Mastodon.md +++ b/doc/API-Mastodon.md @@ -39,7 +39,7 @@ Extensions to the [Mastodon Instance::V2 Entities](https://docs.joinmastodon.org * `codename`: The Friendica version code name * `db_version`: The database schema version number -Example: +Example: ```json { "domain": "friendicadevtest1.myportal.social", @@ -68,6 +68,7 @@ Extensions to the [Mastodon Status Entities](https://docs.joinmastodon.org/entit * `delivery_queue_done`: Total number of remote servers that have successfully been federated to so far. * `delivery_queue_failed`: Total number of remote servers that have we failed to federate to so far. * `dislikes_count`: The number of dislikes that a status has accumulated according to the server. + * `disliked`: Whether the API user disliked the status. Example: ```json @@ -117,7 +118,7 @@ Example: "title": "", "delivery_data": { "delivery_queue_count": 10, - "delivery_queue_done": 3, + "delivery_queue_done": 3, "delivery_queue_failed": 0 }, "dislikes_count": 0 @@ -213,7 +214,7 @@ Example: - Additionally to the static values `public`, `unlisted` and `private`, the `visibility` parameter can contain a numeric value with a group id. - Additional field `quote_id` for the post that is being quote reshared - Additional fields `friendica` for Friendica specific parameters: - - `title`: Explicitly sets the title for a post status, ignored if used on a comment status. For post statuses the legacy behavior is to use any "spoiler text" as the title if it is provided. If both the title and spoiler text are provided for a post status then they will each be used for their respective roles. If no title is provided then the legacy behavior will persist. If you want to create a post with no title but spoiler text then explicitly set the title but set it to an empty string `""`. + - `title`: Explicitly sets the title for a post status, ignored if used on a comment status. For post statuses the legacy behavior is to use any "spoiler text" as the title if it is provided. If both the title and spoiler text are provided for a post status then they will each be used for their respective roles. If no title is provided then the legacy behavior will persist. If you want to create a post with no title but spoiler text then explicitly set the title but set it to an empty string `""`. - [`GET /api/v1/statuses/:id`](https://docs.joinmastodon.org/methods/statuses/#get) - [`DELETE /api/v1/statuses/:id`](https://docs.joinmastodon.org/methods/statuses/#delete) - [`GET /api/v1/statuses/:id/context`](https://docs.joinmastodon.org/methods/statuses/#context) @@ -264,7 +265,7 @@ Example: ## Currently unimplemented endpoints -These emdpoints are planned to be implemented somewhere in the future. +These endpoints are planned to be implemented somewhere in the future. - [`POST /api/v1/accounts/:id/remove_from_followers`](https://github.com/mastodon/mastodon/pull/16864) - [`GET /api/v1/accounts/familiar_followers`](https://github.com/mastodon/mastodon/pull/17700) diff --git a/doc/Account-Basics.md b/doc/Account-Basics.md index 5e22e8a15..a205ea7e5 100644 --- a/doc/Account-Basics.md +++ b/doc/Account-Basics.md @@ -10,7 +10,7 @@ Not all Friendica sites allow open registration. If registration is allowed, you will see a "Register" link immediately below the login prompt on the site's home page. Following this link will take you to the site registration page. The strength of our network is that lots of different sites are all completely compatible with each other. -If the site you're visting doesn't allow registration, or you think you might prefer another one, there is a [list of public servers here](https://dir.friendica.social/servers) and hopefully you will find one that meets your needs. +If the site you're visiting doesn't allow registration, or you think you might prefer another one, there is a [list of public servers here](https://dir.friendica.social/servers) and hopefully you will find one that meets your needs. If you'd like to have your own server, you can do that too. Visit [the Friendica website](http://friendi.ca/) to download the code with setup instructions. diff --git a/doc/AddonStorageBackend.md b/doc/AddonStorageBackend.md index eaa58cd4d..c3a6d1639 100644 --- a/doc/AddonStorageBackend.md +++ b/doc/AddonStorageBackend.md @@ -100,7 +100,7 @@ See doxygen documentation of `IWritableStorage` interface for details about each ## Register a storage backend class -Each backend must be registered in the system when the plugin is installed, to be aviable. +Each backend must be registered in the system when the plugin is installed, to be available. `DI::facStorage()->register(string $class)` is used to register the backend class. @@ -140,18 +140,18 @@ abstract class StorageTest There are two intended types of exceptions for storages -### `ReferenceStorageExecption` +### `ReferenceStorageException` This storage exception should be used in case the caller tries to use an invalid references. This could happen in case the caller tries to delete or update an unknown reference. The implementation of the storage backend must not ignore invalid references. -Avoid throwing the common `StorageExecption` instead of the `ReferenceStorageException` at this particular situation! +Avoid throwing the common `StorageException` instead of the `ReferenceStorageException` at this particular situation! ### `StorageException` This is the common exception in case unexpected errors happen using the storage backend. -If there's a predecessor to this exception (e.g. you caught an exception and are throwing this execption), you should add the predecessor for transparency reasons. +If there's a predecessor to this exception (e.g. you caught an exception and are throwing this exception), you should add the predecessor for transparency reasons. Example: @@ -320,7 +320,7 @@ The file is `addon/samplestorage/samplestorage.php` */ diff --git a/doc/Addons.md b/doc/Addons.md index dbb2c501f..5a80a9558 100644 --- a/doc/Addons.md +++ b/doc/Addons.md @@ -44,7 +44,7 @@ Uninstalling an addon automatically unregisters any hook it registered, but if y The install and uninstall functions will be called (i.e. re-installed) if the addon changes after installation. Therefore your uninstall should not destroy data and install should consider that data may already exist. -Future extensions may provide for "setup" amd "remove". +Future extensions may provide for "setup" and "remove". ## PHP addon hooks @@ -124,7 +124,7 @@ function _footer() ### JavaScript hooks The main Friendica script provides hooks via events dispatched on the `document` property. -In your Javascript file included as described above, add your event listener like this: +In your JavaScript file included as described above, add your event listener like this: ```js document.addEventListener(name, callback); @@ -133,7 +133,7 @@ document.addEventListener(name, callback); - *name* is the name of the hook and corresponds to a known Friendica JavaScript hook. - *callback* is a JavaScript anonymous function to execute. -More info about Javascript event listeners: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener +More info about JavaScript event listeners: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener #### Current JavaScript hooks @@ -264,7 +264,7 @@ $data = [ ##### With multiple submit buttons ```php $data = [ - 'addon' => 'catavar', + 'addon' => 'catavatar', 'title' => DI::l10n()->t('Cat Avatar Settings'), 'html' => $html, 'submit' => [ @@ -402,7 +402,7 @@ Called prior to output of personal XRD file. ### home_content Called prior to output home page content, shown to unlogged users. -`$b` is the HTML sring of section region. +`$b` is the HTML string of section region. ### contact_edit Called when editing contact details on an individual from the Contacts page. @@ -425,7 +425,7 @@ Called after HTML content functions have completed. ### footer Called after HTML content functions have completed. -Deferred Javascript files should be registered using this hook. +Deferred JavaScript files should be registered using this hook. `$b` is (string) HTML of footer div/element. ### avatar_lookup diff --git a/doc/Chats.md b/doc/Chats.md index df3e7c784..1fd76ec6f 100644 --- a/doc/Chats.md +++ b/doc/Chats.md @@ -39,7 +39,7 @@ You can use several servers to create an account: ### 1. Basics -At first you have to get the current version. You can either pull it from [Github](https://github.com) like so: +At first you have to get the current version. You can either pull it from [GitHub](https://github.com) like so: $> cd /var/www/virtual/YOURSPACE/html/addon; git pull diff --git a/doc/Composer.md b/doc/Composer.md index 7b62ba6cf..7310a443e 100644 --- a/doc/Composer.md +++ b/doc/Composer.md @@ -20,7 +20,7 @@ Composer requires PHP CLI and the following examples assume it's available syste #### From Archive -If you just unpacked a Friendica release archive, you don't have to use Commposer at all, all the required libraries are already bundled in the archive. +If you just unpacked a Friendica release archive, you don't have to use Composer at all, all the required libraries are already bundled in the archive. #### Installing with Git diff --git a/doc/Config.md b/doc/Config.md index fbc9ff1fd..3e0459f9c 100644 --- a/doc/Config.md +++ b/doc/Config.md @@ -250,7 +250,7 @@ key = value
 [config]
-register_policty = REGISTER_CLOSED
+register_policy = REGISTER_CLOSED
 
 'config' => [
diff --git a/doc/Developer-Domain-Driven-Design.md b/doc/Developer-Domain-Driven-Design.md
index a4af43688..305207444 100644
--- a/doc/Developer-Domain-Driven-Design.md
+++ b/doc/Developer-Domain-Driven-Design.md
@@ -47,7 +47,7 @@ function doSomething(\Friendica\Contact\Introductions\Collection\Introductions $
 }
 
 /** @var $intros \Friendica\Contact\Introductions\Collection\Introductions */
-$intros = \Friendica\DI::intro()->selecForUser(Session::getLocalUser());
+$intros = \Friendica\DI::intro()->selectForUser(Session::getLocalUser());
 
 doSomething($intros);
 ```
diff --git a/doc/Developer-How-To-Move-Classes-to-src.md b/doc/Developer-How-To-Move-Classes-to-src.md
index 3087918b7..c33df3d72 100644
--- a/doc/Developer-How-To-Move-Classes-to-src.md
+++ b/doc/Developer-How-To-Move-Classes-to-src.md
@@ -95,7 +95,7 @@ Please remove all the `require_once` mentions of the former file, as they will p
 ## Miscellaneous tips
 
 When you are done with moving the class, please run `php bin/console.php typo` from the Friendica base directory to check for obvious mistakes.
-Howevever, this tool isn't bullet-proof, and a staging install of Friendica is recommended to test your class move without impairing your production server if you host one.
+However, this tool isn't bullet-proof, and a staging install of Friendica is recommended to test your class move without impairing your production server if you host one.
 
 Most of Friendica processes are run in the background, so make sure to turn on your debug log to check for errors that wouldn't show up while simply browsing Friendica.
 
diff --git a/doc/Developers-Intro.md b/doc/Developers-Intro.md
index 7a6e8861c..329219925 100644
--- a/doc/Developers-Intro.md
+++ b/doc/Developers-Intro.md
@@ -92,7 +92,7 @@ For documentation we use the standard of *one sentence per line* for the `md` fi
 
 #### Check with [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer)
 
-This tool checks your files against a variety of coding standards, including PSR-2, and ouputs a report of all the standard violations.
+This tool checks your files against a variety of coding standards, including PSR-2, and outputs a report of all the standard violations.
 You can simply install it through PEAR: `pear install PHP_CodeSniffer`
 Once it is installed and available in your PATH, here's the command to run before committing your work:
 
@@ -109,7 +109,7 @@ Here's the command to automatically fix the files you created/modified:
 
 	$> phpcbf --standard=ruleset.xml 
 
-If the command-line tools `diff` and `patch` are unavailabe for you, `phpcbf` can use slightly slower PHP equivalents by using the `--no-patch` argument.
+If the command-line tools `diff` and `patch` are unavailable for you, `phpcbf` can use slightly slower PHP equivalents by using the `--no-patch` argument.
 
 ### Code documentation
 
diff --git a/doc/Github.md b/doc/GitHub.md
similarity index 100%
rename from doc/Github.md
rename to doc/GitHub.md
diff --git a/doc/Home.md b/doc/Home.md
index 74ae151fb..d343c41cc 100644
--- a/doc/Home.md
+++ b/doc/Home.md
@@ -42,7 +42,7 @@ Friendica Documentation and Resources
 
 * [Get started](help/Developers-Intro)
 * Set up development environment
-	* [Help on Github](help/Github)
+	* [Help on GitHub](help/GitHub)
 	* [Help on Vagrant](help/Vagrant)
 	* [Bugs and Issues](help/Bugs-and-Issues)
 * Code structure
@@ -69,7 +69,7 @@ Friendica Documentation and Resources
 * Ways to get Support
   * Friendica Support Forum: [@helpers@forum.friendi.ca](https://forum.friendi.ca/~helpers)
   * [Mailing List Archive](http://mailman.friendi.ca/mailman/listinfo/support-friendi.ca) you can subscribe to the list by sending an email to ``support-request(at)friendi.ca?subject=subscribe``
-  * Community chat rooms (the IRC, Matrix and XMPP rooms are bridget) these public chats are logged [from IRC](https://gnusociarg.nsupdate.info/2021/%23friendica/) and [Matrix](https://view.matrix.org/alias/%23friendi.ca:matrix.org/)
+  * Community chat rooms (the IRC, Matrix and XMPP rooms are bridged) these public chats are logged [from IRC](https://gnusociarg.nsupdate.info/2021/%23friendica/) and [Matrix](https://view.matrix.org/alias/%23friendi.ca:matrix.org/)
     * XMPP/Jabber MUC: support(at)forum.friendi.ca
     * IRC: #friendica at [libera.chat](https://web.libera.chat/?channels=#friendica)
     * Matrix: [#friendi.ca](https://matrix.to/#/#friendi.ca:matrix.org) or [#friendica-en](https://matrix.to/#/#friendica-en:matrix.org) at matrix.org
diff --git a/doc/Improve-Performance.md b/doc/Improve-Performance.md
index 79490c257..1d0a859f1 100644
--- a/doc/Improve-Performance.md
+++ b/doc/Improve-Performance.md
@@ -81,6 +81,6 @@ Please refer to external documentation for a more detailed explanation how to se
 
 ### Database
 
-There are scripts like [tuning-primer.sh](http://www.day32.com/MySQL/) and [mysqltuner.pl](http://mysqltuner.pl) that analyze your database server and give hints on values that could be changed.
+There are scripts like [tuning-primer.sh](https://github.com/BMDan/tuning-primer.sh) and [mysqltuner.pl](https://github.com/major/MySQLTuner-perl/blob/master/mysqltuner.pl) that analyze your database server and give hints on values that could be changed.
 
 Please enable the slow query log. This helps to find performance problems.
diff --git a/doc/Install.md b/doc/Install.md
index d0c3576ac..ddffe601c 100644
--- a/doc/Install.md
+++ b/doc/Install.md
@@ -51,10 +51,13 @@ For alternative server configurations (such as Nginx server and MariaDB database
 ### Alternative Installation Methods
 
 This guide will walk you through the manual installation process of Friendica.
-If this is nothing for you, you might be interested in
+If this is nothing for you, you might be interested in the following:
 
-* the [Friendica Docker image](https://github.com/friendica/docker) or
-* how to [install Friendica with YunoHost](https://github.com/YunoHost-Apps/friendica_ynh).
+* the [Friendica Docker image](https://github.com/friendica/docker)
+* how to [install Friendica with YunoHost](https://github.com/YunoHost-Apps/friendica_ynh)
+* [Tutorial: Creating a Friendica Server with Ubuntu 22.04](https://nequalsonelifestyle.com/2022/07/30/creating-friendica-server-ubuntu/)
+  * [Setting Up Friendica Daemon as a Systemd Service Tutorial](https://nequalsonelifestyle.com/2022/08/04/setting-up-friendica-daemon-systemd-service/)
+* [Setting up Friendica on Unraid](https://www.jenovarain.com/2023/03/setting-up-friendica-on-unraid/) (NAS)
 
 ### Get Friendica
 
@@ -228,7 +231,7 @@ Copy `.htaccess-dist` to `.htaccess` (be careful under Windows) to have working
 
 Example:
 
-    cp .htacces-dist .htaccess
+    cp .htaccess-dist .htaccess
 
 *Note*: Do **not** rename the `.htaccess-dist` file as it is tracked by GIT and renaming will cause a dirty working directory.
 
@@ -350,7 +353,7 @@ Often this will need to be resolved with your hosting provider or (if self-hoste
 First check your file permissions.
 Your website and all contents must generally be world-readable.
 
-Ensure that mod-rewite is installed and working, and that your `.htaccess` file
+Ensure that mod-rewrite is installed and working, and that your `.htaccess` file
 is being used. To verify the latter, create a file `test.out` containing the
 word "test" in the top directory of Friendica, make it world readable and point
 your web browser to
@@ -463,9 +466,11 @@ After that, restart mysql and try again.
 
 ### Your worker never or rarely runs
 
-Friendica is coded to always play nice. It checks whether the host machine is idle enough and if it _seems_ to be overloaded, it intermittently refuses to process the worker queue.
+Friendica is coded to always play nice.
+It checks whether the host machine is idle enough and if it _seems_ to be overloaded, it intermittently refuses to process the worker queue.
 
-Such checks originate from the days of single-user single-core machines and involves thresholds that you should adjust based on the number of exclusive CPU cores you have. See this issue for more information:
+Such checks originate from the days of single-user single-core machines and involves thresholds that you should adjust based on the number of exclusive CPU cores you have.
+See this issue for more information:
 
 * https://github.com/friendica/friendica/issues/10131
 
@@ -482,28 +487,40 @@ You tried to upload an image up to 100kB and it failed.
 
 You may not have the ownership or file mode set correctly if you are using the file system storage backend.
 
-Change the backend to database. If this solves it, that is what needs to be fixed.
+Change the backend to database.
+If this solves it, that is what needs to be fixed.
+
+Verify in your PHP ini:
+
+* `file_uploads`: should be `1`
+* `upload_tmp_dir`: should be writable (falls back to system default temp) and not blocked by `open_basedir`
 
 ### Error uploading large files
 
 You may find `413 Request Entity Too Large` or `500 Internal Error` in the network inspector of the browser if the file is too large, for example if it is a video.
 
-First try to upload a very small file, up to 100kB. If that succeeds, you will need to increase limits at multiple places, including on any web proxy that you are using.
+First try to upload a very small file, up to 100kB.
+If that succeeds, you will need to increase limits at multiple places, including on any web proxy that you are using.
+Which one applies to you depends on your installation.
 
 In your PHP ini:
 
 * `upload_max_filesize`: defaults to 2MB
 * `post_max_size`: defaults to 8MB, must be greater than `upload_max_filesize`
 * `memory_limit`: defaults to 128MB, must be greater than `post_max_size`
+* `max_input_time`: time limit of an upload, defaults to -1, meaning it uses `max_execution_time` instead
+* `max_execution_time`: defaults to 30 seconds, should be enough if you also set `max_input_time`
 
 You should verify whether you changed them in the _right file_ by checking the web interface at the end of the overview on the `Admin` panel.
 
-For Apache2:
+In your Apache2 config:
 
 * `LimitRequestBody`: defaults to unlimited
+* `FcgidMaxRequestLen`: defaults to 128kB
 * `SSLRenegBufferSize`: defaults to 128kB, only if your site uses TLS and perhaps only when using `SSLVerifyClient` or `SSLVerifyDepth`
+* Remove `LoadModule reqtimeout_module modules / mod_reqtimeout.so` or adjust `RequestReadTimeout`: defaults to 20 seconds and >= 500 byte/second
 
-For nginx:
+In your nginx config:
 
 * `client_max_body_size`: defaults to 1MB
 
@@ -511,7 +528,28 @@ If you are using the database backend for storage, increase this in your SQL con
 
 * `max_allowed_packet`: defaults to 32MB
 
-If you use the ModSecurity WAF:
+In your ModSecurity WAF config:
 
 * `SecRequestBodyLimit`: defaults to 12MB
 * `SecRequestBodyNoFilesLimit`: defaults to 128kB, should not apply to Friendica
+
+In the end, you will need to restart all services that you have changed configuration for.
+If you don't know which ones these are, just reboot.
+
+### Diaspora support is not activated
+
+You get this error when you try to add a Diaspora contact.
+
+You can enable it from the web interface in `Admin -> Site -> Policies -> Enable diaspora* support`.
+You may also set it manually in the config file or in the database within the `diaspora_enabled` key of the `system` category.
+
+### Upgrade failed due to DB migration timeout
+
+Altering of a table may fail if it contains a large number of rows.
+First verify the existing timeout (50s by default):
+
+`show global variables like "innodb_lock_wait_timeout";`
+
+Then increase it:
+
+`set global innodb_lock_wait_timeout=600;`
diff --git a/doc/Making-Friends.md b/doc/Making-Friends.md
index e435dc7a4..aadf24796 100644
--- a/doc/Making-Friends.md
+++ b/doc/Making-Friends.md
@@ -50,12 +50,12 @@ This will take you through a similar process.
 
 Connect to users of alternate networks
 ---
-### Across the Federation and Fedivese
-You can also use your Identity Address or other people's Identity Addresses to become friends across the so-called Federation/Fedivese of open source social media.
+### Across the Federation and Fediverse
+You can also use your Identity Address or other people's Identity Addresses to become friends across the so-called Federation/Fediverse of open source social media.
 Currently, Friendica supports connections with people on diaspora*, Red, Hubzilla, GNU Social, StatusNet, Mastodon, Pleroma, socialhome, and ganggo platforms.
 
 If you know (for instance) "alice" on gnusocial.net (a GNU Social site) you could put alice@gnusocial.net into your Contact page and become friends across networks.
-Likwise you can put in the URL to Alice's gnusocial.net page, if you wish.
+Likewise you can put in the URL to Alice's gnusocial.net page, if you wish.
 Note: Some versions of GNU Social software may require the full URL to your profile and may not work with the identity address.
 
 People on these networks can also initiate contact with you, if they know your contact details.
@@ -74,7 +74,7 @@ Create an email contact with for example Alice on Gmail, enter her email in foll
 In order to avoid abuse or spam, you must have an email from Alice with the correct email address in your email inbox.
 
 Subscribing to mailing lists is done in the same way, but without the use of the "mailto:" prefix.
-To subscribe to a mailing list, enter the email in following example format "mailling-list@list-server.net".
+To subscribe to a mailing list, enter the email in following example format "mailing-list@list-server.net".
 
 ### Syndication feeds
 You can "follow" almost anybody or any website that produces a syndication feed (RSS/Atom,etc.).
diff --git a/doc/Move-Account.md b/doc/Move-Account.md
index 70d23daa9..f2b56b982 100644
--- a/doc/Move-Account.md
+++ b/doc/Move-Account.md
@@ -19,7 +19,7 @@ Friendica contacts
 ---
 Friendica will recreate your account on the new server, with your contacts and groups.
 A message is sent to Friendica contacts, to inform them about your move:
-If your contacts are runnning on an updated server, your details on their side will be automatically updated.
+If your contacts are running on an updated server, your details on their side will be automatically updated.
 
 GNU Social contacts
 ---
diff --git a/doc/Quick-Start-guide.md b/doc/Quick-Start-guide.md
index 2725fe4f8..ebcc6243f 100644
--- a/doc/Quick-Start-guide.md
+++ b/doc/Quick-Start-guide.md
@@ -4,7 +4,7 @@ If you're not already logged in, do so in the frame below.
 Once you've logged in (or if you are already logged in), you'll now be looking at your profile page.
 
 This is a bit like a Facebook wall.
-It's where all your status messgages are kept, and where your friends come to post on your wall.
+It's where all your status messages are kept, and where your friends come to post on your wall.
 
 To write your status, simply click on the Pencil & Paper icon in the top right (in the Frio theme), or click in the box that says "share" (other themes).
 When you do this, the posting dialog box will appear or the share box will expand.
diff --git a/doc/Settings.md b/doc/Settings.md
index 16b7ec38a..3ec2144e7 100644
--- a/doc/Settings.md
+++ b/doc/Settings.md
@@ -104,12 +104,12 @@ Default is false.
 #### File storage backend
 
 Set the backend used by Friendica to store uploaded file data.
-Two storage backends are avaiable with Friendica:
+Two storage backends are available with Friendica:
 
 - **Database** : Data is stored in a dedicated table in database (`storage`)
 - **Filesystem** : Data is stored as file on the filesystem.
 
-More storage backends can be avaiable from third-party addons.
+More storage backends can be available from third-party addons.
 If you use those, please refer to the documentation of those addons for further information.
 
 Default value is 'Database (legacy)': it's the legacy way used to store data directly in database.
diff --git a/doc/Tags-and-Mentions.md b/doc/Tags-and-Mentions.md
index 020214457..ab87470b6 100644
--- a/doc/Tags-and-Mentions.md
+++ b/doc/Tags-and-Mentions.md
@@ -52,5 +52,5 @@ The same rules apply as with names that spaces within tags are represented by th
 It is therefore not possible to create a tag whose target contains an underscore.
 
 Topical tags are also not linked if they are purely numeric, e.g. #1.
-If you wish to use a numerica hashtag, please add some descriptive text such as #2012-elections.
+If you wish to use a numeric hashtag, please add some descriptive text such as #2012-elections.
 
diff --git a/doc/Two-Factor-Authentication.md b/doc/Two-Factor-Authentication.md
index 2ec33ed29..b413f9f25 100644
--- a/doc/Two-Factor-Authentication.md
+++ b/doc/Two-Factor-Authentication.md
@@ -13,7 +13,7 @@ If 2FA is already enabled and you want to add another device, you must re-config
 ### 1. Download an authenticator app
 
 Any authenticator app should work with Friendica.
-Notheless, we recommend:
+Nonetheless, we recommend:
 
  - For iOS, [Matt Rubin's MIT-licensed Authenticator app](https://mattrubin.me/authenticator).
  - For Android, [andOTP](https://github.com/andOTP/andOTP).
@@ -68,7 +68,7 @@ Instead, if you enabled two-factor authentication, you have to generate app-spec
 
 You can generate as many app-specific passwords as you want, they will be shown once to you just after you generated it.
 Just copy and paste it in your third-party app in the Friendica account password input field at this point.
-We recommend generating a single app-specific password for each separate third-party app you are using, using a meaningul description of the target app (like "Frienqa on my Fairphone 2").
+We recommend generating a single app-specific password for each separate third-party app you are using, using a meaningful description of the target app (like "Frienqa on my Fairphone 2").
 
 You can also revoke any and all app-specific password you generated this way.
 This may log you out of the third-party application(s) you used the revoked app-specific password to log in with.
diff --git a/doc/Vagrant.md b/doc/Vagrant.md
index ea098e3fb..16088cd37 100644
--- a/doc/Vagrant.md
+++ b/doc/Vagrant.md
@@ -31,7 +31,7 @@ The mysql database is called "friendica", the mysql user and password both are "
 Your local working directory is set up as a shared directory with the VM (/vagrant).
 7. Check the changes in your browser in the VM.
 Find the Friendica log file `/vagrant/logfile.out` on the VM or in the `logfile.out` in you local Friendica directory.
-8. Commit and push your changes directly back to Github.
+8. Commit and push your changes directly back to GitHub.
 
 If you want to stop vagrant after finishing your work, run the following command
 
diff --git a/doc/database/db_diaspora-contact.md b/doc/database/db_diaspora-contact.md
index 4beaeb019..5bbc9ab22 100644
--- a/doc/database/db_diaspora-contact.md
+++ b/doc/database/db_diaspora-contact.md
@@ -27,7 +27,7 @@ Fields
 | gsid              | Global Server ID                                             | int unsigned | YES  |     | NULL                |       |
 | created           |                                                              | datetime     | NO   |     | 0001-01-01 00:00:00 |       |
 | updated           |                                                              | datetime     | NO   |     | 0001-01-01 00:00:00 |       |
-| interacting_count | Number of contacts this contact interactes with              | int unsigned | YES  |     | 0                   |       |
+| interacting_count | Number of contacts this contact interacts with               | int unsigned | YES  |     | 0                   |       |
 | interacted_count  | Number of contacts that interacted with this contact         | int unsigned | YES  |     | 0                   |       |
 | post_count        | Number of posts and comments                                 | int unsigned | YES  |     | 0                   |       |
 
diff --git a/doc/database/db_mail.md b/doc/database/db_mail.md
index 2b588b4d7..834b556f6 100644
--- a/doc/database/db_mail.md
+++ b/doc/database/db_mail.md
@@ -13,7 +13,7 @@ Fields
 | guid          | A unique identifier for this private message                   | varbinary(255)     | NO   |     |                     |                |
 | from-name     | name of the sender                                             | varchar(255)       | NO   |     |                     |                |
 | from-photo    | contact photo link of the sender                               | varbinary(383)     | NO   |     |                     |                |
-| from-url      | profile linke of the sender                                    | varbinary(383)     | NO   |     |                     |                |
+| from-url      | profile link of the sender                                     | varbinary(383)     | NO   |     |                     |                |
 | contact-id    | contact.id                                                     | varbinary(255)     | YES  |     | NULL                |                |
 | author-id     | Link to the contact table with uid=0 of the author of the mail | int unsigned       | YES  |     | NULL                |                |
 | convid        | conv.id                                                        | int unsigned       | YES  |     | NULL                |                |
diff --git a/doc/database/db_user.md b/doc/database/db_user.md
index 7f58ce58f..c1aefd6be 100644
--- a/doc/database/db_user.md
+++ b/doc/database/db_user.md
@@ -32,7 +32,7 @@ Fields
 | verified                 | user is verified through email                                                    | boolean            | NO   |     | 0                   |                |
 | blocked                  | 1 for user is blocked                                                             | boolean            | NO   |     | 0                   |                |
 | blockwall                | Prohibit contacts to post to the profile page of the user                         | boolean            | NO   |     | 0                   |                |
-| hidewall                 | Hide profile details from unkown viewers                                          | 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                  |                |
diff --git a/doc/de/FAQ-admin.md b/doc/de/FAQ-admin.md
index f9cd14929..5b355e142 100644
--- a/doc/de/FAQ-admin.md
+++ b/doc/de/FAQ-admin.md
@@ -27,7 +27,7 @@ Der Quellcode von Friendica Red ist [hier](https://github.com/friendica/red) zu
 
 Addons findest Du auf [dieser Seite](https://github.com/friendica/friendica-addons).
 
-Wenn Du neue Themen suchst, findest Du sie auf [Friendica-Themes.com](http://friendica-themes.com/).
+Wenn Du neue Themen suchst, findest Du sie auf [github.com/bkil/friendica-themes](https://github.com/bkil/friendica-themes).
 
 
 ### Ich habe meine E-Mail Adresse geändern und jetzt ist das Admin Panel verschwunden?
diff --git a/doc/de/Improve-Performance.md b/doc/de/Improve-Performance.md
index d9be4fca6..df90437e7 100644
--- a/doc/de/Improve-Performance.md
+++ b/doc/de/Improve-Performance.md
@@ -95,6 +95,6 @@ Nutze externe Dokumente, um eine detailiertere Erklärung für die Einrichtung e
 
 ### Database
 
-Es gibt Skripte wie [tuning-primer.sh](http://www.day32.com/MySQL/) und [mysqltuner.pl](http://mysqltuner.pl), die den Datenbankserver analysieren und Hinweise darauf geben, welche Werte verändert werden könnten.
+Es gibt Skripte wie [tuning-primer.sh](https://github.com/BMDan/tuning-primer.sh) und [mysqltuner.pl](https://github.com/major/MySQLTuner-perl/blob/master/mysqltuner.pl), die den Datenbankserver analysieren und Hinweise darauf geben, welche Werte verändert werden könnten.
 
 Aktivere hierfür die "Slow query" Log-Datei, um Performanceprobleme zu erkennen.
diff --git a/doc/events.md b/doc/events.md
index 58a3b3326..0ec2bc460 100644
--- a/doc/events.md
+++ b/doc/events.md
@@ -9,7 +9,7 @@ Depending on the theme you are using, there might be an additional link from the
 
 ## Event Overview
 
-The overview page shows the calendar of the current month, plus a few days days at the beginning and the end.
+The overview page shows the calendar of the current month, plus a few days at the beginning and the end.
 Listed are all events for this month, created by you, or shared with you by your contacts,
 This includes birthday reminders for contacts who share their birthday with you.
 
diff --git a/doc/smarty3-templates.md b/doc/smarty3-templates.md
index f3f7c3e60..0fbe503eb 100644
--- a/doc/smarty3-templates.md
+++ b/doc/smarty3-templates.md
@@ -37,7 +37,7 @@ Form Templates
 To guarantee a consistent look and feel for input forms, i.e. in the settings sections, there are templates for the basic form fields.
 They are initialized with an array of data, depending on the tyle of the field.
 
-All of these take an array holding the values, e.g. for a one line text input field, which is required and should be used to type email addesses use something along the lines of:
+All of these take an array holding the values, e.g. for a one line text input field, which is required and should be used to type email addresses use something along the lines of:
 
 		'$adminmail' => array('adminmail', DI::l10n()->t('Site administrator email address'), $adminmail, DI::l10n()->t('Your account email address must match this in order to use the web admin panel.'), 'required', '', 'email'),
 
@@ -70,7 +70,7 @@ Field parameter:
 
 ### field_custom.tpl
 
-A customizeable template to include a custom element in the form with the usual surroundings,
+A customizable template to include a custom element in the form with the usual surroundings,
 Field parameter:
 
 0. Name of the field,
@@ -88,7 +88,7 @@ Field parameter:
 2. Current value of the variable,
 3. Help text for the input box,
 4. Should be set to the translation of "Required" to mark this field as required,
-5. if set to "autofocus" modern browser will put the cursur into this box once the page is loaded,
+5. if set to "autofocus" modern browser will put the cursor into this box once the page is loaded,
 6. if set, it will be used for the input type, default is `text` (possible types: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#%3Cinput%3E_types).
 
 ### field_intcheckbox.tpl
diff --git a/doc/themes.md b/doc/themes.md
index 15ac38fdf..8d85dce2a 100644
--- a/doc/themes.md
+++ b/doc/themes.md
@@ -12,7 +12,7 @@ So, how to work on the UI of friendica.
 You can either directly edit an existing theme.
 But you might loose your changes when the theme is updated by the friendica team.
 
-If you are almost happy with an existing theme, the easiest way to cover your needs is to create a new theme, inheritating most of the properties of the parent theme and change just minor stuff.
+If you are almost happy with an existing theme, the easiest way to cover your needs is to create a new theme, inheriting most of the properties of the parent theme and change just minor stuff.
 The below for a more detailed description of theme heritage.
 
 Some themes also allow users to select *variants* of the theme.
@@ -33,7 +33,7 @@ In most cases, you can found these in
     /view/theme/**your-theme-name**/style.css
 
 sometimes, there is also a file called style.php in the theme directory.
-This is only needed if the theme allowes the user to change certain things of the theme dynamically.
+This is only needed if the theme allows the user to change certain things of the theme dynamically.
 Say the font size or set a background image.
 
 ### Templates
@@ -50,7 +50,7 @@ if you want to override any template within your theme create your version of th
 
 any template that exists there will be used instead of the default one.
 
-### Javascript
+### JavaScript
 
 The same rule applies to the JavaScript files found in
 
diff --git a/doc/translations.md b/doc/translations.md
index 8b7077b6b..9eb1bb2db 100644
--- a/doc/translations.md
+++ b/doc/translations.md
@@ -7,7 +7,7 @@ Friendica translations
 
 The Friendica translation process is based on `gettext` PO files.
 
-Basic worflow:
+Basic workflow:
 1. `xgettext` is used to collect translation strings across the project in the authoritative PO file located in `view/lang/C/messages.po`.
 2. This file makes translations strings available at [the Transifex Friendica page](https://www.transifex.com/Friendica/friendica/dashboard/).
 3. The translation itself is done at Transifex by volunteers.
diff --git a/images/screenshots/friendica-frio-green-profle-1.png b/images/screenshots/friendica-frio-green-profile-1.png
similarity index 100%
rename from images/screenshots/friendica-frio-green-profle-1.png
rename to images/screenshots/friendica-frio-green-profile-1.png
diff --git a/images/screenshots/friendica-frio-green-profle-2.png b/images/screenshots/friendica-frio-green-profile-2.png
similarity index 100%
rename from images/screenshots/friendica-frio-green-profle-2.png
rename to images/screenshots/friendica-frio-green-profile-2.png
diff --git a/images/screenshots/friendica-frio-mobile-profle-1.png b/images/screenshots/friendica-frio-mobile-profile-1.png
similarity index 100%
rename from images/screenshots/friendica-frio-mobile-profle-1.png
rename to images/screenshots/friendica-frio-mobile-profile-1.png
diff --git a/images/screenshots/friendica-frio-mobile-profle-2.png b/images/screenshots/friendica-frio-mobile-profile-2.png
similarity index 100%
rename from images/screenshots/friendica-frio-mobile-profle-2.png
rename to images/screenshots/friendica-frio-mobile-profile-2.png
diff --git a/images/screenshots/friendica-frio-red-profle-1.png b/images/screenshots/friendica-frio-red-profile-1.png
similarity index 100%
rename from images/screenshots/friendica-frio-red-profle-1.png
rename to images/screenshots/friendica-frio-red-profile-1.png
diff --git a/images/screenshots/friendica-frio-red-profle-2.png b/images/screenshots/friendica-frio-red-profile-2.png
similarity index 100%
rename from images/screenshots/friendica-frio-red-profle-2.png
rename to images/screenshots/friendica-frio-red-profile-2.png
diff --git a/images/screenshots/friendica-frio-red-profle-3.png b/images/screenshots/friendica-frio-red-profile-3.png
similarity index 100%
rename from images/screenshots/friendica-frio-red-profle-3.png
rename to images/screenshots/friendica-frio-red-profile-3.png
diff --git a/images/smiley-embarassed.gif b/images/smiley-embarrassed.gif
similarity index 100%
rename from images/smiley-embarassed.gif
rename to images/smiley-embarrassed.gif
diff --git a/mod/item.php b/mod/item.php
index 3e4de2aba..66ab1c210 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -19,7 +19,7 @@
  *
  * This is the POST destination for most all locally posted
  * text stuff. This function handles status, wall-to-wall status,
- * local comments, and remote coments that are posted on this site
+ * local comments, and remote comments that are posted on this site
  * (as opposed to being delivered in a feed).
  * Also processed here are posts and comments coming through the
  * statusnet/twitter API.
diff --git a/mod/message.php b/mod/message.php
index 99fb6b3b4..928f575ef 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -436,7 +436,7 @@ function render_messages(array $msg, string $t): string
 		$to_name_e = $rr['name'];
 
 		if (is_null($rr['url'])) {
-			// contact-id is pointing to a non existing contact
+			// contact-id is pointing to a nonexistent contact
 			continue;
 		}
 
diff --git a/mod/photos.php b/mod/photos.php
index 18db9c15d..3d6a1d405 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -714,7 +714,7 @@ function photos_content(App $a)
 		// When PHP is configured with upload_max_filesize less than maximagesize provide this lower limit.
 		$maximagesize_bytes = (is_numeric($mis_bytes) && ($mis_bytes < $umf_bytes) ? $mis_bytes : $umf_bytes);
 
-		// @todo We may be want to use appropriate binary prefixed dynamicly
+		// @todo We may be want to use appropriate binary prefixed dynamically
 		$usage_message = DI::l10n()->t('The maximum accepted image size is %s', Strings::formatBytes($maximagesize_bytes));
 
 		$tpl = Renderer::getMarkupTemplate('photos_upload.tpl');
diff --git a/mods/README.md b/mods/README.md
index 43389eb2c..716d427f9 100644
--- a/mods/README.md
+++ b/mods/README.md
@@ -32,7 +32,7 @@ Please check software documentation to know how modify these examples to make th
 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`
diff --git a/mods/bookmarklet-share2friendica/README.md b/mods/bookmarklet-share2friendica/README.md
index ad30baa9d..b6b1b19a1 100644
--- a/mods/bookmarklet-share2friendica/README.md
+++ b/mods/bookmarklet-share2friendica/README.md
@@ -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
 
diff --git a/mods/home.html b/mods/home.html
index 6763b7ead..b881cf8ff 100644
--- a/mods/home.html
+++ b/mods/home.html
@@ -1,6 +1,6 @@
 
 
-
+
 

Welcome to this Friendica node!

@@ -17,7 +17,7 @@

Is it hard to run Friendica?

-

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.

+

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.

Get the source

diff --git a/mods/sample-Lighttpd.config b/mods/sample-Lighttpd.config index c4ccc1266..9b9a26470 100644 --- a/mods/sample-Lighttpd.config +++ b/mods/sample-Lighttpd.config @@ -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 )----------------- diff --git a/mods/sample-nginx-certbot.config b/mods/sample-nginx-certbot.config index 280bb2ab6..dd4b11bcb 100644 --- a/mods/sample-nginx-certbot.config +++ b/mods/sample-nginx-certbot.config @@ -30,7 +30,7 @@ ## # 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 diff --git a/spec/zot.txt b/spec/zot.txt index 2c3bbb180..b57d6cee4 100644 --- a/spec/zot.txt +++ b/spec/zot.txt @@ -45,7 +45,7 @@ is a superset of salmon). zot:key ******* -A suitable randomly generated encyption key of length 32 octets for encrypting +A suitable randomly generated encryption key of length 32 octets for encrypting the salmon packet. This is then encrypted with the sender's private key and base64url encoded. @@ -59,7 +59,7 @@ key and base64url encoded. zot:env_key *********** -A suitable randomly generated encyption key of length 32 octets for encrypting +A suitable randomly generated encryption key of length 32 octets for encrypting the envelope. This is then encrypted with the recipient's public key and base64url encoded. For bulk deliveries, it is encrypted with the site bulk delivery public key. @@ -127,7 +127,7 @@ MUST be present. Z-To: zot:bob@example.com, zot:alice@example.com, mailto:dave@example.com Z-Bcc: zot:https://example.com/profile/richard -are valid entries. Adresses are comma separated and individual entries MUST NOT +are valid entries. Addresses are comma separated and individual entries MUST NOT contain commas. There MAY be any number of ASCII space characters between entries for legibility. Header lines are terminated with a linefeed character (ASCII 0x0A). @@ -136,8 +136,8 @@ This specification provides the following protocol address prefixes for use in Z-To: or Z-Bcc: elements: zot: - normal zot delivery using webfinger or LRDD resolvable address -dfrn: - legacy DFRN mode delivery using webfinger or LRDD resovable address -ostatus: - normal OStatus delivery using webfinger or LRDD resovable address +dfrn: - legacy DFRN mode delivery using webfinger or LRDD resolvable address +ostatus: - normal OStatus delivery using webfinger or LRDD resolvable address diaspora: - Diaspora network delivery using webfinger address facebook: - Facebook profile page URL twitter: - Twitter personal page URL without AJAX '#!' fragment @@ -289,7 +289,7 @@ systems MAY reject foreign messages. ******************************* This section of the document is considered separate from the delivery -specification precding it and represents a different protocol, which is +specification preceding it and represents a different protocol, which is currently incomplete. This will be split off into another document in the future, but is presented here as a synergistic component of the Zot network model. @@ -353,7 +353,7 @@ Salmon Magic Envelope Atom Activity Stream Draft http://activitystrea.ms/specs/atom/1.0/ -Activty Stream Base Schema +Activity Stream Base Schema http://activitystrea.ms/head/activity-schema.html WebFinger Protocol diff --git a/src/App.php b/src/App.php index d36eb253a..bacf794b9 100644 --- a/src/App.php +++ b/src/App.php @@ -391,7 +391,7 @@ class App } /** - * Returns the current theme name. May be overriden by the mobile theme name. + * Returns the current theme name. May be overridden by the mobile theme name. * * @return string Current theme name or empty string in installation phase * @throws Exception @@ -532,7 +532,7 @@ class App /** * Provide a sane default if nothing is chosen or the specified theme does not exist. * - * @return string Current theme's stylsheet path + * @return string Current theme's stylesheet path * @throws Exception */ public function getCurrentThemeStylesheetPath(): string diff --git a/src/App/Page.php b/src/App/Page.php index 1a083522e..6849656f4 100644 --- a/src/App/Page.php +++ b/src/App/Page.php @@ -253,9 +253,9 @@ class Page implements ArrayAccess '$touch_icon' => $touch_icon, '$block_public' => intval($config->get('system', 'block_public')), '$stylesheets' => $this->stylesheets, - '$likeError' => $l10n->t('Like not successfull'), - '$dislikeError' => $l10n->t('Dislike not successfull'), - '$announceError' => $l10n->t('Sharing not successfull'), + '$likeError' => $l10n->t('Like not successful'), + '$dislikeError' => $l10n->t('Dislike not successful'), + '$announceError' => $l10n->t('Sharing not successful'), '$attendError' => $l10n->t('Attendance unsuccessful'), '$srvError' => $l10n->t('Backend error'), '$netError' => $l10n->t('Network error'), @@ -291,7 +291,7 @@ class Page implements ArrayAccess * Initializes Page->page['footer']. * * Includes: - * - Javascript homebase + * - JavaScript homebase * - Mobile toggle link * - Registered footer scripts (through App->registerFooterScript()) * - footer.tpl template @@ -503,7 +503,7 @@ class Page implements ArrayAccess $content = mb_convert_encoding($this->page["content"], 'HTML-ENTITIES', "UTF-8"); - /// @TODO one day, kill those error-surpressing @ stuff, or PHP should ban it + /// @TODO one day, kill those error-suppressing @ stuff, or PHP should ban it @$doc->loadHTML($content); $xpath = new DOMXPath($doc); diff --git a/src/App/Router.php b/src/App/Router.php index 0bd66d40f..6d90fb013 100644 --- a/src/App/Router.php +++ b/src/App/Router.php @@ -412,7 +412,7 @@ class Router } if (!$this->lock->acquire('getCachedDispatchData', 0)) { - // Immediately return uncached data when we can't aquire a lock + // Immediately return uncached data when we can't acquire a lock return $this->getDispatchData(); } diff --git a/src/BaseFactory.php b/src/BaseFactory.php index 17d9e7606..e40da5877 100644 --- a/src/BaseFactory.php +++ b/src/BaseFactory.php @@ -24,7 +24,7 @@ namespace Friendica; use Psr\Log\LoggerInterface; /** - * Factories act as an intermediary to avoid direct Entitiy instanciation. + * Factories act as an intermediary to avoid direct Entity instantiation. * * @see BaseModel * @see BaseCollection diff --git a/src/BaseModel.php b/src/BaseModel.php index dbacdfa70..1189f7f33 100644 --- a/src/BaseModel.php +++ b/src/BaseModel.php @@ -94,7 +94,7 @@ abstract class BaseModel extends BaseDataTransferObject } /** - * Magic isset method. Returns true if the field exists, either in the data prperty array or in any of the local properties. + * Magic isset method. Returns true if the field exists, either in the data property array or in any of the local properties. * Used by array_column() on an array of objects. * * @param $name diff --git a/src/BaseModule.php b/src/BaseModule.php index d9c7da97a..b43e98477 100644 --- a/src/BaseModule.php +++ b/src/BaseModule.php @@ -90,9 +90,9 @@ abstract class BaseModule implements ICanHandleRequests * * @see L10n::tt() */ - protected function tt(string $singular, string $plurarl, int $count): string + protected function tt(string $singular, string $plural, int $count): string { - return $this->l10n->tt($singular, $plurarl, $count); + return $this->l10n->tt($singular, $plural, $count); } /** diff --git a/src/Console/AutomaticInstallation.php b/src/Console/AutomaticInstallation.php index 1ce516e25..33b6f8303 100644 --- a/src/Console/AutomaticInstallation.php +++ b/src/Console/AutomaticInstallation.php @@ -95,7 +95,7 @@ Examples bin/console autoinstall --savedb Installs Friendica with environment variables and saves them to the 'config/local.config.php' file - bin/console autoinstall -H localhost -p 3365 -u user -P passwort1234 -d friendica -U https://friendica.fqdn + bin/console autoinstall -H localhost -p 3365 -u user -P password1234 -d friendica -U https://friendica.fqdn Installs Friendica with a local mysql database with credentials HELP; } diff --git a/src/Console/DocBloxErrorChecker.php b/src/Console/DocBloxErrorChecker.php index 81a47f663..7028de8a1 100644 --- a/src/Console/DocBloxErrorChecker.php +++ b/src/Console/DocBloxErrorChecker.php @@ -30,7 +30,7 @@ use Friendica\App; * * Basically, docblox takes a list of files to build documentation from. This script assumes there is a file or set of files * breaking the build when it is included in that list. It tries to calculate the smallest list containing these files. - * Unfortunatly, the original problem is NP-complete, so what the script does is a best guess only. + * Unfortunately, the original problem is NP-complete, so what the script does is a best guess only. * * So it starts with a list of all files in the project. * If that list can't be build, it cuts it in two parts and tries both parts independently. If only one of them breaks, diff --git a/src/Console/FixAPDeliveryWorkerTaskParameters.php b/src/Console/FixAPDeliveryWorkerTaskParameters.php index a0bf989fc..d2357c318 100644 --- a/src/Console/FixAPDeliveryWorkerTaskParameters.php +++ b/src/Console/FixAPDeliveryWorkerTaskParameters.php @@ -129,7 +129,7 @@ HELP; if (!$parameters) { $this->errored++; if ($this->getOption('v')) { - $this->out('Unabled to parse parameter JSON of the row with id ' . $workerqueueItem['id']); + $this->out('Unable to parse parameter JSON of the row with id ' . $workerqueueItem['id']); $this->out('JSON: ' . var_export($workerqueueItem['parameter'], true)); } } @@ -155,7 +155,7 @@ HELP; } else { $this->errored++; if ($this->getOption('v')) { - $this->out('Unabled to update the row with id ' . $workerqueueItem['id']); + $this->out('Unable to update the row with id ' . $workerqueueItem['id']); $this->out('Fields: ' . var_export($fields, true)); } } diff --git a/src/Console/PhpToPo.php b/src/Console/PhpToPo.php index 9acea8539..a400fea23 100644 --- a/src/Console/PhpToPo.php +++ b/src/Console/PhpToPo.php @@ -231,7 +231,7 @@ HELP; } /** - * Get a string and retun a message.po ready text + * Get a string and return a message.po ready text * - replace " with \" * - replace tab char with \t * - manage multiline strings diff --git a/src/Console/User.php b/src/Console/User.php index 93b24cbc6..eb061ede3 100644 --- a/src/Console/User.php +++ b/src/Console/User.php @@ -270,7 +270,7 @@ HELP; } /** - * Allows or denys a user based on it's nickname + * Allows or denies a user based on it's nickname * * @param bool $allow True, if the pending user is allowed, false if denies * diff --git a/src/Content/BoundariesPager.php b/src/Content/BoundariesPager.php index ddd071628..6ab64fdef 100644 --- a/src/Content/BoundariesPager.php +++ b/src/Content/BoundariesPager.php @@ -94,7 +94,7 @@ class BoundariesPager extends Pager * $params = ['order' => ['sort_field' => true], 'limit' => $itemsPerPage]; * $items = DBA::toArray(DBA::select($table, $fields, $condition, $params)); * - * $pager = new BoundariesPager($a->query_string, $items[0]['sort_field'], $items[coutn($items) - 1]['sort_field'], $itemsPerPage); + * $pager = new BoundariesPager($a->query_string, $items[0]['sort_field'], $items[count($items) - 1]['sort_field'], $itemsPerPage); * * $html = $pager->renderMinimal(count($items)); * diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index cdc6e6351..0bdc414c5 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -1362,7 +1362,7 @@ class Conversation } } - /// @TODO: Stop recusrsively adding all children back to the top level (!!!) + /// @TODO: Stop recursively adding all children back to the top level (!!!) /// However, this apparently ensures responses (likes, attendance) display (?!) foreach ($parents as $parent) { if (count($parent['children'])) { diff --git a/src/Content/Feature.php b/src/Content/Feature.php index 22b83a094..f97a03011 100644 --- a/src/Content/Feature.php +++ b/src/Content/Feature.php @@ -79,7 +79,7 @@ class Feature * Get a list of all available features * * The array includes the setting group, the setting name, - * explainations for the setting and if it's enabled or disabled + * explanations for the setting and if it's enabled or disabled * by default * * @param bool $filtered True removes any locked features diff --git a/src/Content/ForumManager.php b/src/Content/ForumManager.php index ac64e6d3f..5decaac14 100644 --- a/src/Content/ForumManager.php +++ b/src/Content/ForumManager.php @@ -38,7 +38,7 @@ class ForumManager * * @param int $uid of the profile owner * @param boolean $lastitem Sort by lastitem - * @param boolean $showhidden Show frorums which are not hidden + * @param boolean $showhidden Show forums which are not hidden * @param boolean $showprivate Show private groups * * @return array @@ -102,7 +102,7 @@ class ForumManager /** * Forumlist widget * - * Sidebar widget to show subcribed friendica forums. If activated + * Sidebar widget to show subscribed friendica forums. If activated * in the settings, it appears at the notwork page sidebar * * @param string $baseurl Base module path diff --git a/src/Content/Item.php b/src/Content/Item.php index 25d27b26d..2a4bc9e3e 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -338,7 +338,7 @@ class Item } else { $post_type = $this->l10n->t('status'); } - // Let's break everthing ... ;-) + // Let's break everything ... ;-) break; } $plink = '[url=' . $obj['plink'] . ']' . $post_type . '[/url]'; @@ -548,7 +548,7 @@ class Item $item['allow_cid'] = ''; $item['allow_gid'] = ''; } - } elseif ($setPermissions && ($item['gravity'] == ItemModel::GRAVITY_PARENT)) { + } elseif ($setPermissions) { if (empty($receivers)) { // For security reasons direct posts without any receiver will be posts to yourself $self = Contact::selectFirst(['id'], ['uid' => $item['uid'], 'self' => true]); @@ -685,11 +685,11 @@ class Item // If it is a reshared post then reformat it to avoid display problems with two share elements if (!empty($shared)) { - if (!empty($shared['guid']) && ($encaspulated_share = $this->createSharedPostByGuid($shared['guid'], true))) { + if (!empty($shared['guid']) && ($encapsulated_share = $this->createSharedPostByGuid($shared['guid'], true))) { if (!empty(BBCode::fetchShareAttributes($item['body']))) { - $item['body'] = preg_replace("/\[share.*?\](.*)\[\/share\]/ism", $encaspulated_share, $item['body']); + $item['body'] = preg_replace("/\[share.*?\](.*)\[\/share\]/ism", $encapsulated_share, $item['body']); } else { - $item['body'] .= $encaspulated_share; + $item['body'] .= $encapsulated_share; } } $item['body'] = HTML::toBBCode(BBCode::convertForUriId($item['uri-id'], $item['body'], BBCode::ACTIVITYPUB)); diff --git a/src/Content/OEmbed.php b/src/Content/OEmbed.php index 562febdaf..c11311066 100644 --- a/src/Content/OEmbed.php +++ b/src/Content/OEmbed.php @@ -385,7 +385,7 @@ class OEmbed } /** - * Returns a formmated HTML code from given URL and sets optional title + * Returns a formatted HTML code from given URL and sets optional title * * @param string $url URL to fetch * @param string $title Optional title (default: what comes from OEmbed object) @@ -447,7 +447,7 @@ class OEmbed * Generates an XPath query to select elements whose provided attribute contains * the provided value in a space-separated list. * - * @param string $attr Name of the attribute to seach + * @param string $attr Name of the attribute to search * @param string $value Value to search in a space-separated list * @return string */ diff --git a/src/Content/PageInfo.php b/src/Content/PageInfo.php index 0c60008a1..be8d055c9 100644 --- a/src/Content/PageInfo.php +++ b/src/Content/PageInfo.php @@ -141,7 +141,7 @@ class PageInfo $data['text'] = ''; } - // Only embedd a picture link when it seems to be a valid picture ("width" is set) + // Only embed a picture link when it seems to be a valid picture ("width" is set) if (!empty($data['images']) && !empty($data['images'][0]['width'])) { $preview = str_replace(['[', ']'], ['[', ']'], htmlentities($data['images'][0]['src'], ENT_QUOTES, 'UTF-8', false)); // if the preview picture is larger than 500 pixels then show it in a larger mode diff --git a/src/Content/Smilies.php b/src/Content/Smilies.php index c51d9b330..ff9d63882 100644 --- a/src/Content/Smilies.php +++ b/src/Content/Smilies.php @@ -133,7 +133,7 @@ class Smilies ':\'(', ':-!', ':-/', - ':-[', + ':-[', '8-)', ':beer', ':homebrew', diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index a38d2de78..93dbb1176 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -548,7 +548,7 @@ class BBCode /* * The previously spacefied [noparse][ i ]italic[ /i ][/noparse], - * now turns back and the [noparse] tags are trimed + * now turns back and the [noparse] tags are trimmed * returning [i]italic[/i] * * @param array $match @@ -1373,7 +1373,7 @@ class BBCode }); } - // leave open the posibility of [map=something] + // leave open the possibility of [map=something] // this is replaced in Item::prepareBody() which has knowledge of the item location if (strpos($text, '[/map]') !== false) { $text = preg_replace_callback( diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php index 89a680501..3f9ef7c3b 100644 --- a/src/Content/Text/HTML.php +++ b/src/Content/Text/HTML.php @@ -842,7 +842,7 @@ class HTML * * @param string $s Search query. * @param string $id HTML id - * @param bool $aside Display the search widgit aside. + * @param bool $aside Display the search widget aside. * * @return string Formatted HTML. * @throws \Exception diff --git a/src/Content/Text/Plaintext.php b/src/Content/Text/Plaintext.php index ce0a305fe..4ea4849fe 100644 --- a/src/Content/Text/Plaintext.php +++ b/src/Content/Text/Plaintext.php @@ -180,7 +180,7 @@ class Plaintext $msg = trim($post['description']); } - // If the link is already contained in the post, then it neeedn't to be added again + // If the link is already contained in the post, then it needn't to be added again // But: if the link is beyond the limit, then it has to be added. if (($link != '') && strstr($msg, $link)) { $pos = strpos($msg, $link); diff --git a/src/Content/Widget.php b/src/Content/Widget.php index 641f56329..b198d54cf 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -59,7 +59,7 @@ class Widget /** * Return Find People widget * - * @return string HTML code respresenting "People Widget" + * @return string HTML code representing "People Widget" */ public static function findPeople(): string { diff --git a/src/Core/ACL.php b/src/Core/ACL.php index 4ed8d602a..ba4564589 100644 --- a/src/Core/ACL.php +++ b/src/Core/ACL.php @@ -47,7 +47,7 @@ class ACL /** * Returns a select input tag for private message recipient * - * @param int $selected Existing recipien contact ID + * @param int $selected Existing recipient contact ID * @return string * @throws \Exception */ diff --git a/src/Core/Installer.php b/src/Core/Installer.php index b3d6e2911..583ad5fe2 100644 --- a/src/Core/Installer.php +++ b/src/Core/Installer.php @@ -98,17 +98,17 @@ class Installer * Checks the current installation environment. There are optional and mandatory checks. * * @param string $baseurl The baseurl of Friendica - * @param string $phpath Optional path to the PHP binary + * @param string $phppath Optional path to the PHP binary * * @return bool if the check succeed * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ - public function checkEnvironment($baseurl, $phpath = null) + public function checkEnvironment($baseurl, $phppath = null) { $returnVal = true; - if (isset($phpath)) { - if (!$this->checkPHP($phpath)) { + if (isset($phppath)) { + if (!$this->checkPHP($phppath)) { $returnVal = false; } } @@ -165,7 +165,7 @@ class Installer '$dbpass' => $configCache->get('database', 'password'), '$dbdata' => $configCache->get('database', 'database'), - '$phpath' => $configCache->get('config', 'php_path'), + '$phppath' => $configCache->get('config', 'php_path'), '$adminmail' => $configCache->get('config', 'admin_email'), '$system_url' => $configCache->get('system', 'url'), @@ -590,8 +590,8 @@ class Installer * TLS Check * * Tries to determine whether the connection to the server is secured - * by TLS or not. If not the user will be warned that it is higly - * encuraged to use TLS. + * by TLS or not. If not the user will be warned that it is highly + * encouraged to use TLS. * * @return bool (true) as TLS is not mandatory */ diff --git a/src/Core/L10n.php b/src/Core/L10n.php index 3f74a4084..1d8cfa705 100644 --- a/src/Core/L10n.php +++ b/src/Core/L10n.php @@ -334,7 +334,7 @@ class L10n // for some languages there is only a single array item $s = $t[0]; } - // if $t is empty, skip it, because empty strings array are indended + // if $t is empty, skip it, because empty strings array are intended // to make string file smaller when there's no translation } else { $s = $t; diff --git a/src/Core/Logger.php b/src/Core/Logger.php index fe5f7b25e..db809904b 100644 --- a/src/Core/Logger.php +++ b/src/Core/Logger.php @@ -36,7 +36,7 @@ class Logger */ const TYPE_LOGGER = LoggerInterface::class; /** - * @var WorkerLogger A specific worker logger type, which can be anabled + * @var WorkerLogger A specific worker logger type, which can be enabled */ const TYPE_WORKER = WorkerLogger::class; /** @@ -206,7 +206,7 @@ class Logger * An alternative logger for development. * * Works largely as log() but allows developers - * to isolate particular elements they are targetting + * to isolate particular elements they are targeting * personally without background noise * * @param string $message Message to log diff --git a/src/Core/Storage/Capability/ICanWriteToStorage.php b/src/Core/Storage/Capability/ICanWriteToStorage.php index 2c6a45384..30842180a 100644 --- a/src/Core/Storage/Capability/ICanWriteToStorage.php +++ b/src/Core/Storage/Capability/ICanWriteToStorage.php @@ -27,7 +27,7 @@ use Friendica\Core\Storage\Exception\StorageException; /** * Interface for writable storage backends * - * Used for storages with CRUD functionality, mainly used for user data (e.g. photos, attachements). + * Used for storages with CRUD functionality, mainly used for user data (e.g. photos, attachments). * There's only one active writable storage possible. This type of storage is selectable by the current administrator. */ interface ICanWriteToStorage extends ICanReadFromStorage diff --git a/src/Core/Storage/Type/Filesystem.php b/src/Core/Storage/Type/Filesystem.php index 4cfec23be..7c5f05db7 100644 --- a/src/Core/Storage/Type/Filesystem.php +++ b/src/Core/Storage/Type/Filesystem.php @@ -35,7 +35,7 @@ use Friendica\Util\Strings; * Best would be for storage folder to be outside webserver folder, we are using a * folder relative to code tree root as default to ease things for users in shared hostings. * Each new resource gets a value as reference and is saved in a - * folder tree stucture created from that value. + * folder tree structure created from that value. */ class Filesystem implements ICanWriteToStorage { diff --git a/src/Core/System.php b/src/Core/System.php index bf3f247dd..b31e61199 100644 --- a/src/Core/System.php +++ b/src/Core/System.php @@ -321,7 +321,7 @@ class System } /** - * This function adds the content and a content-teype HTTP header to the output. + * This function adds the content and a content-type HTTP header to the output. * After finishing the process is getting killed. * * @param string $content diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 70ba0ffe4..00885f692 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -362,7 +362,7 @@ class Worker return false; } - // Check for existance and validity of the include file + // Check for existence and validity of the include file $include = $argv[0]; if (method_exists(sprintf('Friendica\Worker\%s', $include), 'execute')) { @@ -590,7 +590,7 @@ class Worker /* With these values we can analyze how effective the worker is. * The database and rest time should be low since this is the unproductive time. * The execution time is the productive time. - * By changing parameters like the maximum number of workers we can check the effectivness. + * By changing parameters like the maximum number of workers we can check the effectiveness. */ $dbtotal = round(self::$db_duration, 2); $dbread = round(self::$db_duration - (self::$db_duration_count + self::$db_duration_write + self::$db_duration_stat), 2); @@ -885,7 +885,7 @@ class Worker /** * Returns waiting jobs for the current process id * - * @return array|bool waiting workerqueue jobs or FALSE on failture + * @return array|bool waiting workerqueue jobs or FALSE on failure * @throws \Exception */ private static function getWaitingJobForPID() @@ -1422,7 +1422,7 @@ class Worker */ public static function isInMaintenanceWindow(bool $check_last_execution = false): bool { - // Calculate the seconds of the start end end of the maintenance window + // Calculate the seconds of the start and end of the maintenance window $start = strtotime(DI::config()->get('system', 'maintenance_start')) % 86400; $end = strtotime(DI::config()->get('system', 'maintenance_end')) % 86400; diff --git a/src/DI.php b/src/DI.php index cc765fa52..8d706ed37 100644 --- a/src/DI.php +++ b/src/DI.php @@ -69,7 +69,7 @@ abstract class DI /** * Returns a clone of the current dice instance - * This usefull for overloading the current instance with mocked methods during tests + * This useful for overloading the current instance with mocked methods during tests * * @return Dice */ diff --git a/src/Database/DBA.php b/src/Database/DBA.php index e29cd3038..d609f108e 100644 --- a/src/Database/DBA.php +++ b/src/Database/DBA.php @@ -205,7 +205,7 @@ class DBA * Please use DBA::delete, DBA::insert, DBA::update, ... instead * * @param string $sql SQL statement - * @return boolean Was the query successfull? False is returned only if an error occurred + * @return boolean Was the query successful? False is returned only if an error occurred * @throws \Exception */ public static function e(string $sql): bool @@ -420,7 +420,7 @@ class DBA * @param array|boolean $old_fields array with the old field values that are about to be replaced (true = update on duplicate, false = don't update identical fields) * @param array $params Parameters: "ignore" If set to "true" then the update is done with the ignore parameter * - * @return boolean was the update successfull? + * @return boolean was the update successful? * @throws \Exception */ public static function update(string $table, array $fields, array $condition, $old_fields = [], array $params = []): bool diff --git a/src/Database/Database.php b/src/Database/Database.php index 9527fefb0..b1ea6c1e4 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -102,7 +102,7 @@ class Database * * @return void * - * @todo Make this method obsolet - use a clean pattern instead ... + * @todo Make this method obsolete - use a clean pattern instead ... */ public function setDependency(IManageConfigValues $config, Profiler $profiler, LoggerInterface $logger) { @@ -767,7 +767,7 @@ class Database * * @param string $sql SQL statement * - * @return boolean Was the query successfull? False is returned only if an error occurred + * @return boolean Was the query successful? False is returned only if an error occurred * @throws \Exception */ public function e(string $sql): bool @@ -1321,7 +1321,7 @@ class Database * @param array|boolean $old_fields array with the old field values that are about to be replaced (true = update on duplicate, false = don't update identical fields) * @param array $params Parameters: "ignore" If set to "true" then the update is done with the ignore parameter * - * @return boolean was the update successfull? + * @return boolean was the update successful? * @throws \Exception * @todo Implement "bool $update_on_duplicate" to avoid mixed type for $old_fields */ diff --git a/src/Database/Definition/DbaDefinition.php b/src/Database/Definition/DbaDefinition.php index 1e597bd64..3d3a2fa92 100644 --- a/src/Database/Definition/DbaDefinition.php +++ b/src/Database/Definition/DbaDefinition.php @@ -82,7 +82,7 @@ class DbaDefinition // Assign all field that are present in the table foreach ($fieldNames as $field) { if (isset($data[$field])) { - // Limit the length of varchar, varbinary, char and binrary fields + // Limit the length of varchar, varbinary, char and binary fields if (is_string($data[$field]) && preg_match("/char\((\d*)\)/", $definition[$table]['fields'][$field]['type'], $result)) { $data[$field] = mb_substr($data[$field], 0, $result[1]); } elseif (is_string($data[$field]) && preg_match("/binary\((\d*)\)/", $definition[$table]['fields'][$field]['type'], $result)) { diff --git a/src/Factory/Api/Mastodon/Status.php b/src/Factory/Api/Mastodon/Status.php index 62941978e..aa9a6fb88 100644 --- a/src/Factory/Api/Mastodon/Status.php +++ b/src/Factory/Api/Mastodon/Status.php @@ -55,7 +55,7 @@ class Status extends BaseFactory /** @var Card */ private $mstdnCardFactory; /** @var Attachment */ - private $mstdnAttachementFactory; + private $mstdnAttachmentFactory; /** @var Error */ private $mstdnErrorFactory; /** @var Poll */ @@ -70,21 +70,21 @@ class Status extends BaseFactory Mention $mstdnMentionFactory, Tag $mstdnTagFactory, Card $mstdnCardFactory, - Attachment $mstdnAttachementFactory, + Attachment $mstdnAttachmentFactory, Error $mstdnErrorFactory, Poll $mstdnPollFactory, ContentItem $contentItem ) { parent::__construct($logger); - $this->dba = $dba; - $this->mstdnAccountFactory = $mstdnAccountFactory; - $this->mstdnMentionFactory = $mstdnMentionFactory; - $this->mstdnTagFactory = $mstdnTagFactory; - $this->mstdnCardFactory = $mstdnCardFactory; - $this->mstdnAttachementFactory = $mstdnAttachementFactory; - $this->mstdnErrorFactory = $mstdnErrorFactory; - $this->mstdnPollFactory = $mstdnPollFactory; - $this->contentItem = $contentItem; + $this->dba = $dba; + $this->mstdnAccountFactory = $mstdnAccountFactory; + $this->mstdnMentionFactory = $mstdnMentionFactory; + $this->mstdnTagFactory = $mstdnTagFactory; + $this->mstdnCardFactory = $mstdnCardFactory; + $this->mstdnAttachmentFactory = $mstdnAttachmentFactory; + $this->mstdnErrorFactory = $mstdnErrorFactory; + $this->mstdnPollFactory = $mstdnPollFactory; + $this->contentItem = $contentItem; } /** @@ -175,7 +175,15 @@ class Status extends BaseFactory 'origin' => true, 'gravity' => Item::GRAVITY_ACTIVITY, 'vid' => Verb::getID(Activity::LIKE), - 'deleted' => false + 'deleted' => false + ]); + $origin_dislike = ($count_dislike == 0) ? false : Post::exists([ + 'thr-parent-id' => $uriId, + 'uid' => $uid, + 'origin' => true, + 'gravity' => Item::GRAVITY_ACTIVITY, + 'vid' => Verb::getID(Activity::DISLIKE), + 'deleted' => false ]); $origin_announce = ($count_announce == 0) ? false : Post::exists([ 'thr-parent-id' => $uriId, @@ -206,7 +214,7 @@ class Status extends BaseFactory $tags = $this->mstdnTagFactory->createFromUriId($uriId); if ($item['has-media']) { $card = $this->mstdnCardFactory->createFromUriId($uriId); - $attachments = $this->mstdnAttachementFactory->createFromUriId($uriId); + $attachments = $this->mstdnAttachmentFactory->createFromUriId($uriId); } else { $card = new \Friendica\Object\Api\Mastodon\Card([]); $attachments = []; @@ -250,7 +258,7 @@ class Status extends BaseFactory } } - foreach ($this->mstdnAttachementFactory->createFromUriId($shared_uri_id) as $attachment) { + foreach ($this->mstdnAttachmentFactory->createFromUriId($shared_uri_id) as $attachment) { if (!in_array($attachment, $attachments)) { $attachments[] = $attachment; } @@ -295,7 +303,7 @@ class Status extends BaseFactory $aclFormatter = DI::aclFormatter(); $delivery_data = $uid != $item['uid'] ? null : new FriendicaDeliveryData($item['delivery_queue_count'], $item['delivery_queue_done'], $item['delivery_queue_failed']); $visibility_data = $uid != $item['uid'] ? null : new FriendicaVisibility($aclFormatter->expand($item['allow_cid']), $aclFormatter->expand($item['deny_cid']), $aclFormatter->expand($item['allow_gid']), $aclFormatter->expand($item['deny_gid'])); - $friendica = new FriendicaExtension($item['title'], $item['changed'], $item['commented'], $item['received'], $counts->dislikes, $delivery_data, $visibility_data); + $friendica = new FriendicaExtension($item['title'], $item['changed'], $item['commented'], $item['received'], $counts->dislikes, $origin_dislike, $delivery_data, $visibility_data); return new \Friendica\Object\Api\Mastodon\Status($item, $account, $counts, $userAttributes, $sensitive, $application, $mentions, $tags, $card, $attachments, $in_reply, $reshare, $friendica, $quote, $poll); } @@ -361,7 +369,7 @@ class Status extends BaseFactory $attachments = []; $in_reply = []; $reshare = []; - $friendica = new FriendicaExtension('', null, null, null, 0, null, null); + $friendica = new FriendicaExtension('', null, null, null, 0, false, null, null); return new \Friendica\Object\Api\Mastodon\Status($item, $account, $counts, $userAttributes, $sensitive, $application, $mentions, $tags, $card, $attachments, $in_reply, $reshare, $friendica); } diff --git a/src/Model/Attach.php b/src/Model/Attach.php index 2cf2d9efc..3dfb2e21e 100644 --- a/src/Model/Attach.php +++ b/src/Model/Attach.php @@ -32,7 +32,7 @@ use Friendica\Util\Mimetype; use Friendica\Security\Security; /** - * Class to handle attach dabatase table + * Class to handle attach database table */ class Attach { @@ -107,7 +107,7 @@ class Attach } /** - * Retrive a single record given the ID + * Retrieve a single record given the ID * * @param int $id Row id of the record * @@ -122,7 +122,7 @@ class Attach } /** - * Retrive a single record given the ID + * Retrieve a single record given the ID * * @param int $id Row id of the record * @@ -192,7 +192,7 @@ class Attach * @param string $allow_cid Permissions, allowed contacts. optional, default = '' * @param string $allow_gid Permissions, allowed groups. optional, default = '' * @param string $deny_cid Permissions, denied contacts.optional, default = '' - * @param string $deny_gid Permissions, denied greoup.optional, default = '' + * @param string $deny_gid Permissions, denied group.optional, default = '' * * @return boolean|integer Row id on success, False on errors * @throws \Friendica\Network\HTTPException\InternalServerErrorException diff --git a/src/Model/Contact.php b/src/Model/Contact.php index f35808f05..8792273ee 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -239,7 +239,7 @@ class Contact * @param array $condition condition array with the key values * @param array|boolean $old_fields array with the old field values that are about to be replaced (true = update on duplicate, false = don't update identical fields) * - * @return boolean was the update successfull? + * @return boolean was the update successful? * @throws \Exception * @todo Let's get rid of boolean type of $old_fields */ @@ -1686,7 +1686,7 @@ class Contact * Unblocks a contact * * @param int $cid Contact id to unblock - * @return bool Whether it was successfull + * @return bool Whether it was successful */ public static function unblock(int $cid): bool { @@ -1733,7 +1733,7 @@ class Contact * * @param array $contact contact array * @param string $size Size of the avatar picture - * @param bool $no_update Don't perfom an update if no cached avatar was found + * @param bool $no_update Don't perform an update if no cached avatar was found * @return string photo path */ private static function getAvatarPath(array $contact, string $size, bool $no_update = false): string @@ -1767,7 +1767,7 @@ class Contact * Return the photo path for a given contact array * * @param array $contact Contact array - * @param bool $no_update Don't perfom an update if no cached avatar was found + * @param bool $no_update Don't perform an update if no cached avatar was found * @return string photo path */ public static function getPhoto(array $contact, bool $no_update = false): string @@ -1779,7 +1779,7 @@ class Contact * Return the photo path (thumb size) for a given contact array * * @param array $contact Contact array - * @param bool $no_update Don't perfom an update if no cached avatar was found + * @param bool $no_update Don't perform an update if no cached avatar was found * @return string photo path */ public static function getThumb(array $contact, bool $no_update = false): string @@ -1791,7 +1791,7 @@ class Contact * Return the photo path (micro size) for a given contact array * * @param array $contact Contact array - * @param bool $no_update Don't perfom an update if no cached avatar was found + * @param bool $no_update Don't perform an update if no cached avatar was found * @return string photo path */ public static function getMicro(array $contact, bool $no_update = false): string @@ -1803,7 +1803,7 @@ class Contact * Check the given contact array for avatar cache fields * * @param array $contact - * @param bool $no_update Don't perfom an update if no cached avatar was found + * @param bool $no_update Don't perform an update if no cached avatar was found * @return array contact array with avatar cache fields */ private static function checkAvatarCacheByArray(array $contact, bool $no_update = false): array diff --git a/src/Model/Conversation.php b/src/Model/Conversation.php index 59936414c..3fa17228d 100644 --- a/src/Model/Conversation.php +++ b/src/Model/Conversation.php @@ -49,7 +49,7 @@ class Conversation */ const UNKNOWN = 0; /** - * The message had been pushed to this sytem + * The message had been pushed to this system */ const PUSH = 1; /** diff --git a/src/Model/Event.php b/src/Model/Event.php index e39ee5fd5..dc818d8f1 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -656,7 +656,7 @@ class Event } // Show edit and drop actions only if the user is the owner of the event and the event - // is a real event (no bithdays). + // is a real event (no birthdays). $edit = null; $copy = null; $drop = null; diff --git a/src/Model/GServer.php b/src/Model/GServer.php index 391e825c1..11d3227e8 100644 --- a/src/Model/GServer.php +++ b/src/Model/GServer.php @@ -92,7 +92,7 @@ class GServer const DETECT_NODEINFO_210 = 103; /** - * Check for the existance of a server and adds it in the background if not existant + * Check for the existence of a server and adds it in the background if not existant * * @param string $url * @param boolean $only_nodeinfo @@ -327,7 +327,7 @@ class GServer return DateTimeFormat::utc('now +1 month'); } - // The system hadn't been successul contacted for more than a month, so try again in three months + // The system hadn't been successful contacted for more than a month, so try again in three months return DateTimeFormat::utc('now +3 month'); } @@ -557,7 +557,7 @@ class GServer return false; } - // If the URL missmatches, then we mark the old entry as failure + // If the URL mismatches, then we mark the old entry as failure if (!Strings::compareLink($url, $original_url)) { self::setFailureByUrl($original_url); if (!self::getID($url, true) && !Network::isUrlBlocked($url)) { @@ -675,7 +675,7 @@ class GServer } // All following checks are done for systems that always have got a "host-meta" endpoint. - // With this check we don't have to waste time and ressources for dead systems. + // With this check we don't have to waste time and resources for dead systems. // Also this hopefully prevents us from receiving abuse messages. if (($serverdata['network'] == Protocol::PHANTOM) || in_array($serverdata['detection-method'], self::DETECT_UNSPECIFIC)) { $validHostMeta = self::validHostMeta($url); @@ -2437,7 +2437,7 @@ class GServer } } - // Disvover Mastodon servers + // Discover Mastodon servers $accesstoken = DI::config()->get('system', 'instances_social_key'); if (!empty($accesstoken)) { diff --git a/src/Model/Group.php b/src/Model/Group.php index eb4008184..e54d598eb 100644 --- a/src/Model/Group.php +++ b/src/Model/Group.php @@ -60,7 +60,7 @@ class Group /** * Checks whether given group id is found in database * - * @param int $group_id Groupd it + * @param int $group_id Group id * @param int $uid Optional user id * @return bool * @throws \Exception diff --git a/src/Model/Item.php b/src/Model/Item.php index 5ef488b97..af47b643c 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -233,7 +233,7 @@ class Item Post\Media::insertFromAttachment($item['uri-id'], $fields['attach']); } - // We only need to notfiy others when it is an original entry from us. + // We only need to notify others when it is an original entry from us. // Only call the notifier when the item had been edited and records had been changed. if ($item['origin'] && !empty($fields['edited']) && ($previous['edited'] != $fields['edited'])) { $notify_items[] = $item['id']; @@ -875,7 +875,7 @@ class Item /* * Do we already have this item? * We have to check several networks since Friendica posts could be repeated - * via OStatus (maybe Diasporsa as well) + * via OStatus (maybe Diaspora as well) */ $duplicate = self::getDuplicateID($item); if ($duplicate) { @@ -892,6 +892,8 @@ class Item $item['post-type'] = empty($item['title']) ? self::PT_NOTE : self::PT_ARTICLE; } + $defined_permissions = isset($item['allow_cid']) && isset($item['allow_gid']) && isset($item['deny_cid']) && isset($item['deny_gid']) && isset($item['private']); + $item['wall'] = intval($item['wall'] ?? 0); $item['extid'] = trim($item['extid'] ?? ''); $item['author-name'] = trim($item['author-name'] ?? ''); @@ -931,7 +933,7 @@ class Item $item['inform'] = trim($item['inform'] ?? ''); $item['file'] = trim($item['file'] ?? ''); - // Communities aren't working with the Diaspora protoccol + // Communities aren't working with the Diaspora protocol if (($uid != 0) && ($item['network'] == Protocol::DIASPORA)) { $user = User::getById($uid, ['account-type']); if ($user['account-type'] == Contact::TYPE_COMMUNITY) { @@ -993,7 +995,7 @@ class Item $item['wall'] = $toplevel_parent['wall']; // Reshares have to keep their permissions to allow forums to work - if (!$item['origin'] || ($item['verb'] != Activity::ANNOUNCE)) { + if (!$defined_permissions && (!$item['origin'] || ($item['verb'] != Activity::ANNOUNCE))) { $item['allow_cid'] = $toplevel_parent['allow_cid']; $item['allow_gid'] = $toplevel_parent['allow_gid']; $item['deny_cid'] = $toplevel_parent['deny_cid']; @@ -1016,7 +1018,7 @@ class Item * This differs from the above settings as it subtly allows comments from * email correspondents to be private even if the overall thread is not. */ - if ($toplevel_parent['private']) { + if (!$defined_permissions && $toplevel_parent['private']) { $item['private'] = $toplevel_parent['private']; } @@ -1063,7 +1065,7 @@ class Item } // ACL settings - if (!empty($item['allow_cid'] . $item['allow_gid'] . $item['deny_cid'] . $item['deny_gid'])) { + if (!$defined_permissions && !empty($item['allow_cid'] . $item['allow_gid'] . $item['deny_cid'] . $item['deny_gid'])) { $item['private'] = self::PRIVATE; } @@ -1497,7 +1499,7 @@ class Item $users = []; - /// @todo add a field "pcid" in the contact table that referrs to the public contact id. + /// @todo add a field "pcid" in the contact table that refers to the public contact id. $owner = DBA::selectFirst('contact', ['url', 'nurl', 'alias'], ['id' => $parent['owner-id']]); if (!DBA::isResult($owner)) { return; @@ -2499,12 +2501,12 @@ class Item */ public static function enumeratePermissions(array $obj, bool $check_dead = false): array { - $aclFormater = DI::aclFormatter(); + $aclFormatter = DI::aclFormatter(); - $allow_people = $aclFormater->expand($obj['allow_cid']); - $allow_groups = Group::expand($obj['uid'], $aclFormater->expand($obj['allow_gid']), $check_dead); - $deny_people = $aclFormater->expand($obj['deny_cid']); - $deny_groups = Group::expand($obj['uid'], $aclFormater->expand($obj['deny_gid']), $check_dead); + $allow_people = $aclFormatter->expand($obj['allow_cid']); + $allow_groups = Group::expand($obj['uid'], $aclFormatter->expand($obj['allow_gid']), $check_dead); + $deny_people = $aclFormatter->expand($obj['deny_cid']); + $deny_groups = Group::expand($obj['uid'], $aclFormatter->expand($obj['deny_gid']), $check_dead); $recipients = array_unique(array_merge($allow_people, $allow_groups)); $deny = array_unique(array_merge($deny_people, $deny_groups)); $recipients = array_diff($recipients, $deny); @@ -2613,7 +2615,7 @@ class Item * Activity verb. One of * like, unlike, dislike, undislike, attendyes, unattendyes, * attendno, unattendno, attendmaybe, unattendmaybe, - * announce, unannouce + * announce, unannounce * @param int $uid * @param string $allow_cid * @param string $allow_gid diff --git a/src/Model/Log/ParsedLogIterator.php b/src/Model/Log/ParsedLogIterator.php index a45b67176..d238920e4 100644 --- a/src/Model/Log/ParsedLogIterator.php +++ b/src/Model/Log/ParsedLogIterator.php @@ -25,7 +25,7 @@ use Friendica\Util\ReversedFileReader; use Friendica\Object\Log\ParsedLogLine; /** - * An iterator which returns `\Friendica\Objec\Log\ParsedLogLine` instances + * An iterator which returns `\Friendica\Object\Log\ParsedLogLine` instances * * Uses `\Friendica\Util\ReversedFileReader` to fetch log lines * from newest to oldest. diff --git a/src/Model/Nodeinfo.php b/src/Model/Nodeinfo.php index 51692f016..4dbe06c9b 100644 --- a/src/Model/Nodeinfo.php +++ b/src/Model/Nodeinfo.php @@ -67,7 +67,7 @@ class Nodeinfo DI::keyValue()->set('nodeinfo_local_posts', $posts); DI::keyValue()->set('nodeinfo_local_comments', $comments); - $logger->info('User actitivy', ['posts' => $posts, 'comments' => $comments]); + $logger->info('User activity', ['posts' => $posts, 'comments' => $comments]); } /** diff --git a/src/Model/OpenWebAuthToken.php b/src/Model/OpenWebAuthToken.php index e99d40f12..4186467c1 100644 --- a/src/Model/OpenWebAuthToken.php +++ b/src/Model/OpenWebAuthToken.php @@ -58,7 +58,7 @@ class OpenWebAuthToken * @param int $uid The user ID. * @param string $token * - * @return string|boolean The meta enry or false if not found. + * @return string|boolean The meta entry or false if not found. * @throws \Exception */ public static function getMeta(string $type, int $uid, string $token) diff --git a/src/Model/Photo.php b/src/Model/Photo.php index 96c82b0c1..29ae473ab 100644 --- a/src/Model/Photo.php +++ b/src/Model/Photo.php @@ -41,7 +41,7 @@ use Friendica\Util\Proxy; use Friendica\Util\Strings; /** - * Class to handle photo dabatase table + * Class to handle photo database table */ class Photo { @@ -101,7 +101,7 @@ class Photo * Get photos for user id * * @param integer $uid User id - * @param string $resourceid Rescource ID of the photo + * @param string $resourceid Resource ID of the photo * @param array $conditions Array of fields for conditions * @param array $params Array of several parameters * @@ -122,7 +122,7 @@ class Photo * Get a photo for user id * * @param integer $uid User id - * @param string $resourceid Rescource ID of the photo + * @param string $resourceid Resource ID of the photo * @param integer $scale Scale of the photo. Defaults to 0 * @param array $conditions Array of fields for conditions * @param array $params Array of several parameters @@ -148,7 +148,7 @@ class Photo * on success, "no sign" image info, if user has no permission, * false if photo does not exists * - * @param string $resourceid Rescource ID of the photo + * @param string $resourceid Resource ID of the photo * @param integer $scale Scale of the photo. Defaults to 0 * @param integer $visitor_uid UID of the visitor * @@ -416,7 +416,7 @@ class Photo * @param string $allow_cid Permissions, allowed contacts. optional, default = "" * @param string $allow_gid Permissions, allowed groups. optional, default = "" * @param string $deny_cid Permissions, denied contacts.optional, default = "" - * @param string $deny_gid Permissions, denied greoup.optional, default = "" + * @param string $deny_gid Permissions, denied group.optional, default = "" * @param string $desc Photo caption. optional, default = "" * * @return boolean True on success @@ -536,7 +536,7 @@ class Photo * @param Image $image Image to update. Optional, default null. * @param array $old_fields Array with the old field values that are about to be replaced (true = update on duplicate) * - * @return boolean Was the update successfull? + * @return boolean Was the update successful? * * @throws \Friendica\Network\HTTPException\InternalServerErrorException * @see \Friendica\Database\DBA::update @@ -881,14 +881,14 @@ class Photo * Then set the permissions to public. */ - self::setPermissionForRessource($image_rid, $uid, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny); + self::setPermissionForResource($image_rid, $uid, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny); } return true; } /** - * Add permissions to photo ressource + * Add permissions to photo resource * @todo mix with previous photo permissions * * @param string $image_rid @@ -899,7 +899,7 @@ class Photo * @param string $str_group_deny * @return void */ - public static function setPermissionForRessource(string $image_rid, int $uid, string $str_contact_allow, string $str_group_allow, string $str_contact_deny, string $str_group_deny) + public static function setPermissionForResource(string $image_rid, int $uid, string $str_contact_allow, string $str_group_allow, string $str_contact_deny, string $str_group_deny) { $fields = ['allow_cid' => $str_contact_allow, 'allow_gid' => $str_group_allow, 'deny_cid' => $str_contact_deny, 'deny_gid' => $str_group_deny, diff --git a/src/Model/Post/Link.php b/src/Model/Post/Link.php index dc7797951..3fafdd7ea 100644 --- a/src/Model/Post/Link.php +++ b/src/Model/Post/Link.php @@ -58,7 +58,7 @@ class Link * @param int $uriId * @param string $url * @param string $size - * @return string Found link URL + id on success, $url on failture + * @return string Found link URL + id on success, $url on failure */ public static function getByLink(int $uriId, string $url, string $size = ''): string { diff --git a/src/Model/Post/Media.php b/src/Model/Post/Media.php index e84513836..e80cc131f 100644 --- a/src/Model/Post/Media.php +++ b/src/Model/Post/Media.php @@ -455,7 +455,7 @@ class Media } /** - * Tests for path patterns that are usef for picture links in Friendica + * Tests for path patterns that are used for picture links in Friendica * * @param string $page Link to the image page * @param string $preview Preview picture @@ -467,7 +467,7 @@ class Media } /** - * Tests for path patterns that are usef for picture links in Friendica + * Tests for path patterns that are used for picture links in Friendica * * @param string $page Link to the image page * @param string $preview Preview picture diff --git a/src/Model/User.php b/src/Model/User.php index 50586183a..66b4cf1ff 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -529,7 +529,7 @@ class User // Addons can create users, and since this 'catch' branch should only // execute if getAuthenticationInfo can't find an existing user, that's // exactly what will happen here. Creating a numeric username would create - // abiguity with user IDs, possibly opening up an attack vector. + // ambiguity with user IDs, possibly opening up an attack vector. // So let's be very careful about that. if (empty($username) || is_numeric($username)) { throw $e; @@ -684,7 +684,7 @@ class User if ($user['last-activity'] != $current_day) { User::update(['last-activity' => $current_day], $uid); - // Set the last actitivy for all identities of the user + // Set the last activity for all identities of the user DBA::update('user', ['last-activity' => $current_day], ['parent-uid' => $uid, 'account_removed' => false]); } } @@ -816,14 +816,14 @@ class User * Empties the password reset token field just in case. * * @param int $uid - * @param string $pasword_hashed + * @param string $password_hashed * @return bool * @throws Exception */ - private static function updatePasswordHashed(int $uid, string $pasword_hashed): bool + private static function updatePasswordHashed(int $uid, string $password_hashed): bool { $fields = [ - 'password' => $pasword_hashed, + 'password' => $password_hashed, 'pwdreset' => null, 'pwdreset_time' => null, 'legacy_password' => false @@ -851,7 +851,7 @@ class User * Checks if a nickname is in the list of the forbidden nicknames * * Check if a nickname is forbidden from registration on the node by the - * admin. Forbidden nicknames (e.g. role namess) can be configured in the + * admin. Forbidden nicknames (e.g. role names) can be configured in the * admin panel. * * @param string $nickname The nickname that should be checked @@ -1232,7 +1232,7 @@ class User $resource_id = Photo::newResource(); - // Not using Photo::PROFILE_PHOTOS here, so that it is discovered as translateble string + // Not using Photo::PROFILE_PHOTOS here, so that it is discovered as translatable string $profile_album = DI::l10n()->t('Profile Photos'); $r = Photo::store($image, $uid, 0, $resource_id, $filename, $profile_album, 4); @@ -1377,7 +1377,7 @@ class User * permanently against re-registration, as the person was not yet * allowed to have friends on this system * - * @return bool True, if the deny was successfull + * @return bool True, if the deny was successful * @throws Exception */ public static function deny(string $hash): bool @@ -1792,7 +1792,7 @@ class User * * @param int $start Start count (Default is 0) * @param int $count Count of the items per page (Default is @see Pager::ITEMS_PER_PAGE) - * @param string $type The type of users, which should get (all, bocked, removed) + * @param string $type The type of users, which should get (all, blocked, removed) * @param string $order Order of the user list (Default is 'contact.name') * @param bool $descending Order direction (Default is ascending) * @return array|bool The list of the users diff --git a/src/Module/Admin/Federation.php b/src/Module/Admin/Federation.php index 59399e639..517e8cb4a 100644 --- a/src/Module/Admin/Federation.php +++ b/src/Module/Admin/Federation.php @@ -391,7 +391,7 @@ class Federation extends BaseAdmin // // clean up version numbers // - // some platforms do not provide version information, add a unkown there + // some platforms do not provide version information, add a unknown there // to the version string for the displayed list. foreach ($versionCounts as $key => $value) { if ($versionCounts[$key]['version'] == '') { diff --git a/src/Module/Admin/Storage.php b/src/Module/Admin/Storage.php index 71d34cb25..e31d7db39 100644 --- a/src/Module/Admin/Storage.php +++ b/src/Module/Admin/Storage.php @@ -110,7 +110,7 @@ class Storage extends BaseAdmin foreach ($storageConfig->getOptions() as $option => $info) { $type = $info[0]; - // Backward compatibilty with yesno field description + // Backward compatibility with yesno field description if ($type == 'yesno') { $type = 'checkbox'; // Remove translated labels Yes No from field info diff --git a/src/Module/Api/Friendica/Photo/Update.php b/src/Module/Api/Friendica/Photo/Update.php index c6bcadfa4..0eec5a344 100644 --- a/src/Module/Api/Friendica/Photo/Update.php +++ b/src/Module/Api/Friendica/Photo/Update.php @@ -70,7 +70,7 @@ class Update extends BaseApi throw new HTTPException\BadRequestException('no albumname specified'); } - // check if photo is existing in databasei + // check if photo is existing in database if (!Photo::exists(['resource-id' => $photo_id, 'uid' => $uid, 'album' => $album])) { throw new HTTPException\BadRequestException('photo not available'); } diff --git a/src/Module/Api/Mastodon/Accounts/Relationships.php b/src/Module/Api/Mastodon/Accounts/Relationships.php index 4f759bf3d..074daa95d 100644 --- a/src/Module/Api/Mastodon/Accounts/Relationships.php +++ b/src/Module/Api/Mastodon/Accounts/Relationships.php @@ -51,12 +51,12 @@ class Relationships extends BaseApi $request['id'] = [$request['id']]; } - $relationsships = []; + $relationships = []; foreach ($request['id'] as $id) { - $relationsships[] = DI::mstdnRelationship()->createFromContactId($id, $uid); + $relationships[] = DI::mstdnRelationship()->createFromContactId($id, $uid); } - System::jsonExit($relationsships); + System::jsonExit($relationships); } } diff --git a/src/Module/Api/Mastodon/Statuses.php b/src/Module/Api/Mastodon/Statuses.php index e64d84192..f8f46a895 100644 --- a/src/Module/Api/Mastodon/Statuses.php +++ b/src/Module/Api/Mastodon/Statuses.php @@ -181,7 +181,7 @@ class Statuses extends BaseApi 'sensitive' => false, // Mark status and attached media as sensitive? 'spoiler_text' => '', // Text to be shown as a warning or subject before the actual content. Statuses are generally collapsed behind this field. 'visibility' => '', // Visibility of the posted status. One of: "public", "unlisted", "private" or "direct". - 'scheduled_at' => '', // ISO 8601 Datetime at which to schedule a status. Providing this paramter will cause ScheduledStatus to be returned instead of Status. Must be at least 5 minutes in the future. + 'scheduled_at' => '', // ISO 8601 Datetime at which to schedule a status. Providing this parameter will cause ScheduledStatus to be returned instead of Status. Must be at least 5 minutes in the future. 'language' => '', // ISO 639 language code for this status. 'friendica' => [], // Friendica extensions to the standard Mastodon API spec ], $request); @@ -266,15 +266,14 @@ class Statuses extends BaseApi } if ($request['in_reply_to_id']) { - $parent = Post::selectFirst(['uri', 'private'], ['uri-id' => $request['in_reply_to_id'], 'uid' => [0, $uid]]); + $parent = Post::selectFirst(['uri'], ['uri-id' => $request['in_reply_to_id'], 'uid' => [0, $uid]]); + if (empty($parent)) { + throw new HTTPException\NotFoundException('Item with URI ID ' . $request['in_reply_to_id'] . ' not found for user ' . $uid . '.'); + } $item['thr-parent'] = $parent['uri']; $item['gravity'] = Item::GRAVITY_COMMENT; $item['object-type'] = Activity\ObjectType::COMMENT; - - if (in_array($parent['private'], [Item::UNLISTED, Item::PUBLIC]) && ($item['private'] == Item::PRIVATE)) { - throw new HTTPException\NotImplementedException('Private replies for public posts are not implemented.'); - } } else { self::checkThrottleLimit(); @@ -392,9 +391,8 @@ class Statuses extends BaseApi continue; } - Photo::setPermissionForRessource($media[0]['resource-id'], $item['uid'], $item['allow_cid'], $item['allow_gid'], $item['deny_cid'], $item['deny_gid']); + Photo::setPermissionForResource($media[0]['resource-id'], $item['uid'], $item['allow_cid'], $item['allow_gid'], $item['deny_cid'], $item['deny_gid']); - $ressources[] = $media[0]['resource-id']; $phototypes = Images::supportedTypes(); $ext = $phototypes[$media[0]['type']]; diff --git a/src/Module/Api/Twitter/Statuses/Update.php b/src/Module/Api/Twitter/Statuses/Update.php index 702cc169e..df51ff8a8 100644 --- a/src/Module/Api/Twitter/Statuses/Update.php +++ b/src/Module/Api/Twitter/Statuses/Update.php @@ -153,11 +153,10 @@ class Update extends BaseApi continue; } - Photo::setPermissionForRessource($media[0]['resource-id'], $uid, $item['allow_cid'], $item['allow_gid'], $item['deny_cid'], $item['deny_gid']); + Photo::setPermissionForResource($media[0]['resource-id'], $uid, $item['allow_cid'], $item['allow_gid'], $item['deny_cid'], $item['deny_gid']); - $ressources[] = $media[0]['resource-id']; - $phototypes = Images::supportedTypes(); - $ext = $phototypes[$media[0]['type']]; + $phototypes = Images::supportedTypes(); + $ext = $phototypes[$media[0]['type']]; $attachment = [ 'type' => Post\Media::IMAGE, diff --git a/src/Module/Attach.php b/src/Module/Attach.php index c924934b7..b70e43429 100644 --- a/src/Module/Attach.php +++ b/src/Module/Attach.php @@ -49,7 +49,7 @@ class Attach extends BaseModule throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('Item was not found.')); } - // Now we'll fetch the item, if we have enough permisson + // Now we'll fetch the item, if we have enough permission $item = MAttach::getByIdWithPermission($item_id); if ($item === false) { throw new \Friendica\Network\HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.')); diff --git a/src/Module/BaseNotifications.php b/src/Module/BaseNotifications.php index 45975672b..117530d25 100644 --- a/src/Module/BaseNotifications.php +++ b/src/Module/BaseNotifications.php @@ -158,7 +158,7 @@ abstract class BaseNotifications extends BaseModule /** * List of pages for the Notifications TabBar * - * @return array with with notifications TabBar data + * @return array with notifications TabBar data * @throws Exception */ private function getTabs() diff --git a/src/Module/Contact/Redir.php b/src/Module/Contact/Redir.php index 678019755..e1a7b2144 100644 --- a/src/Module/Contact/Redir.php +++ b/src/Module/Contact/Redir.php @@ -171,7 +171,7 @@ class Redir extends \Friendica\BaseModule // On a local instance we have to check if the local user has already authenticated // with the local contact. Otherwise, the local user would ask the local contact - // for authentification everytime he/she is visiting a profile page of the local + // for authentication everytime he/she is visiting a profile page of the local // contact. if (($host == $remotehost) && ($this->session->getRemoteContactID($this->session->get('visitor_visiting')) == $this->session->get('visitor_id'))) { // Remote user is already authenticated. diff --git a/src/Module/Conversation/Community.php b/src/Module/Conversation/Community.php index 818943733..ae6297e48 100644 --- a/src/Module/Conversation/Community.php +++ b/src/Module/Conversation/Community.php @@ -302,7 +302,7 @@ class Community extends BaseModule } /** - * Database query for the comunity page + * Database query for the community page * * @param $min_id * @param $max_id diff --git a/src/Module/Conversation/Network.php b/src/Module/Conversation/Network.php index 84d08ff9c..5653b128a 100644 --- a/src/Module/Conversation/Network.php +++ b/src/Module/Conversation/Network.php @@ -120,7 +120,7 @@ class Network extends BaseModule $content = ''; if (self::$forumContactId) { - // If self::$forumContactId belongs to a communitity forum or a privat goup,.add a mention to the status editor + // If self::$forumContactId belongs to a community forum or a private group, add a mention to the status editor $condition = ["`id` = ? AND `contact-type` = ?", self::$forumContactId, Contact::TYPE_COMMUNITY]; $contact = DBA::selectFirst('contact', ['addr'], $condition); if (!empty($contact['addr'])) { diff --git a/src/Module/Delegation.php b/src/Module/Delegation.php index 0003ae08b..3595ff7f3 100644 --- a/src/Module/Delegation.php +++ b/src/Module/Delegation.php @@ -120,7 +120,7 @@ class Delegation extends BaseModule $identities = User::identities(DI::userSession()->getSubManagedUserId() ?: DI::userSession()->getLocalUserId()); - //getting additinal information for each identity + //getting additional information for each identity foreach ($identities as $key => $identity) { $identities[$key]['thumb'] = User::getAvatarUrl($identity, Proxy::SIZE_THUMB); diff --git a/src/Module/Diaspora/Receive.php b/src/Module/Diaspora/Receive.php index d95e252e5..4df2192d3 100644 --- a/src/Module/Diaspora/Receive.php +++ b/src/Module/Diaspora/Receive.php @@ -101,7 +101,7 @@ class Receive extends BaseModule } if ($importer['account-type'] == User::ACCOUNT_TYPE_COMMUNITY) { - // Communities aren't working with the Diaspora protoccol + // Communities aren't working with the Diaspora protocol // We throw an "accepted" here, so that the sender doesn't repeat the delivery throw new HTTPException\AcceptedException(); } diff --git a/src/Module/HTTPException/PageNotFound.php b/src/Module/HTTPException/PageNotFound.php index 5818f8759..4956bfcdc 100644 --- a/src/Module/HTTPException/PageNotFound.php +++ b/src/Module/HTTPException/PageNotFound.php @@ -61,7 +61,7 @@ class PageNotFound extends BaseModule * Otherwise we are going to emit a 404 not found. */ $queryString = $this->server['QUERY_STRING']; - // Stupid browser tried to pre-fetch our Javascript img template. Don't log the event or return anything - just quietly exit. + // Stupid browser tried to pre-fetch our JavaScript img template. Don't log the event or return anything - just quietly exit. if (!empty($queryString) && preg_match('/{[0-9]}/', $queryString) !== 0) { System::exit(); } diff --git a/src/Module/Media/Attachment/Upload.php b/src/Module/Media/Attachment/Upload.php index b837b8df7..50c20b364 100644 --- a/src/Module/Media/Attachment/Upload.php +++ b/src/Module/Media/Attachment/Upload.php @@ -38,7 +38,7 @@ use Psr\Log\LoggerInterface; /** * Asynchronous attachment upload module * - * Only used as the target action of the AjaxUpload Javascript library + * Only used as the target action of the AjaxUpload JavaScript library */ class Upload extends \Friendica\BaseModule { diff --git a/src/Module/Media/Photo/Upload.php b/src/Module/Media/Photo/Upload.php index 8b56540f4..1283b7cf3 100644 --- a/src/Module/Media/Photo/Upload.php +++ b/src/Module/Media/Photo/Upload.php @@ -40,7 +40,7 @@ use Psr\Log\LoggerInterface; /** * Asynchronous photo upload module * - * Only used as the target action of the AjaxUpload Javascript library + * Only used as the target action of the AjaxUpload JavaScript library */ class Upload extends \Friendica\BaseModule { diff --git a/src/Module/Owa.php b/src/Module/Owa.php index a3ff8d983..69abd8e87 100644 --- a/src/Module/Owa.php +++ b/src/Module/Owa.php @@ -80,12 +80,12 @@ class Owa extends BaseModule $ret['success'] = true; $token = Strings::getRandomHex(32); - // Store the generated token in the databe. + // Store the generated token in the database. OpenWebAuthToken::create('owt', 0, $token, $contact['addr']); $result = ''; - // Encrypt the token with the public contacts publik key. + // Encrypt the token with the public contacts public key. // Only the specific public contact will be able to encrypt it. // At a later time, we will compare weather the token we're getting // is really the same token we have stored in the database. diff --git a/src/Module/PermissionTooltip.php b/src/Module/PermissionTooltip.php index 1f41584d6..ad5c11cc0 100644 --- a/src/Module/PermissionTooltip.php +++ b/src/Module/PermissionTooltip.php @@ -79,7 +79,7 @@ class PermissionTooltip extends \Friendica\BaseModule throw new HttpException\NotFoundException(DI::l10n()->t('Model not found')); } - // Kept for backwards compatiblity + // Kept for backwards compatibility Hook::callAll('lockview_content', $model); if ($type == 'item') { diff --git a/src/Module/Post/Tag/Add.php b/src/Module/Post/Tag/Add.php index 8c4858794..53be1c639 100644 --- a/src/Module/Post/Tag/Add.php +++ b/src/Module/Post/Tag/Add.php @@ -118,10 +118,10 @@ EOT; EOT; - $tagger_link = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]'; - $aauthor_link = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]'; - $post_link = '[url=' . $item['plink'] . ']' . ($item['resource-id'] ? $this->t('photo') : $this->t('post')) . '[/url]'; - $term_link = '#[url=' . $tagid . ']' . $term . '[/url]'; + $tagger_link = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]'; + $author_link = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]'; + $post_link = '[url=' . $item['plink'] . ']' . ($item['resource-id'] ? $this->t('photo') : $this->t('post')) . '[/url]'; + $term_link = '#[url=' . $tagid . ']' . $term . '[/url]'; $post = [ 'guid' => System::createUUID(), @@ -138,7 +138,7 @@ EOT; 'author-name' => $contact['name'], 'author-link' => $contact['url'], 'author-avatar' => $contact['thumb'], - 'body' => $this->t('%1$s tagged %2$s\'s %3$s with %4$s', $tagger_link, $aauthor_link, $post_link, $term_link), + 'body' => $this->t('%1$s tagged %2$s\'s %3$s with %4$s', $tagger_link, $author_link, $post_link, $term_link), 'verb' => Activity::TAG, 'target-type' => $targettype, 'target' => $target, diff --git a/src/Module/Profile/Profile.php b/src/Module/Profile/Profile.php index 6fb44c300..d753cd762 100644 --- a/src/Module/Profile/Profile.php +++ b/src/Module/Profile/Profile.php @@ -254,7 +254,7 @@ class Profile extends BaseProfile ); } - //show subcribed forum if it is enabled in the usersettings + //show subscribed forum if it is enabled in the usersettings if (Feature::isEnabled($profile['uid'], 'forumlist_profile')) { $custom_fields += self::buildField( 'forumlist', diff --git a/src/Module/RobotsTxt.php b/src/Module/RobotsTxt.php index caa114642..49aab1471 100644 --- a/src/Module/RobotsTxt.php +++ b/src/Module/RobotsTxt.php @@ -31,7 +31,7 @@ class RobotsTxt extends BaseModule { protected function rawContent(array $request = []) { - $allDisalloweds = [ + $allDisallowed = [ '/settings/', '/admin/', '/message/', @@ -42,7 +42,7 @@ class RobotsTxt extends BaseModule header('Content-Type: text/plain'); echo 'User-agent: *' . PHP_EOL; - foreach ($allDisalloweds as $disallowed) { + foreach ($allDisallowed as $disallowed) { echo 'Disallow: ' . $disallowed . PHP_EOL; } System::exit(); diff --git a/src/Module/Search/Index.php b/src/Module/Search/Index.php index d1cd5f40d..167389684 100644 --- a/src/Module/Search/Index.php +++ b/src/Module/Search/Index.php @@ -106,7 +106,7 @@ class Index extends BaseSearch $search = '#' . trim(rawurldecode($_GET['tag'])); } - // contruct a wrapper for the search header + // construct a wrapper for the search header $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('content_wrapper.tpl'), [ 'name' => 'search-header', '$title' => DI::l10n()->t('Search'), diff --git a/src/Module/Security/TwoFactor/Trust.php b/src/Module/Security/TwoFactor/Trust.php index 4b519cc97..31bd3e4cc 100644 --- a/src/Module/Security/TwoFactor/Trust.php +++ b/src/Module/Security/TwoFactor/Trust.php @@ -60,7 +60,7 @@ class Trust extends BaseModule /** @var TwoFactor\Repository\TrustedBrowser */ protected $trustedBrowserRepository; - public function __construct(App $app, Authentication $auth, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, IHandleUserSessions $session, Cookie $cookie, TwoFactor\Factory\TrustedBrowser $trustedBrowserFactory, TwoFactor\Repository\TrustedBrowser $trustedBrowserRepositoy, Response $response, array $server, array $parameters = []) + public function __construct(App $app, Authentication $auth, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, IHandleUserSessions $session, Cookie $cookie, TwoFactor\Factory\TrustedBrowser $trustedBrowserFactory, TwoFactor\Repository\TrustedBrowser $trustedBrowserRepository, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -69,7 +69,7 @@ class Trust extends BaseModule $this->session = $session; $this->cookie = $cookie; $this->trustedBrowserFactory = $trustedBrowserFactory; - $this->trustedBrowserRepository = $trustedBrowserRepositoy; + $this->trustedBrowserRepository = $trustedBrowserRepository; } protected function post(array $request = []) diff --git a/src/Module/Settings/Profile/Photo/Crop.php b/src/Module/Settings/Profile/Photo/Crop.php index b08071915..2929e16da 100644 --- a/src/Module/Settings/Profile/Photo/Crop.php +++ b/src/Module/Settings/Profile/Photo/Crop.php @@ -181,7 +181,7 @@ class Crop extends BaseSettings $havescale = $havescale || $photo['scale'] == 5; } - // set an already uloaded photo as profile photo + // set an already uploaded photo as profile photo // if photo is in 'Profile Photos', change it in db if ($photos[0]['photo-type'] == Photo::USER_AVATAR && $havescale) { Photo::update(['profile' => false], ['uid' => DI::userSession()->getLocalUserId()]); diff --git a/src/Module/WellKnown/XSocialRelay.php b/src/Module/WellKnown/XSocialRelay.php index 11835ec35..22d1b08a4 100644 --- a/src/Module/WellKnown/XSocialRelay.php +++ b/src/Module/WellKnown/XSocialRelay.php @@ -28,7 +28,7 @@ use Friendica\Model\Search; use Friendica\Protocol\Relay; /** - * Node subscription preferences for social realy systems + * Node subscription preferences for social relay systems * @see https://git.feneas.org/jaywink/social-relay/blob/master/docs/relays.md */ class XSocialRelay extends BaseModule diff --git a/src/Navigation/Notifications/Factory/FormattedNotify.php b/src/Navigation/Notifications/Factory/FormattedNotify.php index 792bf91d3..b34aa74eb 100644 --- a/src/Navigation/Notifications/Factory/FormattedNotify.php +++ b/src/Navigation/Notifications/Factory/FormattedNotify.php @@ -363,7 +363,7 @@ class FormattedNotify extends BaseFactory { $item['seen'] = !($item['unseen'] > 0); - // For feed items we use the user's contact, since the avatar is mostly self choosen. + // For feed items we use the user's contact, since the avatar is mostly self chosen. if (!empty($item['network']) && $item['network'] == Protocol::FEED) { $item['author-avatar'] = $item['contact-avatar']; } diff --git a/src/Navigation/Notifications/Factory/Introduction.php b/src/Navigation/Notifications/Factory/Introduction.php index bc5affd69..3d176743c 100644 --- a/src/Navigation/Notifications/Factory/Introduction.php +++ b/src/Navigation/Notifications/Factory/Introduction.php @@ -100,11 +100,11 @@ class Introduction extends BaseFactory try { $stmtNotifications = $this->dba->p( "SELECT `intro`.`id` AS `intro_id`, `intro`.*, `contact`.*, - `sugggest-contact`.`name` AS `fname`, `sugggest-contact`.`url` AS `furl`, `sugggest-contact`.`addr` AS `faddr`, - `sugggest-contact`.`photo` AS `fphoto`, `sugggest-contact`.`request` AS `frequest` + `suggest-contact`.`name` AS `fname`, `suggest-contact`.`url` AS `furl`, `suggest-contact`.`addr` AS `faddr`, + `suggest-contact`.`photo` AS `fphoto`, `suggest-contact`.`request` AS `frequest` FROM `intro` LEFT JOIN `contact` ON `contact`.`id` = `intro`.`contact-id` - LEFT JOIN `contact` AS `sugggest-contact` ON `intro`.`suggest-cid` = `sugggest-contact`.`id` + LEFT JOIN `contact` AS `suggest-contact` ON `intro`.`suggest-cid` = `suggest-contact`.`id` WHERE `intro`.`uid` = ? $sql_extra LIMIT ?, ?", $this->session->getLocalUserId(), diff --git a/src/Navigation/Notifications/ValueObject/FormattedNavNotification.php b/src/Navigation/Notifications/ValueObject/FormattedNavNotification.php index 493fdb811..8f64bf25a 100644 --- a/src/Navigation/Notifications/ValueObject/FormattedNavNotification.php +++ b/src/Navigation/Notifications/ValueObject/FormattedNavNotification.php @@ -53,7 +53,7 @@ class FormattedNavNotification extends BaseEntity */ public function __construct(string $contact_name, string $contact_url, string $contact_photo, string $timestamp, string $plaintext, string $html, string $href, bool $seen) { - // Properties differ from constructor because this structure is used in the "nav-update" Javascript event listener + // Properties differ from constructor because this structure is used in the "nav-update" JavaScript event listener $this->contact = [ 'name' => $contact_name, 'url' => $contact_url, diff --git a/src/Network/HTTPClient/Factory/HttpClient.php b/src/Network/HTTPClient/Factory/HttpClient.php index 65f90dab8..c139828b6 100644 --- a/src/Network/HTTPClient/Factory/HttpClient.php +++ b/src/Network/HTTPClient/Factory/HttpClient.php @@ -60,7 +60,7 @@ class HttpClient extends BaseFactory /** * Creates a IHTTPClient for communications with HTTP endpoints * - * @param HandlerStack|null $handlerStack (optional) A handler replacement (just usefull at test environments) + * @param HandlerStack|null $handlerStack (optional) A handler replacement (just useful at test environments) * * @return ICanSendHttpRequests */ diff --git a/src/Network/HTTPClient/Response/CurlResult.php b/src/Network/HTTPClient/Response/CurlResult.php index f187fb62a..9db2f1304 100644 --- a/src/Network/HTTPClient/Response/CurlResult.php +++ b/src/Network/HTTPClient/Response/CurlResult.php @@ -216,7 +216,7 @@ class CurlResult implements ICanHandleHttpResponses $parts = []; } - /// @todo Checking the corresponding RFC which parts of a redirect can be ommitted. + /// @todo Checking the corresponding RFC which parts of a redirect can be omitted. $components = ['scheme', 'host', 'path', 'query', 'fragment']; foreach ($components as $component) { if (empty($redirect_parts[$component]) && !empty($parts[$component])) { diff --git a/src/Network/HTTPException/LenghtRequiredException.php b/src/Network/HTTPException/LengthRequiredException.php similarity index 95% rename from src/Network/HTTPException/LenghtRequiredException.php rename to src/Network/HTTPException/LengthRequiredException.php index 93a975953..0dd189693 100644 --- a/src/Network/HTTPException/LenghtRequiredException.php +++ b/src/Network/HTTPException/LengthRequiredException.php @@ -23,7 +23,7 @@ namespace Friendica\Network\HTTPException; use Friendica\Network\HTTPException; -class LenghtRequiredException extends HTTPException +class LengthRequiredException extends HTTPException { protected $code = 411; protected $httpdesc = 'Length Required'; diff --git a/src/Network/Probe.php b/src/Network/Probe.php index 88c256fe0..d344d556c 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -63,7 +63,7 @@ class Probe private static $baseurl; /** - * @var boolean Whether a timeout has occured + * @var boolean Whether a timeout has occurred */ private static $isTimeout; @@ -769,7 +769,7 @@ class Probe if (empty($result['network']) && empty($ap_profile['network']) || ($network == Protocol::FEED)) { $result = self::feed($uri); } else { - // We overwrite the detected nick with our try if the previois routines hadn't detected it. + // We overwrite the detected nick with our try if the previous routines hadn't detected it. // Additionally, it is overwritten when the nickname doesn't make sense (contains spaces). if ((empty($result['nick']) || (strstr($result['nick'], ' '))) && ($nick != '')) { $result['nick'] = $nick; @@ -1623,7 +1623,7 @@ class Probe if (!empty($feed_data['header']['author-about'])) { $data['about'] = $feed_data['header']['author-about']; } - // OStatus has serious issues when the the url doesn't fit (ssl vs. non ssl) + // OStatus has serious issues when the url doesn't fit (ssl vs. non ssl) // So we take the value that we just fetched, although the other one worked as well if (!empty($feed_data['header']['author-link'])) { $data['url'] = $feed_data['header']['author-link']; @@ -2280,7 +2280,7 @@ class Probe ] ]; } catch (Exception $e) { - // Default values for non existing targets + // Default values for nonexistent targets $data = [ 'name' => $url, 'nick' => $url, 'url' => $url, 'network' => Protocol::PHANTOM, 'photo' => DI::baseUrl() . Contact::DEFAULT_AVATAR_PHOTO diff --git a/src/Object/Api/Mastodon/Status/FriendicaExtension.php b/src/Object/Api/Mastodon/Status/FriendicaExtension.php index be49fe3c5..e00399a9b 100644 --- a/src/Object/Api/Mastodon/Status/FriendicaExtension.php +++ b/src/Object/Api/Mastodon/Status/FriendicaExtension.php @@ -47,14 +47,18 @@ class FriendicaExtension extends BaseDataTransferObject /** @var FriendicaDeliveryData|null */ protected $delivery_data; + /** @var int */ protected $dislikes_count; + + /** @var bool */ + protected $disliked = false; + /** * @var FriendicaVisibility|null */ protected $visibility; - /** * Creates a FriendicaExtension object * @@ -64,6 +68,7 @@ class FriendicaExtension extends BaseDataTransferObject * @param string|null $edited_at * @param string|null $received_at * @param int $dislikes_count + * @param bool $disliked * @param FriendicaDeliveryData|null $delivery_data * @param FriendicaVisibility|null $visibility */ @@ -73,6 +78,7 @@ class FriendicaExtension extends BaseDataTransferObject ?string $commented_at, ?string $received_at, int $dislikes_count, + bool $disliked, ?FriendicaDeliveryData $delivery_data, ?FriendicaVisibility $visibility ) { @@ -82,6 +88,7 @@ class FriendicaExtension extends BaseDataTransferObject $this->received_at = $received_at ? DateTimeFormat::utc($received_at, DateTimeFormat::JSON) : null; $this->delivery_data = $delivery_data; $this->dislikes_count = $dislikes_count; + $this->disliked = $disliked; $this->visibility = $visibility; } diff --git a/src/Object/Image.php b/src/Object/Image.php index 49196a0c4..5e915d84f 100644 --- a/src/Object/Image.php +++ b/src/Object/Image.php @@ -600,7 +600,7 @@ class Image do { $this->image->cropImage($w, $h, $x, $y); /* - * We need to remove the canva, + * We need to remove the canvas, * or the image is not resized to the crop: * http://php.net/manual/en/imagick.cropimage.php#97232 */ diff --git a/src/Profile/ProfileField/Repository/ProfileField.php b/src/Profile/ProfileField/Repository/ProfileField.php index e20ed8a19..d297ca237 100644 --- a/src/Profile/ProfileField/Repository/ProfileField.php +++ b/src/Profile/ProfileField/Repository/ProfileField.php @@ -192,7 +192,7 @@ class ProfileField extends BaseRepository } /** - * Delets a whole collection of ProfileFields + * Deletes a whole collection of ProfileFields * * @param Collection\ProfileFields $profileFields * diff --git a/src/Protocol/ActivityPub/Delivery.php b/src/Protocol/ActivityPub/Delivery.php index 5bb09dfa8..ddf5816ed 100644 --- a/src/Protocol/ActivityPub/Delivery.php +++ b/src/Protocol/ActivityPub/Delivery.php @@ -208,7 +208,7 @@ class Delivery } /** - * mark or unmark the given receivers for archival upon succoess + * mark or unmark the given receivers for archival upon success * * @param array $receivers * @param boolean $success diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 42ff0ee12..d6dc834fc 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -946,7 +946,7 @@ class Processor return true; } - if (in_array($activity['completion-mode'] ?? Receiver::COMPLETION_NONE, [Receiver::COMPLETION_MANUAL, Receiver::COMPLETION_ANNOUCE])) { + if (in_array($activity['completion-mode'] ?? Receiver::COMPLETION_NONE, [Receiver::COMPLETION_MANUAL, Receiver::COMPLETION_ANNOUNCE])) { // Manual completions and completions caused by reshares are allowed without any further checks. Logger::debug('Message is in completion mode - accepted', ['mode' => $activity['completion-mode'], 'uri-id' => $item['uri-id'], 'guid' => $item['guid'], 'url' => $item['uri']]); return true; diff --git a/src/Protocol/ActivityPub/Queue.php b/src/Protocol/ActivityPub/Queue.php index 9180de08f..d77785fe6 100644 --- a/src/Protocol/ActivityPub/Queue.php +++ b/src/Protocol/ActivityPub/Queue.php @@ -252,7 +252,7 @@ class Queue { $entries = DBA::select('inbox-entry', ['id', 'type', 'object-type', 'object-id', 'in-reply-to-id'], ["`trust` AND `wid` IS NULL"], ['order' => ['id' => true]]); while ($entry = DBA::fetch($entries)) { - // Don't process entries of items that are answer to non existing posts + // Don't process entries of items that are answer to nonexistent posts if (!empty($entry['in-reply-to-id']) && !Post::exists(['uri' => $entry['in-reply-to-id']])) { continue; } diff --git a/src/Protocol/ActivityPub/Receiver.php b/src/Protocol/ActivityPub/Receiver.php index b1de036fd..468af6c72 100644 --- a/src/Protocol/ActivityPub/Receiver.php +++ b/src/Protocol/ActivityPub/Receiver.php @@ -74,11 +74,11 @@ class Receiver const TARGET_ANSWER = 6; const TARGET_GLOBAL = 7; - const COMPLETION_NONE = 0; - const COMPLETION_ANNOUCE = 1; - const COMPLETION_RELAY = 2; - const COMPLETION_MANUAL = 3; - const COMPLETION_AUTO = 4; + const COMPLETION_NONE = 0; + const COMPLETION_ANNOUNCE = 1; + const COMPLETION_RELAY = 2; + const COMPLETION_MANUAL = 3; + const COMPLETION_AUTO = 4; /** * Checks incoming message from the inbox @@ -248,7 +248,7 @@ class Receiver * Fetches the object type for a given object id * * @param array $activity - * @param string $object_id Object ID of the the provided object + * @param string $object_id Object ID of the provided object * @param integer $uid User ID * * @return string with object type or NULL @@ -643,7 +643,7 @@ class Receiver } } - $decouple = DI::config()->get('system', 'decoupled_receiver') && !in_array($completion, [self::COMPLETION_MANUAL, self::COMPLETION_ANNOUCE]); + $decouple = DI::config()->get('system', 'decoupled_receiver') && !in_array($completion, [self::COMPLETION_MANUAL, self::COMPLETION_ANNOUNCE]); if ($decouple && ($trust_source || DI::config()->get('debug', 'ap_inbox_store_untrusted'))) { $object_data = Queue::add($object_data, $type, $uid, $http_signer, $push, $trust_source); @@ -731,7 +731,7 @@ class Receiver case 'as:Announce': if (in_array($object_data['object_type'], self::CONTENT_TYPES)) { if (!Item::searchByLink($object_data['object_id'], $uid)) { - if (ActivityPub\Processor::fetchMissingActivity($object_data['object_id'], [], $object_data['actor'], self::COMPLETION_ANNOUCE, $uid)) { + if (ActivityPub\Processor::fetchMissingActivity($object_data['object_id'], [], $object_data['actor'], self::COMPLETION_ANNOUNCE, $uid)) { Logger::debug('Created announced id', ['uid' => $uid, 'id' => $object_data['object_id']]); Queue::remove($object_data); } else { @@ -1067,7 +1067,7 @@ class Receiver { $reply = $receivers = $profile = []; - // When it is an answer, we inherite the receivers from the parent + // When it is an answer, we inherit the receivers from the parent $replyto = JsonLD::fetchElement($activity, 'as:inReplyTo', '@id'); if (!empty($replyto)) { $reply = [$replyto]; @@ -1181,7 +1181,7 @@ class Receiver self::switchContacts($receivers, $actor); // "birdsitelive" is a service that mirrors tweets into the fediverse - // These posts can be fetched without authentification, but are not marked as public + // These posts can be fetched without authentication, but are not marked as public // We treat them as unlisted posts to be able to handle them. if (empty($receivers) && $fetch_unlisted && Contact::isPlatform($actor, 'birdsitelive')) { $receivers[0] = ['uid' => 0, 'type' => self::TARGET_GLOBAL]; @@ -1370,9 +1370,9 @@ class Receiver } /** - * Fetches the object data from external ressources if needed + * Fetches the object data from external resources if needed * - * @param string $object_id Object ID of the the provided object + * @param string $object_id Object ID of the provided object * @param array $object The provided object array * @param boolean $trust_source Do we trust the provided object? * @param integer $uid User ID for the signature that we use to fetch data diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index fb4ed0b4c..a4e1157ca 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -444,7 +444,7 @@ class Transmitter } /** - * Get a minimal actror array for the C2S API + * Get a minimal actor array for the C2S API * * @param integer $cid * @return array @@ -1830,7 +1830,7 @@ class Transmitter $item['body'] = $announce['comment'] . "\n" . $announce['object']['plink']; $activity['object'] = self::createNote($item, $api_mode); - /// @todo Finally descide how to implement this in AP. This is a possible way: + /// @todo Finally decide how to implement this in AP. This is a possible way: $activity['object']['attachment'][] = self::createNote($announce['object']); $activity['object']['source']['content'] = $orig_body; @@ -1838,7 +1838,7 @@ class Transmitter } /** - * Return announce related data if the item is an annunce + * Return announce related data if the item is an announce * * @param array $item * @return array Announcement array diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 621f18e98..b29a3676a 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -608,7 +608,7 @@ class DFRN /// @Todo /// - Check real image type and image size - /// - Check which of these boths elements we should use + /// - Check which of these elements we should use $attributes = [ 'rel' => 'photo', 'type' => 'image/jpeg', @@ -878,7 +878,7 @@ class DFRN XML::addElement($doc, $entry, 'dfrn:diaspora_guid', $item['guid']); - // The signed text contains the content in Markdown, the sender handle and the signatur for the content + // The signed text contains the content in Markdown, the sender handle and the signature for the content // It is needed for relayed comments to Diaspora. if ($item['signed_text']) { $sign = base64_encode(json_encode(['signed_text' => $item['signed_text'],'signature' => '','signer' => ''])); @@ -1585,7 +1585,7 @@ class DFRN Logger::info('Process verb ' . $item['verb'] . ' and object-type ' . $item['object-type'] . ' for entrytype ' . $entrytype); if (($entrytype == self::TOP_LEVEL) && !empty($importer['id'])) { - // The filling of the the "contact" variable is done for legcy reasons + // The filling of the "contact" variable is done for legacy reasons // The functions below are partly used by ostatus.php as well - where we have this variable $contact = Contact::selectFirst([], ['id' => $importer['id']]); @@ -1713,7 +1713,7 @@ class DFRN * Checks if an incoming message is wanted * * @param array $item - * @param array $imporer + * @param array $importer * @return boolean Is the message wanted? */ private static function isSolicitedMessage(array $item, array $importer): bool diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 6f2759071..09b1a8a67 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -2068,7 +2068,7 @@ class Diaspora } /** - * Processes poll participations - unssupported + * Processes poll participations - unsupported * * @param array $importer Array of the importer user * @param object $data The message object @@ -2204,7 +2204,7 @@ class Diaspora $author = WebFingerUri::fromString($author_handle); // the current protocol version doesn't know these fields - // That means that we will assume their existance + // That means that we will assume their existence if (isset($data->following)) { $following = (XML::unescape($data->following) == 'true'); } else { @@ -2255,7 +2255,7 @@ class Diaspora } elseif (!$following && $sharing) { Logger::info("Author " . $author . " wants to share with us."); } elseif ($following && $sharing) { - Logger::info("Author " . $author . " wants to have a bidirectional conection."); + Logger::info("Author " . $author . " wants to have a bidirectional connection."); } elseif ($following && !$sharing) { Logger::info("Author " . $author . " wants to listen to us."); } @@ -2756,7 +2756,7 @@ class Diaspora * ************************************************************************************** */ /** - * returnes the handle of a contact + * returns the handle of a contact * * @param array $contact contact array * @@ -2770,7 +2770,7 @@ class Diaspora } // Normally we should have a filled "addr" field - but in the past this wasn't the case - // So - just in case - we build the the address here. + // So - just in case - we build the address here. if ($contact['nickname'] != '') { $nick = $contact['nickname']; } else { diff --git a/src/Protocol/Email.php b/src/Protocol/Email.php index 4c6ac9cb4..35f5fdfdd 100644 --- a/src/Protocol/Email.php +++ b/src/Protocol/Email.php @@ -51,12 +51,12 @@ class Email $errors = imap_errors(); if (!empty($errors)) { - Logger::notice('IMAP Errors occured', ['errors' => $errors]); + Logger::notice('IMAP Errors occurred', ['errors' => $errors]); } $alerts = imap_alerts(); if (!empty($alerts)) { - Logger::notice('IMAP Alerts occured: ', ['alerts' => $alerts]); + Logger::notice('IMAP Alerts occurred: ', ['alerts' => $alerts]); } return $mbox; @@ -322,7 +322,7 @@ class Email } if ($out_str && $charset) { - // define start delimimter, end delimiter and spacer + // define start delimiter, end delimiter and spacer $end = "?="; $start = "=?" . $charset . "?B?"; $spacer = $end . "\r\n " . $start; diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index a83819742..bfb744838 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -945,7 +945,7 @@ class Feed $previous_created = $last_update; - // Don't cache when the last item was posted less then 15 minutes ago (Cache duration) + // Don't cache when the last item was posted less than 15 minutes ago (Cache duration) if ((time() - strtotime($owner['last-item'])) < 15 * 60) { $result = DI::cache()->get($cachekey); if (!$nocache && !is_null($result)) { diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index abaa298eb..ff8fc3cbe 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -1709,7 +1709,7 @@ class OStatus $previous_created = $last_update; - // Don't cache when the last item was posted less then 15 minutes ago (Cache duration) + // Don't cache when the last item was posted less than 15 minutes ago (Cache duration) if ((time() - strtotime($owner['last-item'])) < 15*60) { $result = DI::cache()->get($cachekey); if (!$nocache && !is_null($result)) { diff --git a/src/Protocol/Relay.php b/src/Protocol/Relay.php index 028a7885b..d8b11cf95 100644 --- a/src/Protocol/Relay.php +++ b/src/Protocol/Relay.php @@ -176,7 +176,7 @@ class Relay if (in_array($gserver['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN])) { $system = APContact::getByURL($gserver['url'] . '/friendica'); if (!empty($system['sharedinbox'])) { - Logger::info('Sucessfully probed for relay contact', ['server' => $gserver['url']]); + Logger::info('Successfully probed for relay contact', ['server' => $gserver['url']]); $id = Contact::updateFromProbeByURL($system['url']); Logger::info('Updated relay contact', ['server' => $gserver['url'], 'id' => $id]); return; @@ -302,7 +302,7 @@ class Relay DBA::close($tagserver); } - // All adresses with the given id + // All addresses with the given id if (!empty($tagserverlist)) { $servers = DBA::select('gserver', ['id', 'url', 'network'], ['relay-subscribe' => true, 'relay-scope' => 'tags', 'id' => $tagserverlist]); while ($server = DBA::fetch($servers)) { diff --git a/src/Protocol/Salmon.php b/src/Protocol/Salmon.php index 50d1b931c..5047375ea 100644 --- a/src/Protocol/Salmon.php +++ b/src/Protocol/Salmon.php @@ -85,7 +85,7 @@ class Salmon Logger::notice('Key located', ['ret' => $ret]); if (count($ret) == 1) { - /* We only found one one key so we don't care if the hash matches. + /* We only found one key so we don't care if the hash matches. * If it's the wrong key we'll find out soon enough because * message verification will fail. This also covers some older * software which don't supply a keyhash. As long as they only diff --git a/src/Security/BasicAuth.php b/src/Security/BasicAuth.php index 0c5e91034..25da9b831 100644 --- a/src/Security/BasicAuth.php +++ b/src/Security/BasicAuth.php @@ -31,7 +31,7 @@ use Friendica\Network\HTTPException\UnauthorizedException; use Friendica\Util\DateTimeFormat; /** - * Authentification via the basic auth method + * Authentication via the basic auth method */ class BasicAuth { diff --git a/src/Security/ExAuth.php b/src/Security/ExAuth.php index af04e8013..cc1f03f8c 100644 --- a/src/Security/ExAuth.php +++ b/src/Security/ExAuth.php @@ -153,11 +153,11 @@ class ExAuth if (is_array($aCommand)) { switch ($aCommand[0]) { case 'isuser': - // Check the existance of a given username + // Check the existence of a given username $this->isUser($aCommand); break; case 'auth': - // Check if the givven password is correct + // Check if the given password is correct $this->auth($aCommand); break; case 'setpass': @@ -225,7 +225,7 @@ class ExAuth } /** - * Check remote user existance via HTTP(S) + * Check remote user existence via HTTP(S) * * @param string $host The hostname * @param string $user Username @@ -303,10 +303,10 @@ class ExAuth // If the hostnames doesn't match or there is some failure, we try to check remotely if ($Error && !$this->checkCredentials($aCommand[2], $aCommand[1], $aCommand[3], true)) { - $this->writeLog(LOG_WARNING, 'authentification failed for user ' . $sUser . '@' . $aCommand[2]); + $this->writeLog(LOG_WARNING, 'authentication failed for user ' . $sUser . '@' . $aCommand[2]); fwrite(STDOUT, pack('nn', 2, 0)); } else { - $this->writeLog(LOG_NOTICE, 'authentificated user ' . $sUser . '@' . $aCommand[2]); + $this->writeLog(LOG_NOTICE, 'authenticated user ' . $sUser . '@' . $aCommand[2]); fwrite(STDOUT, pack('nn', 2, 1)); } } diff --git a/src/Security/OAuth1/OAuthRequest.php b/src/Security/OAuth1/OAuthRequest.php index b88aa9296..9e5892e46 100644 --- a/src/Security/OAuth1/OAuthRequest.php +++ b/src/Security/OAuth1/OAuthRequest.php @@ -190,7 +190,7 @@ class OAuthRequest * * The base string defined as the method, the url * and the parameters (normalized), each urlencoded - * and the concated with &. + * and concatenated with &. */ public function get_signature_base_string() { diff --git a/src/Security/OAuth1/OAuthUtil.php b/src/Security/OAuth1/OAuthUtil.php index 2547f0908..06847eceb 100644 --- a/src/Security/OAuth1/OAuthUtil.php +++ b/src/Security/OAuth1/OAuthUtil.php @@ -135,7 +135,7 @@ class OAuthUtil $value = isset($split[1]) ? OAuthUtil::urldecode_rfc3986($split[1]) : ''; if (isset($parsed_parameters[$parameter])) { - // We have already recieved parameter(s) with this name, so add to the list + // We have already received parameter(s) with this name, so add to the list // of parameters with this name if (is_scalar($parsed_parameters[$parameter])) { diff --git a/src/Security/TwoFactor/Model/TrustedBrowser.php b/src/Security/TwoFactor/Model/TrustedBrowser.php index f0781efe3..c01e41fec 100644 --- a/src/Security/TwoFactor/Model/TrustedBrowser.php +++ b/src/Security/TwoFactor/Model/TrustedBrowser.php @@ -46,7 +46,7 @@ class TrustedBrowser extends BaseEntity protected $last_used; /** - * Please do not use this constructor directly, instead use one of the method of the TrustedBroser factory. + * Please do not use this constructor directly, instead use one of the method of the TrustedBrowser factory. * * @see \Friendica\Security\TwoFactor\Factory\TrustedBrowser * diff --git a/src/Util/Arrays.php b/src/Util/Arrays.php index ae1b1b73e..1d96be051 100644 --- a/src/Util/Arrays.php +++ b/src/Util/Arrays.php @@ -30,7 +30,7 @@ class Arrays * Private constructor */ private function __construct() { - // Utitlities don't have instances + // Utilities don't have instances } /** diff --git a/src/Util/FileSystem.php b/src/Util/FileSystem.php index e86d6b595..a21e7fb60 100644 --- a/src/Util/FileSystem.php +++ b/src/Util/FileSystem.php @@ -73,7 +73,7 @@ class FileSystem * * @param string $url The file/url * - * @return resource the open stream rssource + * @return resource the open stream resource * * @throws \UnexpectedValueException */ diff --git a/src/Util/HTTPSignature.php b/src/Util/HTTPSignature.php index d48d02c20..ae7e0fe37 100644 --- a/src/Util/HTTPSignature.php +++ b/src/Util/HTTPSignature.php @@ -451,7 +451,7 @@ class HTTPSignature * @param string $request request url * @param integer $uid User id of the requester * @param boolean $binary TRUE if asked to return binary results (file download) (default is "false") - * @param array $opts (optional parameters) assoziative array with: + * @param array $opts (optional parameters) associative array with: * 'accept_content' => supply Accept: header with 'accept_content' as the value * 'timeout' => int Timeout in seconds, default system config value or 60 seconds * 'nobody' => only return the header @@ -627,7 +627,7 @@ class HTTPSignature } if (empty($algorithm)) { - Logger::info('No alagorithm'); + Logger::info('No algorithm'); return false; } diff --git a/src/Util/Network.php b/src/Util/Network.php index 30c4798a5..e02767be4 100644 --- a/src/Util/Network.php +++ b/src/Util/Network.php @@ -349,7 +349,7 @@ class Network $pair = $param . '=' . str_replace(' ', '+', $value); $url = str_replace($pair, '', $url); - // Third try: Maybey the url isn't encoded at all + // Third try: Maybe the url isn't encoded at all $pair = $param . '=' . $value; $url = str_replace($pair, '', $url); diff --git a/src/Util/ParseUrl.php b/src/Util/ParseUrl.php index f1e96dedc..338288483 100644 --- a/src/Util/ParseUrl.php +++ b/src/Util/ParseUrl.php @@ -91,7 +91,7 @@ class ParseUrl } /** - * Search for chached embeddable data of an url otherwise fetch it + * Search for cached embeddable data of an url otherwise fetch it * * @param string $url The url of the page which should be scraped * @param bool $do_oembed The false option is used by the function fetch_oembed() @@ -686,7 +686,7 @@ class ParseUrl { $urlarr = parse_url($url); - // If the url does allready have an scheme + // If the url does already have an scheme // we can stop the process here if (isset($urlarr['scheme'])) { return $url; diff --git a/src/Util/PidFile.php b/src/Util/PidFile.php index 649a15679..1d9019d73 100644 --- a/src/Util/PidFile.php +++ b/src/Util/PidFile.php @@ -31,7 +31,7 @@ class PidFile * * @param string $file Filename of pid file * - * @return boolean|string PID or "false" if not existent + * @return boolean|string PID or "false" if nonexistent */ private static function pidFromFile(string $file) { diff --git a/src/Util/Proxy.php b/src/Util/Proxy.php index 7f3c94672..aa0f66bbf 100644 --- a/src/Util/Proxy.php +++ b/src/Util/Proxy.php @@ -75,9 +75,9 @@ class Proxy * This function only performs the URL replacement on http URL and if the * provided URL isn't local * - * @param string $url The URL to proxyfy + * @param string $url The URL to proxify * @param string $size One of the Proxy::SIZE_* constants - * @return string The proxyfied URL or relative path + * @return string The proxified URL or relative path * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ public static function proxifyUrl(string $url, string $size = ''): string diff --git a/src/Util/ReversedFileReader.php b/src/Util/ReversedFileReader.php index fbd32d51f..fdd15bec9 100644 --- a/src/Util/ReversedFileReader.php +++ b/src/Util/ReversedFileReader.php @@ -158,7 +158,7 @@ class ReversedFileReader implements \Iterator } /** - * Checks if current iterator value is valid, that is, we readed all lines in files + * Checks if current iterator value is valid, that is, we read all lines in files * * @see Iterator::valid() * @return bool diff --git a/src/Util/Strings.php b/src/Util/Strings.php index 2405fbaba..1ce1ac8c7 100644 --- a/src/Util/Strings.php +++ b/src/Util/Strings.php @@ -532,7 +532,7 @@ class Strings } /** - * This function converts a PHP's shorhand notation string for file sizes in to an integer number of total bytes. + * This function converts a file size string written in PHP's shorthand notation to an integer number of total bytes. * For example: The string for shorthand notation of '2M' (which is 2,097,152 Bytes) is converted to 2097152 * @see https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes * @param string $shorthand diff --git a/src/Util/Writer/DbaDefinitionSqlWriter.php b/src/Util/Writer/DbaDefinitionSqlWriter.php index 95ab586b1..786eb8665 100644 --- a/src/Util/Writer/DbaDefinitionSqlWriter.php +++ b/src/Util/Writer/DbaDefinitionSqlWriter.php @@ -178,7 +178,7 @@ class DbaDefinitionSqlWriter * Creates the SQL definition to modify a table field * * @param string $fieldName The table field name - * @param array $parameters The paramters to modify + * @param array $parameters The parameters to modify * * @return string The SQL definition */ @@ -235,7 +235,7 @@ class DbaDefinitionSqlWriter * @param string $method The method to create the index (default is ADD) * * @return string The SQL definition - * @throws Exception in cases the paramter contains invalid content + * @throws Exception in cases the parameter contains invalid content */ public static function createIndex(string $indexName, array $fieldNames, string $method = 'ADD'): string { diff --git a/src/Util/XML.php b/src/Util/XML.php index 0cdf1f34e..e5fa4009f 100644 --- a/src/Util/XML.php +++ b/src/Util/XML.php @@ -259,7 +259,7 @@ class XML * @param integer $get_attributes 1 or 0. If this is 1 the function will get the attributes as well as the tag values - * this results in a different array structure in the return value. * @param string $priority Can be 'tag' or 'attribute'. This will change the way the resulting - * array sturcture. For 'tag', the tags are given more importance. + * array structure. For 'tag', the tags are given more importance. * * @return array The parsed XML in an array form. Use print_r() to see the resulting array structure. * @throws \Exception @@ -397,7 +397,7 @@ class XML } $repeated_tag_index[$tag . '_' . $level]++; } else { // If it is not an array... - $current[$tag] = [$current[$tag], $result]; //...Make it an array using using the existing value and the new value + $current[$tag] = [$current[$tag], $result]; //...Make it an array using the existing value and the new value $repeated_tag_index[$tag . '_' . $level] = 1; if ($priority == 'tag' and $get_attributes) { if (isset($current[$tag.'_attr'])) { // The attribute of the last(0th) tag must be moved as well @@ -441,7 +441,7 @@ class XML * Parse XML string * * @param string $s XML string to parse into object - * @param boolean $suppress_log Whether to supressing logging + * @param boolean $suppress_log Whether to suppressing logging * @return SimpleXMLElement|bool SimpleXMLElement or false on failure */ public static function parseString(string $s, bool $suppress_log = false) @@ -536,7 +536,7 @@ class XML * * @param string $str * @return string Escaped text. - * @todo Move this generic method to Util\Strings and also rewrite all other findingd + * @todo Move this generic method to Util\Strings and also rewrite all other occurrences */ public static function escape(string $str): string { @@ -548,7 +548,7 @@ class XML * * @param string $s xml escaped text * @return string unescaped text - * @todo Move this generic method to Util\Strings and also rewrite all other findingd + * @todo Move this generic method to Util\Strings and also rewrite all other occurrences */ public static function unescape(string $s): string { diff --git a/src/Worker/CheckRelMeProfileLink.php b/src/Worker/CheckRelMeProfileLink.php index 334bea27e..d55ebf3c4 100644 --- a/src/Worker/CheckRelMeProfileLink.php +++ b/src/Worker/CheckRelMeProfileLink.php @@ -48,7 +48,7 @@ use GuzzleHttp\Psr7\Uri; */ class CheckRelMeProfileLink { - /* Cheks the homepage of a profile for a rel-me link back to the user profile + /* Checks the homepage of a profile for a rel-me link back to the user profile * * @param $uid (int) the UID of the user */ diff --git a/src/Worker/Contact/RevokeFollow.php b/src/Worker/Contact/RevokeFollow.php index 4296926c6..51116ac64 100644 --- a/src/Worker/Contact/RevokeFollow.php +++ b/src/Worker/Contact/RevokeFollow.php @@ -30,7 +30,7 @@ use Friendica\Network\HTTPException; class RevokeFollow { /** - * Issue asynchronous follow revokation message to remote servers. + * Issue asynchronous follow revocation message to remote servers. * The local relationship has already been updated, so we can't use the user-specific contact * * @param int $cid Target public contact id diff --git a/src/Worker/Cron.php b/src/Worker/Cron.php index a232834bc..8c9ea58a1 100644 --- a/src/Worker/Cron.php +++ b/src/Worker/Cron.php @@ -44,7 +44,7 @@ class Cron if ($last) { $next = $last + ($poll_interval * 60); if ($next > time()) { - Logger::notice('cron intervall not reached'); + Logger::notice('cron interval not reached'); return; } } diff --git a/src/Worker/ExpirePosts.php b/src/Worker/ExpirePosts.php index 87669a2d1..2ca9e4f4e 100644 --- a/src/Worker/ExpirePosts.php +++ b/src/Worker/ExpirePosts.php @@ -52,7 +52,7 @@ class ExpirePosts self::addMissingEntries(); } - // Set the expiry for origin posta + // Set the expiry for origin posts Worker::add(Worker::PRIORITY_LOW, 'Expire'); // update nodeinfo data after everything is cleaned up diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index 3f5b0fa82..7c78896f3 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -890,7 +890,7 @@ class Notifier Worker::coolDown(); } - // We deliver posts to relay servers slightly delayed to priorize the direct delivery + // We deliver posts to relay servers slightly delayed to prioritize the direct delivery foreach ($relay_inboxes as $inbox) { Logger::info('Delivery to relay servers via ActivityPub', ['cmd' => $cmd, 'id' => $target_item['id'], 'inbox' => $inbox]); diff --git a/src/Worker/SpoolPost.php b/src/Worker/SpoolPost.php index c2712519c..5dc021fa0 100644 --- a/src/Worker/SpoolPost.php +++ b/src/Worker/SpoolPost.php @@ -38,7 +38,7 @@ class SpoolPost { // It is not named like a spool file, so we don't care. if (substr($file, 0, 5) != "item-") { - Logger::info('Spool file does does not start with "item-"', ['file' => $file]); + Logger::info('Spool file does not start with "item-"', ['file' => $file]); continue; } diff --git a/src/Worker/UpdateAllSuggestions.php b/src/Worker/UpdateAllSuggestions.php index 69c48aacb..285cfe5bb 100644 --- a/src/Worker/UpdateAllSuggestions.php +++ b/src/Worker/UpdateAllSuggestions.php @@ -26,7 +26,7 @@ use Friendica\Model\Contact; use Friendica\Util\DateTimeFormat; /** - * Update contact suggestions for all aktive users + * Update contact suggestions for all active users */ class UpdateAllSuggestions { diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 6eaad609e..9acfbfcf9 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -127,7 +127,7 @@ return [ "verified" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "user is verified through email"], "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 for user is blocked"], "blockwall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to post to the profile page of the user"], - "hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide profile details from unkown viewers"], + "hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide profile details from unknown viewers"], "blocktags" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to tag the post of this user"], "unkmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Permit unknown people to send private mails to this user"], "cntunkmail" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""], @@ -662,7 +662,7 @@ return [ "gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"], "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""], - "interacting_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts this contact interactes with"], + "interacting_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts this contact interacts with"], "interacted_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of contacts that interacted with this contact"], "post_count" => ["type" => "int unsigned", "default" => 0, "comment" => "Number of posts and comments"], ], @@ -926,7 +926,7 @@ return [ "guid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this private message"], "from-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "name of the sender"], "from-photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "contact photo link of the sender"], - "from-url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "profile linke of the sender"], + "from-url" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => "profile link of the sender"], "contact-id" => ["type" => "varbinary(255)", "relation" => ["contact" => "id"], "comment" => "contact.id"], "author-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id", "on delete" => "restrict"], "comment" => "Link to the contact table with uid=0 of the author of the mail"], "convid" => ["type" => "int unsigned", "relation" => ["conv" => "id"], "comment" => "conv.id"], diff --git a/static/defaults.config.php b/static/defaults.config.php index 4fb96cfce..3c4fdd762 100644 --- a/static/defaults.config.php +++ b/static/defaults.config.php @@ -106,7 +106,7 @@ return [ 'always_show_preview' => false, // ap_always_bcc (Boolean) - // Adresses non-mentioned ActivityPub receivers by BCC instead of CC. Increases privacy, decreases performance. + // Addresses non-mentioned ActivityPub receivers by BCC instead of CC. Increases privacy, decreases performance. 'ap_always_bcc' => false, // archival_days (Integer) @@ -291,7 +291,7 @@ return [ 'emoji_activities' => false, // expire-notify-priority (integer) - // Priority for the expirary notification + // Priority for the expiry notification 'expire-notify-priority' => Friendica\Core\Worker::PRIORITY_LOW, // fetch_by_worker (Boolean) @@ -520,7 +520,7 @@ return [ 'profiler' => false, // pushpoll_frequency (Integer) - // Frequency of contact poll for subhub contact using the DFRM or OStatus network. + // Frequency of contact poll for subhub contact using the DFRN or OStatus network. // Available values: // - 5 = every month // - 4 = every week diff --git a/static/settings.config.php b/static/settings.config.php index 04994bc73..e17fa0442 100644 --- a/static/settings.config.php +++ b/static/settings.config.php @@ -48,7 +48,7 @@ return [ ], 'system' => [ // account_abandon_days (Integer) - // Will not waste system resources polling external sites for abandonded accounts. + // Will not waste system resources polling external sites for abandoned accounts. // Enter 0 for no time limit. 'account_abandon_days' => 0, @@ -123,7 +123,7 @@ return [ 'jpeg_quality' => 100, // language (String) - // System default languague, inluding admin-created user default language. + // System default language, including admin-created user default language. // Two-letters ISO 639-1 code. 'language' => 'en', diff --git a/tests/Util/Database/StaticDatabase.php b/tests/Util/Database/StaticDatabase.php index 0f180e52a..be2ec99f0 100644 --- a/tests/Util/Database/StaticDatabase.php +++ b/tests/Util/Database/StaticDatabase.php @@ -66,7 +66,7 @@ class StaticDatabase extends Database } /** - * Override the transaction since there are now hierachical transactions possible + * Override the transaction since there are now hierarchical transactions possible * * @return bool */ @@ -183,7 +183,7 @@ class StaticDatabase extends Database self::$staticConnection->setAttribute(PDO::ATTR_AUTOCOMMIT,0); } catch (PDOException $e) { /* - * @TODO Try to find a way to log this exception as it contains valueable information + * @TODO Try to find a way to log this exception as it contains valuable information * @nupplaphil@github.com comment: * * There is no easy possibility to add a logger here, that's why diff --git a/tests/Util/Intercept.php b/tests/Util/Intercept.php index 9a037cfd7..27b558fc5 100644 --- a/tests/Util/Intercept.php +++ b/tests/Util/Intercept.php @@ -24,7 +24,7 @@ namespace Friendica\Test\Util; use php_user_filter; /** - * Output Interceptor for STDOUT to prevent outputing to the console + * Output Interceptor for STDOUT to prevent outputting to the console * Instead the $cache variable will get filled with the output * * @package Friendica\Test\Util diff --git a/tests/Util/VFSTrait.php b/tests/Util/VFSTrait.php index a98b7925d..86b7c167c 100644 --- a/tests/Util/VFSTrait.php +++ b/tests/Util/VFSTrait.php @@ -85,7 +85,7 @@ trait VFSTrait } /** - * Delets a config file from the Virtual File System + * Deletes a config file from the Virtual File System * * @param string $filename The filename of the config file * @param bool $static True, if the folder `static` instead of `config` should be used diff --git a/tests/datasets/config/transformer/resource.node.config.php b/tests/datasets/config/transformer/resource.node.config.php new file mode 100644 index 000000000..f7f0f6b1a --- /dev/null +++ b/tests/datasets/config/transformer/resource.node.config.php @@ -0,0 +1,7 @@ + [ + 'resources_not_allowed' => new \GuzzleHttp\Psr7\AppendStream(), + ], +]; diff --git a/tests/datasets/config/transformer/ressource.node.config.php b/tests/datasets/config/transformer/ressource.node.config.php deleted file mode 100644 index b83a139e3..000000000 --- a/tests/datasets/config/transformer/ressource.node.config.php +++ /dev/null @@ -1,7 +0,0 @@ - [ - 'ressources_not_allowed' => new \GuzzleHttp\Psr7\AppendStream(), - ], -]; diff --git a/tests/datasets/log/friendica.log.txt b/tests/datasets/log/friendica.log.txt index ed695bd8e..b633801aa 100644 --- a/tests/datasets/log/friendica.log.txt +++ b/tests/datasets/log/friendica.log.txt @@ -1,3 +1,3 @@ 2021-05-24T15:23:58Z index [INFO]: No HTTP_SIGNATURE header [] - {"file":"HTTPSignature.php","line":476,"function":"getSigner","uid":"0a3934","process_id":14826} 2021-05-24T15:30:01Z worker [NOTICE]: Load: 0.01/20 - processes: 0/1/6 (0:0, 30:1) - maximum: 10/10 {"worker_id":"ece8fc8","worker_cmd":"Cron"} - {"file":"Worker.php","line":786,"function":"tooMuchWorkers","uid":"364d3c","process_id":20754} -2021-05-24T15:40:01Z worker [WARNING]: Spool file does does not start with "item-" {"file":".","worker_id":"560c8b6","worker_cmd":"SpoolPost"} - {"file":"SpoolPost.php","line":40,"function":"execute","uid":"fd8c37","process_id":20846} +2021-05-24T15:40:01Z worker [WARNING]: Spool file does not start with "item-" {"file":".","worker_id":"560c8b6","worker_cmd":"SpoolPost"} - {"file":"SpoolPost.php","line":40,"function":"execute","uid":"fd8c37","process_id":20846} diff --git a/tests/src/Console/AutomaticInstallationConsoleTest.php b/tests/src/Console/AutomaticInstallationConsoleTest.php index cde18e72c..b4ad96dca 100644 --- a/tests/src/Console/AutomaticInstallationConsoleTest.php +++ b/tests/src/Console/AutomaticInstallationConsoleTest.php @@ -673,7 +673,7 @@ Examples bin/console autoinstall --savedb Installs Friendica with environment variables and saves them to the 'config/local.config.php' file - bin/console autoinstall -h localhost -p 3365 -U user -P passwort1234 -d friendica + bin/console autoinstall -h localhost -p 3365 -U user -P password1234 -d friendica Installs Friendica with a local mysql database with credentials HELP; diff --git a/tests/src/Core/Config/Cache/CacheTest.php b/tests/src/Core/Config/Cache/CacheTest.php index c4e536871..de73763dd 100644 --- a/tests/src/Core/Config/Cache/CacheTest.php +++ b/tests/src/Core/Config/Cache/CacheTest.php @@ -588,7 +588,7 @@ class CacheTest extends MockedTest $cache->load($data, Cache::SOURCE_FILE); $cache2 = new Cache(); - $cache2->set('system', 'test', 'overrride'); + $cache2->set('system', 'test', 'override'); $cache2->delete('system', 'test'); self::assertEquals('it', $cache->get('system', 'test')); diff --git a/tests/src/Core/Config/ConfigTest.php b/tests/src/Core/Config/ConfigTest.php index cf13ea05a..b526fc13b 100644 --- a/tests/src/Core/Config/ConfigTest.php +++ b/tests/src/Core/Config/ConfigTest.php @@ -346,7 +346,7 @@ class ConfigTest extends DatabaseTest // without refresh self::assertNull($this->testedConfig->get('test', 'it')); - /// beware that the cache returns '!!' and not null for a non existing value + /// beware that the cache returns '!!' and not null for a nonexistent value self::assertNull($this->testedConfig->getCache()->get('test', 'it')); // with default value diff --git a/tests/src/Core/PConfig/PConfigTest.php b/tests/src/Core/PConfig/PConfigTest.php index 2aade836d..784f81b2e 100644 --- a/tests/src/Core/PConfig/PConfigTest.php +++ b/tests/src/Core/PConfig/PConfigTest.php @@ -324,7 +324,7 @@ abstract class PConfigTest extends MockedTest // without refresh self::assertNull($this->testedConfig->get(0, 'test', 'it')); - /// beware that the cache returns '!!' and not null for a non existing value + /// beware that the cache returns '!!' and not null for a nonexistent value self::assertNull($this->testedConfig->getCache()->get(0, 'test', 'it')); // with default value diff --git a/tests/src/Database/DBStructureTest.php b/tests/src/Database/DBStructureTest.php index dfb46514f..7bb9baf94 100644 --- a/tests/src/Database/DBStructureTest.php +++ b/tests/src/Database/DBStructureTest.php @@ -45,7 +45,7 @@ class DBStructureTest extends DatabaseTest */ public function testExists() { self::assertTrue(DBStructure::existsTable('user')); - self::assertFalse(DBStructure::existsTable('notatable')); + self::assertFalse(DBStructure::existsTable('nonexistent')); self::assertTrue(DBStructure::existsColumn('user', ['uid'])); self::assertFalse(DBStructure::existsColumn('user', ['nonsense'])); diff --git a/tests/src/Factory/Api/Twitter/StatusTest.php b/tests/src/Factory/Api/Twitter/StatusTest.php index 86b91deb3..e79e545bf 100644 --- a/tests/src/Factory/Api/Twitter/StatusTest.php +++ b/tests/src/Factory/Api/Twitter/StatusTest.php @@ -114,11 +114,11 @@ class StatusTest extends FixtureTest } /** - * Test the api_get_entitities() function. + * Test the api_get_entities() function. * * @return void */ - public function testApiGetEntititiesWithIncludeEntities() + public function testApiGetEntitiesWithIncludeEntities() { $status = $this->statusFactory ->createFromItemId(13, ApiTest::SELF_USER['id'], true) diff --git a/tests/src/Model/Log/ParsedLogIteratorTest.php b/tests/src/Model/Log/ParsedLogIteratorTest.php index d709cf916..eb650a9dc 100644 --- a/tests/src/Model/Log/ParsedLogIteratorTest.php +++ b/tests/src/Model/Log/ParsedLogIteratorTest.php @@ -94,7 +94,7 @@ class ParsedLogIteratorTest extends TestCase 'date' => '2021-05-24T15:40:01Z', 'context' => 'worker', 'level' => 'WARNING', - 'message' => 'Spool file does does not start with "item-"', + 'message' => 'Spool file does not start with "item-"', 'data' => '{"file":".","worker_id":"560c8b6","worker_cmd":"SpoolPost"}', 'source' => '{"file":"SpoolPost.php","line":40,"function":"execute","uid":"fd8c37","process_id":20846}', ] diff --git a/tests/src/Model/UserTest.php b/tests/src/Model/UserTest.php index f1785f99d..eb0cb9f32 100644 --- a/tests/src/Model/UserTest.php +++ b/tests/src/Model/UserTest.php @@ -133,7 +133,7 @@ class UserTest extends MockedTest $this->dbMock->shouldReceive('isResult')->with('objectReturn')->andReturn(true)->once(); $this->dbMock->shouldReceive('toArray')->with('objectReturn', true, 0)->andReturn([$this->parent])->once(); - // Select the childs (user & manage) + // Select the children (user & manage) $this->dbMock->shouldReceive('select')->with('user', ['uid', 'username', 'nickname'], [ diff --git a/tests/src/Module/Api/Mastodon/PushSubscriptionTest.php b/tests/src/Module/Api/Mastodon/PushSubscriptionTest.php index c50763bd6..e7c968ea2 100644 --- a/tests/src/Module/Api/Mastodon/PushSubscriptionTest.php +++ b/tests/src/Module/Api/Mastodon/PushSubscriptionTest.php @@ -32,7 +32,7 @@ class PushSubscriptionTest extends ApiTest */ public function testApiAccountVerifyCredentials(): void { - $this->markTestIncomplete('Needs mocking of whole applictaions/Apps first'); + $this->markTestIncomplete('Needs mocking of whole applications/Apps first'); // $this->useHttpMethod(Router::POST); // diff --git a/tests/src/Module/Api/Twitter/Users/LookupTest.php b/tests/src/Module/Api/Twitter/Users/LookupTest.php index 89f6ee612..c4f8d8568 100644 --- a/tests/src/Module/Api/Twitter/Users/LookupTest.php +++ b/tests/src/Module/Api/Twitter/Users/LookupTest.php @@ -49,12 +49,12 @@ class LookupTest extends ApiTest */ public function testApiUsersLookupWithUserId() { - $respone = (new Lookup(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) + $response = (new Lookup(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) ->run($this->httpExceptionMock, [ 'user_id' => static::OTHER_USER['id'] ]); - $json = $this->toJson($respone); + $json = $this->toJson($response); self::assertOtherUser($json[0]); } diff --git a/tests/src/Module/Api/Twitter/Users/SearchTest.php b/tests/src/Module/Api/Twitter/Users/SearchTest.php index b9cf3ab4c..921d2a434 100644 --- a/tests/src/Module/Api/Twitter/Users/SearchTest.php +++ b/tests/src/Module/Api/Twitter/Users/SearchTest.php @@ -37,12 +37,12 @@ class SearchTest extends ApiTest */ public function testApiUsersSearch() { - $respone = (new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) + $response = (new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) ->run($this->httpExceptionMock, [ 'q' => static::OTHER_USER['name'] ]); - $json = $this->toJson($respone); + $json = $this->toJson($response); self::assertOtherUser($json[0]); } @@ -54,13 +54,13 @@ class SearchTest extends ApiTest */ public function testApiUsersSearchWithXml() { - $respone = (new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [ + $response = (new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [ 'extension' => ICanCreateResponses::TYPE_XML ]))->run($this->httpExceptionMock, [ 'q' => static::OTHER_USER['name'] ]); - self::assertXml((string)$respone->getBody(), 'users'); + self::assertXml((string)$response->getBody(), 'users'); } /** diff --git a/tests/src/Object/Log/ParsedLogLineTest.php b/tests/src/Object/Log/ParsedLogLineTest.php index d4a903ce8..1bebd34bd 100644 --- a/tests/src/Object/Log/ParsedLogLineTest.php +++ b/tests/src/Object/Log/ParsedLogLineTest.php @@ -43,12 +43,12 @@ class ParsedLogLineTest extends TestCase public function testGenericLogLine() { self::do_log_line( - '2021-05-24T15:40:01Z worker [WARNING]: Spool file does does not start with "item-" {"file":".","worker_id":"560c8b6","worker_cmd":"SpoolPost"} - {"file":"SpoolPost.php","line":40,"function":"execute","uid":"fd8c37","process_id":20846}', + '2021-05-24T15:40:01Z worker [WARNING]: Spool file does not start with "item-" {"file":".","worker_id":"560c8b6","worker_cmd":"SpoolPost"} - {"file":"SpoolPost.php","line":40,"function":"execute","uid":"fd8c37","process_id":20846}', [ 'date' => '2021-05-24T15:40:01Z', 'context' => 'worker', 'level' => 'WARNING', - 'message' => 'Spool file does does not start with "item-"', + 'message' => 'Spool file does not start with "item-"', 'data' => '{"file":".","worker_id":"560c8b6","worker_cmd":"SpoolPost"}', 'source' => '{"file":"SpoolPost.php","line":40,"function":"execute","uid":"fd8c37","process_id":20846}', ] diff --git a/tests/src/Util/ACLFormaterTest.php b/tests/src/Util/ACLFormaterTest.php index 12f81cb78..afbf435d8 100644 --- a/tests/src/Util/ACLFormaterTest.php +++ b/tests/src/Util/ACLFormaterTest.php @@ -26,9 +26,9 @@ use Friendica\Util\ACLFormatter; use PHPUnit\Framework\TestCase; /** - * ACLFormater utility testing class + * ACLFormatter utility testing class */ -class ACLFormaterTest extends TestCase +class ACLFormatterTest extends TestCase { public function assertAcl($text, array $assert = []) { @@ -38,10 +38,10 @@ class ACLFormaterTest extends TestCase self::assertEquals($assert, $acl); - self::assertMergable($acl); + self::assertMergeable($acl); } - public function assertMergable(array $aclOne, array $aclTwo = []) + public function assertMergeable(array $aclOne, array $aclTwo = []) { self::assertTrue(is_array($aclOne)); self::assertTrue(is_array($aclTwo)); diff --git a/tests/src/Util/ImagesTest.php b/tests/src/Util/ImagesTest.php index 384e90936..b9caf4cca 100644 --- a/tests/src/Util/ImagesTest.php +++ b/tests/src/Util/ImagesTest.php @@ -88,7 +88,7 @@ class ImagesTest extends MockedTest * * @dataProvider dataImages */ - public function testGetInfoFromRemotURL(string $url, array $headers, string $data, array $assertion) + public function testGetInfoFromRemoteURL(string $url, array $headers, string $data, array $assertion) { $this->httpRequestHandler->setHandler(new MockHandler([ new Response(200, $headers, $data), diff --git a/tests/src/Util/StringsTest.php b/tests/src/Util/StringsTest.php index ae17920e0..f87226700 100644 --- a/tests/src/Util/StringsTest.php +++ b/tests/src/Util/StringsTest.php @@ -63,7 +63,7 @@ class StringsTest extends TestCase /** * try to fail it with invalid input * - * @todo What's corect behaviour here? An exception? + * @todo What's correct behaviour here? An exception? */ public function testRandomNameNegativeLength() { diff --git a/update.php b/update.php index 672c11a4f..8dcd1b71d 100644 --- a/update.php +++ b/update.php @@ -79,7 +79,7 @@ function update_1298() $a = new \stdClass(); $a->strings = []; - // First we get the the localizations + // First we get the localizations if (file_exists('view/lang/$lang/strings.php')) { include 'view/lang/$lang/strings.php'; } diff --git a/view/fonts/README.md b/view/fonts/README.md index ca35ddadb..f8e7d632e 100644 --- a/view/fonts/README.md +++ b/view/fonts/README.md @@ -11,7 +11,7 @@ The iconset started from the new default user avatar (letter "p") Andi made for License ------- -The iconset is published unter the [CC-BY-SA 4.0][cc] license. +The iconset is published under the [CC-BY-SA 4.0][cc] license. Preview ------- diff --git a/view/global.css b/view/global.css index 9d8566542..5b701654a 100644 --- a/view/global.css +++ b/view/global.css @@ -374,7 +374,7 @@ a { border: 0; } -.itentity-match-wrapper { +.identity-match-wrapper { float: left; padding: 10px; width: 120px; @@ -609,7 +609,7 @@ img.invalid-src:after { vertical-align: top;} word-wrap: break-word; } -#register-explicid-content { +#register-explicit-content { font-weight: bold; } diff --git a/view/install/style.css b/view/install/style.css index d6140a1bb..ab37a5055 100644 --- a/view/install/style.css +++ b/view/install/style.css @@ -1,5 +1,5 @@ /*** - * Friendica Communcation Server + * Friendica Communication Server * * This is the static css for the install procedure */ diff --git a/view/js/ajaxupload.js b/view/js/ajaxupload.js index 912cd0b4c..ebbbfda45 100644 --- a/view/js/ajaxupload.js +++ b/view/js/ajaxupload.js @@ -40,7 +40,7 @@ /** * Attaches resize event to a window, limiting - * number of event fired. Fires only when encounteres + * number of event fired. Fires only when encounters * delay of 100 after series of events. * * Some browsers fire event multiple times when resizing @@ -75,7 +75,7 @@ }; - // Needs more testing, will be rewriten for next version + // Needs more testing, will be rewritten for next version // getOffset function copied from jQuery lib (http://jquery.com/) if (document.documentElement.getBoundingClientRect){ // Get Offset using getBoundingClientRect @@ -157,7 +157,7 @@ /** * Function places an absolutely positioned * element on top of the specified element - * copying position and dimentions. + * copying position and dimensions. * @param {Element} from * @param {Element} to */ @@ -211,7 +211,7 @@ /** * Get file extension lowercase * @param {String} file name - * @return file extenstion + * @return file extension */ function getExt(file){ return (-1 !== file.indexOf('.')) ? file.replace(/.*[.]/, '') : ''; @@ -239,7 +239,7 @@ * Easy styling and uploading * @constructor * @param button An element you want convert to - * upload button. Tested dimentions up to 500x500px + * upload button. Tested dimensions up to 500x500px * @param {Object} options See defaults below. */ window.AjaxUpload = function(button, options){ diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 91dd0053f..7d5bd0656 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -13,7 +13,7 @@ function contact_search(term, callback, backend_url, type, mode) { - // Check if there is a conversation id to include the unkonwn contacts of the conversation + // Check if there is a conversation id to include the unknown contacts of the conversation var conv_id = document.activeElement.id.match(/\d+$/); // Check if there is a cached result that contains the same information we would get with a full server-side search diff --git a/view/js/friendica-tagsinput/friendica-tagsinput.js b/view/js/friendica-tagsinput/friendica-tagsinput.js index 45c00641f..0aca44d54 100644 --- a/view/js/friendica-tagsinput/friendica-tagsinput.js +++ b/view/js/friendica-tagsinput/friendica-tagsinput.js @@ -96,7 +96,7 @@ if (typeof item === "object" && !self.objectItems) throw("Can't add objects when itemValue option is not set"); - // Ignore strings only containg whitespace + // Ignore strings only containing whitespace if (item.toString().match(/^\s*$/)) return; @@ -124,7 +124,7 @@ itemTitle = self.options.itemTitle(item), itemThumb = self.options.itemThumb(item); - // Ignore items allready added + // Ignore items already added var existing = $.grep(self.itemsArray, function(item) { return self.options.itemValue(item) === itemValue; } )[0]; if (existing && !self.options.allowDuplicates) { // Invoke onTagExists @@ -522,7 +522,7 @@ }, /** - * Removes all tagsinput behaviour and unregsiter all event handlers + * Removes all tagsinput behaviour and unregister all event handlers */ destroy: function() { var self = this; diff --git a/view/js/linkPreview.js b/view/js/linkPreview.js index e0ce0f64f..28c8df9b6 100644 --- a/view/js/linkPreview.js +++ b/view/js/linkPreview.js @@ -31,7 +31,7 @@ \
\
\ - \
\ @@ -125,7 +125,7 @@ isExtern = true; } - // Don't procces the textarea input if we have already + // Don't process the textarea input if we have already // an attachment preview. if (!isExtern && isActive) { return; @@ -233,7 +233,7 @@ }; /** - * Proccess all attachment data and show up a html + * Process all attachment data and show up a html * attachment preview. * * @param {obj} data Attachment data. @@ -242,7 +242,7 @@ var insertAttachment = function(data) { // If we have already a preview, leaver here. // Note: if we finish the Preview of other media content type, - // we can move this condition to the beggining of crawlText(); + // we can move this condition to the beginning of crawlText(); if (isActive) { $('#profile-rotator').hide(); return; @@ -273,7 +273,7 @@ * @returns {void} */ var processAttachmentTpl = function(data) { - // Load and add the template if it isn't allready loaded. + // Load and add the template if it isn't already loaded. if ($('#preview_' + id).length === 0) { var tpl = previewTpl.format( 'type-' + data.type, @@ -368,7 +368,7 @@ // More than just one image. if (images.length > 1) { - // Enable the the button to change the preview pictures. + // Enable the button to change the preview pictures. $('#previewChangeImg_' + id).show(); if (firstPosted === false) { @@ -500,7 +500,7 @@ }; /** - * Convert attachmant bbcode into an array. + * Convert attachment bbcode into an array. * * @param {string} content Text content with the attachment bbcode. * @returns {object || null} @@ -679,7 +679,7 @@ $('#previewImage_' + id).html(appendImage); $('#attachmentImageSrc_' + id).val(bin2hex(image)); - // We need to add the image widht and height when it is + // We need to add the image width and height when it is // loaded. $('' ,{ load : function(){ @@ -805,7 +805,7 @@ /** * Get in a textarea the previous word before the cursor. * - * @param {object} text Textarea elemet. + * @param {object} text Textarea element. * @param {integer} caretPos Cursor position. * * @returns {string} Previous word. @@ -813,7 +813,7 @@ function returnWord(text, caretPos) { var index = text.indexOf(caretPos); var preText = text.substring(0, caretPos); - // If the last charachter is a space or enter remove it + // If the last character is a space or enter remove it // We need this in friendica for the url preview. var lastChar = preText.slice(-1) if ( lastChar === " " @@ -853,9 +853,9 @@ } /** - * Get the cursor posiotion in an text element. + * Get the cursor position in an text element. * - * @param {object} ctrl Textarea elemet. + * @param {object} ctrl Textarea element. * @returns {integer} Position of the cursor. */ function getCaretPosition(ctrl) { diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index ad7013564..e7434b0ae 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -674,15 +674,15 @@ msgid "" msgstr "" #: src/App/Page.php:256 -msgid "Like not successfull" +msgid "Like not successful" msgstr "" #: src/App/Page.php:257 -msgid "Dislike not successfull" +msgid "Dislike not successful" msgstr "" #: src/App/Page.php:258 -msgid "Sharing not successfull" +msgid "Sharing not successful" msgstr "" #: src/App/Page.php:259 diff --git a/view/php/none.php b/view/php/none.php index a72311bd1..bf8041e8e 100644 --- a/view/php/none.php +++ b/view/php/none.php @@ -19,7 +19,7 @@ * * The site template for pure content (e.g. (modals) * - * This themplate is used e.g for bs modals. So outputs + * This template is used e.g for bs modals. So outputs * only the pure content */ diff --git a/view/templates/delegation.tpl b/view/templates/delegation.tpl index e95bea3bb..0e819cdad 100644 --- a/view/templates/delegation.tpl +++ b/view/templates/delegation.tpl @@ -6,7 +6,7 @@
{{foreach $identities as $identity}} -
+
+

diff --git a/view/templates/mail_conv.tpl b/view/templates/mail_conv.tpl index 588f2509a..328e7a77d 100644 --- a/view/templates/mail_conv.tpl +++ b/view/templates/mail_conv.tpl @@ -1,7 +1,7 @@
- {{$mail.from_name}} + {{$mail.from_name}}
{{$mail.from_name}}
diff --git a/view/templates/register.tpl b/view/templates/register.tpl index 40bf466d2..b697316de 100644 --- a/view/templates/register.tpl +++ b/view/templates/register.tpl @@ -7,7 +7,7 @@ {{if $registertext != ""}}
{{$registertext nofilter}}
{{/if}} - {{if $explicit_content}}

{{$explicit_content_note}}

{{/if}} + {{if $explicit_content}}

{{$explicit_content_note}}

{{/if}}

{{$fillwith}}

{{$fillext}}

diff --git a/view/templates/settings/pagetypes.tpl b/view/templates/settings/pagetypes.tpl index 93732960b..8b285aea8 100644 --- a/view/templates/settings/pagetypes.tpl +++ b/view/templates/settings/pagetypes.tpl @@ -24,11 +24,11 @@ var accountType = {{$account_type}}; $(document).ready(function(){ - // Hide all DIV for page-flags expet the one which belongs to the present + // Hide all DIV for page-flags except the one which belongs to the present // account-type showPageFlags(accountType); - // Save the ID of the active page-flage + // Save the ID of the active page-flags var activeFlag = $('[id^=id_page-flags_]:checked'); $("[id^=id_account-type_]").change(function(){ diff --git a/view/templates/sub/delivery_count.tpl b/view/templates/sub/delivery_count.tpl index 997a0e7d6..81dddf116 100644 --- a/view/templates/sub/delivery_count.tpl +++ b/view/templates/sub/delivery_count.tpl @@ -1,6 +1,6 @@ {{* Please don't use this template as is, this is a placeholder that needs to be - overriden with specific icons to avoid taking too much visual space + overridden with specific icons to avoid taking too much visual space *}} {{if $delivery.queue_count >= -1 && $delivery.queue_count !== '' && $delivery.queue_count !== null}} diff --git a/view/templates/widget_forumlist.tpl b/view/templates/widget_forumlist.tpl index 6d0af8ce2..7d250a01a 100644 --- a/view/templates/widget_forumlist.tpl +++ b/view/templates/widget_forumlist.tpl @@ -19,7 +19,7 @@ function showHideForumlist() {

{{$title}}

-