diff --git a/.editorconfig b/.editorconfig index 8565b274..ef6e90b2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -27,3 +27,6 @@ indent_size = 2 [*.json] indent_style = space indent_size = 2 + +[composer.json] +indent_size = 4 diff --git a/.woodpecker/.code_standards_check.yml b/.woodpecker/.code_standards_check.yml index 9d59dc08..60a1bd2a 100644 --- a/.woodpecker/.code_standards_check.yml +++ b/.woodpecker/.code_standards_check.yml @@ -1,9 +1,12 @@ skip_clone: true -pipeline: +steps: clone_friendica_base: image: alpine/git commands: + - git config --global user.email "no-reply@friendi.ca" + - git config --global user.name "Friendica" + - git config --global --add safe.directory $CI_WORKSPACE - git clone https://github.com/friendica/friendica.git . - git checkout $CI_COMMIT_BRANCH when: @@ -13,7 +16,7 @@ pipeline: commands: - git config --global user.email "no-reply@friendi.ca" - git config --global user.name "Friendica" - - git clone $CI_REPO_LINK addon + - git clone $CI_REPO_CLONE_URL addon - cd addon/ - git checkout $CI_COMMIT_BRANCH - git fetch origin $CI_COMMIT_REF @@ -53,6 +56,10 @@ pipeline: - /tmp/drone-cache:/tmp/cache when: event: pull_request + phpstan: + image: friendicaci/php8.3:php8.3.3 + commands: + - ./bin/composer.phar run phpstan; check: image: friendicaci/php-cs commands: diff --git a/.woodpecker/.continuous-deployment-allinone.yml b/.woodpecker/.continuous-deployment-allinone.yml new file mode 100644 index 00000000..8d608db8 --- /dev/null +++ b/.woodpecker/.continuous-deployment-allinone.yml @@ -0,0 +1,115 @@ +# This prevents executing this pipeline at other servers than ci.friendi.ca +labels: + location: friendica + type: releaser + +skip_clone: true + +steps: + clone_friendica_base: + image: alpine/git + commands: + - git config --global user.email "no-reply@friendi.ca" + - git config --global user.name "Friendica" + - git config --global --add safe.directory $CI_WORKSPACE + - git clone https://github.com/friendica/friendica.git . + - git checkout $CI_COMMIT_BRANCH + when: + repo: friendica/friendica-addons + branch: [ develop, '*-rc' ] + event: push + clone_friendica_addon: + image: alpine/git + commands: + - git config --global user.email "no-reply@friendi.ca" + - git config --global user.name "Friendica" + - git clone $CI_REPO_CLONE_URL addon + - cd addon/ + - git checkout $CI_COMMIT_BRANCH + - git fetch origin $CI_COMMIT_REF + - git merge $CI_COMMIT_SHA + when: + repo: friendica/friendica-addons + branch: [ develop, '*-rc' ] + event: push + restore_cache: + image: meltwater/drone-cache:dev + settings: + backend: "filesystem" + restore: true + cache_key: "{{ .Repo.Name }}_php7.4_{{ arch }}_{{ os }}" + archive_format: "gzip" + mount: + - '.composer' + volumes: + - /tmp/drone-cache:/tmp/cache + when: + repo: friendica/friendica-addons + branch: [ develop, '*-rc' ] + event: push + composer_install: + image: friendicaci/php8.2:php8.2.28 + commands: + - export COMPOSER_HOME=.composer + - composer validate + - composer install --no-dev --optimize-autoloader + volumes: + - /etc/hosts:/etc/hosts + when: + repo: friendica/friendica-addons + branch: [ develop, '*-rc' ] + event: push + create_artifacts: + image: debian + commands: + - apt-get update + - apt-get install bzip2 + - mkdir ./build + - export VERSION="$(cat VERSION)" + - export RELEASE="friendica-all-in-one-$VERSION" + - export ARTIFACT="$RELEASE.tar.gz" + - tar + --exclude='.tx' + --exclude='.git' + --exclude='.editorconfig' + --exclude='.gitattributes' + --exclude='.gitignore' + --exclude='.woodpecker' + --exclude='**/*/messages.po' + -cvzf ./build/$ARTIFACT / + - cd ./build + - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256" + - chmod 664 ./* + - ls -lh + - cat "$ARTIFACT.sum256" + - sha256sum "$ARTIFACT" + when: + repo: friendica/friendica-addons + branch: [ develop, '*-rc' ] + event: push + sign_artifacts: + image: plugins/gpgsign + settings: + key: + from_secret: gpg_key + passphrase: + from_secret: gpg_password + files: + - build/* + exclude: + - build/*.sum256 + detach_sign: true + when: + repo: friendica/friendica-addons + branch: [ develop, '*-rc' ] + event: push + publish_artifacts: + image: alpine + commands: + - cp -fr build/* /tmp/friendica_files/ + volumes: + - files:/tmp/friendica_files + when: + repo: friendica/friendica-addons + branch: [ develop, '*-rc' ] + event: push diff --git a/.woodpecker/.continuous-deployment.yml b/.woodpecker/.continuous-deployment.yml index ab6e07e9..d6d8a22a 100644 --- a/.woodpecker/.continuous-deployment.yml +++ b/.woodpecker/.continuous-deployment.yml @@ -5,10 +5,13 @@ labels: skip_clone: true -pipeline: +steps: clone_friendica_base: image: alpine/git commands: + - git config --global user.email "no-reply@friendi.ca" + - git config --global user.name "Friendica" + - git config --global --add safe.directory $CI_WORKSPACE - git clone https://github.com/friendica/friendica.git . - git checkout $CI_COMMIT_BRANCH when: @@ -20,7 +23,7 @@ pipeline: commands: - git config --global user.email "no-reply@friendi.ca" - git config --global user.name "Friendica" - - git clone $CI_REPO_LINK addon + - git clone $CI_REPO_CLONE_URL addon - cd addon/ - git checkout $CI_COMMIT_BRANCH - git fetch origin $CI_COMMIT_REF @@ -45,7 +48,7 @@ pipeline: branch: [ develop, '*-rc' ] event: push composer_install: - image: friendicaci/php7.4:php7.4.33 + image: friendicaci/php8.2:php8.2.28 commands: - export COMPOSER_HOME=.composer - composer validate diff --git a/.woodpecker/.messages.po_check.yml b/.woodpecker/.messages.po_check.yml index f5691e00..e0239dcd 100644 --- a/.woodpecker/.messages.po_check.yml +++ b/.woodpecker/.messages.po_check.yml @@ -1,9 +1,12 @@ skip_clone: true -pipeline: +steps: clone_friendica_base: image: alpine/git commands: + - git config --global user.email "no-reply@friendi.ca" + - git config --global user.name "Friendica" + - git config --global --add safe.directory $CI_WORKSPACE - git clone https://github.com/friendica/friendica.git . - git checkout $CI_COMMIT_BRANCH when: @@ -13,7 +16,7 @@ pipeline: commands: - git config --global user.email "no-reply@friendi.ca" - git config --global user.name "Friendica" - - git clone $CI_REPO_LINK addon + - git clone $CI_REPO_CLONE_URL addon - cd addon/ - git checkout $CI_COMMIT_BRANCH - git fetch origin $CI_COMMIT_REF diff --git a/.woodpecker/.phpunit.yml b/.woodpecker/.phpunit.yml index a6c5db09..b0745ad0 100644 --- a/.woodpecker/.phpunit.yml +++ b/.woodpecker/.phpunit.yml @@ -5,9 +5,13 @@ matrix: - PHP_MAJOR_VERSION: 8.0 PHP_VERSION: 8.0.30 - PHP_MAJOR_VERSION: 8.1 - PHP_VERSION: 8.1.23 + PHP_VERSION: 8.1.31 - PHP_MAJOR_VERSION: 8.2 - PHP_VERSION: 8.2.11 + PHP_VERSION: 8.2.28 + - PHP_MAJOR_VERSION: 8.3 + PHP_VERSION: 8.3.17 + - PHP_MAJOR_VERSION: 8.4 + PHP_VERSION: 8.4.5 # This forces PHP Unit executions at the "opensocial" labeled location (because of much more power...) labels: @@ -15,10 +19,13 @@ labels: skip_clone: true -pipeline: +steps: clone_friendica_base: image: alpine/git commands: + - git config --global user.email "no-reply@friendi.ca" + - git config --global user.name "Friendica" + - git config --global --add safe.directory $CI_WORKSPACE - git clone https://github.com/friendica/friendica.git . - git checkout $CI_COMMIT_BRANCH clone_friendica_addon: @@ -26,7 +33,7 @@ pipeline: commands: - git config --global user.email "no-reply@friendi.ca" - git config --global user.name "Friendica" - - git clone $CI_REPO_LINK addon + - git clone $CI_REPO_CLONE_URL addon - cd addon/ - git checkout $CI_COMMIT_BRANCH - git fetch origin $CI_COMMIT_REF @@ -76,7 +83,7 @@ pipeline: - cp config/local-sample.config.php config/local.config.php - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql - - if [ "${PHP_MAJOR_VERSION}" = "7.4" -a "${CI_REPO}" = "friendica/friendica-addons" ]; then + - if [ "${PHP_MAJOR_VERSION}" = "8.2" -a "${CI_REPO}" = "friendica/friendica-addons" ]; then phpenmod xdebug; export XDEBUG_MODE=coverage; phpunit --configuration tests/phpunit-addons.xml --coverage-clover clover.xml; @@ -87,15 +94,15 @@ pipeline: image: friendicaci/codecov when: matrix: - PHP_MAJOR_VERSION: 7.4 - PHP_VERSION: 7.4.33 + PHP_MAJOR_VERSION: 8.2 + PHP_VERSION: 8.2.16 repo: - friendica/friendica-addons commands: - codecov -R '.' -Z -f 'clover.xml' - secrets: - - source: codecov-token - target: codecov_token + environment: + CODECOV_TOKEN: + from_secret: codecov-token services: mariadb: diff --git a/.woodpecker/.releaser.yml b/.woodpecker/.releaser.yml index 4a661937..7407f2bc 100644 --- a/.woodpecker/.releaser.yml +++ b/.woodpecker/.releaser.yml @@ -5,10 +5,13 @@ labels: skip_clone: true -pipeline: +steps: clone_friendica_base: image: alpine/git commands: + - git config --global user.email "no-reply@friendi.ca" + - git config --global user.name "Friendica" + - git config --global --add safe.directory $CI_WORKSPACE - git clone https://github.com/friendica/friendica.git . - git checkout $CI_COMMIT_BRANCH when: @@ -19,7 +22,7 @@ pipeline: commands: - git config --global user.email "no-reply@friendi.ca" - git config --global user.name "Friendica" - - git clone $CI_REPO_LINK addon + - git clone $CI_REPO_CLONE_URL addon - cd addon/ - git checkout $CI_COMMIT_BRANCH - git fetch origin $CI_COMMIT_REF @@ -42,7 +45,7 @@ pipeline: repo: friendica/friendica-addons event: tag composer_install: - image: friendicaci/php7.4:php7.4.33 + image: friendicaci/php8.2:php8.2.28 commands: - export COMPOSER_HOME=.composer - composer validate diff --git a/README.md b/README.md index 6a3202bb..82029288 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,6 @@ See the [documentation](https://github.com/friendica/friendica/blob/stable/doc/A ## Translation Addons can be translated like any other part of Friendica. -Translation for addons is done at [the Transifex Friendica page](https://www.transifex.com/Friendica/friendica/dashboard/). +Translation for addons is done at [the Transifex Friendica page](https://app.transifex.com/Friendica/friendica/dashboard/). Read more about the workflow in the [Friendica translation documentation](https://github.com/friendica/friendica/blob/stable/doc/translations.md#addon). diff --git a/advancedcontentfilter/advancedcontentfilter.js b/advancedcontentfilter/advancedcontentfilter.js index fcf7b096..a8fc1c65 100644 --- a/advancedcontentfilter/advancedcontentfilter.js +++ b/advancedcontentfilter/advancedcontentfilter.js @@ -54,7 +54,7 @@ new Vue({ self.rules.push(responseJSON.rule); self.resetForm(); }, function (response) { - self.errorMessage = response.responseJSON.message; + self.errorMessage = response.responseJSON.exception[0].message; }); } }, @@ -74,7 +74,7 @@ new Vue({ self.rules[self.editedIndex] = rule; self.resetForm(); }, function (response) { - self.errorMessage = response.responseJSON.message; + self.errorMessage = response.responseJSON.exception[0].message; }); }, diff --git a/advancedcontentfilter/advancedcontentfilter.php b/advancedcontentfilter/advancedcontentfilter.php index f2927f57..53cb9ebe 100644 --- a/advancedcontentfilter/advancedcontentfilter.php +++ b/advancedcontentfilter/advancedcontentfilter.php @@ -33,16 +33,13 @@ * */ -use Friendica\App; use Friendica\BaseModule; use Friendica\Content\Text\Markdown; use Friendica\Core\Hook; -use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\Database\DBStructure; use Friendica\DI; -use Friendica\Model\Item; use Friendica\Model\Post; use Friendica\Model\Tag; use Friendica\Model\User; @@ -64,7 +61,7 @@ function advancedcontentfilter_install() Hook::add('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition'); DBStructure::performUpdate(); - Logger::notice('installed advancedcontentfilter'); + DI::logger()->notice('installed advancedcontentfilter'); } /* @@ -123,21 +120,22 @@ function advancedcontentfilter_prepare_body_content_filter(&$hook_data) $expressionLanguage = new ExpressionLanguage\ExpressionLanguage(); } - if (!DI::userSession()->getLocalUserId()) { + $uid = $hook_data['uid'] ?? DI::userSession()->getLocalUserId(); + if (!$uid) { return; } $vars = advancedcontentfilter_get_filter_fields($hook_data['item']); - $rules = DI::cache()->get('rules_' . DI::userSession()->getLocalUserId()); + $rules = DI::cache()->get('rules_' . $uid); if (!isset($rules)) { $rules = DBA::toArray(DBA::select( 'advancedcontentfilter_rules', ['name', 'expression', 'serialized'], - ['uid' => DI::userSession()->getLocalUserId(), 'active' => true] + ['uid' => $uid, 'active' => true] )); - DI::cache()->set('rules_' . DI::userSession()->getLocalUserId(), $rules); + DI::cache()->set('rules_' . $uid, $rules); } if ($rules) { @@ -190,11 +188,32 @@ function advancedcontentfilter_module() {} function advancedcontentfilter_init() { if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'api') { - $slim = new \Slim\App(); + $slim = \Slim\Factory\AppFactory::create(); - require __DIR__ . '/src/middlewares.php'; + /** + * The routing middleware should be added before the ErrorMiddleware + * Otherwise exceptions thrown from it will not be handled + */ + $slim->addRoutingMiddleware(); + + $slim->addErrorMiddleware(true, true, true, DI::logger()); + + // register routes + $slim->group('/advancedcontentfilter/api', function (\Slim\Routing\RouteCollectorProxy $app) { + $app->group('/rules', function (\Slim\Routing\RouteCollectorProxy $app) { + $app->get('', 'advancedcontentfilter_get_rules'); + $app->post('', 'advancedcontentfilter_post_rules'); + + $app->get('/{id}', 'advancedcontentfilter_get_rules_id'); + $app->put('/{id}', 'advancedcontentfilter_put_rules_id'); + $app->delete('/{id}', 'advancedcontentfilter_delete_rules_id'); + }); + + $app->group('/variables', function (\Slim\Routing\RouteCollectorProxy $app) { + $app->get('/{guid}', 'advancedcontentfilter_get_variables_guid'); + }); + }); - require __DIR__ . '/src/routes.php'; $slim->run(); exit; @@ -252,8 +271,8 @@ function advancedcontentfilter_content() 'rule_expression' => DI::l10n()->t('Rule Expression'), 'cancel' => DI::l10n()->t('Cancel'), ], - '$current_theme' => DI::app()->getCurrentTheme(), - '$rules' => advancedcontentfilter_get_rules(), + '$current_theme' => DI::appHelper()->getCurrentTheme(), + '$rules' => DBA::toArray(DBA::select('advancedcontentfilter_rules', [], ['uid' => DI::userSession()->getLocalUserId()])), '$form_security_token' => BaseModule::getFormSecurityToken() ]); } @@ -305,7 +324,7 @@ function advancedcontentfilter_build_fields($data) * API */ -function advancedcontentfilter_get_rules() +function advancedcontentfilter_get_rules(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface { if (!DI::userSession()->getLocalUserId()) { throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method')); @@ -313,7 +332,8 @@ function advancedcontentfilter_get_rules() $rules = DBA::toArray(DBA::select('advancedcontentfilter_rules', [], ['uid' => DI::userSession()->getLocalUserId()])); - return json_encode($rules); + $response->getBody()->write(json_encode($rules)); + return $response->withHeader('Content-Type', 'application/json'); } function advancedcontentfilter_get_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args) @@ -324,10 +344,11 @@ function advancedcontentfilter_get_rules_id(ServerRequestInterface $request, Res $rule = DBA::selectFirst('advancedcontentfilter_rules', [], ['id' => $args['id'], 'uid' => DI::userSession()->getLocalUserId()]); - return json_encode($rule); + $response->getBody()->write(json_encode($rule)); + return $response->withHeader('Content-Type', 'application/json'); } -function advancedcontentfilter_post_rules(ServerRequestInterface $request) +function advancedcontentfilter_post_rules(ServerRequestInterface $request, ResponseInterface $response) { if (!DI::userSession()->getLocalUserId()) { throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method')); @@ -360,7 +381,8 @@ function advancedcontentfilter_post_rules(ServerRequestInterface $request) DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId()); - return json_encode(['message' => DI::l10n()->t('Rule successfully added'), 'rule' => $rule]); + $response->getBody()->write(json_encode(['message' => DI::l10n()->t('Rule successfully added'), 'rule' => $rule])); + return $response->withHeader('Content-Type', 'application/json'); } function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args) @@ -391,7 +413,8 @@ function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, Res DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId()); - return json_encode(['message' => DI::l10n()->t('Rule successfully updated')]); + $response->getBody()->write(json_encode(['message' => DI::l10n()->t('Rule successfully updated')])); + return $response->withHeader('Content-Type', 'application/json'); } function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args) @@ -414,7 +437,8 @@ function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request, DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId()); - return json_encode(['message' => DI::l10n()->t('Rule successfully deleted')]); + $response->getBody()->write(json_encode(['message' => DI::l10n()->t('Rule successfully deleted')])); + return $response->withHeader('Content-Type', 'application/json'); } function advancedcontentfilter_get_variables_guid(ServerRequestInterface $request, ResponseInterface $response, $args) @@ -437,7 +461,8 @@ function advancedcontentfilter_get_variables_guid(ServerRequestInterface $reques $return = advancedcontentfilter_get_filter_fields(advancedcontentfilter_prepare_item_row($item_row)); - return json_encode(['variables' => str_replace('\\\'', '\'', var_export($return, true))]); + $response->getBody()->write(json_encode(['variables' => str_replace('\\\'', '\'', var_export($return, true))])); + return $response->withHeader('Content-Type', 'application/json'); } /** diff --git a/advancedcontentfilter/composer.json b/advancedcontentfilter/composer.json index 93b19cd5..b9ab1900 100644 --- a/advancedcontentfilter/composer.json +++ b/advancedcontentfilter/composer.json @@ -1,25 +1,27 @@ { - "name": "friendica-addons/advancedcontentfilter", - "description": "Advanced Content Filter addon for Friendica", - "type": "friendica-addon", - "authors": [ - { - "name": "Hypolite Petovan", - "email": "hypolite@mrpetovan.com", - "homepage": "https://friendica.mrpetovan.com/profile/hypolite", - "role": "Developer" - } - ], - "require": { - "php": ">=5.6.0", - "slim/slim": "^3.1", - "symfony/expression-language": "^3.4" - }, - "license": "3-clause BSD license", - "minimum-stability": "stable", - "config": { - "optimize-autoloader": true, - "autoloader-suffix": "AdvancedContentFilterAddon", - "preferred-install": "dist" - } + "name": "friendica-addons/advancedcontentfilter", + "description": "Advanced Content Filter addon for Friendica", + "type": "friendica-addon", + "authors": [ + { + "name": "Hypolite Petovan", + "email": "hypolite@mrpetovan.com", + "homepage": "https://friendica.mrpetovan.com/profile/hypolite", + "role": "Developer" + } + ], + "require": { + "slim/slim": "^4", + "symfony/expression-language": "^3.4" + }, + "license": "3-clause BSD license", + "minimum-stability": "stable", + "config": { + "platform": { + "php": "7.4" + }, + "optimize-autoloader": true, + "autoloader-suffix": "AdvancedContentFilterAddon", + "preferred-install": "dist" + } } diff --git a/advancedcontentfilter/composer.lock b/advancedcontentfilter/composer.lock index 774b5ec8..6dbd17ba 100644 --- a/advancedcontentfilter/composer.lock +++ b/advancedcontentfilter/composer.lock @@ -4,40 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d0e3662dd9d910ffe4f71d325bc39319", + "content-hash": "a7276eb2d2108a26699f69c750d02d27", "packages": [ - { - "name": "container-interop/container-interop", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "shasum": "" - }, - "require": { - "psr/container": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "abandoned": "psr/container", - "time": "2017-02-14T19:40:03+00:00" - }, { "name": "nikic/fast-route", "version": "v1.3.0", @@ -84,56 +52,6 @@ ], "time": "2018-02-13T20:26:39+00:00" }, - { - "name": "pimple/pimple", - "version": "v3.2.3", - "source": { - "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32", - "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/container": "^1.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "^3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "http://pimple.sensiolabs.org", - "keywords": [ - "container", - "dependency injection" - ], - "time": "2018-01-21T07:42:36+00:00" - }, { "name": "psr/cache", "version": "1.0.1", @@ -182,27 +100,22 @@ }, { "name": "psr/container", - "version": "1.0.0", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.4.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -215,7 +128,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -227,24 +140,25 @@ "container-interop", "psr" ], - "time": "2017-02-14T16:28:37+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { - "name": "psr/http-message", - "version": "1.0.1", + "name": "psr/http-factory", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "url": "https://github.com/php-fig/http-factory.git", + "reference": "e616d01114759c4c489f93b099585439f795fe35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.0.0", + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -264,7 +178,58 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "time": "2023-04-10T20:10:41+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -277,20 +242,126 @@ "request", "response" ], - "time": "2016-08-06T14:39:51+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { - "name": "psr/log", - "version": "1.1.2", + "name": "psr/http-server-handler", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" + "url": "https://github.com/php-fig/http-server-handler.git", + "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", + "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", + "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP server-side request handler", + "keywords": [ + "handler", + "http", + "http-interop", + "psr", + "psr-15", + "psr-7", + "request", + "response", + "server" + ], + "time": "2023-04-10T20:06:20+00:00" + }, + { + "name": "psr/http-server-middleware", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-server-middleware.git", + "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", + "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "psr/http-message": "^1.0 || ^2.0", + "psr/http-server-handler": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP server-side middleware", + "keywords": [ + "http", + "http-interop", + "middleware", + "psr", + "psr-15", + "psr-7", + "request", + "response" + ], + "time": "2023-04-11T06:14:47+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { @@ -314,7 +385,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", @@ -324,84 +395,55 @@ "psr", "psr-3" ], - "time": "2019-11-01T11:05:21+00:00" - }, - { - "name": "psr/simple-cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "time": "2017-10-23T01:57:42+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { "name": "slim/slim", - "version": "3.9.2", + "version": "4.13.0", "source": { "type": "git", "url": "https://github.com/slimphp/Slim.git", - "reference": "4086d0106cf5a7135c69fce4161fe355a8feb118" + "reference": "038fd5713d5a41636fdff0e8dcceedecdd17fc17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/4086d0106cf5a7135c69fce4161fe355a8feb118", - "reference": "4086d0106cf5a7135c69fce4161fe355a8feb118", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/038fd5713d5a41636fdff0e8dcceedecdd17fc17", + "reference": "038fd5713d5a41636fdff0e8dcceedecdd17fc17", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.2", - "nikic/fast-route": "^1.0", - "php": ">=5.5.0", - "pimple/pimple": "^3.0", - "psr/container": "^1.0", - "psr/http-message": "^1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" + "ext-json": "*", + "nikic/fast-route": "^1.3", + "php": "^7.4 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "psr/http-server-handler": "^1.0", + "psr/http-server-middleware": "^1.0", + "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { - "phpunit/phpunit": "^4.0", - "squizlabs/php_codesniffer": "^2.5" + "adriansuter/php-autoload-override": "^1.4", + "ext-simplexml": "*", + "guzzlehttp/psr7": "^2.6", + "httpsoft/http-message": "^1.1", + "httpsoft/http-server-request": "^1.1", + "laminas/laminas-diactoros": "^2.17 || ^3", + "nyholm/psr7": "^1.8", + "nyholm/psr7-server": "^1.1", + "phpspec/prophecy": "^1.19", + "phpspec/prophecy-phpunit": "^2.1", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.6", + "slim/http": "^1.3", + "slim/psr7": "^1.6", + "squizlabs/php_codesniffer": "^3.9" + }, + "suggest": { + "ext-simplexml": "Needed to support XML format in BodyParsingMiddleware", + "ext-xml": "Needed to support XML format in BodyParsingMiddleware", + "php-di/php-di": "PHP-DI is the recommended container library to be used with Slim", + "slim/psr7": "Slim PSR-7 implementation. See https://www.slimframework.com/docs/v4/start/installation.html for more information." }, "type": "library", "autoload": { @@ -414,77 +456,100 @@ "MIT" ], "authors": [ - { - "name": "Rob Allen", - "email": "rob@akrabat.com", - "homepage": "http://akrabat.com" - }, { "name": "Josh Lockhart", "email": "hello@joshlockhart.com", "homepage": "https://joshlockhart.com" }, - { - "name": "Gabriel Manricks", - "email": "gmanricks@me.com", - "homepage": "http://gabrielmanricks.com" - }, { "name": "Andrew Smith", "email": "a.smith@silentworks.co.uk", "homepage": "http://silentworks.co.uk" + }, + { + "name": "Rob Allen", + "email": "rob@akrabat.com", + "homepage": "http://akrabat.com" + }, + { + "name": "Pierre Berube", + "email": "pierre@lgse.com", + "homepage": "http://www.lgse.com" + }, + { + "name": "Gabriel Manricks", + "email": "gmanricks@me.com", + "homepage": "http://gabrielmanricks.com" } ], "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", - "homepage": "https://slimframework.com", + "homepage": "https://www.slimframework.com", "keywords": [ "api", "framework", "micro", "router" ], - "time": "2017-11-26T19:13:09+00:00" + "funding": [ + { + "url": "https://opencollective.com/slimphp", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/slim/slim", + "type": "tidelift" + } + ], + "time": "2024-03-03T21:25:30+00:00" }, { "name": "symfony/cache", - "version": "v3.4.36", + "version": "v4.4.48", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "3d9f46a6960fd5cd7f030f86adc5b4b63bcfa4e3" + "reference": "3b98ed664887ad197b8ede3da2432787212eb915" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/3d9f46a6960fd5cd7f030f86adc5b4b63bcfa4e3", - "reference": "3d9f46a6960fd5cd7f030f86adc5b4b63bcfa4e3", + "url": "https://api.github.com/repos/symfony/cache/zipball/3b98ed664887ad197b8ede3da2432787212eb915", + "reference": "3b98ed664887ad197b8ede3da2432787212eb915", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "psr/cache": "~1.0", - "psr/log": "~1.0", - "psr/simple-cache": "^1.0", - "symfony/polyfill-apcu": "~1.1" + "php": ">=7.1.3", + "psr/cache": "^1.0|^2.0", + "psr/log": "^1|^2|^3", + "symfony/cache-contracts": "^1.1.7|^2", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.2|^5.0" }, "conflict": { - "symfony/var-dumper": "<3.3" + "doctrine/dbal": "<2.7", + "symfony/dependency-injection": "<3.4", + "symfony/http-kernel": "<4.4|>=5.0", + "symfony/var-dumper": "<4.4" }, "provide": { - "psr/cache-implementation": "1.0", - "psr/simple-cache-implementation": "1.0" + "psr/cache-implementation": "1.0|2.0", + "psr/simple-cache-implementation": "1.0|2.0", + "symfony/cache-implementation": "1.0|2.0" }, "require-dev": { "cache/integration-tests": "dev-master", - "doctrine/cache": "~1.6", - "doctrine/dbal": "~2.4", - "predis/predis": "~1.0" + "doctrine/cache": "^1.6|^2.0", + "doctrine/dbal": "^2.7|^3.0", + "predis/predis": "^1.1", + "psr/simple-cache": "^1.0|^2.0", + "symfony/config": "^4.2|^5.0", + "symfony/dependency-injection": "^3.4|^4.1|^5.0", + "symfony/filesystem": "^4.4|^5.0", + "symfony/http-kernel": "^4.4", + "symfony/var-dumper": "^4.4|^5.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Cache\\": "" @@ -507,38 +572,188 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Cache component with PSR-6, PSR-16, and tags", + "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", "homepage": "https://symfony.com", "keywords": [ "caching", "psr6" ], - "time": "2019-12-01T10:45:41+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-10-17T20:21:54+00:00" }, { - "name": "symfony/expression-language", - "version": "v3.4.8", + "name": "symfony/cache-contracts", + "version": "v2.5.2", "source": { "type": "git", - "url": "https://github.com/symfony/expression-language.git", - "reference": "867e4d1f5d4e52435a8ffff6b24fd6a801582241" + "url": "https://github.com/symfony/cache-contracts.git", + "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/expression-language/zipball/867e4d1f5d4e52435a8ffff6b24fd6a801582241", - "reference": "867e4d1f5d4e52435a8ffff6b24fd6a801582241", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/64be4a7acb83b6f2bf6de9a02cee6dad41277ebc", + "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/cache": "~3.1|~4.0" + "php": ">=7.2.5", + "psr/cache": "^1.0|^2.0|^3.0" + }, + "suggest": { + "symfony/cache-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Cache\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to caching", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:53:40+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:53:40+00:00" + }, + { + "name": "symfony/expression-language", + "version": "v3.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/expression-language.git", + "reference": "de38e66398fca1fcb9c48e80279910e6889cb28f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/expression-language/zipball/de38e66398fca1fcb9c48e80279910e6889cb28f", + "reference": "de38e66398fca1fcb9c48e80279910e6889cb28f", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/cache": "~3.1|~4.0", + "symfony/polyfill-php70": "~1.6" + }, + "type": "library", "autoload": { "psr-4": { "Symfony\\Component\\ExpressionLanguage\\": "" @@ -563,37 +778,120 @@ ], "description": "Symfony ExpressionLanguage Component", "homepage": "https://symfony.com", - "time": "2018-01-03T07:37:34+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-24T10:57:07+00:00" }, { - "name": "symfony/polyfill-apcu", - "version": "v1.13.1", + "name": "symfony/polyfill-php70", + "version": "v1.20.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-apcu.git", - "reference": "a8e961c841b9ec52927a87914f8820a1ad8f8116" + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/a8e961c841b9ec52927a87914f8820a1ad8f8116", - "reference": "a8e961c841b9ec52927a87914f8820a1ad8f8116", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "type": "metapackage", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-23T14:02:19+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.29.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", + "shasum": "" + }, + "require": { + "php": ">=7.1" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.13-dev" + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Apcu\\": "" - }, "files": [ "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -610,16 +908,256 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting apcu_* functions to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ - "apcu", "compatibility", "polyfill", "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-29T20:11:03+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.29.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-29T20:11:03+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-30T19:17:29+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v5.4.35", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "abb0a151b62d6b07e816487e20040464af96cae7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/abb0a151b62d6b07e816487e20040464af96cae7", + "reference": "abb0a151b62d6b07e816487e20040464af96cae7", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" + }, + "require-dev": { + "symfony/var-dumper": "^4.4.9|^5.0.9|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "serialize" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-01-23T13:51:25+00:00" } ], "packages-dev": [], @@ -628,8 +1166,10 @@ "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, - "platform": { - "php": ">=5.6.0" + "platform": [], + "platform-dev": [], + "platform-overrides": { + "php": "7.4" }, - "platform-dev": [] + "plugin-api-version": "1.1.0" } diff --git a/advancedcontentfilter/lang/bg/messages.po b/advancedcontentfilter/lang/bg/messages.po new file mode 100644 index 00000000..8c65990e --- /dev/null +++ b/advancedcontentfilter/lang/bg/messages.po @@ -0,0 +1,161 @@ +# ADDON advancedcontentfilter +# Copyright (C) +# This file is distributed under the same license as the Friendica advancedcontentfilter addon package. +# +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-11 08:54-0400\n" +"PO-Revision-Date: 2018-05-24 06:41+0000\n" +"Language-Team: Bulgarian (https://app.transifex.com/Friendica/teams/12172/bg/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: bg\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: advancedcontentfilter.php:154 +#, php-format +msgid "Filtered by rule: %s" +msgstr "" + +#: advancedcontentfilter.php:170 advancedcontentfilter.php:225 +msgid "Advanced Content Filter" +msgstr "" + +#: advancedcontentfilter.php:224 +msgid "Back to Addon Settings" +msgstr "" + +#: advancedcontentfilter.php:226 +msgid "Add a Rule" +msgstr "" + +#: advancedcontentfilter.php:227 +msgid "Help" +msgstr "" + +#: advancedcontentfilter.php:228 +msgid "" +"Add and manage your personal content filter rules in this screen. Rules have" +" a name and an arbitrary expression that will be matched against post data. " +"For a complete reference of the available operations and variables, check " +"the help page." +msgstr "" + +#: advancedcontentfilter.php:229 +msgid "Your rules" +msgstr "" + +#: advancedcontentfilter.php:230 +msgid "" +"You have no rules yet! Start adding one by clicking on the button above next" +" to the title." +msgstr "" + +#: advancedcontentfilter.php:231 +msgid "Disabled" +msgstr "" + +#: advancedcontentfilter.php:232 +msgid "Enabled" +msgstr "" + +#: advancedcontentfilter.php:233 +msgid "Disable this rule" +msgstr "" + +#: advancedcontentfilter.php:234 +msgid "Enable this rule" +msgstr "" + +#: advancedcontentfilter.php:235 +msgid "Edit this rule" +msgstr "" + +#: advancedcontentfilter.php:236 +msgid "Edit the rule" +msgstr "" + +#: advancedcontentfilter.php:237 +msgid "Save this rule" +msgstr "" + +#: advancedcontentfilter.php:238 +msgid "Delete this rule" +msgstr "" + +#: advancedcontentfilter.php:239 +msgid "Rule" +msgstr "" + +#: advancedcontentfilter.php:240 +msgid "Close" +msgstr "" + +#: advancedcontentfilter.php:241 +msgid "Add new rule" +msgstr "" + +#: advancedcontentfilter.php:242 +msgid "Rule Name" +msgstr "" + +#: advancedcontentfilter.php:243 +msgid "Rule Expression" +msgstr "" + +#: advancedcontentfilter.php:244 +msgid "Cancel" +msgstr "" + +#: advancedcontentfilter.php:295 +msgid "This addon requires this node having at least one post" +msgstr "" + +#: advancedcontentfilter.php:325 advancedcontentfilter.php:336 +#: advancedcontentfilter.php:347 advancedcontentfilter.php:383 +#: advancedcontentfilter.php:414 advancedcontentfilter.php:437 +msgid "You must be logged in to use this method" +msgstr "" + +#: advancedcontentfilter.php:351 advancedcontentfilter.php:387 +#: advancedcontentfilter.php:418 +msgid "Invalid form security token, please refresh the page." +msgstr "" + +#: advancedcontentfilter.php:363 +msgid "The rule name and expression are required." +msgstr "" + +#: advancedcontentfilter.php:377 +msgid "Rule successfully added" +msgstr "" + +#: advancedcontentfilter.php:391 advancedcontentfilter.php:422 +msgid "Rule doesn't exist or doesn't belong to you." +msgstr "" + +#: advancedcontentfilter.php:408 +msgid "Rule successfully updated" +msgstr "" + +#: advancedcontentfilter.php:431 +msgid "Rule successfully deleted" +msgstr "" + +#: advancedcontentfilter.php:441 +msgid "Missing argument: guid." +msgstr "" + +#: advancedcontentfilter.php:449 +#, php-format +msgid "Unknown post with guid: %s" +msgstr "" + +#: src/middlewares.php:49 +msgid "Method not found" +msgstr "" diff --git a/advancedcontentfilter/lang/bg/strings.php b/advancedcontentfilter/lang/bg/strings.php new file mode 100644 index 00000000..d912b572 --- /dev/null +++ b/advancedcontentfilter/lang/bg/strings.php @@ -0,0 +1,7 @@ + 2 && n < 20) ? 2 : 3;\n" + +#: advancedcontentfilter.php:154 +#, php-format +msgid "Filtered by rule: %s" +msgstr "" + +#: advancedcontentfilter.php:170 advancedcontentfilter.php:225 +msgid "Advanced Content Filter" +msgstr "" + +#: advancedcontentfilter.php:224 +msgid "Back to Addon Settings" +msgstr "" + +#: advancedcontentfilter.php:226 +msgid "Add a Rule" +msgstr "" + +#: advancedcontentfilter.php:227 +msgid "Help" +msgstr "" + +#: advancedcontentfilter.php:228 +msgid "" +"Add and manage your personal content filter rules in this screen. Rules have" +" a name and an arbitrary expression that will be matched against post data. " +"For a complete reference of the available operations and variables, check " +"the help page." +msgstr "" + +#: advancedcontentfilter.php:229 +msgid "Your rules" +msgstr "" + +#: advancedcontentfilter.php:230 +msgid "" +"You have no rules yet! Start adding one by clicking on the button above next" +" to the title." +msgstr "" + +#: advancedcontentfilter.php:231 +msgid "Disabled" +msgstr "" + +#: advancedcontentfilter.php:232 +msgid "Enabled" +msgstr "" + +#: advancedcontentfilter.php:233 +msgid "Disable this rule" +msgstr "" + +#: advancedcontentfilter.php:234 +msgid "Enable this rule" +msgstr "" + +#: advancedcontentfilter.php:235 +msgid "Edit this rule" +msgstr "" + +#: advancedcontentfilter.php:236 +msgid "Edit the rule" +msgstr "" + +#: advancedcontentfilter.php:237 +msgid "Save this rule" +msgstr "" + +#: advancedcontentfilter.php:238 +msgid "Delete this rule" +msgstr "" + +#: advancedcontentfilter.php:239 +msgid "Rule" +msgstr "" + +#: advancedcontentfilter.php:240 +msgid "Close" +msgstr "" + +#: advancedcontentfilter.php:241 +msgid "Add new rule" +msgstr "" + +#: advancedcontentfilter.php:242 +msgid "Rule Name" +msgstr "" + +#: advancedcontentfilter.php:243 +msgid "Rule Expression" +msgstr "" + +#: advancedcontentfilter.php:244 +msgid "Cancel" +msgstr "" + +#: advancedcontentfilter.php:295 +msgid "This addon requires this node having at least one post" +msgstr "" + +#: advancedcontentfilter.php:325 advancedcontentfilter.php:336 +#: advancedcontentfilter.php:347 advancedcontentfilter.php:383 +#: advancedcontentfilter.php:414 advancedcontentfilter.php:437 +msgid "You must be logged in to use this method" +msgstr "" + +#: advancedcontentfilter.php:351 advancedcontentfilter.php:387 +#: advancedcontentfilter.php:418 +msgid "Invalid form security token, please refresh the page." +msgstr "" + +#: advancedcontentfilter.php:363 +msgid "The rule name and expression are required." +msgstr "" + +#: advancedcontentfilter.php:377 +msgid "Rule successfully added" +msgstr "" + +#: advancedcontentfilter.php:391 advancedcontentfilter.php:422 +msgid "Rule doesn't exist or doesn't belong to you." +msgstr "" + +#: advancedcontentfilter.php:408 +msgid "Rule successfully updated" +msgstr "" + +#: advancedcontentfilter.php:431 +msgid "Rule successfully deleted" +msgstr "" + +#: advancedcontentfilter.php:441 +msgid "Missing argument: guid." +msgstr "" + +#: advancedcontentfilter.php:449 +#, php-format +msgid "Unknown post with guid: %s" +msgstr "" + +#: src/middlewares.php:49 +msgid "Method not found" +msgstr "" diff --git a/advancedcontentfilter/lang/gd/strings.php b/advancedcontentfilter/lang/gd/strings.php new file mode 100644 index 00000000..dcbcfe0a --- /dev/null +++ b/advancedcontentfilter/lang/gd/strings.php @@ -0,0 +1,7 @@ + 2 && $n < 20)) { return 2; } else { return 3; } +}} diff --git a/advancedcontentfilter/lang/is/messages.po b/advancedcontentfilter/lang/is/messages.po new file mode 100644 index 00000000..4c50158d --- /dev/null +++ b/advancedcontentfilter/lang/is/messages.po @@ -0,0 +1,161 @@ +# ADDON advancedcontentfilter +# Copyright (C) +# This file is distributed under the same license as the Friendica advancedcontentfilter addon package. +# +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-05-11 08:54-0400\n" +"PO-Revision-Date: 2018-05-24 06:41+0000\n" +"Language-Team: Icelandic (https://app.transifex.com/Friendica/teams/12172/is/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: is\n" +"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" + +#: advancedcontentfilter.php:154 +#, php-format +msgid "Filtered by rule: %s" +msgstr "" + +#: advancedcontentfilter.php:170 advancedcontentfilter.php:225 +msgid "Advanced Content Filter" +msgstr "" + +#: advancedcontentfilter.php:224 +msgid "Back to Addon Settings" +msgstr "" + +#: advancedcontentfilter.php:226 +msgid "Add a Rule" +msgstr "" + +#: advancedcontentfilter.php:227 +msgid "Help" +msgstr "" + +#: advancedcontentfilter.php:228 +msgid "" +"Add and manage your personal content filter rules in this screen. Rules have" +" a name and an arbitrary expression that will be matched against post data. " +"For a complete reference of the available operations and variables, check " +"the help page." +msgstr "" + +#: advancedcontentfilter.php:229 +msgid "Your rules" +msgstr "" + +#: advancedcontentfilter.php:230 +msgid "" +"You have no rules yet! Start adding one by clicking on the button above next" +" to the title." +msgstr "" + +#: advancedcontentfilter.php:231 +msgid "Disabled" +msgstr "" + +#: advancedcontentfilter.php:232 +msgid "Enabled" +msgstr "" + +#: advancedcontentfilter.php:233 +msgid "Disable this rule" +msgstr "" + +#: advancedcontentfilter.php:234 +msgid "Enable this rule" +msgstr "" + +#: advancedcontentfilter.php:235 +msgid "Edit this rule" +msgstr "" + +#: advancedcontentfilter.php:236 +msgid "Edit the rule" +msgstr "" + +#: advancedcontentfilter.php:237 +msgid "Save this rule" +msgstr "" + +#: advancedcontentfilter.php:238 +msgid "Delete this rule" +msgstr "" + +#: advancedcontentfilter.php:239 +msgid "Rule" +msgstr "" + +#: advancedcontentfilter.php:240 +msgid "Close" +msgstr "" + +#: advancedcontentfilter.php:241 +msgid "Add new rule" +msgstr "" + +#: advancedcontentfilter.php:242 +msgid "Rule Name" +msgstr "" + +#: advancedcontentfilter.php:243 +msgid "Rule Expression" +msgstr "" + +#: advancedcontentfilter.php:244 +msgid "Cancel" +msgstr "" + +#: advancedcontentfilter.php:295 +msgid "This addon requires this node having at least one post" +msgstr "" + +#: advancedcontentfilter.php:325 advancedcontentfilter.php:336 +#: advancedcontentfilter.php:347 advancedcontentfilter.php:383 +#: advancedcontentfilter.php:414 advancedcontentfilter.php:437 +msgid "You must be logged in to use this method" +msgstr "" + +#: advancedcontentfilter.php:351 advancedcontentfilter.php:387 +#: advancedcontentfilter.php:418 +msgid "Invalid form security token, please refresh the page." +msgstr "" + +#: advancedcontentfilter.php:363 +msgid "The rule name and expression are required." +msgstr "" + +#: advancedcontentfilter.php:377 +msgid "Rule successfully added" +msgstr "" + +#: advancedcontentfilter.php:391 advancedcontentfilter.php:422 +msgid "Rule doesn't exist or doesn't belong to you." +msgstr "" + +#: advancedcontentfilter.php:408 +msgid "Rule successfully updated" +msgstr "" + +#: advancedcontentfilter.php:431 +msgid "Rule successfully deleted" +msgstr "" + +#: advancedcontentfilter.php:441 +msgid "Missing argument: guid." +msgstr "" + +#: advancedcontentfilter.php:449 +#, php-format +msgid "Unknown post with guid: %s" +msgstr "" + +#: src/middlewares.php:49 +msgid "Method not found" +msgstr "" diff --git a/advancedcontentfilter/lang/is/strings.php b/advancedcontentfilter/lang/is/strings.php new file mode 100644 index 00000000..975c341e --- /dev/null +++ b/advancedcontentfilter/lang/is/strings.php @@ -0,0 +1,7 @@ +, 2018 -# Sylke Vicious , 2021 +# Sylke Vicious , 2023 # #, fuzzy msgid "" @@ -14,7 +14,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-05-11 08:54-0400\n" "PO-Revision-Date: 2018-05-24 06:41+0000\n" -"Last-Translator: Sylke Vicious , 2021\n" +"Last-Translator: Sylke Vicious , 2023\n" "Language-Team: Italian (https://app.transifex.com/Friendica/teams/12172/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -125,7 +125,7 @@ msgstr "Annulla" #: advancedcontentfilter.php:295 msgid "This addon requires this node having at least one post" -msgstr "" +msgstr "Questo addon richiede che questo nodo abbia almeno un messaggio" #: advancedcontentfilter.php:325 advancedcontentfilter.php:336 #: advancedcontentfilter.php:347 advancedcontentfilter.php:383 diff --git a/advancedcontentfilter/lang/it/strings.php b/advancedcontentfilter/lang/it/strings.php index 5cc01739..d47d7a5a 100644 --- a/advancedcontentfilter/lang/it/strings.php +++ b/advancedcontentfilter/lang/it/strings.php @@ -27,6 +27,7 @@ $a->strings['Add new rule'] = 'Aggiungi nuova regola'; $a->strings['Rule Name'] = 'Nome Regola'; $a->strings['Rule Expression'] = 'Espressione Regola'; $a->strings['Cancel'] = 'Annulla'; +$a->strings['This addon requires this node having at least one post'] = 'Questo addon richiede che questo nodo abbia almeno un messaggio'; $a->strings['You must be logged in to use this method'] = 'Devi essere autenticato per usare questo metodo'; $a->strings['Invalid form security token, please refresh the page.'] = 'Token di sicurezza invalido, aggiorna la pagina.'; $a->strings['The rule name and expression are required.'] = 'Il nome e l\'espressione della regola sono richiesti.'; diff --git a/advancedcontentfilter/lang/pl/messages.po b/advancedcontentfilter/lang/pl/messages.po index 5fc9ca65..9f0483c6 100644 --- a/advancedcontentfilter/lang/pl/messages.po +++ b/advancedcontentfilter/lang/pl/messages.po @@ -6,7 +6,7 @@ # Translators: # Waldemar Stoczkowski, 2018 # Joe Doe, 2021 -# Piotr Strębski , 2022 +# Bartosz Kozień, 2025 # #, fuzzy msgid "" @@ -15,8 +15,8 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-05-11 08:54-0400\n" "PO-Revision-Date: 2018-05-24 06:41+0000\n" -"Last-Translator: Piotr Strębski , 2022\n" -"Language-Team: Polish (https://www.transifex.com/Friendica/teams/12172/pl/)\n" +"Last-Translator: Bartosz Kozień, 2025\n" +"Language-Team: Polish (https://app.transifex.com/Friendica/teams/12172/pl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -126,7 +126,7 @@ msgstr "Anuluj" #: advancedcontentfilter.php:295 msgid "This addon requires this node having at least one post" -msgstr "Ten dodatek wymaga, aby ten węzeł miał co najmniej jeden wpis" +msgstr "Ten dodatek wymaga, aby ta instancja miała co najmniej jeden wpis" #: advancedcontentfilter.php:325 advancedcontentfilter.php:336 #: advancedcontentfilter.php:347 advancedcontentfilter.php:383 diff --git a/advancedcontentfilter/lang/pl/strings.php b/advancedcontentfilter/lang/pl/strings.php index 625819c1..57215c65 100644 --- a/advancedcontentfilter/lang/pl/strings.php +++ b/advancedcontentfilter/lang/pl/strings.php @@ -27,7 +27,7 @@ $a->strings['Add new rule'] = 'Dodaj nową regułę'; $a->strings['Rule Name'] = 'Nazwa reguły'; $a->strings['Rule Expression'] = 'Wyrażanie reguły'; $a->strings['Cancel'] = 'Anuluj'; -$a->strings['This addon requires this node having at least one post'] = 'Ten dodatek wymaga, aby ten węzeł miał co najmniej jeden wpis'; +$a->strings['This addon requires this node having at least one post'] = 'Ten dodatek wymaga, aby ta instancja miała co najmniej jeden wpis'; $a->strings['You must be logged in to use this method'] = 'Musisz być zalogowany, aby skorzystać z tej metody'; $a->strings['Invalid form security token, please refresh the page.'] = 'Nieprawidłowy token zabezpieczający formularz, odśwież stronę.'; $a->strings['The rule name and expression are required.'] = 'Nazwa reguły i wyrażenie są wymagane.'; diff --git a/advancedcontentfilter/src/middlewares.php b/advancedcontentfilter/src/middlewares.php deleted file mode 100644 index dffb9363..00000000 --- a/advancedcontentfilter/src/middlewares.php +++ /dev/null @@ -1,51 +0,0 @@ -. - * - */ - -use Friendica\DI; - -$container = $slim->getContainer(); - -// Error handler based off https://stackoverflow.com/a/48135009/757392 -$container['errorHandler'] = function () { - return function(Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, Exception $exception) - { - $responseCode = 500; - - if (is_a($exception, 'Friendica\Network\HTTPException')) { - $responseCode = $exception->getCode(); - } - - $errors['message'] = $exception->getMessage(); - - $errors['responseCode'] = $responseCode; - - return $response - ->withStatus($responseCode) - ->withJson($errors); - }; -}; - -$container['notFoundHandler'] = function () { - return function () - { - throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('Method not found')); - }; -}; diff --git a/advancedcontentfilter/src/routes.php b/advancedcontentfilter/src/routes.php deleted file mode 100644 index 09077bda..00000000 --- a/advancedcontentfilter/src/routes.php +++ /dev/null @@ -1,39 +0,0 @@ -. - * - */ - -/* @var $slim Slim\App */ -$slim->group('/advancedcontentfilter/api', function () { - /* @var $this Slim\App */ - $this->group('/rules', function () { - /* @var $this Slim\App */ - $this->get('', 'advancedcontentfilter_get_rules'); - $this->post('', 'advancedcontentfilter_post_rules'); - - $this->get('/{id}', 'advancedcontentfilter_get_rules_id'); - $this->put('/{id}', 'advancedcontentfilter_put_rules_id'); - $this->delete('/{id}', 'advancedcontentfilter_delete_rules_id'); - }); - - $this->group('/variables', function () { - /* @var $this Slim\App */ - $this->get('/{guid}', 'advancedcontentfilter_get_variables_guid'); - }); -}); diff --git a/advancedcontentfilter/templates/settings.tpl b/advancedcontentfilter/templates/settings.tpl index c9dfbe3a..8b82e595 100644 --- a/advancedcontentfilter/templates/settings.tpl +++ b/advancedcontentfilter/templates/settings.tpl @@ -3,7 +3,7 @@
'; + $header .= "\n" . '' . "\n"; +} + +function quickphoto_post_hook(&$item) { + // Placeholder +} \ No newline at end of file diff --git a/randplace/lang/bg/messages.po b/randplace/lang/bg/messages.po new file mode 100644 index 00000000..3fad2546 --- /dev/null +++ b/randplace/lang/bg/messages.po @@ -0,0 +1,27 @@ +# ADDON randplace +# Copyright (C) +# This file is distributed under the same license as the Friendica randplace addon package. +# +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:16-0500\n" +"PO-Revision-Date: 2014-06-23 12:34+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: bg\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: randplace.php:161 +msgid "Enable Randplace Addon" +msgstr "" + +#: randplace.php:166 +msgid "Randplace Settings" +msgstr "" diff --git a/randplace/lang/bg/strings.php b/randplace/lang/bg/strings.php new file mode 100644 index 00000000..d912b572 --- /dev/null +++ b/randplace/lang/bg/strings.php @@ -0,0 +1,7 @@ +\n" +"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: randplace.php:161 +msgid "Enable Randplace Addon" +msgstr "" + +#: randplace.php:166 +msgid "Randplace Settings" +msgstr "" diff --git a/randplace/lang/ca/strings.php b/randplace/lang/ca/strings.php index 120fab8c..d34874f6 100644 --- a/randplace/lang/ca/strings.php +++ b/randplace/lang/ca/strings.php @@ -1,5 +1,7 @@ -strings["Randplace Settings"] = "Configuració de Randplace"; -$a->strings["Enable Randplace Addon"] = "Habilitar el Addon de Randplace"; -$a->strings["Submit"] = "Enviar"; +\n" +"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: eo\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: randplace.php:161 +msgid "Enable Randplace Addon" +msgstr "" + +#: randplace.php:166 +msgid "Randplace Settings" +msgstr "" diff --git a/randplace/lang/eo/strings.php b/randplace/lang/eo/strings.php index 38e6ebfa..68e8a64c 100644 --- a/randplace/lang/eo/strings.php +++ b/randplace/lang/eo/strings.php @@ -1,5 +1,7 @@ -strings["Randplace Settings"] = "Randplace agordoj."; -$a->strings["Enable Randplace Addon"] = "Aktivigi la Randplace kromprogramon."; -$a->strings["Submit"] = "Sendi"; +\n" +"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: is\n" +"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" + +#: randplace.php:161 +msgid "Enable Randplace Addon" +msgstr "" + +#: randplace.php:166 +msgid "Randplace Settings" +msgstr "" diff --git a/randplace/lang/is/strings.php b/randplace/lang/is/strings.php index 85e49238..975c341e 100644 --- a/randplace/lang/is/strings.php +++ b/randplace/lang/is/strings.php @@ -1,5 +1,7 @@ -strings["Randplace Settings"] = "Stilla Randplace"; -$a->strings["Enable Randplace Addon"] = "Kveikja á Randplace einingu"; -$a->strings["Submit"] = "Senda inn"; +\n" +"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" + +#: randplace.php:161 +msgid "Enable Randplace Addon" +msgstr "" + +#: randplace.php:166 +msgid "Randplace Settings" +msgstr "" diff --git a/randplace/lang/ru/strings.php b/randplace/lang/ru/strings.php index 46733dc6..0579fc21 100644 --- a/randplace/lang/ru/strings.php +++ b/randplace/lang/ru/strings.php @@ -1,5 +1,7 @@ -strings["Randplace Settings"] = "Настройки Случайного места"; -$a->strings["Enable Randplace Addon"] = "Включить Randplace плагин"; -$a->strings["Submit"] = "Подтвердить"; +=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } +}} diff --git a/randplace/randplace.php b/randplace/randplace.php index 34f48c6c..89a75f98 100644 --- a/randplace/randplace.php +++ b/randplace/randplace.php @@ -19,9 +19,7 @@ * */ -use Friendica\App; use Friendica\Core\Hook; -use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; @@ -41,7 +39,7 @@ function randplace_install() Hook::register('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings'); Hook::register('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post'); - Logger::notice("installed randplace"); + DI::logger()->notice("installed randplace"); } function randplace_uninstall() @@ -51,7 +49,7 @@ function randplace_uninstall() * * Except hooks, they are all unregistered automatically and don't need to be unregistered manually. */ - Logger::notice("removed randplace"); + DI::logger()->notice("removed randplace"); } function randplace_post_hook(&$item) @@ -62,7 +60,7 @@ function randplace_post_hook(&$item) * - A status post by a profile owner * - The profile owner must have allowed our addon */ - Logger::notice('randplace invoked'); + DI::logger()->notice('randplace invoked'); if (!DI::userSession()->getLocalUserId()) { /* non-zero if this is a logged in user of this system */ diff --git a/ratioed/RatioedPanel.php b/ratioed/RatioedPanel.php new file mode 100644 index 00000000..37e692a5 --- /dev/null +++ b/ratioed/RatioedPanel.php @@ -0,0 +1,323 @@ +getArgv()[1]) and DI::args()->getArgv()[1] === 'help') { + $template = Renderer::getMarkupTemplate('/help.tpl', 'addon/ratioed/'); + return Renderer::replaceMacros($template, array('$config' => DI::baseUrl() . '/settings/addon')); + } + + $uid = $this->parameters['uid'] ?? 0; + $user = []; + + if ($uid) { + $user = User::getById($uid, ['username', 'blocked']); + if (!$user) { + $this->systemMessages->addNotice($this->t('User not found')); + $this->baseUrl->redirect('ratioed'); + } + } + + $pager = new Pager($this->l10n, $this->args->getQueryString(), 100); + + $valid_orders = [ + 'name', + 'email', + 'register_date', + 'last-activity', + 'last-item', + 'page-flags', + ]; + + $order = 'last-item'; + $order_direction = '-'; + if (!empty($_REQUEST['o'])) { + $new_order = $_REQUEST['o']; + if ($new_order[0] !== '-') { + $order_direction = '+'; + $new_order = substr($new_order, 1); + } + + if (in_array($new_order, $valid_orders)) { + $order = $new_order; + } + } + + $users = User::getList($pager->getStart(), $pager->getItemsPerPage(), 'active', $order, ($order_direction == '-')); + + $users = array_map($this->setupUserCallback(), $users); + + $header_titles = [ + $this->t('Name'), + $this->t('Email'), + $this->t('Register date'), + $this->t('Last login'), + $this->t('Last public item'), + $this->t('Type'), + $this->t('Blocked by'), + $this->t('Comments last 24h'), + $this->t('Reactions last 24h'), + $this->t('Ratio last 24h'), + $this->t('Replies last month'), + $this->t('Reply likes'), + $this->t('Respondee likes'), + $this->t('OP likes'), + $this->t('Reply guy score'), + ]; + $field_names = [ + 'name', + 'email', + 'register_date', + 'login_date', + 'lastitem_date', + 'page_flags', + 'blocked_by', + 'comments', + 'reactions', + 'ratio', + 'reply_count', + 'reply_likes', + 'reply_respondee_likes', + 'reply_op_likes', + 'reply_guy_score', + ]; + $th_users = array_map(null, $header_titles, $valid_orders, $field_names); + + $count = $this->database->count('user', ["`verified` AND NOT `blocked` AND NOT `account_removed` AND NOT `account_expired` AND `uid` != ?", 0]); + + $t = Renderer::getMarkupTemplate('ratioed.tpl', 'addon/ratioed'); + return self::getTabsHTML('ratioed') . Renderer::replaceMacros($t, [ + // strings // + '$title' => $this->t('Moderation'), + '$help_url' => $this->baseUrl . '/ratioed/help', + '$page' => $this->t('Behaviour'), + '$select_all' => $this->t('select all'), + '$delete' => $this->t('Delete'), + '$block' => $this->t('Block'), + '$blocked' => $this->t('User blocked'), + '$siteadmin' => $this->t('Site admin'), + '$accountexpired' => $this->t('Account expired'), + '$h_newuser' => $this->t('Create a new user'), + + '$th_users' => $th_users, + '$order_users' => $order, + '$order_direction_users' => $order_direction, + + '$confirm_delete_multi' => $this->t('Selected users will be deleted!\n\nEverything these users had posted on this site will be permanently deleted!\n\nAre you sure?'), + '$confirm_delete' => $this->t('The user {0} will be deleted!\n\nEverything this user has posted on this site will be permanently deleted!\n\nAre you sure?'), + + '$form_security_token' => self::getFormSecurityToken('moderation_users_active'), + + // values // + '$baseurl' => $this->baseUrl, + '$query_string' => $this->args->getQueryString(), + + '$users' => $users, + '$count' => $count, + '$pager' => $pager->renderFull($count), + ]); + } + + protected function getReplyGuyRow($contact_uid) + { + $like_vid = Verb::getID(Activity::LIKE); + $post_vid = Verb::getID(Activity::POST); + + /* + * This is a complicated query. + * + * The innermost select retrieves a chain of four posts: an + * original post, a target comment (possibly deep down in the + * thread), a reply from our user, and a like for that reply. + * If there's no like, we still want to count the reply, so we + * use an outer join. + * + * The second select adds "points" for different kinds of + * likes. The outermost select then counts up these points, + * and the number of distinct replies. + */ + $reply_guy_result = DBA::p(' +SELECT + COUNT(distinct reply_id) AS replies_total, + SUM(like_point) AS like_total, + SUM(target_like_point) AS target_like_total, + SUM(original_like_point) AS original_like_total +FROM ( + SELECT + reply_id, + like_date, + like_date IS NOT NULL AS like_point, + like_author = target_author AS target_like_point, + like_author = original_author AS original_like_point + FROM ( + SELECT + original_post.`uri-id` AS original_id, + original_post.`author-id` AS original_author, + original_post.created AS original_date, + target_post.`uri-id` AS target_id, + target_post.`author-id` AS target_author, + target_post.created AS target_date, + reply_post.`uri-id` AS reply_id, + reply_post.`author-id` AS reply_author, + reply_post.created AS reply_date, + like_post.`uri-id` AS like_id, + like_post.`author-id` AS like_author, + like_post.created AS like_date + FROM + post AS original_post + JOIN + post AS target_post + ON + original_post.`uri-id` = target_post.`parent-uri-id` + JOIN + post AS reply_post + ON + target_post.`uri-id` = reply_post.`thr-parent-id` AND + reply_post.`author-id` = ? AND + reply_post.`author-id` != target_post.`author-id` AND + reply_post.`author-id` != original_post.`author-id` AND + reply_post.`uri-id` != reply_post.`thr-parent-id` AND + reply_post.vid = ? AND + reply_post.created > CURDATE() - INTERVAL 1 MONTH + LEFT OUTER JOIN + post AS like_post + ON + reply_post.`uri-id` = like_post.`thr-parent-id` AND + like_post.vid = ? AND + like_post.`author-id` != reply_post.`author-id` + ) AS post_meta +) AS reply_counts +', $contact_uid, $post_vid, $like_vid); + return $reply_guy_result; + } + + // https://stackoverflow.com/a/48283297/235936 + protected function sigFig($value, $digits) + { + if ($value == 0) { + $decimalPlaces = $digits - 1; + } elseif ($value < 0) { + $decimalPlaces = $digits - floor(log10($value * -1)) - 1; + } else { + $decimalPlaces = $digits - floor(log10($value)) - 1; + } + + $answer = ($decimalPlaces > 0) ? + number_format($value, $decimalPlaces) : round($value, $decimalPlaces); + return $answer; + } + + protected function fillReplyGuyData(&$user) + { + $reply_guy_result = $this->getReplyGuyRow($user['user_contact_uid']); + if (DBA::isResult($reply_guy_result)) { + $reply_guy_result_row = DBA::fetch($reply_guy_result); + $user['reply_count'] = (int) $reply_guy_result_row['replies_total'] ?? 0; + $user['reply_likes'] = (int) $reply_guy_result_row['like_total'] ?? 0; + $user['reply_respondee_likes'] = (int) $reply_guy_result_row['target_like_total'] ?? 0; + $user['reply_op_likes'] = (int) $reply_guy_result_row['original_like_total'] ?? 0; + + $denominator = $user['reply_likes'] + $user['reply_respondee_likes'] + $user['reply_op_likes']; + if ($user['reply_count'] === 0) { + $user['reply_guy'] = false; + $user['reply_guy_score'] = 0; + } elseif ($denominator == 0) { + $user['reply_guy'] = true; + $user['reply_guy_score'] = '∞'; + } else { + $reply_guy_score = $user['reply_count'] / $denominator; + $user['reply_guy'] = $reply_guy_score >= 1.0; + $user['reply_guy_score'] = $this->sigFig($reply_guy_score, 2); + } + } else { + $user['reply_count'] = "error"; + $user['reply_likes'] = "error"; + $user['reply_respondee_likes'] = "error"; + $user['reply_op_likes'] = "error"; + $user['reply_guy'] = false; + $user['reply_guy_score'] = 0; + } + } + + protected function setupUserCallback(): \Closure + { + DI::logger()->debug("ratioed: setupUserCallback"); + $parentCallback = parent::setupUserCallback(); + return function ($user) use ($parentCallback) { + $blocked_count = DBA::count('user-contact', ['uid' => $user['uid'], 'is-blocked' => 1]); + $user['blocked_by'] = $blocked_count; + + $self_contact_result = DBA::p('SELECT admin_contact.id AS user_contact_uid FROM contact AS admin_contact JOIN contact AS user_contact ON admin_contact.`uri-id` = user_contact.`uri-id` AND admin_contact.self = 0 AND user_contact.self = 1 WHERE user_contact.uid = ?', $user['uid']); + if (DBA::isResult($self_contact_result)) { + $self_contact_result_row = DBA::fetch($self_contact_result); + $user['user_contact_uid'] = $self_contact_result_row['user_contact_uid']; + } else { + $user['user_contact_uid'] = null; + } + + if ($user['user_contact_uid']) { + $post_engagement_result = DBA::p('SELECT SUM(`comments`) AS `comment_count`, SUM(`activities`) AS `activities_count` FROM `post-engagement` WHERE `post-engagement`.created > DATE_SUB(now(), INTERVAL 1 DAY) AND `post-engagement`.`owner-id` = ?', $user['user_contact_uid']); + if (DBA::isResult($post_engagement_result)) { + $post_engagement_result_row = DBA::fetch($post_engagement_result); + $user['comments'] = $post_engagement_result_row['comment_count']; + $user['reactions'] = $post_engagement_result_row['activities_count']; + if ($user['reactions'] > 0) { + $user['ratio'] = number_format($user['comments'] / $user['reactions'], 1, '.', ''); + $user['ratioed'] = (float)($user['ratio']) >= 2.0; + } else { + $user['reactions'] = 0; + if ($user['comments'] == 0) { + $user['comments'] = 0; + $user['ratio'] = 0; + $user['ratioed'] = false; + } else { + $user['ratio'] = '∞'; + $user['ratioed'] = false; + } + } + } else { + $user['comments'] = 'error'; + $user['reactions'] = 'error'; + $user['ratio'] = 'error'; + $user['ratioed'] = false; + } + } else { + $user['comments'] = 'error'; + $user['reactions'] = 'error'; + $user['ratio'] = 'error'; + $user['ratioed'] = false; + } + + $this->fillReplyGuyData($user); + + $user = $parentCallback($user); + DI::logger()->debug("ratioed: setupUserCallback", [ + 'uid' => $user['uid'], + 'blocked_by' => $user['blocked_by'], + 'comments' => $user['comments'], + 'reactions' => $user['reactions'], + 'ratio' => $user['ratio'], + 'ratioed' => $user['ratioed'], + ]); + return $user; + }; + } +} diff --git a/ratioed/lang/C/messages.po b/ratioed/lang/C/messages.po new file mode 100644 index 00000000..58e61175 --- /dev/null +++ b/ratioed/lang/C/messages.po @@ -0,0 +1,130 @@ +# ADDON ratioed +# Copyright (C) +# This file is distributed under the same license as the Friendica ratioed addon package. +# +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-11-08 13:50+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: RatioedPanel.php:34 +msgid "User not found" +msgstr "" + +#: RatioedPanel.php:69 +msgid "Name" +msgstr "" + +#: RatioedPanel.php:70 +msgid "Email" +msgstr "" + +#: RatioedPanel.php:71 +msgid "Register date" +msgstr "" + +#: RatioedPanel.php:72 +msgid "Last login" +msgstr "" + +#: RatioedPanel.php:73 +msgid "Last public item" +msgstr "" + +#: RatioedPanel.php:74 +msgid "Type" +msgstr "" + +#: RatioedPanel.php:75 +msgid "Blocked by" +msgstr "" + +#: RatioedPanel.php:76 +msgid "Comments last 24h" +msgstr "" + +#: RatioedPanel.php:77 +msgid "Reactions last 24h" +msgstr "" + +#: RatioedPanel.php:78 +msgid "Ratio last 24h" +msgstr "" + +#: RatioedPanel.php:79 +msgid "Replies last month" +msgstr "" + +#: RatioedPanel.php:80 +msgid "Reply likes" +msgstr "" + +#: RatioedPanel.php:81 +msgid "Respondee likes" +msgstr "" + +#: RatioedPanel.php:82 +msgid "OP likes" +msgstr "" + +#: RatioedPanel.php:83 +msgid "Reply guy score" +msgstr "" + +#: RatioedPanel.php:109 +msgid "Moderation" +msgstr "" + +#: RatioedPanel.php:111 ratioed.php:39 +msgid "Behaviour" +msgstr "" + +#: RatioedPanel.php:112 +msgid "select all" +msgstr "" + +#: RatioedPanel.php:113 +msgid "Delete" +msgstr "" + +#: RatioedPanel.php:114 +msgid "Block" +msgstr "" + +#: RatioedPanel.php:115 +msgid "User blocked" +msgstr "" + +#: RatioedPanel.php:116 +msgid "Site admin" +msgstr "" + +#: RatioedPanel.php:117 +msgid "Account expired" +msgstr "" + +#: RatioedPanel.php:118 +msgid "Create a new user" +msgstr "" + +#: RatioedPanel.php:124 +msgid "Selected users will be deleted!\\n\\nEverything these users had posted on this site will be permanently deleted!\\n\\nAre you sure?" +msgstr "" + +#: RatioedPanel.php:125 +msgid "The user {0} will be deleted!\\n\\nEverything this user has posted on this site will be permanently deleted!\\n\\nAre you sure?" +msgstr "" + +#: ratioed.php:42 +msgid "Statistics about users behaviour" +msgstr "" diff --git a/ratioed/ratioed.php b/ratioed/ratioed.php new file mode 100644 index 00000000..5cc6d539 --- /dev/null +++ b/ratioed/ratioed.php @@ -0,0 +1,57 @@ + + */ + +use Friendica\Addon\ratioed\RatioedPanel; +use Friendica\Core\Hook; +use Friendica\DI; + +/** + * Sets up the addon hooks and updates data in the database if needed + */ +function ratioed_install() +{ + Hook::register('moderation_users_tabs', 'addon/ratioed/ratioed.php', 'ratioed_users_tabs'); + + DI::logger()->info("ratioed: installed"); +} + +/** + * This is a statement rather than an actual function definition. The simple + * existence of this method is checked to figure out if the addon offers a + * module. + */ +function ratioed_module() {} + +/** + * @brief Adds additional users tab to the moderation panel + * + * @param array $arr Parameters, including "tabs" which is the list to modify, and "selectedTab", which is the currently selected tab ID + */ +function ratioed_users_tabs(array &$arr) { + DI::logger()->debug("ratioed: users tabs"); + + array_push($arr['tabs'], [ + 'label' => DI::l10n()->t('Behaviour'), + 'url' => 'ratioed', + 'sel' => $arr['selectedTab'] == 'ratioed' ? 'active' : '', + 'title' => DI::l10n()->t('Statistics about users behaviour'), + 'id' => 'admin-users-ratioed', + 'accesskey' => 'r', + ]); +} + +/** + * @brief Displays the ratioed tab in the moderation panel + */ +function ratioed_content() { + DI::logger()->debug("ratioed: content"); + + $ratioed = DI::getDice()->create(RatioedPanel::class, [$_SERVER]); + $httpException = DI::getDice()->create(Friendica\Module\Special\HTTPException::class); + $ratioed->run($httpException); +} diff --git a/ratioed/templates/help.tpl b/ratioed/templates/help.tpl new file mode 100644 index 00000000..0d012ca7 --- /dev/null +++ b/ratioed/templates/help.tpl @@ -0,0 +1,145 @@ +
+
+

Ratioed Plugin Help

+

+ This plugin provides moderators with additional statistics about + the behaviour of users. These may be useful as early warning signs + that warrant more carefully watching the behaviour of a user. They + are not suitable as a trigger for instantly blocking, + muting, or reporting a user, since they lack context. +

+

+ The name of the plugin comes + from "The + Ratio", a well-known quick rule of thumb: +

+
+ If the Replies:RT ratio is greater than 2:1, you done messed up. +
+

+ To "get ratioed" is to receive a large number of comments in a short + space of time, with relatively few likes or boosts. If commenters + were enthusiastic about the posts, they would also have liked or + boosted them. Receiving many comments without such likes or boosts + indicates the comments were probably angry. This anger may or may + not be justified, but either way this is probably something + moderators should be aware of. +

+

+ This plugin allows viewing of an actual ratio, calculated over the + last 24 hours. This is a useful timeframe for sudden dogpiling + events that moderators might not otherwise notice. The plugin + also calculates other statistics. +

+

Explanation of Statistics

+

Blocked by

+

+ This summarises the number of users on remote servers that have + blocked this user. +

+

+ Note that the ActivityPub spec expressly says that + implementations "SHOULD NOT" forward such block messages to + remote servers. Nevertheless some implementations do this + anyway, notably Mastodon. This statistic can only count block + messages from servers that do this, as well as blocks from local + users. As such, it is usually an undercount. +

+

+ The reason the spec recommends against forwarding these messages + is that they can lead to retaliation. For this reason, this + plugin deliberately does not provide any way to investigate + exactly who blocked the user. +

+

Comments last 24h

+

+ This gives the number of comments made on the top-level posts that + this user made within the last 24 hours. +

+

Reactions last 24h

+

+ This collects the number of likes, boosts, or other "one-click" + interactions made on the user's top-level posts within the last 24 + hours. +

+

Ratio last 24h

+

+ This is the ratio between "Comments last 24h" and "Reactions last + 24h". It is intended to approximate the traditional ratio as + understood on Twitter. +

+

Replies last month

+

+ This is the number of times the user posted a reply to someone + else, on a thread the user did not start, any time in the last + month. +

+

Reply likes

+

+ This is the number of likes received by the user on their + replies to other people's posts in the last month. Replies that + receive likes can be assumed to be more of a valuable + contribution than replies that do not. +

+

Respondee likes

+

+ The number of times in the last month the user replied to + someone else's comment and that person then liked the reply. + Likes to replies are not necessarily a positive thing, but if + the person you're replying to approves the reply, that's a very + good sign. Of course it's also common in a debate for neither + side to like the other side's comments without that indicating + an unhealthy interaction, so interpret this statistic cautiously. +

+

OP likes

+

+ The number of times in the last month the user replied on a + thread and the original poster that started the thread liked the + reply. While there is no formal concept of "ownership" of a + thread, conventionally the original poster is assumed to have + started the thread for a reason, and making replies that do not + fulfil that purpose are bad etiquette. Getting approval from + the original poster therefore is a good sign that the user is + posting replies that are wanted. +

+

Reply guy score

+

+ A "reply + guy" is a common Internet phenomenon of people + (disproportionately male) posting unwanted comments on other + (disproportionately female) people's threads, derailing the + conversation. This score loosely quantifies this phenomenon, + as the ratio betwen the number of replies and the sum of likes, + respondee likes, and OP likes. This formula gives extra weight + to particularly relevant likes: a reply to a top-level post that + is liked by the original poster scores the maximum of 3 + "points". A score above 1.0 might indicate cause for concern + for moderators. +

+

+ Since this is indicative of long-term behaviour, the score is + calculated over a month instead of 24 hours. +

+

+

Performance

+

+ The statistics are computed from scratch each time the page loads. + It's possible that this might put a heavy load on the database, and + the page may take a long time to load. +

+

Extending

+

+ Suggestions for additional statistics are welcome, especially from + moderators. This plugin should be considered a sandbox for + experimentation, so it is not necessary to prove that any statistic + is correlated with unwanted behaviour. +

+

+ However, this plugin does deal with potentially sensitive + information. Even if moderators do in principle have access to all + information, it should not necessarily be highlighted. Statistics + should be kept anonymous and neutral. Also, they should be + presented only to moderators, not to the users themselves. +

+
+
diff --git a/ratioed/templates/ratioed.tpl b/ratioed/templates/ratioed.tpl new file mode 100644 index 00000000..2413ed9d --- /dev/null +++ b/ratioed/templates/ratioed.tpl @@ -0,0 +1,131 @@ + + + +
+

+ {{$title}} - {{$page}} ({{$count}}) + +

+
+ + + + + + + {{foreach $th_users as $k=>$th}} + {{if $k < 2 || $order_users == $th.1 || ($k==4 && !in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.5.1])) }} + + {{/if}} + {{/foreach}} + + + + + {{foreach $users as $u}} + + + + + + {{if $order_users == $th_users.2.1}} + + {{/if}} + + {{if $order_users == $th_users.3.1}} + + {{/if}} + + {{if $order_users == $th_users.5.1}} + + {{/if}} + + {{if !in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.5.1]) }} + + {{/if}} + + + + + + + + + {{/foreach}} + +
+ + {{if $order_users == $th.1}} + {{if $order_direction_users == "+"}} + ↓ + {{else}} + ↑ + {{/if}} + {{else}} + ↕ + {{/if}} + {{$th.0}} + +
{{$u.name}}{{$u.email}}{{$u.register_date}}{{$u.login_date}} + + + {{if $u.page_flags_raw==0 && $u.account_type_raw > 0}} + + {{/if}} + {{if $u.is_admin}}{{/if}} + {{if $u.account_expired}}{{/if}} + {{$u.lastitem_date}} + +
+ {{$pager nofilter}} +
+
diff --git a/rendertime/lang/bg/messages.po b/rendertime/lang/bg/messages.po new file mode 100644 index 00000000..f55f683f --- /dev/null +++ b/rendertime/lang/bg/messages.po @@ -0,0 +1,53 @@ +# ADDON rendertime +# Copyright (C) +# This file is distributed under the same license as the Friendica rendertime addon package. +# +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-12-12 22:09+0000\n" +"PO-Revision-Date: 2014-06-23 12:36+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: bg\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: rendertime.php:30 +msgid "Save Settings" +msgstr "" + +#: rendertime.php:31 +msgid "Show callstack" +msgstr "" + +#: rendertime.php:31 +msgid "" +"Show detailed performance measures in the callstack. When deactivated, only " +"the summary will be displayed." +msgstr "" + +#: rendertime.php:32 +msgid "Minimal time" +msgstr "" + +#: rendertime.php:32 +msgid "Minimal time that an activity needs to be listed in the callstack." +msgstr "" + +#: rendertime.php:57 +#, php-format +msgid "" +"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " +"%s, Total: %s" +msgstr "" + +#: rendertime.php:74 +#, php-format +msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" +msgstr "" diff --git a/rendertime/lang/bg/strings.php b/rendertime/lang/bg/strings.php new file mode 100644 index 00000000..d912b572 --- /dev/null +++ b/rendertime/lang/bg/strings.php @@ -0,0 +1,7 @@ +\n" +"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: rendertime.php:30 +msgid "Save Settings" +msgstr "" + +#: rendertime.php:31 +msgid "Show callstack" +msgstr "" + +#: rendertime.php:31 +msgid "" +"Show detailed performance measures in the callstack. When deactivated, only " +"the summary will be displayed." +msgstr "" + +#: rendertime.php:32 +msgid "Minimal time" +msgstr "" + +#: rendertime.php:32 +msgid "Minimal time that an activity needs to be listed in the callstack." +msgstr "" + +#: rendertime.php:57 +#, php-format +msgid "" +"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " +"%s, Total: %s" +msgstr "" + +#: rendertime.php:74 +#, php-format +msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" +msgstr "" diff --git a/rendertime/lang/ca/strings.php b/rendertime/lang/ca/strings.php index ab4fa67a..d34874f6 100644 --- a/rendertime/lang/ca/strings.php +++ b/rendertime/lang/ca/strings.php @@ -1,2 +1,7 @@ -\n" +"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: eo\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: rendertime.php:30 +msgid "Save Settings" +msgstr "" + +#: rendertime.php:31 +msgid "Show callstack" +msgstr "" + +#: rendertime.php:31 +msgid "" +"Show detailed performance measures in the callstack. When deactivated, only " +"the summary will be displayed." +msgstr "" + +#: rendertime.php:32 +msgid "Minimal time" +msgstr "" + +#: rendertime.php:32 +msgid "Minimal time that an activity needs to be listed in the callstack." +msgstr "" + +#: rendertime.php:57 +#, php-format +msgid "" +"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " +"%s, Total: %s" +msgstr "" + +#: rendertime.php:74 +#, php-format +msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" +msgstr "" diff --git a/rendertime/lang/eo/strings.php b/rendertime/lang/eo/strings.php index ab4fa67a..68e8a64c 100644 --- a/rendertime/lang/eo/strings.php +++ b/rendertime/lang/eo/strings.php @@ -1,2 +1,7 @@ -\n" +"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: et\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: rendertime.php:30 +msgid "Save Settings" +msgstr "" + +#: rendertime.php:31 +msgid "Show callstack" +msgstr "" + +#: rendertime.php:31 +msgid "" +"Show detailed performance measures in the callstack. When deactivated, only " +"the summary will be displayed." +msgstr "" + +#: rendertime.php:32 +msgid "Minimal time" +msgstr "" + +#: rendertime.php:32 +msgid "Minimal time that an activity needs to be listed in the callstack." +msgstr "" + +#: rendertime.php:57 +#, php-format +msgid "" +"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " +"%s, Total: %s" +msgstr "" + +#: rendertime.php:74 +#, php-format +msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" +msgstr "" diff --git a/rendertime/lang/et/strings.php b/rendertime/lang/et/strings.php new file mode 100644 index 00000000..dfe78358 --- /dev/null +++ b/rendertime/lang/et/strings.php @@ -0,0 +1,7 @@ +, 2022 # Nicolas Derive, 2022 # Thecross, 2017 @@ -13,8 +14,8 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-12 22:09+0000\n" "PO-Revision-Date: 2014-06-23 12:36+0000\n" -"Last-Translator: Nicolas Derive, 2022\n" -"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" +"Last-Translator: cracrayol, 2025\n" +"Language-Team: French (http://app.transifex.com/Friendica/friendica/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -23,7 +24,7 @@ msgstr "" #: rendertime.php:30 msgid "Save Settings" -msgstr "Enregistrer les paramètres" +msgstr "Sauvegarder les paramètres" #: rendertime.php:31 msgid "Show callstack" diff --git a/rendertime/lang/fr/strings.php b/rendertime/lang/fr/strings.php index d6aed6fa..2d21fdad 100644 --- a/rendertime/lang/fr/strings.php +++ b/rendertime/lang/fr/strings.php @@ -5,7 +5,7 @@ function string_plural_select_fr($n){ $n = intval($n); if (($n == 0 || $n == 1)) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } }} -$a->strings['Save Settings'] = 'Enregistrer les paramètres'; +$a->strings['Save Settings'] = 'Sauvegarder les paramètres'; $a->strings['Show callstack'] = 'Afficher le callstack'; $a->strings['Show detailed performance measures in the callstack. When deactivated, only the summary will be displayed.'] = 'Affiche les performances détaillées dans le callstack. Si désactivé, seul le résumé sera affiché.'; $a->strings['Minimal time'] = 'Temps minimal'; diff --git a/rendertime/lang/gd/messages.po b/rendertime/lang/gd/messages.po new file mode 100644 index 00000000..9362eb06 --- /dev/null +++ b/rendertime/lang/gd/messages.po @@ -0,0 +1,53 @@ +# ADDON rendertime +# Copyright (C) +# This file is distributed under the same license as the Friendica rendertime addon package. +# +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-12-12 22:09+0000\n" +"PO-Revision-Date: 2014-06-23 12:36+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: gd\n" +"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" + +#: rendertime.php:30 +msgid "Save Settings" +msgstr "" + +#: rendertime.php:31 +msgid "Show callstack" +msgstr "" + +#: rendertime.php:31 +msgid "" +"Show detailed performance measures in the callstack. When deactivated, only " +"the summary will be displayed." +msgstr "" + +#: rendertime.php:32 +msgid "Minimal time" +msgstr "" + +#: rendertime.php:32 +msgid "Minimal time that an activity needs to be listed in the callstack." +msgstr "" + +#: rendertime.php:57 +#, php-format +msgid "" +"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " +"%s, Total: %s" +msgstr "" + +#: rendertime.php:74 +#, php-format +msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" +msgstr "" diff --git a/rendertime/lang/gd/strings.php b/rendertime/lang/gd/strings.php new file mode 100644 index 00000000..dcbcfe0a --- /dev/null +++ b/rendertime/lang/gd/strings.php @@ -0,0 +1,7 @@ + 2 && $n < 20)) { return 2; } else { return 3; } +}} diff --git a/rendertime/lang/is/messages.po b/rendertime/lang/is/messages.po new file mode 100644 index 00000000..9812a11f --- /dev/null +++ b/rendertime/lang/is/messages.po @@ -0,0 +1,53 @@ +# ADDON rendertime +# Copyright (C) +# This file is distributed under the same license as the Friendica rendertime addon package. +# +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-12-12 22:09+0000\n" +"PO-Revision-Date: 2014-06-23 12:36+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: is\n" +"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" + +#: rendertime.php:30 +msgid "Save Settings" +msgstr "" + +#: rendertime.php:31 +msgid "Show callstack" +msgstr "" + +#: rendertime.php:31 +msgid "" +"Show detailed performance measures in the callstack. When deactivated, only " +"the summary will be displayed." +msgstr "" + +#: rendertime.php:32 +msgid "Minimal time" +msgstr "" + +#: rendertime.php:32 +msgid "Minimal time that an activity needs to be listed in the callstack." +msgstr "" + +#: rendertime.php:57 +#, php-format +msgid "" +"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " +"%s, Total: %s" +msgstr "" + +#: rendertime.php:74 +#, php-format +msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" +msgstr "" diff --git a/rendertime/lang/is/strings.php b/rendertime/lang/is/strings.php index ab4fa67a..975c341e 100644 --- a/rendertime/lang/is/strings.php +++ b/rendertime/lang/is/strings.php @@ -1,2 +1,7 @@ -\n" +"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" + +#: rendertime.php:30 +msgid "Save Settings" +msgstr "" + +#: rendertime.php:31 +msgid "Show callstack" +msgstr "" + +#: rendertime.php:31 +msgid "" +"Show detailed performance measures in the callstack. When deactivated, only " +"the summary will be displayed." +msgstr "" + +#: rendertime.php:32 +msgid "Minimal time" +msgstr "" + +#: rendertime.php:32 +msgid "Minimal time that an activity needs to be listed in the callstack." +msgstr "" + +#: rendertime.php:57 +#, php-format +msgid "" +"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " +"%s, Total: %s" +msgstr "" + +#: rendertime.php:74 +#, php-format +msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" +msgstr "" diff --git a/rendertime/lang/ru/strings.php b/rendertime/lang/ru/strings.php index ab4fa67a..0579fc21 100644 --- a/rendertime/lang/ru/strings.php +++ b/rendertime/lang/ru/strings.php @@ -1,2 +1,7 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } +}} diff --git a/rendertime/rendertime.php b/rendertime/rendertime.php index 731cf003..4523d911 100644 --- a/rendertime/rendertime.php +++ b/rendertime/rendertime.php @@ -7,7 +7,6 @@ * */ -use Friendica\App; use Friendica\Core\Hook; use Friendica\Core\Renderer; use Friendica\DI; @@ -60,7 +59,7 @@ function rendertime_page_end(string &$o) if (DI::userSession()->isSiteAdmin() && (($_GET['mode'] ?? '') != 'minimal') && !DI::mode()->isMobile() && !DI::mode()->isMobile() && !$ignored) { - $o = $o . '
' . DI::l10n()->t("Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: %s, Total: %s", + $o = $o . '