From: nupplaPhil Date: Sun, 9 Feb 2020 15:34:23 +0000 (+0100) Subject: Add license info at Friendica PHP files X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7d714319c8d528976eaf48f83d588b9cd12e21c6;p=friendica.git Add license info at Friendica PHP files --- diff --git a/bin/auth_ejabberd.php b/bin/auth_ejabberd.php index 13dc6eeba0..930fa853c7 100755 --- a/bin/auth_ejabberd.php +++ b/bin/auth_ejabberd.php @@ -1,6 +1,23 @@ #!/usr/bin/env php . + * * ejabberd extauth script for the integration with friendica * * Originally written for joomla by Dalibor Karlovic diff --git a/bin/console.php b/bin/console.php index a6513a2e8f..27522d8554 100755 --- a/bin/console.php +++ b/bin/console.php @@ -1,5 +1,24 @@ #!/usr/bin/env php . + * + */ use Dice\Dice; use Psr\Log\LoggerInterface; diff --git a/bin/testargs.php b/bin/testargs.php index a0ddea3452..b7d7125f7a 100644 --- a/bin/testargs.php +++ b/bin/testargs.php @@ -1,10 +1,22 @@ . * - * Purpose: * During installation we need to check if register_argc_argv is * enabled for the command line PHP processor, because otherwise * deliveries will fail. So we will do a shell exec of php and diff --git a/bin/wait-for-connection b/bin/wait-for-connection index e73a98b077..b6c03a6705 100755 --- a/bin/wait-for-connection +++ b/bin/wait-for-connection @@ -1,8 +1,23 @@ #!/usr/bin/php - . + * * This script tries to connect to a database for a given interval * Useful in case of installation e.g. to wait for the database to not generate unnecessary errors * diff --git a/include/api.php b/include/api.php index dda4631ce1..567e3cc439 100644 --- a/include/api.php +++ b/include/api.php @@ -1,5 +1,22 @@ . + * * Friendica implementation of statusnet/twitter API * * @file include/api.php diff --git a/include/dba.php b/include/dba.php index a90ec26fbb..5f633afaaa 100644 --- a/include/dba.php +++ b/include/dba.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\Database\DBA; diff --git a/mod/msearch.php b/mod/msearch.php index 9584776002..48476da4f0 100644 --- a/mod/msearch.php +++ b/mod/msearch.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Database\DBA; diff --git a/mod/poco.php b/mod/poco.php index d8941e51ad..b306f2bf79 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -1,8 +1,24 @@ . + * + * @see https://web.archive.org/web/20160405005550/http://portablecontacts.net/draft-spec.html + */ use Friendica\App; use Friendica\Content\Text\BBCode; diff --git a/mod/pubsub.php b/mod/pubsub.php index 31c0634dcf..cae346493f 100644 --- a/mod/pubsub.php +++ b/mod/pubsub.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Core\Logger; diff --git a/mod/pubsubhubbub.php b/mod/pubsubhubbub.php index 2ffaaf729e..3d6b48fd4b 100644 --- a/mod/pubsubhubbub.php +++ b/mod/pubsubhubbub.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Core\Logger; diff --git a/mod/redir.php b/mod/redir.php index 1d36065e99..56cb13a06b 100644 --- a/mod/redir.php +++ b/mod/redir.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Core\Logger; diff --git a/mod/share.php b/mod/share.php index 6f368b1d14..998ebe5fde 100644 --- a/mod/share.php +++ b/mod/share.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Database\DBA; diff --git a/mod/update_community.php b/mod/update_community.php index c861b750ec..8a12142ebd 100644 --- a/mod/update_community.php +++ b/mod/update_community.php @@ -1,6 +1,24 @@ . + * + * See update_profile.php for documentation + */ use Friendica\App; use Friendica\DI; diff --git a/mod/update_contact.php b/mod/update_contact.php index bd9ced0e9a..768ff0c74f 100644 --- a/mod/update_contact.php +++ b/mod/update_contact.php @@ -1,6 +1,25 @@ . + * + * See update_profile.php for documentation + * + */ use Friendica\App; use Friendica\DI; diff --git a/mod/update_notes.php b/mod/update_notes.php index 4065b5d1f8..87822f513e 100644 --- a/mod/update_notes.php +++ b/mod/update_notes.php @@ -1,8 +1,23 @@ . + * + * AJAX synchronisation of notes page */ use Friendica\App; diff --git a/mods/fpostit/fpostit.php b/mods/fpostit/fpostit.php index 3a2f0d15f5..ad4a53c922 100644 --- a/mods/fpostit/fpostit.php +++ b/mods/fpostit/fpostit.php @@ -1,4 +1,23 @@ . + * + */ if (($_POST["friendica_acct_name"] != '') && ($_POST["friendica_password"] != '')) { setcookie("username", $_POST["friendica_acct_name"], time()+60*60*24*300); diff --git a/src/Content/Widget/CalendarExport.php b/src/Content/Widget/CalendarExport.php index 693be2d6f0..dda3513fec 100644 --- a/src/Content/Widget/CalendarExport.php +++ b/src/Content/Widget/CalendarExport.php @@ -1,7 +1,22 @@ . + * */ namespace Friendica\Content\Widget; diff --git a/src/Content/Widget/ContactBlock.php b/src/Content/Widget/ContactBlock.php index bce4b617f9..47fac09a83 100644 --- a/src/Content/Widget/ContactBlock.php +++ b/src/Content/Widget/ContactBlock.php @@ -1,7 +1,22 @@ . + * */ namespace Friendica\Content\Widget; diff --git a/src/Content/Widget/TagCloud.php b/src/Content/Widget/TagCloud.php index f57d5c3f27..006aef9161 100644 --- a/src/Content/Widget/TagCloud.php +++ b/src/Content/Widget/TagCloud.php @@ -1,7 +1,22 @@ . + * */ namespace Friendica\Content\Widget; diff --git a/src/Network/HTTPException.php b/src/Network/HTTPException.php index 89c447b714..b6be886b35 100644 --- a/src/Network/HTTPException.php +++ b/src/Network/HTTPException.php @@ -1,16 +1,34 @@ . * - * This list of Exception has been extracted from - * here http://racksburg.com/choosing-an-http-status-code/ */ namespace Friendica\Network; use Exception; +/** + * Throwable exceptions to return HTTP status code + * + * This list of Exception has been extracted from + * here http://racksburg.com/choosing-an-http-status-code/ + */ abstract class HTTPException extends Exception { public $httpdesc = ''; diff --git a/src/Util/ExAuth.php b/src/Util/ExAuth.php index e21020829a..de13ee82f5 100644 --- a/src/Util/ExAuth.php +++ b/src/Util/ExAuth.php @@ -1,6 +1,6 @@ diff --git a/src/Util/FileSystem.php b/src/Util/FileSystem.php index c082fb2d1e..5791fed234 100644 --- a/src/Util/FileSystem.php +++ b/src/Util/FileSystem.php @@ -24,7 +24,7 @@ namespace Friendica\Util; /** * Util class for filesystem manipulation */ -final class FileSystem +class FileSystem { /** * @var string a error message diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 87cfdd11c6..da92391dde 100755 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -1,6 +1,23 @@ . + * + * Main database structure configuration file. * * Here are described all the tables, fields and indexes Friendica needs to work. * diff --git a/static/defaults.config.php b/static/defaults.config.php index dfec158cfe..f9eda841f2 100644 --- a/static/defaults.config.php +++ b/static/defaults.config.php @@ -1,12 +1,28 @@ . + * + * This file declares the default values for the base config of Friendica. * * These configuration values aren't accessible from the admin settings page and custom values must be set in config/local.config.php * * Please don't edit this file directly as its content may change in the upcoming versions. + * */ return [ diff --git a/static/dependencies.config.php b/static/dependencies.config.php index 51fff62289..84344a60e2 100644 --- a/static/dependencies.config.php +++ b/static/dependencies.config.php @@ -1,4 +1,37 @@ . + * + * The configuration defines "complex" dependencies inside Friendica + * So this classes shouldn't be simple or their dependencies are already defined here. + * + * This kind of dependencies are NOT required to be defined here: + * - $a = new ClassA(new ClassB()); + * - $a = new ClassA(); + * - $a = new ClassA(Configuration $configuration); + * + * This kind of dependencies SHOULD be defined here: + * - $a = new ClassA(); + * $b = $a->create(); + * + * - $a = new ClassA($creationPassedVariable); + * + */ use Dice\Dice; use Friendica\App; @@ -16,22 +49,6 @@ use Friendica\Model\User\Cookie; use Friendica\Util; use Psr\Log\LoggerInterface; -/** - * The configuration defines "complex" dependencies inside Friendica - * So this classes shouldn't be simple or their dependencies are already defined here. - * - * This kind of dependencies are NOT required to be defined here: - * - $a = new ClassA(new ClassB()); - * - $a = new ClassA(); - * - $a = new ClassA(Configuration $configuration); - * - * This kind of dependencies SHOULD be defined here: - * - $a = new ClassA(); - * $b = $a->create(); - * - * - $a = new ClassA($creationPassedVariable); - * - */ return [ '*' => [ // marks all class result as shared for other creations, so there's just diff --git a/static/routes.config.php b/static/routes.config.php index dd757b518e..34f4b6d6f6 100644 --- a/static/routes.config.php +++ b/static/routes.config.php @@ -1,17 +1,35 @@ . + * + * Configuration for the default routes in Friendica + * + * The syntax is either + * - 'route' => [ Module::class , [ HTTPMethod(s) ] ] + * - 'group' => [ 'route' => [ Module::class, [ HTTPMethod(s) ] ] + * + * It's possible to create recursive groups + * + */ use Friendica\App\Router as R; use Friendica\Module; -/** -* Configuration for the default routes in Friendica -* -* The syntax is either -* - 'route' => [ Module::class , [ HTTPMethod(s) ] ] -* - 'group' => [ 'route' => [ Module::class, [ HTTPMethod(s) ] ] -* -* It's possible to create recursive groups -*/ return [ '/' => [Module\Home::class, [R::GET]], diff --git a/static/settings.config.php b/static/settings.config.php index a5c6c3aeab..abfb1024e0 100644 --- a/static/settings.config.php +++ b/static/settings.config.php @@ -1,12 +1,28 @@ . + * + * This file declares the default values for the admin settings of Friendica. * * These values will be overridden by the admin settings page. * * Please don't edit this file directly as its content may change in the upcoming versions. + * */ return [ diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 7421f16a09..1e581725da 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -1,6 +1,22 @@ . + * */ namespace Friendica\Test; diff --git a/tests/DatabaseTestTrait.php b/tests/DatabaseTestTrait.php index 49dc999b69..5f753f3152 100644 --- a/tests/DatabaseTestTrait.php +++ b/tests/DatabaseTestTrait.php @@ -1,6 +1,22 @@ . + * */ namespace Friendica\Test; diff --git a/tests/Util/SampleStorageBackendInstance.php b/tests/Util/SampleStorageBackendInstance.php index ceb329cb38..02afc7d75e 100644 --- a/tests/Util/SampleStorageBackendInstance.php +++ b/tests/Util/SampleStorageBackendInstance.php @@ -1,6 +1,24 @@ . + * + * Contains a test-hook call for creating a storage instance + */ use Friendica\App; use Friendica\Core\L10n; diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 8b4b8ade1e..bf95252f10 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,5 +1,22 @@ . + * * This file is loaded by PHPUnit before any test. */ diff --git a/tests/datasets/api.fixture.php b/tests/datasets/api.fixture.php index 44501d0493..8bb701da1d 100644 --- a/tests/datasets/api.fixture.php +++ b/tests/datasets/api.fixture.php @@ -1,4 +1,23 @@ . + * + */ return [ // Empty these tables diff --git a/tests/datasets/storage/database.fixture.php b/tests/datasets/storage/database.fixture.php index 780bfa1402..442b40e732 100644 --- a/tests/datasets/storage/database.fixture.php +++ b/tests/datasets/storage/database.fixture.php @@ -1,4 +1,23 @@ . + * + */ return [ 'photo' => [ diff --git a/tests/src/Core/InstallerTest.php b/tests/src/Core/InstallerTest.php index 371932caf2..f512bf17b9 100644 --- a/tests/src/Core/InstallerTest.php +++ b/tests/src/Core/InstallerTest.php @@ -1,4 +1,23 @@ . + * + */ // this is in the same namespace as Install for mocking 'function_exists' namespace Friendica\Core; diff --git a/tests/src/Util/CryptoTest.php b/tests/src/Util/CryptoTest.php index 76e3076f0f..9f232210c9 100644 --- a/tests/src/Util/CryptoTest.php +++ b/tests/src/Util/CryptoTest.php @@ -1,6 +1,24 @@ . + * + * This is in the same namespace as Crypto for mocking 'rand' and 'random_init' + */ namespace Friendica\Util; use PHPUnit\Framework\TestCase; diff --git a/update.php b/update.php index f86fea8dfd..06287516fa 100644 --- a/update.php +++ b/update.php @@ -1,21 +1,23 @@ . + * + * Automatic post-databse structure change updates * * These functions are responsible for doing critical post update changes to the data (not the structure) in the database. * @@ -38,6 +40,20 @@ use Friendica\Worker\Delivery; * If you need to run a script before the database update, name the function "pre_update_4712()" */ +use Friendica\Core\Addon; +use Friendica\Core\Logger; +use Friendica\Core\Update; +use Friendica\Core\Worker; +use Friendica\Database\DBA; +use Friendica\DI; +use Friendica\Model\Contact; +use Friendica\Model\GContact; +use Friendica\Model\Item; +use Friendica\Model\User; +use Friendica\Model\Storage; +use Friendica\Util\DateTimeFormat; +use Friendica\Worker\Delivery; + function update_1178() { require_once 'mod/profiles.php'; diff --git a/view/theme/duepuntozero/theme.php b/view/theme/duepuntozero/theme.php index 8548899a7d..33ad00baff 100644 --- a/view/theme/duepuntozero/theme.php +++ b/view/theme/duepuntozero/theme.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Core\Renderer; diff --git a/view/theme/frio/config.php b/view/theme/frio/config.php index d0d1c8cb73..511008eaa9 100644 --- a/view/theme/frio/config.php +++ b/view/theme/frio/config.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Core\Renderer; diff --git a/view/theme/frio/php/scheme.php b/view/theme/frio/php/scheme.php index d2c209d64f..42fc21ab8b 100644 --- a/view/theme/frio/php/scheme.php +++ b/view/theme/frio/php/scheme.php @@ -1,6 +1,22 @@ . + * * Get info header of the scheme * * This function parses the header of the schemename.php file for informations like