diff --git a/bin/worker.php b/bin/worker.php index 841ac3574a..29fd5a4fb7 100755 --- a/bin/worker.php +++ b/bin/worker.php @@ -15,7 +15,6 @@ if (php_sapi_name() !== 'cli') { } use Dice\Dice; -use Friendica\App; use Friendica\App\Mode; use Friendica\Core\Logger\Capability\LogChannel; use Friendica\Core\Update; @@ -57,7 +56,7 @@ DI::mode()->setExecutor(Mode::WORKER); Update::check(DI::basePath(), true); // Quit when in maintenance -if (!DI::mode()->has(App\Mode::MAINTENANCEDISABLED)) { +if (!DI::mode()->has(Mode::MAINTENANCEDISABLED)) { return; } diff --git a/mod/item.php b/mod/item.php index 445e2ebc22..decb957bcc 100644 --- a/mod/item.php +++ b/mod/item.php @@ -16,7 +16,7 @@ * information. */ -use Friendica\App; +use Friendica\AppHelper; use Friendica\Content\Conversation; use Friendica\Content\Text\BBCode; use Friendica\Core\Hook; @@ -284,7 +284,7 @@ function item_process(array $post, array $request, bool $preview, string $return unset($post['api_source']); if (!empty($request['scheduled_at'])) { - $scheduled_at = DateTimeFormat::convert($request['scheduled_at'], 'UTC', DI::app()->getTimeZone()); + $scheduled_at = DateTimeFormat::convert($request['scheduled_at'], 'UTC', DI::appHelper()->getTimeZone()); if ($scheduled_at > DateTimeFormat::utcNow()) { unset($post['created']); unset($post['edited']); @@ -330,7 +330,7 @@ function item_post_return($baseurl, $return_path) System::jsonExit($json); } -function item_content(App $a) +function item_content(AppHelper $appHelper) { if (!DI::userSession()->isAuthenticated()) { throw new HTTPException\UnauthorizedException(); diff --git a/mod/lostpass.php b/mod/lostpass.php index b16a4e10ec..940546d951 100644 --- a/mod/lostpass.php +++ b/mod/lostpass.php @@ -7,7 +7,7 @@ * */ -use Friendica\App; +use Friendica\AppHelper; use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\DI; @@ -15,7 +15,7 @@ use Friendica\Model\User; use Friendica\Util\DateTimeFormat; use Friendica\Util\Strings; -function lostpass_post(App $a) +function lostpass_post(AppHelper $a) { $loginame = trim($_POST['login-name']); if (!$loginame) { @@ -78,7 +78,7 @@ function lostpass_post(App $a) DI::baseUrl()->redirect(); } -function lostpass_content(App $a) +function lostpass_content(AppHelper $appHelper) { if (DI::args()->getArgc() > 1) { $pwdreset_token = DI::args()->getArgv()[1]; diff --git a/mod/notes.php b/mod/notes.php index 27e7a9dc76..b61cb97850 100644 --- a/mod/notes.php +++ b/mod/notes.php @@ -7,7 +7,7 @@ * */ -use Friendica\App; +use Friendica\AppHelper; use Friendica\Content\Conversation; use Friendica\Content\Nav; use Friendica\Content\Pager; @@ -17,7 +17,7 @@ use Friendica\Model\Item; use Friendica\Model\Post; use Friendica\Module\BaseProfile; -function notes_init(App $a) +function notes_init(AppHelper $appHelper) { if (! DI::userSession()->getLocalUserId()) { return; @@ -27,7 +27,7 @@ function notes_init(App $a) } -function notes_content(App $a, bool $update = false) +function notes_content(AppHelper $appHelper, bool $update = false) { if (!DI::userSession()->getLocalUserId()) { DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); @@ -46,11 +46,11 @@ function notes_content(App $a, bool $update = false) 'acl_data' => '', ]; - $o .= DI::conversation()->statusEditor($x, $a->getContactId()); + $o .= DI::conversation()->statusEditor($x, $appHelper->getContactId()); } $condition = ['uid' => DI::userSession()->getLocalUserId(), 'post-type' => Item::PT_PERSONAL_NOTE, 'gravity' => Item::GRAVITY_PARENT, - 'contact-id'=> $a->getContactId()]; + 'contact-id'=> $appHelper->getContactId()]; if (DI::mode()->isMobile()) { $itemsPerPage = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'itemspage_mobile_network', diff --git a/mod/update_contact.php b/mod/update_contact.php index 76993c0ce3..30212e5589 100644 --- a/mod/update_contact.php +++ b/mod/update_contact.php @@ -9,14 +9,14 @@ * */ -use Friendica\App; +use Friendica\AppHelper; use Friendica\Core\System; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Post; use Friendica\Model\Contact; -function update_contact_content(App $a) +function update_contact_content(AppHelper $appHelper) { if (!empty(DI::args()->get(1)) && !empty($_GET['force'])) { $contact = DBA::selectFirst('account-user-view', ['pid', 'deleted'], ['id' => DI::args()->get(1)]); diff --git a/mod/update_notes.php b/mod/update_notes.php index de455f5f00..93b5e95207 100644 --- a/mod/update_notes.php +++ b/mod/update_notes.php @@ -8,13 +8,12 @@ * AJAX synchronisation of notes page */ -use Friendica\App; +use Friendica\AppHelper; use Friendica\Core\System; -use Friendica\DI; require_once 'mod/notes.php'; -function update_notes_content(App $a) +function update_notes_content(AppHelper $appHelper) { $profile_uid = intval($_GET['p']); @@ -28,7 +27,7 @@ function update_notes_content(App $a) * */ - $text = notes_content($a, $profile_uid); + $text = notes_content($appHelper, $profile_uid); System::htmlUpdateExit($text); } diff --git a/src/App.php b/src/App.php index e302c85154..48574662fd 100644 --- a/src/App.php +++ b/src/App.php @@ -10,7 +10,10 @@ namespace Friendica; use Exception; use Friendica\App\Arguments; use Friendica\App\BaseURL; +use Friendica\App\Mode; +use Friendica\App\Page; use Friendica\App\Request; +use Friendica\App\Router; use Friendica\Capabilities\ICanCreateResponses; use Friendica\Content\Nav; use Friendica\Core\Config\Factory\Config; @@ -18,14 +21,13 @@ use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Database\Definition\DbaDefinition; use Friendica\Database\Definition\ViewDefinition; use Friendica\Module\Maintenance; +use Friendica\Network\HTTPException\InternalServerErrorException; use Friendica\Security\Authentication; use Friendica\Core\Config\ValueObject\Cache; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; use Friendica\Core\L10n; use Friendica\Core\System; -use Friendica\Core\Theme; -use Friendica\Database\Database; use Friendica\Module\Special\HTTPException as ModuleHTTPException; use Friendica\Network\HTTPException; use Friendica\Protocol\ATProtocol\DID; @@ -34,7 +36,6 @@ use Friendica\Util\DateTimeFormat; use Friendica\Util\HTTPInputData; use Friendica\Util\HTTPSignature; use Friendica\Util\Profiler; -use Friendica\Util\Strings; use Psr\Log\LoggerInterface; /** @@ -47,26 +48,14 @@ use Psr\Log\LoggerInterface; * before we spit the page out. * */ -class App +class App implements AppHelper { const PLATFORM = 'Friendica'; const CODENAME = 'Yellow Archangel'; const VERSION = '2024.12-dev'; - // Allow themes to control internal parameters - // by changing App values in theme.php - private $theme_info = [ - 'videowidth' => 425, - 'videoheight' => 350, - ]; - - private $timezone = ''; - private $profile_owner = 0; - private $contact_id = 0; - private $queue = []; - /** - * @var App\Mode The Mode of the Application + * @var Mode The Mode of the Application */ private $mode; @@ -75,11 +64,6 @@ class App */ private $baseURL; - /** @var string The name of the current theme */ - private $currentTheme; - /** @var string The name of the current mobile theme */ - private $currentMobileTheme; - /** @var string */ private $requestId; @@ -101,11 +85,6 @@ class App */ private $profiler; - /** - * @var Database The Friendica database connection - */ - private $database; - /** * @var L10n The translator */ @@ -116,177 +95,202 @@ class App */ private $args; - /** - * @var IManagePersonalConfigValues - */ - private $pConfig; - /** * @var IHandleUserSessions */ private $session; + /** + * @var AppHelper $appHelper + */ + private $appHelper; + + public function __construct( + Request $request, + Authentication $auth, + IManageConfigValues $config, + Mode $mode, + BaseURL $baseURL, + LoggerInterface $logger, + Profiler $profiler, + L10n $l10n, + Arguments $args, + IHandleUserSessions $session, + DbaDefinition $dbaDefinition, + ViewDefinition $viewDefinition + ) { + $this->requestId = $request->getRequestId(); + $this->auth = $auth; + $this->config = $config; + $this->mode = $mode; + $this->baseURL = $baseURL; + $this->profiler = $profiler; + $this->logger = $logger; + $this->l10n = $l10n; + $this->args = $args; + $this->session = $session; + $this->appHelper = DI::appHelper(); + + $this->load($dbaDefinition, $viewDefinition); + } + /** * Set the profile owner ID * + * @deprecated 2024.12 Use AppHelper::setProfileOwner() instead + * * @param int $owner_id * @return void */ public function setProfileOwner(int $owner_id) { - $this->profile_owner = $owner_id; + $this->appHelper->setProfileOwner($owner_id); } /** * Get the profile owner ID * + * @deprecated 2024.12 Use AppHelper::getProfileOwner() instead + * * @return int */ public function getProfileOwner(): int { - return $this->profile_owner; + return $this->appHelper->getProfileOwner(); } /** * Set the contact ID * + * @deprecated 2024.12 Use AppHelper::setContactId() instead + * * @param int $contact_id * @return void */ public function setContactId(int $contact_id) { - $this->contact_id = $contact_id; + $this->appHelper->setContactId($contact_id); } /** * Get the contact ID * + * @deprecated 2024.12 Use AppHelper::getContactId() instead + * * @return int */ public function getContactId(): int { - return $this->contact_id; + return $this->appHelper->getContactId(); } /** * Set the timezone * + * @deprecated 2024.12 Use AppHelper::setTimeZone() instead + * * @param string $timezone A valid time zone identifier, see https://www.php.net/manual/en/timezones.php * @return void */ public function setTimeZone(string $timezone) { - $this->timezone = (new \DateTimeZone($timezone))->getName(); - DateTimeFormat::setLocalTimeZone($this->timezone); + $this->appHelper->setTimeZone($timezone); } /** * Get the timezone * - * @return int + * @deprecated 2024.12 Use AppHelper::getTimeZone() instead */ public function getTimeZone(): string { - return $this->timezone; + return $this->appHelper->getTimeZone(); } /** * Set workerqueue information * + * @deprecated 2024.12 Use AppHelper::setQueue() instead + * * @param array $queue * @return void */ public function setQueue(array $queue) { - $this->queue = $queue; + $this->appHelper->setQueue($queue); } /** * Fetch workerqueue information * + * @deprecated 2024.12 Use AppHelper::getQueue() instead + * * @return array Worker queue */ public function getQueue(): array { - return $this->queue ?? []; + return $this->appHelper->getQueue(); } /** * Fetch a specific workerqueue field * + * @deprecated 2024.12 Use AppHelper::getQueueValue() instead + * * @param string $index Work queue record to fetch * @return mixed Work queue item or NULL if not found */ public function getQueueValue(string $index) { - return $this->queue[$index] ?? null; + return $this->appHelper->getQueueValue($index); } + /** + * @deprecated 2024.12 Use AppHelper::setThemeInfoValue() instead + */ public function setThemeInfoValue(string $index, $value) { - $this->theme_info[$index] = $value; + $this->appHelper->setThemeInfoValue($index, $value); } + /** + * @deprecated 2024.12 Use AppHelper::getThemeInfo() instead + */ public function getThemeInfo() { - return $this->theme_info; + return $this->appHelper->getThemeInfo(); } + /** + * @deprecated 2024.12 Use AppHelper::getThemeInfoValue() instead + */ public function getThemeInfoValue(string $index, $default = null) { - return $this->theme_info[$index] ?? $default; + return $this->appHelper->getThemeInfoValue($index, $default); } /** * Returns the current config cache of this node * + * @deprecated 2024.12 Use AppHelper::getConfigCache() instead + * * @return Cache */ public function getConfigCache() { - return $this->config->getCache(); + return $this->appHelper->getConfigCache(); } /** * The basepath of this app * + * @deprecated 2024.12 Use AppHelper::getBasePath() instead + * * @return string Base path from configuration */ public function getBasePath(): string { - return $this->config->get('system', 'basepath'); - } - - /** - * @param Database $database The Friendica Database - * @param IManageConfigValues $config The Configuration - * @param App\Mode $mode The mode of this Friendica app - * @param BaseURL $baseURL The full base URL of this Friendica app - * @param LoggerInterface $logger The current app logger - * @param Profiler $profiler The profiler of this application - * @param L10n $l10n The translator instance - * @param App\Arguments $args The Friendica Arguments of the call - * @param IManagePersonalConfigValues $pConfig Personal configuration - * @param IHandleUserSessions $session The (User)Session handler - * @param DbaDefinition $dbaDefinition - * @param ViewDefinition $viewDefinition - */ - public function __construct(Request $request, Authentication $auth, Database $database, IManageConfigValues $config, App\Mode $mode, BaseURL $baseURL, LoggerInterface $logger, Profiler $profiler, L10n $l10n, Arguments $args, IManagePersonalConfigValues $pConfig, IHandleUserSessions $session, DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition) - { - $this->requestId = $request->getRequestId(); - $this->auth = $auth; - $this->database = $database; - $this->config = $config; - $this->mode = $mode; - $this->baseURL = $baseURL; - $this->profiler = $profiler; - $this->logger = $logger; - $this->l10n = $l10n; - $this->args = $args; - $this->pConfig = $pConfig; - $this->session = $session; - - $this->load($dbaDefinition, $viewDefinition); + return $this->appHelper->getBasePath(); } /** @@ -310,17 +314,11 @@ class App // Ensure that all "strtotime" operations do run timezone independent date_default_timezone_set('UTC'); - set_include_path( - get_include_path() . PATH_SEPARATOR - . $this->getBasePath() . DIRECTORY_SEPARATOR . 'include' . PATH_SEPARATOR - . $this->getBasePath() . DIRECTORY_SEPARATOR . 'library' . PATH_SEPARATOR - . $this->getBasePath()); - $this->profiler->reset(); - if ($this->mode->has(App\Mode::DBAVAILABLE)) { + if ($this->mode->has(Mode::DBAVAILABLE)) { Core\Hook::loadHooks(); - $loader = (new Config())->createConfigFileManager($this->getBasePath(), $_SERVER); + $loader = (new Config())->createConfigFileManager($this->appHelper->getBasePath(), $_SERVER); Core\Hook::callAll('load_config', $loader); // Hooks are now working, reload the whole definitions with hook enabled @@ -349,157 +347,70 @@ class App $timezone = $default_timezone ?? '' ?: 'UTC'; } - $this->setTimeZone($timezone); + $this->appHelper->setTimeZone($timezone); } /** * Returns the current theme name. May be overridden by the mobile theme name. * + * @deprecated 2024.12 Use AppHelper::getCurrentTheme() instead + * * @return string Current theme name or empty string in installation phase * @throws Exception */ public function getCurrentTheme(): string { - if ($this->mode->isInstall()) { - return ''; - } - - // Specific mobile theme override - if (($this->mode->isMobile() || $this->mode->isTablet()) && $this->session->get('show-mobile', true)) { - $user_mobile_theme = $this->getCurrentMobileTheme(); - - // --- means same mobile theme as desktop - if (!empty($user_mobile_theme) && $user_mobile_theme !== '---') { - return $user_mobile_theme; - } - } - - if (!$this->currentTheme) { - $this->computeCurrentTheme(); - } - - return $this->currentTheme; + return $this->appHelper->getCurrentTheme(); } /** * Returns the current mobile theme name. * + * @deprecated 2024.12 Use AppHelper::getCurrentMobileTheme() instead + * * @return string Mobile theme name or empty string if installer * @throws Exception */ public function getCurrentMobileTheme(): string { - if ($this->mode->isInstall()) { - return ''; - } - - if (is_null($this->currentMobileTheme)) { - $this->computeCurrentMobileTheme(); - } - - return $this->currentMobileTheme; + return $this->appHelper->getCurrentMobileTheme(); } /** * Setter for current theme name * + * @deprecated 2024.12 Use AppHelper::setCurrentTheme() instead + * * @param string $theme Name of current theme */ public function setCurrentTheme(string $theme) { - $this->currentTheme = $theme; + $this->appHelper->setCurrentTheme($theme); } /** * Setter for current mobile theme name * + * @deprecated 2024.12 Use AppHelper::setCurrentMobileTheme() instead + * * @param string $theme Name of current mobile theme */ public function setCurrentMobileTheme(string $theme) { - $this->currentMobileTheme = $theme; - } - - /** - * Computes the current theme name based on the node settings, the page owner settings and the user settings - * - * @throws Exception - */ - private function computeCurrentTheme() - { - $system_theme = $this->config->get('system', 'theme'); - if (!$system_theme) { - throw new Exception($this->l10n->t('No system theme config value set.')); - } - - // Sane default - $this->setCurrentTheme($system_theme); - - $page_theme = null; - // Find the theme that belongs to the user whose stuff we are looking at - if (!empty($this->profile_owner) && ($this->profile_owner != $this->session->getLocalUserId())) { - // Allow folks to override user themes and always use their own on their own site. - // This works only if the user is on the same server - $user = $this->database->selectFirst('user', ['theme'], ['uid' => $this->profile_owner]); - if ($this->database->isResult($user) && !$this->session->getLocalUserId()) { - $page_theme = $user['theme']; - } - } - - $theme_name = $page_theme ?: $this->session->get('theme', $system_theme); - - $theme_name = Strings::sanitizeFilePathItem($theme_name); - if ($theme_name - && in_array($theme_name, Theme::getAllowedList()) - && (file_exists('view/theme/' . $theme_name . '/style.css') - || file_exists('view/theme/' . $theme_name . '/style.php')) - ) { - $this->setCurrentTheme($theme_name); - } - } - - /** - * Computes the current mobile theme name based on the node settings, the page owner settings and the user settings - */ - private function computeCurrentMobileTheme() - { - $system_mobile_theme = $this->config->get('system', 'mobile-theme', ''); - - // Sane default - $this->setCurrentMobileTheme($system_mobile_theme); - - $page_mobile_theme = null; - // Find the theme that belongs to the user whose stuff we are looking at - if (!empty($this->profile_owner) && ($this->profile_owner != $this->session->getLocalUserId())) { - // Allow folks to override user themes and always use their own on their own site. - // This works only if the user is on the same server - if (!$this->session->getLocalUserId()) { - $page_mobile_theme = $this->pConfig->get($this->profile_owner, 'system', 'mobile-theme'); - } - } - - $mobile_theme_name = $page_mobile_theme ?: $this->session->get('mobile-theme', $system_mobile_theme); - - $mobile_theme_name = Strings::sanitizeFilePathItem($mobile_theme_name); - if ($mobile_theme_name == '---' - || - in_array($mobile_theme_name, Theme::getAllowedList()) - && (file_exists('view/theme/' . $mobile_theme_name . '/style.css') - || file_exists('view/theme/' . $mobile_theme_name . '/style.php')) - ) { - $this->setCurrentMobileTheme($mobile_theme_name); - } + $this->appHelper->setCurrentMobileTheme($theme); } /** * Provide a sane default if nothing is chosen or the specified theme does not exist. * + * @deprecated 2024.12 Use AppHelper::getCurrentThemeStylesheetPath() instead + * * @return string Current theme's stylesheet path * @throws Exception */ public function getCurrentThemeStylesheetPath(): string { - return Core\Theme::getStylesheetPath($this->getCurrentTheme()); + return $this->appHelper->getCurrentThemeStylesheetPath(); } /** @@ -510,10 +421,10 @@ class App * * This probably should change to limit the size of this monster method. * - * @param App\Router $router + * @param Router $router * @param IManagePersonalConfigValues $pconfig * @param Authentication $auth The Authentication backend of the node - * @param App\Page $page The Friendica page printing container + * @param Page $page The Friendica page printing container * @param ModuleHTTPException $httpException The possible HTTP Exception container * @param HTTPInputData $httpInput A library for processing PHP input streams * @param float $start_time The start time of the overall script execution @@ -522,8 +433,17 @@ class App * @throws HTTPException\InternalServerErrorException * @throws \ImagickException */ - public function runFrontend(App\Router $router, IManagePersonalConfigValues $pconfig, Authentication $auth, App\Page $page, Nav $nav, ModuleHTTPException $httpException, HTTPInputData $httpInput, float $start_time, array $server) - { + public function runFrontend( + Router $router, + IManagePersonalConfigValues $pconfig, + Authentication $auth, + Page $page, + Nav $nav, + ModuleHTTPException $httpException, + HTTPInputData $httpInput, + float $start_time, + array $server + ) { $requeststring = ($server['REQUEST_METHOD'] ?? '') . ' ' . ($server['REQUEST_URI'] ?? '') . ' ' . ($server['SERVER_PROTOCOL'] ?? ''); $this->logger->debug('Request received', ['address' => $server['REMOTE_ADDR'] ?? '', 'request' => $requeststring, 'referer' => $server['HTTP_REFERER'] ?? '', 'user-agent' => $server['HTTP_USER_AGENT'] ?? '']); $request_start = microtime(true); @@ -536,7 +456,7 @@ class App try { // Missing DB connection: ERROR - if ($this->mode->has(App\Mode::LOCALCONFIGPRESENT) && !$this->mode->has(App\Mode::DBAVAILABLE)) { + if ($this->mode->has(Mode::LOCALCONFIGPRESENT) && !$this->mode->has(Mode::DBAVAILABLE)) { throw new HTTPException\InternalServerErrorException($this->l10n->t('Apologies but the website is unavailable at the moment.')); } @@ -583,7 +503,7 @@ class App } if (!$this->mode->isBackend()) { - $auth->withSession($this); + $auth->withSession(); } if ($this->session->isUnauthenticated()) { @@ -601,7 +521,7 @@ class App if ($this->mode->isInstall() && $moduleName !== 'install') { $this->baseURL->redirect('install'); } else { - Core\Update::check($this->getBasePath(), false); + Core\Update::check($this->appHelper->getBasePath(), false); Core\Addon::loadAddons(); Core\Hook::loadHooks(); } @@ -648,7 +568,7 @@ class App $page['page_title'] = $moduleName; // The "view" module is required to show the theme CSS - if (!$this->mode->isInstall() && !$this->mode->has(App\Mode::MAINTENANCEDISABLED) && $moduleName !== 'view') { + if (!$this->mode->isInstall() && !$this->mode->has(Mode::MAINTENANCEDISABLED) && $moduleName !== 'view') { $module = $router->getModule(Maintenance::class); } else { // determine the module class and save it to the module instance @@ -665,7 +585,7 @@ class App // Let the module run its internal process (init, get, post, ...) $timestamp = microtime(true); - $response = $module->run($httpException, $input); + $response = $module->run($httpException, $input); $this->profiler->set(microtime(true) - $timestamp, 'content'); // Wrapping HTML responses in the theme template @@ -688,17 +608,15 @@ class App * Automatically redirects to relative or absolute URL * Should only be used if it isn't clear if the URL is either internal or external * + * @deprecated 2024.12 Use AppHelper::redirect() instead + * * @param string $toUrl The target URL * - * @throws HTTPException\InternalServerErrorException + * @throws InternalServerErrorException */ public function redirect(string $toUrl) { - if (!empty(parse_url($toUrl, PHP_URL_SCHEME))) { - Core\System::externalRedirect($toUrl); - } else { - $this->baseURL->redirect($toUrl); - } + $this->appHelper->redirect($toUrl); } /** diff --git a/src/App/Page.php b/src/App/Page.php index eb7772f34f..2fb18c4c5d 100644 --- a/src/App/Page.php +++ b/src/App/Page.php @@ -11,6 +11,7 @@ use ArrayAccess; use DOMDocument; use DOMXPath; use Friendica\App; +use Friendica\AppHelper; use Friendica\Content\Nav; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Hook; @@ -21,7 +22,6 @@ use Friendica\Core\Renderer; use Friendica\Core\Session\Model\UserSession; use Friendica\Core\System; use Friendica\Core\Theme; -use Friendica\Module\Response; use Friendica\Network\HTTPException; use Friendica\Util\Images; use Friendica\Util\Network; @@ -176,17 +176,22 @@ class Page implements ArrayAccess * - Infinite scroll data * - head.tpl template * - * @param App $app The Friendica App instance - * @param Arguments $args The Friendica App Arguments - * @param L10n $l10n The l10n language instance - * @param IManageConfigValues $config The Friendica configuration - * @param IManagePersonalConfigValues $pConfig The Friendica personal configuration (for user) - * @param int $localUID The local user id + * @param Arguments $args The Friendica App Arguments + * @param L10n $l10n The l10n language instance + * @param IManageConfigValues $config The Friendica configuration + * @param IManagePersonalConfigValues $pConfig The Friendica personal configuration (for user) + * @param int $localUID The local user id * * @throws HTTPException\InternalServerErrorException */ - private function initHead(App $app, Arguments $args, L10n $l10n, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, int $localUID) - { + private function initHead( + AppHelper $appHelper, + Arguments $args, + L10n $l10n, + IManageConfigValues $config, + IManagePersonalConfigValues $pConfig, + int $localUID + ) { $interval = ($localUID ? $pConfig->get($localUID, 'system', 'update_interval') : 40000); // If the update is 'deactivated' set it to the highest integer number (~24 days) @@ -209,7 +214,7 @@ class Page implements ArrayAccess if (!empty(Renderer::$theme['stylesheet'])) { $stylesheet = Renderer::$theme['stylesheet']; } else { - $stylesheet = $app->getCurrentThemeStylesheetPath(); + $stylesheet = $appHelper->getCurrentThemeStylesheetPath(); } $this->registerStylesheet($stylesheet); @@ -313,7 +318,6 @@ class Page implements ArrayAccess * - Registered footer scripts (through App->registerFooterScript()) * - footer.tpl template * - * @param App $app The Friendica App instance * @param Mode $mode The Friendica runtime mode * @param L10n $l10n The l10n instance * @@ -399,23 +403,34 @@ class Page implements ArrayAccess /** * Executes the creation of the current page and prints it to the screen * - * @param App $app The Friendica App - * @param BaseURL $baseURL The Friendica Base URL - * @param Arguments $args The Friendica App arguments - * @param Mode $mode The current node mode - * @param ResponseInterface $response The Response of the module class, including type, content & headers - * @param L10n $l10n The l10n language class + * @param BaseURL $baseURL The Friendica Base URL + * @param Arguments $args The Friendica App arguments + * @param Mode $mode The current node mode + * @param ResponseInterface $response The Response of the module class, including type, content & headers + * @param L10n $l10n The l10n language class * @param Profiler $profiler - * @param IManageConfigValues $config The Configuration of this node - * @param IManagePersonalConfigValues $pconfig The personal/user configuration + * @param IManageConfigValues $config The Configuration of this node + * @param IManagePersonalConfigValues $pconfig The personal/user configuration * @param Nav $nav * @param int $localUID * @throws HTTPException\MethodNotAllowedException * @throws HTTPException\InternalServerErrorException * @throws HTTPException\ServiceUnavailableException */ - public function run(App $app, UserSession $session, BaseURL $baseURL, Arguments $args, Mode $mode, ResponseInterface $response, L10n $l10n, Profiler $profiler, IManageConfigValues $config, IManagePersonalConfigValues $pconfig, Nav $nav, int $localUID) - { + public function run( + AppHelper $appHelper, + UserSession $session, + BaseURL $baseURL, + Arguments $args, + Mode $mode, + ResponseInterface $response, + L10n $l10n, + Profiler $profiler, + IManageConfigValues $config, + IManagePersonalConfigValues $pconfig, + Nav $nav, + int $localUID + ) { $moduleName = $args->getModuleName(); $this->command = $moduleName; @@ -430,7 +445,7 @@ class Page implements ArrayAccess $this->initContent($response, $mode); // Load current theme info after module has been initialized as theme could have been set in module - $currentTheme = $app->getCurrentTheme(); + $currentTheme = $appHelper->getCurrentTheme(); $theme_info_file = 'view/theme/' . $currentTheme . '/theme.php'; if (file_exists($theme_info_file)) { require_once $theme_info_file; @@ -438,7 +453,7 @@ class Page implements ArrayAccess if (function_exists(str_replace('-', '_', $currentTheme) . '_init')) { $func = str_replace('-', '_', $currentTheme) . '_init'; - $func($app); + $func($appHelper); } /* Create the page head after setting the language @@ -448,7 +463,7 @@ class Page implements ArrayAccess * all the module functions have executed so that all * theme choices made by the modules can take effect. */ - $this->initHead($app, $args, $l10n, $config, $pconfig, $localUID); + $this->initHead($appHelper, $args, $l10n, $config, $pconfig, $localUID); /* Build the page ending -- this is stuff that goes right before * the closing tag @@ -534,7 +549,7 @@ class Page implements ArrayAccess } // Theme templates expect $a as an App instance - $a = $app; + $a = $appHelper; // Used as is in view/php/default.php $lang = $l10n->getCurrentLang(); diff --git a/src/AppHelper.php b/src/AppHelper.php new file mode 100644 index 0000000000..66d3c61d9a --- /dev/null +++ b/src/AppHelper.php @@ -0,0 +1,139 @@ + $queue + */ + public function setQueue(array $queue); + + /** + * Fetch workerqueue information + * + * @return array Worker queue + */ + public function getQueue(); + + /** + * Fetch a specific workerqueue field + * + * @param string $index Work queue record to fetch + * + * @return mixed|null Work queue item or NULL if not found + */ + public function getQueueValue(string $index); + + /** + * Returns the current theme name. May be overridden by the mobile theme name. + * + * @return string Current theme name or empty string in installation phase + * @throws Exception + */ + public function getCurrentTheme(): string; + + /** + * Returns the current mobile theme name. + * + * @return string Mobile theme name or empty string if installer + * @throws Exception + */ + public function getCurrentMobileTheme(): string; + + /** + * Setter for current theme name + * + * @param string $theme Name of current theme + */ + public function setCurrentTheme(string $theme); + + /** + * Setter for current mobile theme name + * + * @param string $theme Name of current mobile theme + */ + public function setCurrentMobileTheme(string $theme); + + public function setThemeInfoValue(string $index, $value); + + public function getThemeInfo(); + + public function getThemeInfoValue(string $index, $default = null); + + /** + * Provide a sane default if nothing is chosen or the specified theme does not exist. + * + * @return string Current theme's stylesheet path + * @throws Exception + */ + public function getCurrentThemeStylesheetPath(): string; + + /** + * Returns the current config cache of this node + * + * @return Cache + */ + public function getConfigCache(); + + /** + * The basepath of this app + * + * @return string Base path from configuration + */ + public function getBasePath(): string; + + public function redirect(string $toUrl); +} diff --git a/src/AppLegacy.php b/src/AppLegacy.php new file mode 100644 index 0000000000..4aa3f25e4c --- /dev/null +++ b/src/AppLegacy.php @@ -0,0 +1,399 @@ + 425, + 'videoheight' => 350, + ]; + + /** + * @var Database The Friendica database connection + */ + private $database; + + /** + * @var IManageConfigValues The config + */ + private $config; + + /** + * @var Mode The Mode of the Application + */ + private $mode; + + /** + * @var BaseURL + */ + private $baseURL; + + /** + * @var L10n The translator + */ + private $l10n; + + /** + * @var IManagePersonalConfigValues + */ + private $pConfig; + + /** + * @var IHandleUserSessions + */ + private $session; + + public function __construct( + Database $database, + IManageConfigValues $config, + Mode $mode, + BaseURL $baseURL, + L10n $l10n, + IManagePersonalConfigValues $pConfig, + IHandleUserSessions $session + ) { + $this->database = $database; + $this->config = $config; + $this->mode = $mode; + $this->l10n = $l10n; + $this->baseURL = $baseURL; + $this->pConfig = $pConfig; + $this->session = $session; + } + + /** + * Set the profile owner ID + */ + public function setProfileOwner(int $owner_id): void + { + $this->profile_owner = $owner_id; + } + + /** + * Get the profile owner ID + */ + public function getProfileOwner(): int + { + return $this->profile_owner; + } + + /** + * Set the timezone + * + * @param string $timezone A valid time zone identifier, see https://www.php.net/manual/en/timezones.php + */ + public function setTimeZone(string $timezone): void + { + $this->timezone = (new DateTimeZone($timezone))->getName(); + + DateTimeFormat::setLocalTimeZone($this->timezone); + } + + /** + * Get the timezone name + */ + public function getTimeZone(): string + { + return $this->timezone; + } + + /** + * Set the contact ID + */ + public function setContactId(int $contact_id): void + { + $this->contact_id = $contact_id; + } + + /** + * Get the contact ID + */ + public function getContactId(): int + { + return $this->contact_id; + } + + /** + * Set workerqueue information + * + * @param array $queue + */ + public function setQueue(array $queue): void + { + $this->queue = $queue; + } + + /** + * Fetch workerqueue information + * + * @return array Worker queue + */ + public function getQueue(): array + { + return $this->queue; + } + + /** + * Fetch a specific workerqueue field + * + * @param string $index Work queue record to fetch + * + * @return mixed|null Work queue item or NULL if not found + */ + public function getQueueValue(string $index) + { + return $this->queue[$index] ?? null; + } + + /** + * Returns the current theme name. May be overridden by the mobile theme name. + * + * @return string Current theme name or empty string in installation phase + * @throws Exception + */ + public function getCurrentTheme(): string + { + if ($this->mode->isInstall()) { + return ''; + } + + // Specific mobile theme override + if (($this->mode->isMobile() || $this->mode->isTablet()) && $this->session->get('show-mobile', true)) { + $user_mobile_theme = $this->getCurrentMobileTheme(); + + // --- means same mobile theme as desktop + if (!empty($user_mobile_theme) && $user_mobile_theme !== '---') { + return $user_mobile_theme; + } + } + + if (!$this->currentTheme) { + $this->computeCurrentTheme(); + } + + return $this->currentTheme; + } + + /** + * Returns the current mobile theme name. + * + * @return string Mobile theme name or empty string if installer + * @throws Exception + */ + public function getCurrentMobileTheme(): string + { + if ($this->mode->isInstall()) { + return ''; + } + + if (is_null($this->currentMobileTheme)) { + $this->computeCurrentMobileTheme(); + } + + return $this->currentMobileTheme; + } + + /** + * Setter for current theme name + * + * @param string $theme Name of current theme + */ + public function setCurrentTheme(string $theme): void + { + $this->currentTheme = $theme; + } + + /** + * Setter for current mobile theme name + * + * @param string $theme Name of current mobile theme + */ + public function setCurrentMobileTheme(string $theme): void + { + $this->currentMobileTheme = $theme; + } + + public function setThemeInfoValue(string $index, $value): void + { + $this->theme_info[$index] = $value; + } + + public function getThemeInfo(): array + { + return $this->theme_info; + } + + public function getThemeInfoValue(string $index, $default = null) + { + return $this->theme_info[$index] ?? $default; + } + + /** + * Provide a sane default if nothing is chosen or the specified theme does not exist. + * + * @return string Current theme's stylesheet path + * @throws Exception + */ + public function getCurrentThemeStylesheetPath(): string + { + return Theme::getStylesheetPath($this->getCurrentTheme()); + } + + /** + * Returns the current config cache of this node + */ + public function getConfigCache(): Cache + { + return $this->config->getCache(); + } + + /** + * The basepath of this app + * + * @return string Base path from configuration + */ + public function getBasePath(): string + { + return $this->config->get('system', 'basepath'); + } + + /** + * Computes the current theme name based on the node settings, the page owner settings and the user settings + * + * @throws Exception + */ + private function computeCurrentTheme() + { + $system_theme = $this->config->get('system', 'theme'); + if (!$system_theme) { + throw new Exception($this->l10n->t('No system theme config value set.')); + } + + // Sane default + $this->setCurrentTheme($system_theme); + + $page_theme = null; + $profile_owner = $this->getProfileOwner(); + + // Find the theme that belongs to the user whose stuff we are looking at + if (!empty($profile_owner) && ($profile_owner != $this->session->getLocalUserId())) { + // Allow folks to override user themes and always use their own on their own site. + // This works only if the user is on the same server + $user = $this->database->selectFirst('user', ['theme'], ['uid' => $profile_owner]); + if ($this->database->isResult($user) && !$this->session->getLocalUserId()) { + $page_theme = $user['theme']; + } + } + + $theme_name = $page_theme ?: $this->session->get('theme', $system_theme); + + $theme_name = Strings::sanitizeFilePathItem($theme_name); + if ($theme_name + && in_array($theme_name, Theme::getAllowedList()) + && (file_exists('view/theme/' . $theme_name . '/style.css') + || file_exists('view/theme/' . $theme_name . '/style.php')) + ) { + $this->setCurrentTheme($theme_name); + } + } + + /** + * Computes the current mobile theme name based on the node settings, the page owner settings and the user settings + */ + private function computeCurrentMobileTheme() + { + $system_mobile_theme = $this->config->get('system', 'mobile-theme', ''); + + // Sane default + $this->setCurrentMobileTheme($system_mobile_theme); + + $page_mobile_theme = null; + $profile_owner = $this->getProfileOwner(); + + // Find the theme that belongs to the user whose stuff we are looking at + if (!empty($profile_owner) && ($profile_owner != $this->session->getLocalUserId())) { + // Allow folks to override user themes and always use their own on their own site. + // This works only if the user is on the same server + if (!$this->session->getLocalUserId()) { + $page_mobile_theme = $this->pConfig->get($profile_owner, 'system', 'mobile-theme'); + } + } + + $mobile_theme_name = $page_mobile_theme ?: $this->session->get('mobile-theme', $system_mobile_theme); + + $mobile_theme_name = Strings::sanitizeFilePathItem($mobile_theme_name); + if ($mobile_theme_name == '---' + || + in_array($mobile_theme_name, Theme::getAllowedList()) + && (file_exists('view/theme/' . $mobile_theme_name . '/style.css') + || file_exists('view/theme/' . $mobile_theme_name . '/style.php')) + ) { + $this->setCurrentMobileTheme($mobile_theme_name); + } + } + + /** + * Automatically redirects to relative or absolute URL + * Should only be used if it isn't clear if the URL is either internal or external + * + * @param string $toUrl The target URL + * + * @throws InternalServerErrorException + */ + public function redirect(string $toUrl) + { + if (!empty(parse_url($toUrl, PHP_URL_SCHEME))) { + System::externalRedirect($toUrl); + } else { + $this->baseURL->redirect($toUrl); + } + } +} diff --git a/src/Console/Addon.php b/src/Console/Addon.php index 43ce7a6be3..8066853246 100644 --- a/src/Console/Addon.php +++ b/src/Console/Addon.php @@ -8,8 +8,7 @@ namespace Friendica\Console; use Console_Table; -use Friendica\App; -use Friendica\Content\Pager; +use Friendica\App\Mode; use Friendica\Core\L10n; use Friendica\Core\Addon as AddonCore; use Friendica\Database\Database; @@ -24,7 +23,7 @@ class Addon extends \Asika\SimpleConsole\Console protected $helpOptions = ['h', 'help', '?']; /** - * @var App\Mode + * @var Mode */ private $appMode; /** @@ -57,7 +56,7 @@ HELP; return $help; } - public function __construct(App\Mode $appMode, L10n $l10n, Database $dba, array $argv = null) + public function __construct(Mode $appMode, L10n $l10n, Database $dba, array $argv = null) { parent::__construct($argv); diff --git a/src/Console/ArchiveContact.php b/src/Console/ArchiveContact.php index 33e1de8600..fef6065823 100644 --- a/src/Console/ArchiveContact.php +++ b/src/Console/ArchiveContact.php @@ -7,7 +7,7 @@ namespace Friendica\Console; -use Friendica\App; +use Friendica\App\Mode; use Friendica\Database\Database; use Friendica\DI; use Friendica\Model\Contact; @@ -28,7 +28,7 @@ class ArchiveContact extends \Asika\SimpleConsole\Console protected $helpOptions = ['h', 'help', '?']; /** - * @var App\Mode + * @var Mode */ private $appMode; /** @@ -57,7 +57,7 @@ HELP; return $help; } - public function __construct(App\Mode $appMode, Database $dba, \Friendica\Core\L10n $l10n, array $argv = null) + public function __construct(Mode $appMode, Database $dba, \Friendica\Core\L10n $l10n, array $argv = null) { parent::__construct($argv); diff --git a/src/Console/AutomaticInstallation.php b/src/Console/AutomaticInstallation.php index cc932f51c4..198317f7b4 100644 --- a/src/Console/AutomaticInstallation.php +++ b/src/Console/AutomaticInstallation.php @@ -9,8 +9,7 @@ namespace Friendica\Console; use Asika\SimpleConsole\Console; use Exception; -use Friendica\App; -use Friendica\App\BaseURL; +use Friendica\App\Mode; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\ValueObject\Cache; use Friendica\Core\Installer; @@ -21,7 +20,7 @@ use RuntimeException; class AutomaticInstallation extends Console { - /** @var App\Mode */ + /** @var Mode */ private $appMode; /** @var \Friendica\Core\Config\ValueObject\Cache */ private $configCache; @@ -87,7 +86,7 @@ Examples HELP; } - public function __construct(App\Mode $appMode, Cache $configCache, IManageConfigValues $config, Database $dba, array $argv = null) + public function __construct(Mode $appMode, Cache $configCache, IManageConfigValues $config, Database $dba, array $argv = null) { parent::__construct($argv); diff --git a/src/Console/Cache.php b/src/Console/Cache.php index 1eb400a7b5..c019c18429 100644 --- a/src/Console/Cache.php +++ b/src/Console/Cache.php @@ -8,7 +8,7 @@ namespace Friendica\Console; use Asika\SimpleConsole\CommandArgsException; -use Friendica\App; +use Friendica\App\Mode; use Friendica\Core\Cache\Enum\Duration; use Friendica\Core\Cache\Capability\ICanCache; use RuntimeException; @@ -25,7 +25,7 @@ class Cache extends \Asika\SimpleConsole\Console protected $helpOptions = ['h', 'help', '?']; /** - * @var App\Mode + * @var Mode */ private $appMode; @@ -68,7 +68,7 @@ HELP; return $help; } - public function __construct(App\Mode $appMode, ICanCache $cache, array $argv = null) + public function __construct(Mode $appMode, ICanCache $cache, array $argv = null) { parent::__construct($argv); @@ -85,7 +85,7 @@ HELP; $this->out('Options: ' . var_export($this->options, true)); } - if (!$this->appMode->has(App\Mode::DBAVAILABLE)) { + if (!$this->appMode->has(Mode::DBAVAILABLE)) { $this->out('Database isn\'t ready or populated yet, database cache won\'t be available'); } diff --git a/src/Console/Config.php b/src/Console/Config.php index 578efe964b..7b222a4481 100644 --- a/src/Console/Config.php +++ b/src/Console/Config.php @@ -8,7 +8,7 @@ namespace Friendica\Console; use Asika\SimpleConsole\CommandArgsException; -use Friendica\App; +use Friendica\App\Mode; use Friendica\Core\Config\Capability\IManageConfigValues; use RuntimeException; @@ -38,7 +38,7 @@ class Config extends \Asika\SimpleConsole\Console protected $helpOptions = ['h', 'help', '?']; /** - * @var App\Mode + * @var Mode */ private $appMode; /** @@ -80,7 +80,7 @@ HELP; return $help; } - public function __construct(App\Mode $appMode, IManageConfigValues $config, array $argv = null) + public function __construct(Mode $appMode, IManageConfigValues $config, array $argv = null) { parent::__construct($argv); diff --git a/src/Console/Contact.php b/src/Console/Contact.php index 46a26c4a9d..b33baa6efa 100644 --- a/src/Console/Contact.php +++ b/src/Console/Contact.php @@ -8,7 +8,7 @@ namespace Friendica\Console; use Console_Table; -use Friendica\App; +use Friendica\App\Mode; use Friendica\DI; use Friendica\Model\Contact as ContactModel; use Friendica\Model\User as UserModel; @@ -25,7 +25,7 @@ class Contact extends \Asika\SimpleConsole\Console protected $helpOptions = ['h', 'help', '?']; /** - * @var App\Mode + * @var Mode */ private $appMode; /** @@ -55,7 +55,7 @@ HELP; return $help; } - public function __construct(App\Mode $appMode, array $argv = null) + public function __construct(Mode $appMode, array $argv = null) { parent::__construct($argv); diff --git a/src/Console/DocBloxErrorChecker.php b/src/Console/DocBloxErrorChecker.php index 2b16b6694b..694940c95e 100644 --- a/src/Console/DocBloxErrorChecker.php +++ b/src/Console/DocBloxErrorChecker.php @@ -7,7 +7,7 @@ namespace Friendica\Console; -use Friendica\App; +use Friendica\AppHelper; /** * When I installed docblox, I had the experience that it does not generate any output at all. @@ -33,14 +33,14 @@ class DocBloxErrorChecker extends \Asika\SimpleConsole\Console protected $helpOptions = ['h', 'help', '?']; - /** @var App */ - private $app; + /** @var string */ + private $basePath; - public function __construct(App $app, array $argv = null) + public function __construct(AppHelper $appHelper, array $argv = null) { parent::__construct($argv); - $this->app = $app; + $this->basePath = $appHelper->getBasePath(); } protected function getHelp() @@ -73,7 +73,7 @@ HELP; throw new \RuntimeException('DocBlox isn\'t available.'); } - $dir = $this->app->getBasePath(); + $dir = $this->basePath; //stack for dirs to search $dirstack = []; diff --git a/src/Console/GlobalCommunityBlock.php b/src/Console/GlobalCommunityBlock.php index 946b0dbd43..2e85491455 100644 --- a/src/Console/GlobalCommunityBlock.php +++ b/src/Console/GlobalCommunityBlock.php @@ -7,7 +7,7 @@ namespace Friendica\Console; -use Friendica\App; +use Friendica\App\Mode; use Friendica\Core\L10n; use Friendica\Model\Contact; @@ -22,7 +22,7 @@ class GlobalCommunityBlock extends \Asika\SimpleConsole\Console protected $helpOptions = ['h', 'help', '?']; /** - * @var App\Mode + * @var Mode */ private $appMode; /** @@ -48,7 +48,7 @@ HELP; return $help; } - public function __construct(App\Mode $appMode, L10n $l10n, $argv = null) + public function __construct(Mode $appMode, L10n $l10n, $argv = null) { parent::__construct($argv); diff --git a/src/Console/Lock.php b/src/Console/Lock.php index b5fca2e63f..f883adfc6e 100644 --- a/src/Console/Lock.php +++ b/src/Console/Lock.php @@ -8,7 +8,7 @@ namespace Friendica\Console; use Asika\SimpleConsole\CommandArgsException; -use Friendica\App; +use Friendica\App\Mode; use Friendica\Core\Lock\Capability\ICanLock; use RuntimeException; @@ -23,7 +23,7 @@ class Lock extends \Asika\SimpleConsole\Console protected $helpOptions = ['h', 'help', '?']; /** - * @var App\Mode + * @var Mode */ private $appMode; @@ -62,7 +62,7 @@ HELP; return $help; } - public function __construct(App\Mode $appMode, ICanLock $lock, array $argv = null) + public function __construct(Mode $appMode, ICanLock $lock, array $argv = null) { parent::__construct($argv); @@ -79,7 +79,7 @@ HELP; $this->out('Options: ' . var_export($this->options, true)); } - if (!$this->appMode->has(App\Mode::DBAVAILABLE)) { + if (!$this->appMode->has(Mode::DBAVAILABLE)) { $this->out('Database isn\'t ready or populated yet, database cache won\'t be available'); } diff --git a/src/Console/Maintenance.php b/src/Console/Maintenance.php index 27caa32190..168bccd164 100644 --- a/src/Console/Maintenance.php +++ b/src/Console/Maintenance.php @@ -7,7 +7,7 @@ namespace Friendica\Console; -use Friendica\App; +use Friendica\App\Mode; use Friendica\Core\Config\Capability\IManageConfigValues; /** @@ -18,7 +18,7 @@ class Maintenance extends \Asika\SimpleConsole\Console protected $helpOptions = ['h', 'help', '?']; /** - * @var App\Mode + * @var Mode */ private $appMode; /** @@ -55,7 +55,7 @@ HELP; return $help; } - public function __construct(App\Mode $appMode, IManageConfigValues $config, $argv = null) + public function __construct(Mode $appMode, IManageConfigValues $config, $argv = null) { parent::__construct($argv); diff --git a/src/Console/PhpToPo.php b/src/Console/PhpToPo.php index ebe49b1736..ad377561a2 100644 --- a/src/Console/PhpToPo.php +++ b/src/Console/PhpToPo.php @@ -7,7 +7,8 @@ namespace Friendica\Console; -use Friendica\App; +use Friendica\AppHelper; +use stdClass; /** * Read a strings.php file and create messages.po in the same directory @@ -20,14 +21,14 @@ class PhpToPo extends \Asika\SimpleConsole\Console private $normBaseMsgIds = []; const NORM_REGEXP = "|[\\\]|"; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; - public function __construct(App $app, array $argv = null) + public function __construct(AppHelper $appHelper, array $argv = null) { parent::__construct($argv); - $this->app = $app; + $this->appHelper = $appHelper; } protected function getHelp() @@ -66,7 +67,8 @@ HELP; throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments'); } - $a = $this->app; + $a = new stdClass(); + $a->strings = []; $phpfile = realpath($this->getArgument(0)); diff --git a/src/Console/PostUpdate.php b/src/Console/PostUpdate.php index 90c75bb343..318712cdc5 100644 --- a/src/Console/PostUpdate.php +++ b/src/Console/PostUpdate.php @@ -7,10 +7,11 @@ namespace Friendica\Console; -use Friendica\App; +use Friendica\App\Mode; use Friendica\Core\KeyValueStorage\Capability\IManageKeyValuePairs; use Friendica\Core\L10n; use Friendica\Core\Update; +use Friendica\DI; /** * Performs database post updates @@ -20,7 +21,7 @@ class PostUpdate extends \Asika\SimpleConsole\Console protected $helpOptions = ['h', 'help', '?']; /** - * @var App\Mode + * @var Mode */ private $appMode; /** @@ -31,6 +32,10 @@ class PostUpdate extends \Asika\SimpleConsole\Console * @var L10n */ private $l10n; + /** + * @var string + */ + private $basePath; protected function getHelp() { @@ -46,19 +51,18 @@ HELP; return $help; } - public function __construct(App\Mode $appMode, IManageKeyValuePairs $keyValue, L10n $l10n, array $argv = null) + public function __construct(Mode $appMode, IManageKeyValuePairs $keyValue, L10n $l10n, array $argv = null) { parent::__construct($argv); $this->appMode = $appMode; $this->keyValue = $keyValue; $this->l10n = $l10n; + $this->basePath = DI::appHelper()->getBasePath(); } protected function doExecute(): int { - $a = \Friendica\DI::app(); - if ($this->getOption($this->helpOptions)) { $this->out($this->getHelp()); return 0; @@ -79,7 +83,7 @@ HELP; } echo $this->l10n->t('Check for pending update actions.') . "\n"; - Update::run($a->getBasePath(), true, false, true, false); + Update::run($this->basePath, true, false, true, false); echo $this->l10n->t('Done.') . "\n"; echo $this->l10n->t('Execute pending post updates.') . "\n"; diff --git a/src/Console/User.php b/src/Console/User.php index 42e85f007d..89c217694d 100644 --- a/src/Console/User.php +++ b/src/Console/User.php @@ -8,7 +8,7 @@ namespace Friendica\Console; use Console_Table; -use Friendica\App; +use Friendica\App\Mode; use Friendica\Content\Pager; use Friendica\Core\L10n; use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; @@ -26,7 +26,7 @@ class User extends \Asika\SimpleConsole\Console protected $helpOptions = ['h', 'help', '?']; /** - * @var App\Mode + * @var Mode */ private $appMode; /** @@ -74,7 +74,7 @@ HELP; return $help; } - public function __construct(App\Mode $appMode, L10n $l10n, IManagePersonalConfigValues $pConfig, array $argv = null) + public function __construct(Mode $appMode, L10n $l10n, IManagePersonalConfigValues $pConfig, array $argv = null) { parent::__construct($argv); diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index 4810da647c..110f18933f 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -7,9 +7,11 @@ namespace Friendica\Content; -use Friendica\App; use Friendica\App\Arguments; use Friendica\App\BaseURL; +use Friendica\App\Mode; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\ACL; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -32,8 +34,7 @@ use Friendica\Network\HTTPException\InternalServerErrorException; use Friendica\Object\Post as PostObject; use Friendica\Object\Thread; use Friendica\Protocol\Activity; -use Friendica\User\Settings\Entity\UserGServer; -use Friendica\User\Settings\Repository; +use Friendica\User\Settings\Repository\UserGServer; use Friendica\Util\Crypto; use Friendica\Util\DateTimeFormat; use Friendica\Util\Profiler; @@ -64,7 +65,7 @@ class Conversation private $logger; /** @var Item */ private $item; - /** @var App\Arguments */ + /** @var Arguments */ private $args; /** @var IManagePersonalConfigValues */ private $pConfig; @@ -72,18 +73,18 @@ class Conversation private $baseURL; /** @var IManageConfigValues */ private $config; - /** @var App */ - private $app; - /** @var App\Page */ + /** @var AppHelper */ + private $appHelper; + /** @var Page */ private $page; - /** @var App\Mode */ + /** @var Mode */ private $mode; /** @var IHandleUserSessions */ private $session; - /** @var Repository\UserGServer */ + /** @var UserGServer */ private $userGServer; - public function __construct(Repository\UserGServer $userGServer, LoggerInterface $logger, Profiler $profiler, Activity $activity, L10n $l10n, Item $item, Arguments $args, BaseURL $baseURL, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, App\Page $page, App\Mode $mode, App $app, IHandleUserSessions $session) + public function __construct(UserGServer $userGServer, LoggerInterface $logger, Profiler $profiler, Activity $activity, L10n $l10n, Item $item, Arguments $args, BaseURL $baseURL, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, Page $page, Mode $mode, AppHelper $appHelper, IHandleUserSessions $session) { $this->activity = $activity; $this->item = $item; @@ -96,7 +97,7 @@ class Conversation $this->args = $args; $this->pConfig = $pConfig; $this->page = $page; - $this->app = $app; + $this->appHelper = $appHelper; $this->session = $session; $this->userGServer = $userGServer; } @@ -1017,7 +1018,7 @@ class Conversation $emojis[$count['uri-id']][$count['reaction']]['title'] = []; } - // @todo The following code should be removed, once that we display activity authors on demand + // @todo The following code should be removed, once that we display activity authors on demand $activity_verbs = [ Activity::LIKE, Activity::DISLIKE, diff --git a/src/Content/Item.php b/src/Content/Item.php index 3082a3ff4c..a5a1a17a19 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -7,8 +7,8 @@ namespace Friendica\Content; -use Friendica\App; use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Content\Text\BBCode; use Friendica\Content\Text\BBCode\Video; use Friendica\Content\Text\HTML; @@ -66,10 +66,10 @@ class Item private $baseURL; /** @var Emailer */ private $emailer; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; - public function __construct(Profiler $profiler, Activity $activity, L10n $l10n, IHandleUserSessions $userSession, Video $bbCodeVideo, ACLFormatter $aclFormatter, IManagePersonalConfigValues $pConfig, BaseURL $baseURL, Emailer $emailer, App $app) + public function __construct(Profiler $profiler, Activity $activity, L10n $l10n, IHandleUserSessions $userSession, Video $bbCodeVideo, ACLFormatter $aclFormatter, IManagePersonalConfigValues $pConfig, BaseURL $baseURL, Emailer $emailer, AppHelper $appHelper) { $this->profiler = $profiler; $this->activity = $activity; @@ -80,7 +80,7 @@ class Item $this->baseURL = $baseURL; $this->pConfig = $pConfig; $this->emailer = $emailer; - $this->app = $app; + $this->appHelper = $appHelper; } /** diff --git a/src/Content/OEmbed.php b/src/Content/OEmbed.php index f250889520..4d3c589041 100644 --- a/src/Content/OEmbed.php +++ b/src/Content/OEmbed.php @@ -48,11 +48,11 @@ class OEmbed { $embedurl = trim($embedurl, '\'"'); - $a = DI::app(); + $appHelper = DI::appHelper(); - $cache_key = 'oembed:' . $a->getThemeInfoValue('videowidth') . ':' . $embedurl; + $cache_key = 'oembed:' . $appHelper->getThemeInfoValue('videowidth') . ':' . $embedurl; - $condition = ['url' => Strings::normaliseLink($embedurl), 'maxwidth' => $a->getThemeInfoValue('videowidth')]; + $condition = ['url' => Strings::normaliseLink($embedurl), 'maxwidth' => $appHelper->getThemeInfoValue('videowidth')]; $oembed_record = DBA::selectFirst('oembed', ['content'], $condition); if (DBA::isResult($oembed_record)) { $json_string = $oembed_record['content']; @@ -88,7 +88,7 @@ class OEmbed // but their OEmbed endpoint is only accessible by HTTPS ¯\_(ツ)_/¯ $href = str_replace(['http://www.youtube.com/', 'http://player.vimeo.com/'], ['https://www.youtube.com/', 'https://player.vimeo.com/'], $href); - $result = DI::httpClient()->get($href . '&maxwidth=' . $a->getThemeInfoValue('videowidth'), HttpClientAccept::DEFAULT, [HttpClientOptions::REQUEST => HttpClientRequest::SITEINFO]); + $result = DI::httpClient()->get($href . '&maxwidth=' . $appHelper->getThemeInfoValue('videowidth'), HttpClientAccept::DEFAULT, [HttpClientOptions::REQUEST => HttpClientRequest::SITEINFO]); if ($result->isSuccess()) { $json_string = $result->getBodyString(); break; @@ -109,7 +109,7 @@ class OEmbed if (!empty($oembed->type) && $oembed->type != 'error') { DBA::insert('oembed', [ 'url' => Strings::normaliseLink($embedurl), - 'maxwidth' => $a->getThemeInfoValue('videowidth'), + 'maxwidth' => $appHelper->getThemeInfoValue('videowidth'), 'content' => $json_string, 'created' => DateTimeFormat::utcNow() ], Database::INSERT_UPDATE); diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index e571a219e8..bcac088e7e 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1630,7 +1630,7 @@ class BBCode private static function convertStylesToHtml(string $text, int $simple_html): string { // Markdown is designed to pass through HTML elements that it can't handle itself, - // so that the other system would parse the original HTML element. + // so that the other system would parse the original HTML element. // But Diaspora has chosen not to do this and doesn't parse HTML elements. // So we need to make some changes here. if ($simple_html == BBCode::DIASPORA) { @@ -1926,19 +1926,20 @@ class BBCode private static function convertVideoPlatformsToHtml(string $text, bool $try_oembed): string { - $a = DI::app(); + $appHelper = DI::appHelper(); + $text = self::normalizeVideoLinks($text); // Youtube extensions if ($try_oembed && OEmbed::isAllowedURL('https://www.youtube.com/embed/')) { - $text = preg_replace("/\[youtube\]([A-Za-z0-9\-_=]+)(.*?)\[\/youtube\]/ism", '', $text); + $text = preg_replace("/\[youtube\]([A-Za-z0-9\-_=]+)(.*?)\[\/youtube\]/ism", '', $text); } else { $text = preg_replace("/\[youtube\]([A-Za-z0-9\-_=]+)(.*?)\[\/youtube\]/ism", '[url]https://www.youtube.com/watch?v=$1[/url]', $text); } // Vimeo extensions if ($try_oembed && OEmbed::isAllowedURL('https://player.vimeo.com/video')) { - $text = preg_replace("/\[vimeo\]([0-9]+)(.*?)\[\/vimeo\]/ism", '', $text); + $text = preg_replace("/\[vimeo\]([0-9]+)(.*?)\[\/vimeo\]/ism", '', $text); } else { $text = preg_replace("/\[vimeo\]([0-9]+)(.*?)\[\/vimeo\]/ism", '[url]https://vimeo.com/$1[/url]', $text); } diff --git a/src/Core/Hook.php b/src/Core/Hook.php index 74256b11ec..44dfad70bc 100644 --- a/src/Core/Hook.php +++ b/src/Core/Hook.php @@ -7,7 +7,6 @@ namespace Friendica\Core; -use Friendica\App; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Util\Strings; @@ -81,7 +80,7 @@ class Hook */ public static function register(string $hook, string $file, string $function, int $priority = 0) { - $file = str_replace(DI::app()->getBasePath() . DIRECTORY_SEPARATOR, '', $file); + $file = str_replace(DI::appHelper()->getBasePath() . DIRECTORY_SEPARATOR, '', $file); $condition = ['hook' => $hook, 'file' => $file, 'function' => $function]; if (DBA::exists('hook', $condition)) { @@ -102,7 +101,7 @@ class Hook */ public static function unregister(string $hook, string $file, string $function): bool { - $relative_file = str_replace(DI::app()->getBasePath() . DIRECTORY_SEPARATOR, '', $file); + $relative_file = str_replace(DI::appHelper()->getBasePath() . DIRECTORY_SEPARATOR, '', $file); // This here is only needed for fixing a problem that existed on the develop branch $condition = ['hook' => $hook, 'file' => $file, 'function' => $function]; @@ -198,7 +197,7 @@ class Hook public static function callSingle(string $name, array $hook, &$data = null) { // Don't run a theme's hook if the user isn't using the theme - if (strpos($hook[0], 'view/theme/') !== false && strpos($hook[0], 'view/theme/' . DI::app()->getCurrentTheme()) === false) { + if (strpos($hook[0], 'view/theme/') !== false && strpos($hook[0], 'view/theme/' . DI::appHelper()->getCurrentTheme()) === false) { return; } diff --git a/src/Core/Renderer.php b/src/Core/Renderer.php index ed8d3041be..6fb6e02ead 100644 --- a/src/Core/Renderer.php +++ b/src/Core/Renderer.php @@ -155,9 +155,9 @@ class Renderer if (isset(self::$template_engine_instance[$template_engine])) { return self::$template_engine_instance[$template_engine]; } else { - $a = DI::app(); + $appHelper = DI::appHelper(); $class = self::$template_engines[$template_engine]; - $obj = new $class($a->getCurrentTheme(), $a->getThemeInfo()); + $obj = new $class($appHelper->getCurrentTheme(), $appHelper->getThemeInfo()); self::$template_engine_instance[$template_engine] = $obj; return $obj; } diff --git a/src/Core/Session/Factory/Session.php b/src/Core/Session/Factory/Session.php index 735300b1d6..7855cf35d6 100644 --- a/src/Core/Session/Factory/Session.php +++ b/src/Core/Session/Factory/Session.php @@ -7,7 +7,8 @@ namespace Friendica\Core\Session\Factory; -use Friendica\App; +use Friendica\App\BaseURL; +use Friendica\App\Mode; use Friendica\Core\Cache\Factory\Cache; use Friendica\Core\Cache\Type\DatabaseCache; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -33,8 +34,8 @@ class Session const HANDLER_DEFAULT = self::HANDLER_DATABASE; /** - * @param App\Mode $mode - * @param App\BaseURL $baseURL + * @param Mode $mode + * @param BaseURL $baseURL * @param IManageConfigValues $config * @param Database $dba * @param Cache $cacheFactory @@ -43,7 +44,7 @@ class Session * @param array $server * @return IHandleSessions */ - public function create(App\Mode $mode, App\BaseURL $baseURL, IManageConfigValues $config, Database $dba, Cache $cacheFactory, LoggerInterface $logger, Profiler $profiler, array $server = []): IHandleSessions + public function create(Mode $mode, BaseURL $baseURL, IManageConfigValues $config, Database $dba, Cache $cacheFactory, LoggerInterface $logger, Profiler $profiler, array $server = []): IHandleSessions { $profiler->startRecording('session'); $session_handler = $config->get('system', 'session_handler', self::HANDLER_DEFAULT); diff --git a/src/Core/Session/Type/Native.php b/src/Core/Session/Type/Native.php index fc6f41c466..ebde0d4954 100644 --- a/src/Core/Session/Type/Native.php +++ b/src/Core/Session/Type/Native.php @@ -7,7 +7,7 @@ namespace Friendica\Core\Session\Type; -use Friendica\App; +use Friendica\App\BaseURL; use Friendica\Core\Session\Capability\IHandleSessions; use Friendica\Model\User\Cookie; use SessionHandlerInterface; @@ -17,7 +17,7 @@ use SessionHandlerInterface; */ class Native extends AbstractSession implements IHandleSessions { - public function __construct(App\BaseURL $baseURL, SessionHandlerInterface $handler = null) + public function __construct(BaseURL $baseURL, SessionHandlerInterface $handler = null) { ini_set('session.gc_probability', 50); ini_set('session.use_only_cookies', 1); diff --git a/src/Core/Theme.php b/src/Core/Theme.php index c6fa572028..eedc64e066 100644 --- a/src/Core/Theme.php +++ b/src/Core/Theme.php @@ -208,11 +208,11 @@ class Theme */ public static function getPathForFile(string $file): string { - $a = DI::app(); + $appHelper = DI::appHelper(); - $theme = $a->getCurrentTheme(); + $theme = $appHelper->getCurrentTheme(); - $parent = Strings::sanitizeFilePathItem($a->getThemeInfoValue('extends', $theme)); + $parent = Strings::sanitizeFilePathItem($appHelper->getThemeInfoValue('extends', $theme)); $paths = [ "view/theme/$theme/$file", @@ -245,11 +245,11 @@ class Theme return 'view/theme/' . $theme . '/style.css'; } - $a = DI::app(); + $appHelper = DI::appHelper(); $query_params = []; - $puid = Profile::getThemeUid($a); + $puid = Profile::getThemeUid($appHelper); if ($puid) { $query_params['puid'] = $puid; } @@ -267,8 +267,8 @@ class Theme { $theme = Strings::sanitizeFilePathItem($theme); - $a = DI::app(); - $base_theme = $a->getThemeInfoValue('extends') ?? ''; + $appHelper = DI::appHelper(); + $base_theme = $appHelper->getThemeInfoValue('extends') ?? ''; if (file_exists("view/theme/$theme/config.php")) { return "view/theme/$theme/config.php"; diff --git a/src/Core/Update.php b/src/Core/Update.php index f93de8298a..b6bf0e5a2d 100644 --- a/src/Core/Update.php +++ b/src/Core/Update.php @@ -67,7 +67,6 @@ class Update * * @param string $basePath The base path of this application * @param boolean $via_worker Is the check run via the worker? - * @param App\Mode $mode The current app mode * @return void * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 8a8270bdb9..5d33dc57fe 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -533,7 +533,7 @@ class Worker */ private static function execFunction(array $queue, string $funcname, array $argv, bool $method_call) { - $a = DI::app(); + $appHelper = DI::appHelper(); self::coolDown(); @@ -547,7 +547,7 @@ class Worker // For this reason the variables have to be initialized. DI::profiler()->reset(); - $a->setQueue($queue); + $appHelper->setQueue($queue); $up_duration = microtime(true) - self::$up_start; @@ -571,7 +571,7 @@ class Worker Logger::disableWorker(); - $a->setQueue([]); + $appHelper->setQueue([]); $duration = (microtime(true) - $stamp); @@ -830,7 +830,7 @@ class Worker return false; } elseif ($max_idletime > 0) { Logger::debug('Maximum idletime not reached.', ['last' => $last_check, 'last-check' => $last_date, 'seconds' => $max_idletime, 'load' => $load, 'max_load' => $maxsysload, 'active_worker' => $active, 'max_worker' => $maxqueues]); - } + } } } @@ -1371,20 +1371,20 @@ class Worker */ public static function getRetrial(): int { - $queue = DI::app()->getQueue(); + $queue = DI::appHelper()->getQueue(); return $queue['retrial'] ?? 0; } /** * Defers the current worker entry * - * @param int $worker_defer_limit Maximum defer limit + * @param int $worker_defer_limit Maximum defer limit * @return boolean had the entry been deferred? * @throws \Exception */ public static function defer(int $worker_defer_limit = 0): bool { - $queue = DI::app()->getQueue(); + $queue = DI::appHelper()->getQueue(); if (empty($queue)) { return false; diff --git a/src/DI.php b/src/DI.php index 46010ce62b..5604fe9df2 100644 --- a/src/DI.php +++ b/src/DI.php @@ -71,6 +71,8 @@ abstract class DI // /** + * @deprecated 2024.12 use DI::appHelper() instead + * * @return App */ public static function app() @@ -78,6 +80,11 @@ abstract class DI return self::$dice->create(App::class); } + public static function appHelper(): AppHelper + { + return self::$dice->create(AppHelper::class); + } + /** * @return Database\Database */ diff --git a/src/Model/Item.php b/src/Model/Item.php index 037add5007..ffdb9c67f0 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3348,7 +3348,7 @@ class Item */ public static function prepareBody(array &$item, bool $attach = false, bool $is_preview = false, bool $only_cache = false): string { - $a = DI::app(); + $appHelper = DI::appHelper(); $uid = DI::userSession()->getLocalUserId(); Hook::callAll('prepare_body_init', $item); @@ -3522,8 +3522,8 @@ class Item } // Replace friendica image url size with theme preference. - if (!empty($a->getThemeInfoValue('item_image_size'))) { - $ps = $a->getThemeInfoValue('item_image_size'); + if (!empty($appHelper->getThemeInfoValue('item_image_size'))) { + $ps = $appHelper->getThemeInfoValue('item_image_size'); $s = preg_replace('|(]+src="[^"]+/photo/[0-9a-f]+)-[0-9]|', "$1-" . $ps, $s); } diff --git a/src/Model/Profile.php b/src/Model/Profile.php index a27fd9c99e..e8ebe89d57 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -7,8 +7,8 @@ namespace Friendica\Model; -use Friendica\App; use Friendica\App\Mode; +use Friendica\AppHelper; use Friendica\Content\Text\BBCode; use Friendica\Content\Widget\ContactBlock; use Friendica\Core\Cache\Enum\Duration; @@ -190,7 +190,6 @@ class Profile * the theme is chosen before the _init() function of a theme is run, which will usually * load a lot of theme-specific content * - * @param App $a * @param string $nickname string * @param bool $show_contacts * @@ -199,7 +198,7 @@ class Profile * @throws HTTPException\InternalServerErrorException * @throws \ImagickException */ - public static function load(App $a, string $nickname, bool $show_contacts = true): array + public static function load(AppHelper $appHelper, string $nickname, bool $show_contacts = true): array { $profile = User::getOwnerDataByNick($nickname); if (!isset($profile['account_removed']) || $profile['account_removed']) { @@ -213,13 +212,13 @@ class Profile throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.')); } - $a->setProfileOwner($profile['uid']); + $appHelper->setProfileOwner($profile['uid']); DI::page()['title'] = $profile['name'] . ' @ ' . DI::config()->get('config', 'sitename'); if (!DI::userSession()->getLocalUserId()) { - $a->setCurrentTheme($profile['theme']); - $a->setCurrentMobileTheme(DI::pConfig()->get($a->getProfileOwner(), 'system', 'mobile_theme') ?? ''); + $appHelper->setCurrentTheme($profile['theme']); + $appHelper->setCurrentMobileTheme(DI::pConfig()->get($appHelper->getProfileOwner(), 'system', 'mobile_theme') ?? ''); } /* @@ -228,7 +227,7 @@ class Profile Renderer::setActiveTemplateEngine(); // reset the template engine to the default in case the user's theme doesn't specify one - $theme_info_file = 'view/theme/' . $a->getCurrentTheme() . '/theme.php'; + $theme_info_file = 'view/theme/' . $appHelper->getCurrentTheme() . '/theme.php'; if (file_exists($theme_info_file)) { require_once $theme_info_file; } @@ -687,15 +686,13 @@ class Profile * settings take precedence; unless a local user is logged in which means they don't * want to see anybody else's theme settings except their own while on this site. * - * @param App $a - * * @return int user ID * * @note Returns local_user instead of user ID if "always_my_theme" is set to true */ - public static function getThemeUid(App $a): int + public static function getThemeUid(AppHelper $appHelper): int { - return DI::userSession()->getLocalUserId() ?: $a->getProfileOwner(); + return DI::userSession()->getLocalUserId() ?: $appHelper->getProfileOwner(); } /** diff --git a/src/Model/User/Cookie.php b/src/Model/User/Cookie.php index d28767524f..69270478f8 100644 --- a/src/Model/User/Cookie.php +++ b/src/Model/User/Cookie.php @@ -7,7 +7,8 @@ namespace Friendica\Model\User; -use Friendica\App; +use Friendica\App\BaseURL; +use Friendica\App\Request; use Friendica\Core\Config\Capability\IManageConfigValues; /** @@ -38,12 +39,12 @@ class Cookie private $data; /** - * @param App\Request $request The current http request + * @param Request $request The current http request * @param IManageConfigValues $config - * @param App\BaseURL $baseURL + * @param BaseURL $baseURL * @param array $COOKIE The $_COOKIE array */ - public function __construct(App\Request $request, IManageConfigValues $config, App\BaseURL $baseURL, array $COOKIE = []) + public function __construct(Request $request, IManageConfigValues $config, BaseURL $baseURL, array $COOKIE = []) { $this->sslEnabled = $baseURL->getScheme() === 'https'; $this->sitePrivateKey = $config->get('system', 'site_prvkey'); diff --git a/src/Module/Admin/Summary.php b/src/Module/Admin/Summary.php index bb2d28ee83..736c8b3e2e 100644 --- a/src/Module/Admin/Summary.php +++ b/src/Module/Admin/Summary.php @@ -29,7 +29,7 @@ class Summary extends BaseAdmin { parent::content(); - $a = DI::app(); + $basePath = DI::appHelper()->getBasePath(); // are there MyISAM tables in the DB? If so, trigger a warning message $warningtext = []; @@ -116,7 +116,7 @@ class Summary extends BaseAdmin } // check legacy basepath settings - $configLoader = (new Config())->createConfigFileManager($a->getBasePath(), $_SERVER); + $configLoader = (new Config())->createConfigFileManager($basePath, $_SERVER); $configCache = new Cache(); $configLoader->setupCache($configCache); $confBasepath = $configCache->get('system', 'basepath'); diff --git a/src/Module/Admin/Themes/Embed.php b/src/Module/Admin/Themes/Embed.php index 3337f91d80..00a79db54d 100644 --- a/src/Module/Admin/Themes/Embed.php +++ b/src/Module/Admin/Themes/Embed.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Admin\Themes; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Mode; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\DI; @@ -19,21 +22,21 @@ use Psr\Log\LoggerInterface; class Embed extends BaseAdmin { - /** @var App */ - protected $app; - /** @var App\Mode */ + /** @var AppHelper */ + protected $appHelper; + /** @var Mode */ protected $mode; - public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, App\Mode $mode, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Mode $mode, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->app = $app; - $this->mode = $mode; + $this->appHelper = $appHelper; + $this->mode = $mode; $theme = Strings::sanitizeFilePathItem($this->parameters['theme']); if (is_file("view/theme/$theme/config.php")) { - $this->app->setCurrentTheme($theme); + $this->appHelper->setCurrentTheme($theme); } } @@ -46,7 +49,7 @@ class Embed extends BaseAdmin require_once "view/theme/$theme/config.php"; if (function_exists('theme_admin_post')) { self::checkFormSecurityTokenRedirectOnError('/admin/themes/' . $theme . '/embed?mode=minimal', 'admin_theme_settings'); - theme_admin_post($this->app); + theme_admin_post($this->appHelper); } } @@ -72,7 +75,7 @@ class Embed extends BaseAdmin require_once "view/theme/$theme/config.php"; if (function_exists('theme_admin')) { - $admin_form = theme_admin($this->app); + $admin_form = theme_admin($this->appHelper); } } diff --git a/src/Module/Api/Friendica/DirectMessages/Search.php b/src/Module/Api/Friendica/DirectMessages/Search.php index 0aacdf9b36..18eee80af8 100644 --- a/src/Module/Api/Friendica/DirectMessages/Search.php +++ b/src/Module/Api/Friendica/DirectMessages/Search.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Friendica\DirectMessages; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Database\DBA; @@ -30,9 +32,9 @@ class Search extends BaseApi /** @var DirectMessage */ private $directMessage; - public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->directMessage = $directMessage; diff --git a/src/Module/Api/Friendica/Events/Create.php b/src/Module/Api/Friendica/Events/Create.php index 4eaad3d1ed..3766fa1fbe 100644 --- a/src/Module/Api/Friendica/Events/Create.php +++ b/src/Module/Api/Friendica/Events/Create.php @@ -59,11 +59,11 @@ class Create extends BaseApi $finish = DBA::NULL_DATETIME; $nofinish = true; } else { - $finish = DateTimeFormat::convert($request['end_time'], 'UTC', DI::app()->getTimeZone()); + $finish = DateTimeFormat::convert($request['end_time'], 'UTC', DI::appHelper()->getTimeZone()); $nofinish = false; } - $start = DateTimeFormat::convert($request['start_time'], 'UTC', DI::app()->getTimeZone()); + $start = DateTimeFormat::convert($request['start_time'], 'UTC', DI::appHelper()->getTimeZone()); // create event $event = []; diff --git a/src/Module/Api/Friendica/Photo.php b/src/Module/Api/Friendica/Photo.php index 31c54b7639..a54c41b3c5 100644 --- a/src/Module/Api/Friendica/Photo.php +++ b/src/Module/Api/Friendica/Photo.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Friendica; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; use Friendica\Module\BaseApi; @@ -23,9 +25,9 @@ class Photo extends BaseApi private $friendicaPhoto; - public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->friendicaPhoto = $friendicaPhoto; } diff --git a/src/Module/Api/Friendica/Photo/Create.php b/src/Module/Api/Friendica/Photo/Create.php index 49b943f188..4a50083f35 100644 --- a/src/Module/Api/Friendica/Photo/Create.php +++ b/src/Module/Api/Friendica/Photo/Create.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Friendica\Photo; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\ACL; use Friendica\Core\L10n; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; @@ -27,9 +29,9 @@ class Create extends BaseApi private $friendicaPhoto; - public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->friendicaPhoto = $friendicaPhoto; } diff --git a/src/Module/Api/Friendica/Photo/Lists.php b/src/Module/Api/Friendica/Photo/Lists.php index c493c3e922..174bd06ce7 100644 --- a/src/Module/Api/Friendica/Photo/Lists.php +++ b/src/Module/Api/Friendica/Photo/Lists.php @@ -7,9 +7,11 @@ namespace Friendica\Module\Api\Friendica\Photo; -use Friendica\Database\DBA; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; +use Friendica\Database\DBA; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; use Friendica\Module\BaseApi; use Friendica\Model\Contact; @@ -29,9 +31,9 @@ class Lists extends BaseApi private $friendicaPhoto; - public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->friendicaPhoto = $friendicaPhoto; } diff --git a/src/Module/Api/Friendica/Photo/Update.php b/src/Module/Api/Friendica/Photo/Update.php index 8c072541d3..2a3929189f 100644 --- a/src/Module/Api/Friendica/Photo/Update.php +++ b/src/Module/Api/Friendica/Photo/Update.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Friendica\Photo; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\ACL; use Friendica\Core\L10n; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; @@ -27,9 +29,9 @@ class Update extends BaseApi private $friendicaPhoto; - public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->friendicaPhoto = $friendicaPhoto; } diff --git a/src/Module/Api/Friendica/Photoalbum/Show.php b/src/Module/Api/Friendica/Photoalbum/Show.php index 8542ea1ba7..48b10195c9 100644 --- a/src/Module/Api/Friendica/Photoalbum/Show.php +++ b/src/Module/Api/Friendica/Photoalbum/Show.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Friendica\Photoalbum; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; use Friendica\Model\Contact; @@ -29,9 +31,9 @@ class Show extends BaseApi private $friendicaPhoto; - public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->friendicaPhoto = $friendicaPhoto; } diff --git a/src/Module/Api/Mastodon/Instance.php b/src/Module/Api/Mastodon/Instance.php index 6b7ddfb3e1..2b50613290 100644 --- a/src/Module/Api/Mastodon/Instance.php +++ b/src/Module/Api/Mastodon/Instance.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Mastodon; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Core\System; @@ -37,9 +39,9 @@ class Instance extends BaseApi /** @var AccountFactory */ private $accountFactory; - public function __construct(AccountFactory $accountFactory, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, Database $database, IManageConfigValues $config, array $server, array $parameters = []) + public function __construct(AccountFactory $accountFactory, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, Database $database, IManageConfigValues $config, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; $this->config = $config; diff --git a/src/Module/Api/Mastodon/Instance/ExtendedDescription.php b/src/Module/Api/Mastodon/Instance/ExtendedDescription.php index 886aa64e04..03e2ca17ea 100644 --- a/src/Module/Api/Mastodon/Instance/ExtendedDescription.php +++ b/src/Module/Api/Mastodon/Instance/ExtendedDescription.php @@ -8,7 +8,9 @@ namespace Friendica\Module\Api\Mastodon\Instance; use DateTime; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Model\User; @@ -26,9 +28,9 @@ class ExtendedDescription extends BaseApi { private IManageConfigValues $config; - public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, IManageConfigValues $config, array $server, array $parameters = []) + public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, IManageConfigValues $config, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->config = $config; } diff --git a/src/Module/Api/Mastodon/InstanceV2.php b/src/Module/Api/Mastodon/InstanceV2.php index f33f60b2c6..4cb3af66b9 100644 --- a/src/Module/Api/Mastodon/InstanceV2.php +++ b/src/Module/Api/Mastodon/InstanceV2.php @@ -9,6 +9,9 @@ namespace Friendica\Module\Api\Mastodon; use Exception; use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Contact\Header; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; @@ -41,10 +44,10 @@ class InstanceV2 extends BaseApi public function __construct( \Friendica\Factory\Api\Mastodon\Error $errorFactory, - App $app, + AppHelper $appHelper, L10n $l10n, - App\BaseURL $baseUrl, - App\Arguments $args, + BaseURL $baseUrl, + Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, @@ -53,7 +56,7 @@ class InstanceV2 extends BaseApi array $server, array $parameters = [] ) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; $this->config = $config; diff --git a/src/Module/Api/Mastodon/Lists.php b/src/Module/Api/Mastodon/Lists.php index 5fcf926d02..b2f3292d9e 100644 --- a/src/Module/Api/Mastodon/Lists.php +++ b/src/Module/Api/Mastodon/Lists.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Mastodon; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\DI; use Friendica\Content\Conversation\Factory\Channel as ChannelFactory; @@ -29,9 +31,9 @@ class Lists extends BaseApi /** @var Repository\UserDefinedChannel */ protected $userDefinedChannel; - public function __construct(Repository\UserDefinedChannel $userDefinedChannel, ChannelFactory $channel, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Repository\UserDefinedChannel $userDefinedChannel, ChannelFactory $channel, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->channel = $channel; $this->userDefinedChannel = $userDefinedChannel; diff --git a/src/Module/Api/Mastodon/PushSubscription.php b/src/Module/Api/Mastodon/PushSubscription.php index 9ddeb4eb23..a83263bb24 100644 --- a/src/Module/Api/Mastodon/PushSubscription.php +++ b/src/Module/Api/Mastodon/PushSubscription.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Mastodon; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Factory\Api\Mastodon\Error; use Friendica\Factory\Api\Mastodon\Subscription as SubscriptionFactory; @@ -26,9 +28,9 @@ class PushSubscription extends BaseApi /** @var SubscriptionFactory */ protected $subscriptionFac; - public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, SubscriptionFactory $subscriptionFac, array $server, array $parameters = []) + public function __construct(Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, SubscriptionFactory $subscriptionFac, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->subscriptionFac = $subscriptionFac; } diff --git a/src/Module/Api/Mastodon/Reports.php b/src/Module/Api/Mastodon/Reports.php index eff8bbe679..66c9b518a7 100644 --- a/src/Module/Api/Mastodon/Reports.php +++ b/src/Module/Api/Mastodon/Reports.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Mastodon; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Core\System; use Friendica\Model\Contact; @@ -27,9 +29,9 @@ class Reports extends BaseApi /** @var \Friendica\Moderation\Repository\Report */ private $reportRepo; - public function __construct(\Friendica\Moderation\Repository\Report $reportRepo, \Friendica\Moderation\Factory\Report $reportFactory, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(\Friendica\Moderation\Repository\Report $reportRepo, \Friendica\Moderation\Factory\Report $reportFactory, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->reportFactory = $reportFactory; $this->reportRepo = $reportRepo; diff --git a/src/Module/Api/Mastodon/Timelines/ListTimeline.php b/src/Module/Api/Mastodon/Timelines/ListTimeline.php index ef777d64bb..249955fdb3 100644 --- a/src/Module/Api/Mastodon/Timelines/ListTimeline.php +++ b/src/Module/Api/Mastodon/Timelines/ListTimeline.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Mastodon\Timelines; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Database\DBA; @@ -34,9 +36,9 @@ class ListTimeline extends BaseApi /** @var Timeline */ protected $timeline; - public function __construct(Timeline $timeline, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Timeline $timeline, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->timeline = $timeline; } diff --git a/src/Module/Api/Mastodon/Timelines/PublicTimeline.php b/src/Module/Api/Mastodon/Timelines/PublicTimeline.php index 16e6149df3..411a159037 100644 --- a/src/Module/Api/Mastodon/Timelines/PublicTimeline.php +++ b/src/Module/Api/Mastodon/Timelines/PublicTimeline.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Mastodon\Timelines; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Core\Logger; @@ -34,9 +36,9 @@ class PublicTimeline extends BaseApi */ private $config; - public function __construct(IManageConfigValues $config, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(IManageConfigValues $config, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->config = $config; } /** diff --git a/src/Module/Api/Mastodon/Trends/Statuses.php b/src/Module/Api/Mastodon/Trends/Statuses.php index b63d3f9ca4..142766593d 100644 --- a/src/Module/Api/Mastodon/Trends/Statuses.php +++ b/src/Module/Api/Mastodon/Trends/Statuses.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Mastodon\Trends; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Core\Logger; @@ -32,9 +34,9 @@ class Statuses extends BaseApi */ private $config; - public function __construct(IManageConfigValues $config, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(IManageConfigValues $config, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->config = $config; } diff --git a/src/Module/Api/Twitter/ContactEndpoint.php b/src/Module/Api/Twitter/ContactEndpoint.php index 3896351ded..1781a17ce2 100644 --- a/src/Module/Api/Twitter/ContactEndpoint.php +++ b/src/Module/Api/Twitter/ContactEndpoint.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\DI; use Friendica\Model\User; @@ -24,9 +26,9 @@ abstract class ContactEndpoint extends BaseApi const DEFAULT_COUNT = 20; const MAX_COUNT = 200; - public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->checkAllowedScope(self::SCOPE_READ); } diff --git a/src/Module/Api/Twitter/DirectMessages/Destroy.php b/src/Module/Api/Twitter/DirectMessages/Destroy.php index 8676e91fba..36494b4a66 100644 --- a/src/Module/Api/Twitter/DirectMessages/Destroy.php +++ b/src/Module/Api/Twitter/DirectMessages/Destroy.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter\DirectMessages; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Database\DBA; @@ -27,9 +29,9 @@ class Destroy extends BaseApi /** @var Database */ private $dba; - public function __construct(Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; } diff --git a/src/Module/Api/Twitter/DirectMessages/NewDM.php b/src/Module/Api/Twitter/DirectMessages/NewDM.php index 170c11fb9d..8dd9838297 100644 --- a/src/Module/Api/Twitter/DirectMessages/NewDM.php +++ b/src/Module/Api/Twitter/DirectMessages/NewDM.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter\DirectMessages; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Factory\Api\Twitter\DirectMessage; @@ -32,9 +34,9 @@ class NewDM extends BaseApi /** @var DirectMessage */ private $directMessage; - public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->directMessage = $directMessage; diff --git a/src/Module/Api/Twitter/DirectMessagesEndpoint.php b/src/Module/Api/Twitter/DirectMessagesEndpoint.php index 97f1de1828..e4bf7b92fb 100644 --- a/src/Module/Api/Twitter/DirectMessagesEndpoint.php +++ b/src/Module/Api/Twitter/DirectMessagesEndpoint.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Database\DBA; @@ -26,9 +28,9 @@ abstract class DirectMessagesEndpoint extends BaseApi /** @var DirectMessage */ private $directMessage; - public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->directMessage = $directMessage; diff --git a/src/Module/Api/Twitter/Friendships/Destroy.php b/src/Module/Api/Twitter/Friendships/Destroy.php index d7f65907be..cf014134c0 100644 --- a/src/Module/Api/Twitter/Friendships/Destroy.php +++ b/src/Module/Api/Twitter/Friendships/Destroy.php @@ -8,7 +8,9 @@ namespace Friendica\Module\Api\Twitter\Friendships; use Exception; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Factory\Api\Twitter\User as TwitterUser; @@ -31,9 +33,9 @@ class Destroy extends ContactEndpoint /** @var TwitterUser */ private $twitterUser; - public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, TwitterUser $twitterUser, array $server, array $parameters = []) + public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, TwitterUser $twitterUser, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->twitterUser = $twitterUser; } diff --git a/src/Module/Api/Twitter/Lists/Create.php b/src/Module/Api/Twitter/Lists/Create.php index e641b22ac0..4343a75eea 100644 --- a/src/Module/Api/Twitter/Lists/Create.php +++ b/src/Module/Api/Twitter/Lists/Create.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter\Lists; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle; @@ -32,9 +34,9 @@ class Create extends BaseApi /** @var Database */ private $dba; - public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->friendicaCircle = $friendicaCircle; diff --git a/src/Module/Api/Twitter/Lists/Destroy.php b/src/Module/Api/Twitter/Lists/Destroy.php index 48b9a4e026..34a8d8a99d 100644 --- a/src/Module/Api/Twitter/Lists/Destroy.php +++ b/src/Module/Api/Twitter/Lists/Destroy.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter\Lists; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Factory\Api\Friendica\Circle as FriendicaCirle; @@ -32,9 +34,9 @@ class Destroy extends BaseApi /** @var Database */ private $dba; - public function __construct(Database $dba, FriendicaCirle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, FriendicaCirle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->friendicaCircle = $friendicaCircle; diff --git a/src/Module/Api/Twitter/Lists/Ownership.php b/src/Module/Api/Twitter/Lists/Ownership.php index 16d91efe8d..bdf34ed280 100644 --- a/src/Module/Api/Twitter/Lists/Ownership.php +++ b/src/Module/Api/Twitter/Lists/Ownership.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter\Lists; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle; @@ -30,9 +32,9 @@ class Ownership extends BaseApi /** @var Database */ private $dba; - public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->friendicaCircle = $friendicaCircle; diff --git a/src/Module/Api/Twitter/Lists/Statuses.php b/src/Module/Api/Twitter/Lists/Statuses.php index 5d067a21f1..5b501f3fa3 100644 --- a/src/Module/Api/Twitter/Lists/Statuses.php +++ b/src/Module/Api/Twitter/Lists/Statuses.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter\Lists; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Database\DBA; @@ -34,9 +36,9 @@ class Statuses extends BaseApi /** @var Database */ private $dba; - public function __construct(Database $dba, TwitterStatus $twitterStatus, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, TwitterStatus $twitterStatus, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->twitterStatus = $twitterStatus; diff --git a/src/Module/Api/Twitter/Lists/Update.php b/src/Module/Api/Twitter/Lists/Update.php index f255080df4..c5c368a741 100644 --- a/src/Module/Api/Twitter/Lists/Update.php +++ b/src/Module/Api/Twitter/Lists/Update.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter\Lists; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle; @@ -32,9 +34,9 @@ class Update extends BaseApi /** @var Database */ private $dba; - public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->friendicaCircle = $friendicaCircle; diff --git a/src/Module/Apps.php b/src/Module/Apps.php index fe910d9367..873eea237d 100644 --- a/src/Module/Apps.php +++ b/src/Module/Apps.php @@ -7,7 +7,8 @@ namespace Friendica\Module; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\BaseModule; use Friendica\Content\Nav; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -28,7 +29,7 @@ class Apps extends BaseModule /** @var SystemMessages */ protected $systemMessages; - public function __construct(SystemMessages $systemMessages, Nav $nav, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = []) + public function __construct(SystemMessages $systemMessages, Nav $nav, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); diff --git a/src/Module/BaseApi.php b/src/Module/BaseApi.php index f457d64ec9..a2efbfc1cc 100644 --- a/src/Module/BaseApi.php +++ b/src/Module/BaseApi.php @@ -8,8 +8,10 @@ namespace Friendica\Module; use DateTime; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\App\Router; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Logger; @@ -51,8 +53,8 @@ class BaseApi extends BaseModule */ protected static $request = []; - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; /** @var ApiResponse */ protected $response; @@ -60,11 +62,11 @@ class BaseApi extends BaseModule /** @var \Friendica\Factory\Api\Mastodon\Error */ protected $errorFactory; - public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->app = $app; + $this->appHelper = $appHelper; $this->errorFactory = $errorFactory; } diff --git a/src/Module/BaseModeration.php b/src/Module/BaseModeration.php index 797a73b2f8..e72698f259 100644 --- a/src/Module/BaseModeration.php +++ b/src/Module/BaseModeration.php @@ -7,7 +7,10 @@ namespace Friendica\Module; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -33,18 +36,18 @@ abstract class BaseModeration extends BaseModule protected $session; /** @var SystemMessages */ protected $systemMessages; - /** @var App */ - protected $app; - /** @var App\Page */ + /** @var AppHelper */ + protected $appHelper; + /** @var Page */ protected $page; - public function __construct(App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->session = $session; $this->systemMessages = $systemMessages; - $this->app = $app; + $this->appHelper = $appHelper; $this->page = $page; } diff --git a/src/Module/BaseNotifications.php b/src/Module/BaseNotifications.php index 3b42b46c6d..f9f47d4a21 100644 --- a/src/Module/BaseNotifications.php +++ b/src/Module/BaseNotifications.php @@ -8,14 +8,13 @@ namespace Friendica\Module; use Exception; -use Friendica\App; use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\BaseModule; use Friendica\Content\Pager; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleUserSessions; -use Friendica\Core\System; use Friendica\Navigation\Notifications\ValueObject\FormattedNotify; use Friendica\Network\HTTPException\ForbiddenException; use Friendica\Util\Profiler; @@ -76,7 +75,7 @@ abstract class BaseNotifications extends BaseModule */ abstract public function getNotifications(); - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, array $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); diff --git a/src/Module/BaseProfile.php b/src/Module/BaseProfile.php index a7b610e276..2fab793152 100644 --- a/src/Module/BaseProfile.php +++ b/src/Module/BaseProfile.php @@ -7,7 +7,6 @@ namespace Friendica\Module; -use Friendica\App; use Friendica\BaseModule; use Friendica\Content\Feature; use Friendica\Core\Hook; diff --git a/src/Module/BaseSettings.php b/src/Module/BaseSettings.php index 693554f493..143360c137 100644 --- a/src/Module/BaseSettings.php +++ b/src/Module/BaseSettings.php @@ -7,7 +7,9 @@ namespace Friendica\Module; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; use Friendica\BaseModule; use Friendica\Content\Feature; use Friendica\Content\Nav; @@ -20,12 +22,12 @@ use Psr\Log\LoggerInterface; class BaseSettings extends BaseModule { - /** @var App\Page */ + /** @var Page */ protected $page; /** @var IHandleUserSessions */ protected $session; - public function __construct(IHandleUserSessions $session, App\Page $page, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(IHandleUserSessions $session, Page $page, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); diff --git a/src/Module/Calendar/Event/API.php b/src/Module/Calendar/Event/API.php index efa4644e24..3223ecd42b 100644 --- a/src/Module/Calendar/Event/API.php +++ b/src/Module/Calendar/Event/API.php @@ -7,12 +7,13 @@ namespace Friendica\Module\Calendar\Event; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Protocol; use Friendica\Core\Session\Capability\IHandleUserSessions; -use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\Model\Contact; @@ -61,14 +62,14 @@ class API extends BaseModule /** @var string */ protected $timezone; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, ACLFormatter $aclFormatter, App $app, array $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, ACLFormatter $aclFormatter, AppHelper $appHelper, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->session = $session; $this->sysMessages = $sysMessages; $this->aclFormatter = $aclFormatter; - $this->timezone = $app->getTimeZone(); + $this->timezone = $appHelper->getTimeZone(); if (!$this->session->getLocalUserId()) { throw new UnauthorizedException($this->t('Permission denied.')); diff --git a/src/Module/Calendar/Event/Show.php b/src/Module/Calendar/Event/Show.php index 175bc18707..6cfe9b5208 100644 --- a/src/Module/Calendar/Event/Show.php +++ b/src/Module/Calendar/Event/Show.php @@ -7,15 +7,14 @@ namespace Friendica\Module\Calendar\Event; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; -use Friendica\Content\Feature; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleUserSessions; -use Friendica\Core\System; use Friendica\Model\Event; -use Friendica\Model\User; use Friendica\Module\Response; use Friendica\Network\HTTPException; use Friendica\Util\Profiler; @@ -28,15 +27,15 @@ class Show extends BaseModule { /** @var IHandleUserSessions */ protected $session; - /** @var App */ - private $app; + /** @var AppHelper */ + protected $appHelper; - public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->session = $session; - $this->app = $app; + $this->session = $session; + $this->appHelper = $appHelper; } protected function rawContent(array $request = []) diff --git a/src/Module/Calendar/Export.php b/src/Module/Calendar/Export.php index 9e8141ad4b..ef16636406 100644 --- a/src/Module/Calendar/Export.php +++ b/src/Module/Calendar/Export.php @@ -7,16 +7,16 @@ namespace Friendica\Module\Calendar; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Content\Feature; use Friendica\Core\L10n; use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Model\Event; use Friendica\Model\Profile; -use Friendica\Model\User; use Friendica\Module\Response; -use Friendica\Module\Security\Login; use Friendica\Navigation\SystemMessages; use Friendica\Network\HTTPException; use Friendica\Util\Profiler; @@ -36,16 +36,16 @@ class Export extends BaseModule protected $session; /** @var SystemMessages */ protected $sysMessages; - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; - public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->session = $session; $this->sysMessages = $sysMessages; - $this->app = $app; + $this->appHelper = $appHelper; } protected function rawContent(array $request = []) @@ -55,7 +55,7 @@ class Export extends BaseModule throw new HTTPException\BadRequestException(); } - $owner = Profile::load($this->app, $nickname, false); + $owner = Profile::load($this->appHelper, $nickname, false); if (!$owner || $owner['account_expired'] || $owner['account_removed']) { throw new HTTPException\NotFoundException($this->t('User not found.')); } diff --git a/src/Module/Calendar/Show.php b/src/Module/Calendar/Show.php index 571d0172a1..0a55f7ada7 100644 --- a/src/Module/Calendar/Show.php +++ b/src/Module/Calendar/Show.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Calendar; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Content\Feature; use Friendica\Content\Nav; @@ -33,19 +36,19 @@ class Show extends BaseModule protected $session; /** @var SystemMessages */ protected $sysMessages; - /** @var App\Page */ + /** @var Page */ protected $page; - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, App\Page $page, App $app, array $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, Page $page, AppHelper $appHelper, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->session = $session; $this->sysMessages = $sysMessages; $this->page = $page; - $this->app = $app; + $this->appHelper = $appHelper; } protected function content(array $request = []): string @@ -55,7 +58,7 @@ class Show extends BaseModule throw new HTTPException\UnauthorizedException(); } - $owner = Profile::load($this->app, $nickname, false); + $owner = Profile::load($this->appHelper, $nickname, false); if (!$owner || $owner['account_expired'] || $owner['account_removed']) { throw new HTTPException\NotFoundException($this->t('User not found.')); } diff --git a/src/Module/Contact/Redir.php b/src/Module/Contact/Redir.php index 3e00749fb5..43e7326c31 100644 --- a/src/Module/Contact/Redir.php +++ b/src/Module/Contact/Redir.php @@ -7,8 +7,10 @@ namespace Friendica\Module\Contact; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; -use Friendica\App; use Friendica\Core\Protocol; use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Core\Worker; @@ -27,16 +29,16 @@ class Redir extends \Friendica\BaseModule private $session; /** @var Database */ private $database; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; - public function __construct(App $app, Database $database, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, Database $database, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->session = $session; $this->database = $database; - $this->app = $app; + $this->appHelper = $appHelper; } protected function rawContent(array $request = []) @@ -100,14 +102,14 @@ class Redir extends \Friendica\BaseModule // We don't use magic auth when there is no visitor, we are on the same system, or we visit our own stuff if (empty($visitor) || Strings::compareLink($basepath, $this->baseUrl) || Strings::compareLink($contact_url, $visitor)) { $this->logger->info('Redirecting without magic', ['target' => $target_url, 'visitor' => $visitor, 'contact' => $contact_url]); - $this->app->redirect($target_url); + $this->appHelper->redirect($target_url); } $separator = strpos($target_url, '?') ? '&' : '?'; $target_url .= $separator . 'zrl=' . urlencode($visitor) . '&addr=' . urlencode($contact_url); $this->logger->info('Redirecting with magic', ['target' => $target_url, 'visitor' => $visitor, 'contact' => $contact_url]); - $this->app->redirect($target_url); + $this->appHelper->redirect($target_url); } /** @@ -135,9 +137,9 @@ class Redir extends \Friendica\BaseModule $this->checkUrl($contact_url, $url); $target_url = $url ?: $contact_url; - if (!empty($this->app->getContactId()) && $this->app->getContactId() == $cid) { + if (!empty($this->appHelper->getContactId()) && $this->appHelper->getContactId() == $cid) { // Local user is already authenticated. - $this->app->redirect($target_url); + $this->appHelper->redirect($target_url); } if ($contact['uid'] == 0 && $this->session->getLocalUserId()) { @@ -148,10 +150,10 @@ class Redir extends \Friendica\BaseModule $cid = $contact['id']; } - if (!empty($this->app->getContactId()) && $this->app->getContactId() == $cid) { + if (!empty($this->appHelper->getContactId()) && $this->appHelper->getContactId() == $cid) { // Local user is already authenticated. $this->logger->info('Contact already authenticated. Redirecting to target url', ['url' => $contact['url'], 'name' => $contact['name'], 'target_url' => $target_url]); - $this->app->redirect($target_url); + $this->appHelper->redirect($target_url); } } @@ -166,7 +168,7 @@ class Redir extends \Friendica\BaseModule if (($host == $remotehost) && ($this->session->getRemoteContactID($this->session->get('visitor_visiting')) == $this->session->get('visitor_id'))) { // Remote user is already authenticated. $this->logger->info('Contact already authenticated. Redirecting to target url', ['url' => $contact['url'], 'name' => $contact['name'], 'target_url' => $target_url]); - $this->app->redirect($target_url); + $this->appHelper->redirect($target_url); } } @@ -181,7 +183,7 @@ class Redir extends \Friendica\BaseModule } $this->logger->info('redirecting to ' . $target_url); - $this->app->redirect($target_url); + $this->appHelper->redirect($target_url); } diff --git a/src/Module/Conversation/Network.php b/src/Module/Conversation/Network.php index 49a478fbc4..bf8b0614a9 100644 --- a/src/Module/Conversation/Network.php +++ b/src/Module/Conversation/Network.php @@ -7,8 +7,11 @@ namespace Friendica\Module\Conversation; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\App\Mode; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\BoundariesPager; use Friendica\Content\Conversation; use Friendica\Content\Conversation\Entity\Channel; @@ -61,15 +64,15 @@ class Network extends Timeline /** @var int */ protected $mention; - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; /** @var ICanCache */ protected $cache; /** @var IManageConfigValues The config */ protected $config; /** @var SystemMessages */ protected $systemMessages; - /** @var App\Page */ + /** @var Page */ protected $page; /** @var Conversation */ protected $conversation; @@ -88,11 +91,11 @@ class Network extends Timeline /** @var NetworkFactory */ protected $networkFactory; - public function __construct(UserDefinedChannelFactory $userDefinedChannel, NetworkFactory $network, CommunityFactory $community, ChannelFactory $channelFactory, UserDefinedChannel $channel, App $app, TimelineFactory $timeline, SystemMessages $systemMessages, Mode $mode, Conversation $conversation, App\Page $page, IHandleUserSessions $session, Database $database, IManagePersonalConfigValues $pConfig, IManageConfigValues $config, ICanCache $cache, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(UserDefinedChannelFactory $userDefinedChannel, NetworkFactory $network, CommunityFactory $community, ChannelFactory $channelFactory, UserDefinedChannel $channel, AppHelper $appHelper, TimelineFactory $timeline, SystemMessages $systemMessages, Mode $mode, Conversation $conversation, Page $page, IHandleUserSessions $session, Database $database, IManagePersonalConfigValues $pConfig, IManageConfigValues $config, ICanCache $cache, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($channel, $mode, $session, $database, $pConfig, $config, $cache, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->app = $app; + $this->appHelper = $appHelper; $this->timeline = $timeline; $this->systemMessages = $systemMessages; $this->conversation = $conversation; @@ -393,10 +396,10 @@ class Network extends Timeline } if ($this->dateFrom) { - $conditionStrings = DBA::mergeConditions($conditionStrings, ["`received` <= ? ", DateTimeFormat::convert($this->dateFrom, 'UTC', $this->app->getTimeZone())]); + $conditionStrings = DBA::mergeConditions($conditionStrings, ["`received` <= ? ", DateTimeFormat::convert($this->dateFrom, 'UTC', $this->appHelper->getTimeZone())]); } if ($this->dateTo) { - $conditionStrings = DBA::mergeConditions($conditionStrings, ["`received` >= ? ", DateTimeFormat::convert($this->dateTo, 'UTC', $this->app->getTimeZone())]); + $conditionStrings = DBA::mergeConditions($conditionStrings, ["`received` >= ? ", DateTimeFormat::convert($this->dateTo, 'UTC', $this->appHelper->getTimeZone())]); } if ($this->circleId) { diff --git a/src/Module/FriendSuggest.php b/src/Module/FriendSuggest.php index 717e471460..4c9720a6d6 100644 --- a/src/Module/FriendSuggest.php +++ b/src/Module/FriendSuggest.php @@ -7,7 +7,8 @@ namespace Friendica\Module; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Protocol; @@ -35,7 +36,7 @@ class FriendSuggest extends BaseModule /** @var \Friendica\Contact\FriendSuggest\Factory\FriendSuggest */ protected $friendSuggestFac; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Database $dba, \Friendica\Contact\FriendSuggest\Repository\FriendSuggest $friendSuggestRepo, \Friendica\Contact\FriendSuggest\Factory\FriendSuggest $friendSuggestFac, array $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Database $dba, \Friendica\Contact\FriendSuggest\Repository\FriendSuggest $friendSuggestRepo, \Friendica\Contact\FriendSuggest\Factory\FriendSuggest $friendSuggestFac, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -97,14 +98,14 @@ class FriendSuggest extends BaseModule } $suggestableContacts = ContactModel::selectToArray(['id', 'name'], [ - '`uid` = ? - AND `id` != ? - AND `network` = ? - AND NOT `self` - AND NOT `blocked` - AND NOT `pending` - AND NOT `archive` - AND NOT `deleted` + '`uid` = ? + AND `id` != ? + AND `network` = ? + AND NOT `self` + AND NOT `blocked` + AND NOT `pending` + AND NOT `archive` + AND NOT `deleted` AND `notify` != ""', DI::userSession()->getLocalUserId(), $cid, diff --git a/src/Module/Friendica.php b/src/Module/Friendica.php index c7e4ca983f..cd1362b3af 100644 --- a/src/Module/Friendica.php +++ b/src/Module/Friendica.php @@ -8,6 +8,8 @@ namespace Friendica\Module; use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\BaseModule; use Friendica\Core\Addon; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -36,7 +38,7 @@ class Friendica extends BaseModule /** @var IHandleUserSessions */ private $session; - public function __construct(IHandleUserSessions $session, IManageKeyValuePairs $keyValue, IManageConfigValues $config, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(IHandleUserSessions $session, IManageKeyValuePairs $keyValue, IManageConfigValues $config, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); diff --git a/src/Module/Home.php b/src/Module/Home.php index 2d79148c58..9c72398f7a 100644 --- a/src/Module/Home.php +++ b/src/Module/Home.php @@ -32,7 +32,7 @@ class Home extends BaseModule protected function content(array $request = []): string { - $app = DI::app(); + $basePath = DI::appHelper()->getBasePath(); $config = DI::config(); // currently no returned data is used @@ -51,8 +51,8 @@ class Home extends BaseModule $customHome = ''; $defaultHeader = ($config->get('config', 'sitename') ? DI::l10n()->t('Welcome to %s', $config->get('config', 'sitename')) : ''); - $homeFilePath = $app->getBasePath() . '/home.html'; - $cssFilePath = $app->getBasePath() . '/home.css'; + $homeFilePath = $basePath . '/home.html'; + $cssFilePath = $basePath . '/home.css'; if (file_exists($homeFilePath)) { $customHome = $homeFilePath; diff --git a/src/Module/Install.php b/src/Module/Install.php index 171474e6a3..ae4aba73be 100644 --- a/src/Module/Install.php +++ b/src/Module/Install.php @@ -7,10 +7,14 @@ namespace Friendica\Module; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Mode; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core; use Friendica\Core\Config\ValueObject\Cache; +use Friendica\Core\Installer; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Theme; @@ -51,22 +55,22 @@ class Install extends BaseModule private $currentWizardStep; /** - * @var Core\Installer The installer + * @var Installer The installer */ private $installer; - /** @var App */ - protected $app; - /** @var App\Mode */ + /** @var Cache */ + protected $configCache; + /** @var Mode */ protected $mode; - public function __construct(App $app, BasePath $basePath, App\Mode $mode, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Core\Installer $installer, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, BasePath $basePath, Mode $mode, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Installer $installer, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->app = $app; - $this->mode = $mode; - $this->installer = $installer; + $this->configCache = $appHelper->getConfigCache(); + $this->mode = $mode; + $this->installer = $installer; if (!$this->mode->isInstall()) { throw new HTTPException\ForbiddenException(); @@ -80,8 +84,7 @@ class Install extends BaseModule } // get basic installation information and save them to the config cache - $configCache = $this->app->getConfigCache(); - $this->installer->setUpCache($configCache, $basePath->getPath()); + $this->installer->setUpCache($this->configCache, $basePath->getPath()); // We overwrite current theme css, because during install we may not have a working mod_rewrite // so we may not have a css at all. Here we set a static css file for the install procedure pages @@ -92,31 +95,29 @@ class Install extends BaseModule protected function post(array $request = []) { - $configCache = $this->app->getConfigCache(); - switch ($this->currentWizardStep) { case self::SYSTEM_CHECK: case self::BASE_CONFIG: - $this->checkSetting($configCache, $_POST, 'config', 'php_path'); + $this->checkSetting($this->configCache, $_POST, 'config', 'php_path'); break; case self::DATABASE_CONFIG: - $this->checkSetting($configCache, $_POST, 'config', 'php_path'); + $this->checkSetting($this->configCache, $_POST, 'config', 'php_path'); - $this->checkSetting($configCache, $_POST, 'system', 'basepath'); - $this->checkSetting($configCache, $_POST, 'system', 'url'); + $this->checkSetting($this->configCache, $_POST, 'system', 'basepath'); + $this->checkSetting($this->configCache, $_POST, 'system', 'url'); break; case self::SITE_SETTINGS: - $this->checkSetting($configCache, $_POST, 'config', 'php_path'); + $this->checkSetting($this->configCache, $_POST, 'config', 'php_path'); - $this->checkSetting($configCache, $_POST, 'system', 'basepath'); - $this->checkSetting($configCache, $_POST, 'system', 'url'); + $this->checkSetting($this->configCache, $_POST, 'system', 'basepath'); + $this->checkSetting($this->configCache, $_POST, 'system', 'url'); - $this->checkSetting($configCache, $_POST, 'database', 'hostname', Core\Installer::DEFAULT_HOST); - $this->checkSetting($configCache, $_POST, 'database', 'username', ''); - $this->checkSetting($configCache, $_POST, 'database', 'password', ''); - $this->checkSetting($configCache, $_POST, 'database', 'database', ''); + $this->checkSetting($this->configCache, $_POST, 'database', 'hostname', Core\Installer::DEFAULT_HOST); + $this->checkSetting($this->configCache, $_POST, 'database', 'username', ''); + $this->checkSetting($this->configCache, $_POST, 'database', 'password', ''); + $this->checkSetting($this->configCache, $_POST, 'database', 'database', ''); // If we cannot connect to the database, return to the previous step if (!$this->installer->checkDB(DI::dba())) { @@ -126,19 +127,19 @@ class Install extends BaseModule break; case self::FINISHED: - $this->checkSetting($configCache, $_POST, 'config', 'php_path'); + $this->checkSetting($this->configCache, $_POST, 'config', 'php_path'); - $this->checkSetting($configCache, $_POST, 'system', 'basepath'); - $this->checkSetting($configCache, $_POST, 'system', 'url'); + $this->checkSetting($this->configCache, $_POST, 'system', 'basepath'); + $this->checkSetting($this->configCache, $_POST, 'system', 'url'); - $this->checkSetting($configCache, $_POST, 'database', 'hostname', Core\Installer::DEFAULT_HOST); - $this->checkSetting($configCache, $_POST, 'database', 'username', ''); - $this->checkSetting($configCache, $_POST, 'database', 'password', ''); - $this->checkSetting($configCache, $_POST, 'database', 'database', ''); + $this->checkSetting($this->configCache, $_POST, 'database', 'hostname', Core\Installer::DEFAULT_HOST); + $this->checkSetting($this->configCache, $_POST, 'database', 'username', ''); + $this->checkSetting($this->configCache, $_POST, 'database', 'password', ''); + $this->checkSetting($this->configCache, $_POST, 'database', 'database', ''); - $this->checkSetting($configCache, $_POST, 'system', 'default_timezone', Core\Installer::DEFAULT_TZ); - $this->checkSetting($configCache, $_POST, 'system', 'language', Core\Installer::DEFAULT_LANG); - $this->checkSetting($configCache, $_POST, 'config', 'admin_email', ''); + $this->checkSetting($this->configCache, $_POST, 'system', 'default_timezone', Core\Installer::DEFAULT_TZ); + $this->checkSetting($this->configCache, $_POST, 'system', 'language', Core\Installer::DEFAULT_LANG); + $this->checkSetting($this->configCache, $_POST, 'config', 'admin_email', ''); // If we cannot connect to the database, return to the Database config wizard if (!$this->installer->checkDB(DI::dba())) { @@ -146,7 +147,7 @@ class Install extends BaseModule return; } - if (!$this->installer->createConfig($configCache)) { + if (!$this->installer->createConfig($this->configCache)) { return; } @@ -169,15 +170,13 @@ class Install extends BaseModule protected function content(array $request = []): string { - $configCache = $this->app->getConfigCache(); - $output = ''; $install_title = $this->t('Friendica Communications Server - Setup'); switch ($this->currentWizardStep) { case self::SYSTEM_CHECK: - $php_path = $configCache->get('config', 'php_path'); + $php_path = $this->configCache->get('config', 'php_path'); $status = $this->installer->checkEnvironment($this->baseUrl, $php_path); @@ -199,8 +198,8 @@ class Install extends BaseModule break; case self::BASE_CONFIG: - $baseUrl = $configCache->get('system', 'url') ? - new Uri($configCache->get('system', 'url')) : + $baseUrl = $this->configCache->get('system', 'url') ? + new Uri($this->configCache->get('system', 'url')) : $this->baseUrl; $tpl = Renderer::getMarkupTemplate('install/02_base_config.tpl'); @@ -209,7 +208,7 @@ class Install extends BaseModule '$pass' => $this->t('Base settings'), '$basepath' => ['system-basepath', $this->t("Base path to installation"), - $configCache->get('system', 'basepath'), + $this->configCache->get('system', 'basepath'), $this->t("If the system cannot detect the correct path to your installation, enter the correct path here. This setting should only be set if you are using a restricted system and symbolic links to your webroot."), $this->t('Required')], '$system_url' => ['system-url', @@ -217,7 +216,7 @@ class Install extends BaseModule (string)$baseUrl, $this->t("Overwrite this field in case the system URL determination isn't right, otherwise leave it as is."), $this->t('Required')], - '$php_path' => $configCache->get('config', 'php_path'), + '$php_path' => $this->configCache->get('config', 'php_path'), '$submit' => $this->t('Submit'), ]); break; @@ -233,31 +232,31 @@ class Install extends BaseModule '$required' => $this->t('Required'), '$requirement_not_satisfied' => $this->t('Requirement not satisfied'), '$checks' => $this->installer->getChecks(), - '$basepath' => $configCache->get('system', 'basepath'), - '$system_url' => $configCache->get('system', 'url'), + '$basepath' => $this->configCache->get('system', 'basepath'), + '$system_url' => $this->configCache->get('system', 'url'), '$dbhost' => ['database-hostname', $this->t('Database Server Name'), - $configCache->get('database', 'hostname'), + $this->configCache->get('database', 'hostname'), '', $this->t('Required')], '$dbuser' => ['database-username', $this->t('Database Login Name'), - $configCache->get('database', 'username'), + $this->configCache->get('database', 'username'), '', $this->t('Required'), 'autofocus'], '$dbpass' => ['database-password', $this->t('Database Login Password'), - $configCache->get('database', 'password'), + $this->configCache->get('database', 'password'), $this->t("For security reasons the password must not be empty"), $this->t('Required')], '$dbdata' => ['database-database', $this->t('Database Name'), - $configCache->get('database', 'database'), + $this->configCache->get('database', 'database'), '', $this->t('Required')], '$lbl_10' => $this->t('Please select a default timezone for your website'), - '$php_path' => $configCache->get('config', 'php_path'), + '$php_path' => $this->configCache->get('config', 'php_path'), '$submit' => $this->t('Submit') ]); break; @@ -272,27 +271,27 @@ class Install extends BaseModule '$required' => $this->t('Required'), '$checks' => $this->installer->getChecks(), '$pass' => $this->t('Site settings'), - '$basepath' => $configCache->get('system', 'basepath'), - '$system_url' => $configCache->get('system', 'url'), - '$dbhost' => $configCache->get('database', 'hostname'), - '$dbuser' => $configCache->get('database', 'username'), - '$dbpass' => $configCache->get('database', 'password'), - '$dbdata' => $configCache->get('database', 'database'), + '$basepath' => $this->configCache->get('system', 'basepath'), + '$system_url' => $this->configCache->get('system', 'url'), + '$dbhost' => $this->configCache->get('database', 'hostname'), + '$dbuser' => $this->configCache->get('database', 'username'), + '$dbpass' => $this->configCache->get('database', 'password'), + '$dbdata' => $this->configCache->get('database', 'database'), '$adminmail' => ['config-admin_email', $this->t('Site administrator email address'), - $configCache->get('config', 'admin_email'), + $this->configCache->get('config', 'admin_email'), $this->t('Your account email address must match this in order to use the web admin panel.'), $this->t('Required'), 'autofocus', 'email'], '$timezone' => Temporal::getTimezoneField('system-default_timezone', $this->t('Please select a default timezone for your website'), - $configCache->get('system', 'default_timezone'), + $this->configCache->get('system', 'default_timezone'), ''), '$language' => ['system-language', $this->t('System Language:'), - $configCache->get('system', 'language'), + $this->configCache->get('system', 'language'), $this->t('Set the default language for your Friendica installation interface and to send emails.'), $lang_choices], - '$php_path' => $configCache->get('config', 'php_path'), + '$php_path' => $this->configCache->get('config', 'php_path'), '$submit' => $this->t('Submit') ]); break; diff --git a/src/Module/Item/Compose.php b/src/Module/Item/Compose.php index e5eeb8e278..727b8ba04f 100644 --- a/src/Module/Item/Compose.php +++ b/src/Module/Item/Compose.php @@ -8,7 +8,10 @@ namespace Friendica\Module\Item; use DateTime; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Content\Feature; use Friendica\Core\ACL; @@ -41,7 +44,7 @@ class Compose extends BaseModule /** @var ACLFormatter */ private $ACLFormatter; - /** @var App\Page */ + /** @var Page */ private $page; /** @var IManagePersonalConfigValues */ @@ -53,11 +56,11 @@ class Compose extends BaseModule /** @var UserSession */ private $session; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; - public function __construct(App $app, UserSession $session, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, App\Page $page, ACLFormatter $ACLFormatter, SystemMessages $systemMessages, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, UserSession $session, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, Page $page, ACLFormatter $ACLFormatter, SystemMessages $systemMessages, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -67,7 +70,7 @@ class Compose extends BaseModule $this->pConfig = $pConfig; $this->config = $config; $this->session = $session; - $this->app = $app; + $this->appHelper = $appHelper; } protected function post(array $request = []) @@ -87,7 +90,7 @@ class Compose extends BaseModule return Login::form('compose'); } - if ($this->app->getCurrentTheme() !== 'frio') { + if ($this->appHelper->getCurrentTheme() !== 'frio') { throw new NotImplementedException($this->l10n->t('This feature is only available with the frio theme.')); } @@ -115,7 +118,7 @@ class Compose extends BaseModule $compose_title = $this->l10n->t('Compose new personal note'); $type = 'note'; $doesFederate = false; - $contact_allow_list = [$this->app->getContactId()]; + $contact_allow_list = [$this->appHelper->getContactId()]; $circle_allow_list = []; $contact_deny_list = []; $circle_deny_list = []; @@ -158,12 +161,12 @@ class Compose extends BaseModule $this->page->registerFooterScript(Theme::getPathForFile('js/linkPreview.js')); $this->page->registerFooterScript(Theme::getPathForFile('js/compose.js')); - $contact = Contact::getById($this->app->getContactId()); + $contact = Contact::getById($this->appHelper->getContactId()); if ($this->pConfig->get($this->session->getLocalUserId(), 'system', 'set_creation_date')) { $created_at = Temporal::getDateTimeField( - new \DateTime(DBA::NULL_DATETIME), - new \DateTime('now'), + new DateTime(DBA::NULL_DATETIME), + new DateTime('now'), null, $this->l10n->t('Created at'), 'created_at' diff --git a/src/Module/Item/Display.php b/src/Module/Item/Display.php index 615a8a6d47..66ac3c3a75 100644 --- a/src/Module/Item/Display.php +++ b/src/Module/Item/Display.php @@ -8,6 +8,7 @@ namespace Friendica\Module\Item; use Friendica\App; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Content\Conversation; use Friendica\Content\Item as ContentItem; @@ -46,8 +47,8 @@ class Display extends BaseModule protected $pConfig; /** @var IHandleUserSessions */ protected $session; - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; /** @var ContentItem */ protected $contentItem; /** @var Conversation */ @@ -57,7 +58,7 @@ class Display extends BaseModule /** @var Notify */ protected $notify; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, IHandleUserSessions $session, App $app, App\Page $page, ContentItem $contentItem, Conversation $conversation, Notification $notification, Notify $notify, array $server, array $parameters = []) + public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, IHandleUserSessions $session, AppHelper $appHelper, App\Page $page, ContentItem $contentItem, Conversation $conversation, Notification $notification, Notify $notify, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -65,7 +66,7 @@ class Display extends BaseModule $this->config = $config; $this->pConfig = $pConfig; $this->session = $session; - $this->app = $app; + $this->appHelper = $appHelper; $this->contentItem = $contentItem; $this->conversation = $conversation; $this->notification = $notification; @@ -176,12 +177,12 @@ class Display extends BaseModule } if ($this->baseUrl->isLocalUrl($author['url'])) { - Profile::load($this->app, $author['nick'], false); + Profile::load($this->appHelper, $author['nick'], false); } else { $this->page['aside'] = Widget\VCard::getHTML($author); } - $this->app->setProfileOwner($item['uid']); + $this->appHelper->setProfileOwner($item['uid']); } protected function getDisplayData(array $item, bool $update = false, int $updateUid = 0, bool $force = false): string diff --git a/src/Module/Magic.php b/src/Module/Magic.php index c3b9a2b4db..c06cbd6f4e 100644 --- a/src/Module/Magic.php +++ b/src/Module/Magic.php @@ -8,7 +8,9 @@ namespace Friendica\Module; use Exception; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Protocol; @@ -35,8 +37,8 @@ use Psr\Log\LoggerInterface; */ class Magic extends BaseModule { - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; /** @var Database */ protected $dba; /** @var ICanSendHttpRequests */ @@ -44,11 +46,11 @@ class Magic extends BaseModule /** @var IHandleUserSessions */ protected $userSession; - public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Database $dba, ICanSendHttpRequests $httpClient, IHandleUserSessions $userSession, $server, array $parameters = []) + public function __construct(AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Database $dba, ICanSendHttpRequests $httpClient, IHandleUserSessions $userSession, $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->app = $app; + $this->appHelper = $appHelper; $this->dba = $dba; $this->httpClient = $httpClient; $this->userSession = $userSession; @@ -79,12 +81,12 @@ class Magic extends BaseModule $contact = Contact::getByURL($addr ?: $dest); if ($contact === [] && $owa === 0) { $this->logger->info('No contact record found, no oWA, redirecting to destination.', ['request' => $request, 'server' => $_SERVER, 'dest' => $dest]); - $this->app->redirect($dest); + $this->appHelper->redirect($dest); } if ($contact !== []) { // Redirect if the contact is already authenticated on this site. - if ($this->app->getContactId() && strpos($contact['nurl'], Strings::normaliseLink($this->baseUrl)) !== false) { + if ($this->appHelper->getContactId() && strpos($contact['nurl'], Strings::normaliseLink($this->baseUrl)) !== false) { $this->logger->info('Contact is already authenticated, redirecting to destination.', ['dest' => $dest]); System::externalRedirect($dest); } @@ -94,7 +96,7 @@ class Magic extends BaseModule if (!$this->userSession->getLocalUserId() || $owa === 0) { $this->logger->notice('Not logged in or not OWA, redirecting to destination.', ['uid' => $this->userSession->getLocalUserId(), 'owa' => $owa, 'dest' => $dest]); - $this->app->redirect($dest); + $this->appHelper->redirect($dest); } $dest = Network::removeUrlParameter($dest, 'zid'); @@ -164,7 +166,7 @@ class Magic extends BaseModule $j = json_decode($curlResult->getBodyString(), true); if (empty($j) || !$j['success']) { $this->logger->notice('Invalid JSON, redirecting to destination.', ['json' => $j, 'dest' => $dest]); - $this->app->redirect($dest); + $this->appHelper->redirect($dest); } if ($j['encrypted_token']) { diff --git a/src/Module/Media/Attachment/Browser.php b/src/Module/Media/Attachment/Browser.php index cff3e18243..fd46499552 100644 --- a/src/Module/Media/Attachment/Browser.php +++ b/src/Module/Media/Attachment/Browser.php @@ -7,12 +7,13 @@ namespace Friendica\Module\Media\Attachment; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleUserSessions; -use Friendica\Core\System; use Friendica\Model\Attach; use Friendica\Module\Response; use Friendica\Network\HTTPException\UnauthorizedException; @@ -27,15 +28,15 @@ class Browser extends BaseModule { /** @var IHandleUserSessions */ protected $session; - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, App $app, array $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, AppHelper $appHelper, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->session = $session; - $this->app = $app; + $this->session = $session; + $this->appHelper = $appHelper; } protected function content(array $request = []): string @@ -47,7 +48,7 @@ class Browser extends BaseModule // Needed to match the correct template in a module that uses a different theme than the user/site/default $theme = Strings::sanitizeFilePathItem($request['theme'] ?? ''); if ($theme && is_file("view/theme/$theme/config.php")) { - $this->app->setCurrentTheme($theme); + $this->appHelper->setCurrentTheme($theme); } $files = Attach::selectToArray(['id', 'filename', 'filetype'], ['uid' => $this->session->getLocalUserId()]); diff --git a/src/Module/Media/Photo/Browser.php b/src/Module/Media/Photo/Browser.php index aa412530b7..408ba575d1 100644 --- a/src/Module/Media/Photo/Browser.php +++ b/src/Module/Media/Photo/Browser.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Media\Photo; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -28,15 +30,15 @@ class Browser extends BaseModule { /** @var IHandleUserSessions */ protected $session; - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, App $app, array $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, AppHelper $appHelper, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->session = $session; - $this->app = $app; + $this->session = $session; + $this->appHelper = $appHelper; } protected function content(array $request = []): string @@ -48,7 +50,7 @@ class Browser extends BaseModule // Needed to match the correct template in a module that uses a different theme than the user/site/default $theme = Strings::sanitizeFilePathItem($request['theme'] ?? ''); if ($theme && is_file("view/theme/$theme/config.php")) { - $this->app->setCurrentTheme($theme); + $this->appHelper->setCurrentTheme($theme); } $album = $this->parameters['album'] ?? null; diff --git a/src/Module/Moderation/BaseUsers.php b/src/Module/Moderation/BaseUsers.php index 91c538c123..0123ce5bc8 100644 --- a/src/Module/Moderation/BaseUsers.php +++ b/src/Module/Moderation/BaseUsers.php @@ -7,13 +7,15 @@ namespace Friendica\Module\Moderation; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Core\Hook; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Database\Database; -use Friendica\DI; use Friendica\Model\Register; use Friendica\Model\User; use Friendica\Module\BaseModeration; @@ -29,9 +31,9 @@ abstract class BaseUsers extends BaseModeration /** @var Database */ protected $database; - public function __construct(Database $database, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Database $database, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; } diff --git a/src/Module/Moderation/Blocklist/Contact.php b/src/Module/Moderation/Blocklist/Contact.php index d19fd74903..02bb451213 100644 --- a/src/Module/Moderation/Blocklist/Contact.php +++ b/src/Module/Moderation/Blocklist/Contact.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Moderation\Blocklist; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\Pager; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -18,7 +21,6 @@ use Friendica\Model; use Friendica\Module\BaseModeration; use Friendica\Module\Response; use Friendica\Navigation\SystemMessages; -use Friendica\Util\Network; use Friendica\Util\Profiler; use Psr\Log\LoggerInterface; @@ -27,9 +29,9 @@ class Contact extends BaseModeration /** @var Database */ private $database; - public function __construct(Database $database, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Database $database, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; } diff --git a/src/Module/Moderation/Blocklist/Server/Add.php b/src/Module/Moderation/Blocklist/Server/Add.php index 9f0110a558..6bd878aca5 100644 --- a/src/Module/Moderation/Blocklist/Server/Add.php +++ b/src/Module/Moderation/Blocklist/Server/Add.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Moderation\Blocklist\Server; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\ContactSelector; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -29,7 +32,7 @@ class Add extends BaseModeration /** @var DomainPatternBlocklist */ private $blocklist; - public function __construct(DomainPatternBlocklist $blocklist, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(DomainPatternBlocklist $blocklist, Page $page, AppHelper $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); diff --git a/src/Module/Moderation/Blocklist/Server/Import.php b/src/Module/Moderation/Blocklist/Server/Import.php index d42101857e..52f2a1ccc1 100644 --- a/src/Module/Moderation/Blocklist/Server/Import.php +++ b/src/Module/Moderation/Blocklist/Server/Import.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Moderation\Blocklist\Server; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleUserSessions; @@ -27,9 +30,9 @@ class Import extends \Friendica\Module\BaseModeration /** @var array of blocked server domain patterns */ private $blocklist = []; - public function __construct(DomainPatternBlocklist $localBlocklist, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(DomainPatternBlocklist $localBlocklist, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->localBlocklist = $localBlocklist; } diff --git a/src/Module/Moderation/Blocklist/Server/Index.php b/src/Module/Moderation/Blocklist/Server/Index.php index fd9fbdec87..20d95a218d 100644 --- a/src/Module/Moderation/Blocklist/Server/Index.php +++ b/src/Module/Moderation/Blocklist/Server/Index.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Moderation\Blocklist\Server; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleUserSessions; @@ -24,9 +27,9 @@ class Index extends BaseModeration /** @var DomainPatternBlocklist */ private $blocklist; - public function __construct(DomainPatternBlocklist $blocklist, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(DomainPatternBlocklist $blocklist, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->blocklist = $blocklist; } diff --git a/src/Module/Moderation/Item/Source.php b/src/Module/Moderation/Item/Source.php index b82f8d54a7..64858294eb 100644 --- a/src/Module/Moderation/Item/Source.php +++ b/src/Module/Moderation/Item/Source.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Moderation\Item; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -24,9 +27,9 @@ class Source extends BaseModeration /** @var IManageConfigValues */ private $config; - public function __construct(IManageConfigValues $config, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(IManageConfigValues $config, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->config = $config; } diff --git a/src/Module/Moderation/Reports.php b/src/Module/Moderation/Reports.php index 7951dda59b..1b713abb66 100644 --- a/src/Module/Moderation/Reports.php +++ b/src/Module/Moderation/Reports.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Moderation; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\Pager; use Friendica\Content\Text\BBCode; use Friendica\Core\L10n; @@ -27,9 +30,9 @@ class Reports extends BaseModeration /** @var Database */ private $database; - public function __construct(Database $database, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Database $database, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; } diff --git a/src/Module/Moderation/Summary.php b/src/Module/Moderation/Summary.php index b9f4144df3..99ab2ee296 100644 --- a/src/Module/Moderation/Summary.php +++ b/src/Module/Moderation/Summary.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Moderation; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleUserSessions; @@ -24,9 +27,9 @@ class Summary extends BaseModeration /** @var Database */ private $database; - public function __construct(Database $database, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Database $database, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; } @@ -34,7 +37,7 @@ class Summary extends BaseModeration protected function content(array $request = []): string { parent::content(); - + $accounts = [ [$this->t('Personal Page'), 0], [$this->t('Organisation Page'), 0], diff --git a/src/Module/NodeInfo110.php b/src/Module/NodeInfo110.php index 2e58e6edd5..969d4dd7db 100644 --- a/src/Module/NodeInfo110.php +++ b/src/Module/NodeInfo110.php @@ -8,6 +8,8 @@ namespace Friendica\Module; use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\BaseModule; use Friendica\Capabilities\ICanCreateResponses; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -25,7 +27,7 @@ class NodeInfo110 extends BaseModule /** @var IManageConfigValues */ protected $config; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); diff --git a/src/Module/NodeInfo120.php b/src/Module/NodeInfo120.php index fc1e48171a..a9fcecd6b9 100644 --- a/src/Module/NodeInfo120.php +++ b/src/Module/NodeInfo120.php @@ -8,6 +8,8 @@ namespace Friendica\Module; use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\BaseModule; use Friendica\Capabilities\ICanCreateResponses; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -25,7 +27,7 @@ class NodeInfo120 extends BaseModule /** @var IManageConfigValues */ protected $config; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); diff --git a/src/Module/NodeInfo121.php b/src/Module/NodeInfo121.php index 6a343c1c9d..903af26557 100644 --- a/src/Module/NodeInfo121.php +++ b/src/Module/NodeInfo121.php @@ -8,6 +8,8 @@ namespace Friendica\Module; use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\BaseModule; use Friendica\Capabilities\ICanCreateResponses; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -25,7 +27,7 @@ class NodeInfo121 extends BaseModule /** @var IManageConfigValues */ protected $config; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); diff --git a/src/Module/NodeInfo122.php b/src/Module/NodeInfo122.php index 0ad5b71ff8..7c3a675469 100644 --- a/src/Module/NodeInfo122.php +++ b/src/Module/NodeInfo122.php @@ -8,6 +8,8 @@ namespace Friendica\Module; use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\BaseModule; use Friendica\Capabilities\ICanCreateResponses; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -25,7 +27,7 @@ class NodeInfo122 extends BaseModule /** @var IManageConfigValues */ protected $config; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); diff --git a/src/Module/NodeInfo210.php b/src/Module/NodeInfo210.php index 04a1635d86..bd1d1cdf39 100644 --- a/src/Module/NodeInfo210.php +++ b/src/Module/NodeInfo210.php @@ -8,6 +8,8 @@ namespace Friendica\Module; use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\BaseModule; use Friendica\Capabilities\ICanCreateResponses; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -25,7 +27,7 @@ class NodeInfo210 extends BaseModule /** @var IManageConfigValues */ protected $config; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); diff --git a/src/Module/Notifications/Ping.php b/src/Module/Notifications/Ping.php index 59836d8f91..8e280ef0cb 100644 --- a/src/Module/Notifications/Ping.php +++ b/src/Module/Notifications/Ping.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Notifications; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Contact\Introduction\Repository\Introduction; use Friendica\Content\GroupManager; @@ -60,10 +62,10 @@ class Ping extends BaseModule private $cache; /** @var Repository\Notify */ private $notify; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; - public function __construct(App $app, Repository\Notify $notify, ICanCache $cache, Database $database, IManagePersonalConfigValues $pconfig, IManageConfigValues $config, IHandleUserSessions $session, SystemMessages $systemMessages, Repository\Notification $notificationRepo, Introduction $introductionRepo, Factory\FormattedNavNotification $formattedNavNotification, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, Repository\Notify $notify, ICanCache $cache, Database $database, IManagePersonalConfigValues $pconfig, IManageConfigValues $config, IHandleUserSessions $session, SystemMessages $systemMessages, Repository\Notification $notificationRepo, Introduction $introductionRepo, Factory\FormattedNavNotification $formattedNavNotification, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -77,7 +79,7 @@ class Ping extends BaseModule $this->database = $database; $this->cache = $cache; $this->notify = $notify; - $this->app = $app; + $this->appHelper = $appHelper; } protected function rawContent(array $request = []) diff --git a/src/Module/OAuth/Acknowledge.php b/src/Module/OAuth/Acknowledge.php index 44c1b1a0fc..78e4083e42 100644 --- a/src/Module/OAuth/Acknowledge.php +++ b/src/Module/OAuth/Acknowledge.php @@ -26,7 +26,7 @@ class Acknowledge extends BaseApi protected function post(array $request = []) { DI::session()->set('oauth_acknowledge', true); - DI::app()->redirect(DI::session()->get('return_path')); + DI::appHelper()->redirect(DI::session()->get('return_path')); } protected function content(array $request = []): string diff --git a/src/Module/OAuth/Authorize.php b/src/Module/OAuth/Authorize.php index cd7b274ba6..8179bfa886 100644 --- a/src/Module/OAuth/Authorize.php +++ b/src/Module/OAuth/Authorize.php @@ -60,14 +60,14 @@ class Authorize extends BaseApi $uid = DI::userSession()->getLocalUserId(); if (empty($uid)) { Logger::info('Redirect to login'); - DI::app()->redirect('login?' . http_build_query(['return_authorize' => $redirect])); + DI::appHelper()->redirect('login?' . http_build_query(['return_authorize' => $redirect])); } else { Logger::info('Already logged in user', ['uid' => $uid]); } if (!OAuth::existsTokenForUser($application, $uid) && !DI::session()->get('oauth_acknowledge')) { Logger::info('Redirect to acknowledge'); - DI::app()->redirect('oauth/acknowledge?' . http_build_query(['return_authorize' => $redirect, 'application' => $application['name']])); + DI::appHelper()->redirect('oauth/acknowledge?' . http_build_query(['return_authorize' => $redirect, 'application' => $application['name']])); } DI::session()->remove('oauth_acknowledge'); @@ -78,7 +78,7 @@ class Authorize extends BaseApi } if ($application['redirect_uri'] != 'urn:ietf:wg:oauth:2.0:oob') { - DI::app()->redirect($request['redirect_uri'] . (strpos($request['redirect_uri'], '?') ? '&' : '?') . http_build_query(['code' => $token['code'], 'state' => $request['state']])); + DI::appHelper()->redirect($request['redirect_uri'] . (strpos($request['redirect_uri'], '?') ? '&' : '?') . http_build_query(['code' => $token['code'], 'state' => $request['state']])); } self::$oauth_code = $token['code']; diff --git a/src/Module/ParseUrl.php b/src/Module/ParseUrl.php index ae5d5a3aeb..8da72c742c 100644 --- a/src/Module/ParseUrl.php +++ b/src/Module/ParseUrl.php @@ -7,13 +7,13 @@ namespace Friendica\Module; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\BaseModule; use Friendica\Content\Text\BBCode; use Friendica\Core\Hook; use Friendica\Core\L10n; use Friendica\Core\Session\Capability\IHandleUserSessions; -use Friendica\Core\System; use Friendica\Network\HTTPException\BadRequestException; use Friendica\Util; use Friendica\Util\Profiler; @@ -24,7 +24,7 @@ class ParseUrl extends BaseModule /** @var IHandleUserSessions */ protected $userSession; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $userSession, $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $userSession, $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); diff --git a/src/Module/Ping/Network.php b/src/Module/Ping/Network.php index 7e7acd4b39..f8c41a2e1c 100644 --- a/src/Module/Ping/Network.php +++ b/src/Module/Ping/Network.php @@ -7,8 +7,11 @@ namespace Friendica\Module\Ping; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\App\Mode; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\Conversation; use Friendica\Content\Conversation\Factory\Timeline as TimelineFactory; use Friendica\Content\Conversation\Repository\UserDefinedChannel; @@ -37,9 +40,9 @@ class Network extends NetworkModule */ private $lock; - public function __construct(ICanLock $lock, UserDefinedChannelFactory $userDefinedChannel, NetworkFactory $network, CommunityFactory $community, ChannelFactory $channelFactory, UserDefinedChannel $channel, App $app, TimelineFactory $timeline, SystemMessages $systemMessages, Mode $mode, Conversation $conversation, App\Page $page, IHandleUserSessions $session, Database $database, IManagePersonalConfigValues $pConfig, IManageConfigValues $config, ICanCache $cache, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(ICanLock $lock, UserDefinedChannelFactory $userDefinedChannel, NetworkFactory $network, CommunityFactory $community, ChannelFactory $channelFactory, UserDefinedChannel $channel, AppHelper $appHelper, TimelineFactory $timeline, SystemMessages $systemMessages, Mode $mode, Conversation $conversation, Page $page, IHandleUserSessions $session, Database $database, IManagePersonalConfigValues $pConfig, IManageConfigValues $config, ICanCache $cache, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($userDefinedChannel, $network, $community, $channelFactory, $channel, $app, $timeline, $systemMessages, $mode, $conversation, $page, $session, $database, $pConfig, $config, $cache, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($userDefinedChannel, $network, $community, $channelFactory, $channel, $appHelper, $timeline, $systemMessages, $mode, $conversation, $page, $session, $database, $pConfig, $config, $cache, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->lock = $lock; } diff --git a/src/Module/Post/Edit.php b/src/Module/Post/Edit.php index f07639a18a..c07ba9d78f 100644 --- a/src/Module/Post/Edit.php +++ b/src/Module/Post/Edit.php @@ -8,6 +8,11 @@ namespace Friendica\Module\Post; use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Mode; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Content\Feature; use Friendica\Core\Hook; @@ -37,12 +42,12 @@ class Edit extends BaseModule protected $page; /** @var App\Mode */ protected $mode; - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; /** @var bool */ protected $isModal = false; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, App\Page $page, App\Mode $mode, App $app, array $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, Page $page, Mode $mode, AppHelper $appHelper, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -50,7 +55,7 @@ class Edit extends BaseModule $this->sysMessages = $sysMessages; $this->page = $page; $this->mode = $mode; - $this->app = $app; + $this->appHelper = $appHelper; } diff --git a/src/Module/Profile/Common.php b/src/Module/Profile/Common.php index 539b132c1e..ccd94844a2 100644 --- a/src/Module/Profile/Common.php +++ b/src/Module/Profile/Common.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Profile; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Content\Nav; use Friendica\Content\Pager; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -30,16 +32,16 @@ class Common extends BaseProfile private $config; /** @var IHandleUserSessions */ private $userSession; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; - public function __construct(App $app, IHandleUserSessions $userSession, IManageConfigValues $config, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, IHandleUserSessions $userSession, IManageConfigValues $config, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->config = $config; $this->userSession = $userSession; - $this->app = $app; + $this->appHelper = $appHelper; } protected function content(array $request = []): string @@ -52,7 +54,7 @@ class Common extends BaseProfile $nickname = $this->parameters['nickname']; - $profile = Profile::load($this->app, $nickname); + $profile = Profile::load($this->appHelper, $nickname); if (empty($profile)) { throw new HTTPException\NotFoundException($this->t('User not found.')); } diff --git a/src/Module/Profile/Contacts.php b/src/Module/Profile/Contacts.php index 09bac2cee6..634a9f6bd8 100644 --- a/src/Module/Profile/Contacts.php +++ b/src/Module/Profile/Contacts.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Profile; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Content\Nav; use Friendica\Content\Pager; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -29,18 +31,18 @@ class Contacts extends Module\BaseProfile private $config; /** @var IHandleUserSessions */ private $userSession; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; /** @var Database */ private $database; - public function __construct(Database $database, App $app, IHandleUserSessions $userSession, IManageConfigValues $config, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Database $database, AppHelper $appHelper, IHandleUserSessions $userSession, IManageConfigValues $config, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->config = $config; $this->userSession = $userSession; - $this->app = $app; + $this->appHelper = $appHelper; $this->database = $database; } @@ -53,7 +55,7 @@ class Contacts extends Module\BaseProfile $nickname = $this->parameters['nickname']; $type = $this->parameters['type'] ?? 'all'; - $profile = Model\Profile::load($this->app, $nickname); + $profile = Model\Profile::load($this->appHelper, $nickname); if (empty($profile)) { throw new HTTPException\NotFoundException($this->t('User not found.')); } diff --git a/src/Module/Profile/Conversations.php b/src/Module/Profile/Conversations.php index d250b58765..a906c3ca24 100644 --- a/src/Module/Profile/Conversations.php +++ b/src/Module/Profile/Conversations.php @@ -7,7 +7,11 @@ namespace Friendica\Module\Profile; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Mode; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\Conversation; use Friendica\Content\Nav; use Friendica\Content\Pager; @@ -39,9 +43,9 @@ use Psr\Log\LoggerInterface; class Conversations extends BaseProfile { - /** @var App */ - private $app; - /** @var App\Page */ + /** @var AppHelper */ + private $appHelper; + /** @var Page */ private $page; /** @var DateTimeFormat */ private $dateTimeFormat; @@ -53,14 +57,14 @@ class Conversations extends BaseProfile private $conversation; /** @var IManagePersonalConfigValues */ private $pConfig; - /** @var App\Mode */ + /** @var Mode */ private $mode; - public function __construct(App\Mode $mode, IManagePersonalConfigValues $pConfig, Conversation $conversation, IHandleUserSessions $session, IManageConfigValues $config, DateTimeFormat $dateTimeFormat, App\Page $page, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Mode $mode, IManagePersonalConfigValues $pConfig, Conversation $conversation, IHandleUserSessions $session, IManageConfigValues $config, DateTimeFormat $dateTimeFormat, Page $page, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->app = $app; + $this->appHelper = $appHelper; $this->page = $page; $this->dateTimeFormat = $dateTimeFormat; $this->config = $config; @@ -72,7 +76,7 @@ class Conversations extends BaseProfile protected function content(array $request = []): string { - $profile = ProfileModel::load($this->app, $this->parameters['nickname'] ?? ''); + $profile = ProfileModel::load($this->appHelper, $this->parameters['nickname'] ?? ''); if (empty($profile)) { throw new HTTPException\NotFoundException($this->t('User not found.')); } @@ -166,11 +170,11 @@ class Conversations extends BaseProfile } if (!empty($datequery)) { - $condition = DBA::mergeConditions($condition, ["`received` <= ?", DateTimeFormat::convert($datequery, 'UTC', $this->app->getTimeZone())]); + $condition = DBA::mergeConditions($condition, ["`received` <= ?", DateTimeFormat::convert($datequery, 'UTC', $this->appHelper->getTimeZone())]); } if (!empty($datequery2)) { - $condition = DBA::mergeConditions($condition, ["`received` >= ?", DateTimeFormat::convert($datequery2, 'UTC', $this->app->getTimeZone())]); + $condition = DBA::mergeConditions($condition, ["`received` >= ?", DateTimeFormat::convert($datequery2, 'UTC', $this->appHelper->getTimeZone())]); } // Does the profile page belong to a group? diff --git a/src/Module/Profile/Index.php b/src/Module/Profile/Index.php index 5558c87999..699466f0e5 100644 --- a/src/Module/Profile/Index.php +++ b/src/Module/Profile/Index.php @@ -7,7 +7,11 @@ namespace Friendica\Module\Profile; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Mode; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Content\Conversation; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -34,13 +38,13 @@ class Index extends BaseModule { /** @var Database */ private $database; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; /** @var IHandleUserSessions */ private $session; /** @var IManageConfigValues */ private $config; - /** @var App\Page */ + /** @var Page */ private $page; /** @var ProfileField */ private $profileField; @@ -50,15 +54,15 @@ class Index extends BaseModule private $conversation; /** @var IManagePersonalConfigValues */ private $pConfig; - /** @var App\Mode */ + /** @var Mode */ private $mode; - public function __construct(App\Mode $mode, IManagePersonalConfigValues $pConfig, Conversation $conversation, DateTimeFormat $dateTimeFormat, ProfileField $profileField, App\Page $page, IManageConfigValues $config, IHandleUserSessions $session, App $app, Database $database, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Mode $mode, IManagePersonalConfigValues $pConfig, Conversation $conversation, DateTimeFormat $dateTimeFormat, ProfileField $profileField, Page $page, IManageConfigValues $config, IHandleUserSessions $session, AppHelper $appHelper, Database $database, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; - $this->app = $app; + $this->appHelper = $appHelper; $this->session = $session; $this->config = $config; $this->page = $page; @@ -71,11 +75,11 @@ class Index extends BaseModule protected function rawContent(array $request = []) { - (new Profile($this->profileField, $this->page, $this->config, $this->session, $this->app, $this->database, $this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->response, $this->server, $this->parameters))->rawContent(); + (new Profile($this->profileField, $this->page, $this->config, $this->session, $this->appHelper, $this->database, $this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->response, $this->server, $this->parameters))->rawContent(); } protected function content(array $request = []): string { - return (new Conversations($this->mode, $this->pConfig, $this->conversation, $this->session, $this->config, $this->dateTimeFormat, $this->page, $this->app, $this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->response, $this->server, $this->parameters))->content(); + return (new Conversations($this->mode, $this->pConfig, $this->conversation, $this->session, $this->config, $this->dateTimeFormat, $this->page, $this->appHelper, $this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->response, $this->server, $this->parameters))->content(); } } diff --git a/src/Module/Profile/Photos.php b/src/Module/Profile/Photos.php index 874e17b448..a377cd6dc3 100644 --- a/src/Module/Profile/Photos.php +++ b/src/Module/Profile/Photos.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Profile; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\Feature; use Friendica\Content\Pager; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -37,12 +40,12 @@ class Photos extends \Friendica\Module\BaseProfile { /** @var IHandleUserSessions */ private $session; - /** @var App\Page */ + /** @var Page */ private $page; /** @var IManageConfigValues */ private $config; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; /** @var Database */ private $database; /** @var SystemMessages */ @@ -52,19 +55,19 @@ class Photos extends \Friendica\Module\BaseProfile /** @var array owner-view record */ private $owner; - public function __construct(ACLFormatter $aclFormatter, SystemMessages $systemMessages, Database $database, App $app, IManageConfigValues $config, App\Page $page, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(ACLFormatter $aclFormatter, SystemMessages $systemMessages, Database $database, AppHelper $appHelper, IManageConfigValues $config, Page $page, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->session = $session; $this->page = $page; $this->config = $config; - $this->app = $app; + $this->appHelper = $appHelper; $this->database = $database; $this->systemMessages = $systemMessages; $this->aclFormatter = $aclFormatter; - $owner = Profile::load($this->app, $this->parameters['nickname'] ?? '', false); + $owner = Profile::load($this->appHelper, $this->parameters['nickname'] ?? '', false); if (!$owner || $owner['account_removed'] || $owner['account_expired']) { throw new HTTPException\NotFoundException($this->t('User not found.')); } diff --git a/src/Module/Profile/Profile.php b/src/Module/Profile/Profile.php index 5df1afc3c0..e84003e4dc 100644 --- a/src/Module/Profile/Profile.php +++ b/src/Module/Profile/Profile.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Profile; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\Feature; use Friendica\Content\GroupManager; use Friendica\Content\Nav; @@ -43,23 +46,23 @@ class Profile extends BaseProfile { /** @var Database */ private $database; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; /** @var IHandleUserSessions */ private $session; /** @var IManageConfigValues */ private $config; - /** @var App\Page */ + /** @var Page */ private $page; /** @var ProfileField */ private $profileField; - public function __construct(ProfileField $profileField, App\Page $page, IManageConfigValues $config, IHandleUserSessions $session, App $app, Database $database, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(ProfileField $profileField, Page $page, IManageConfigValues $config, IHandleUserSessions $session, AppHelper $appHelper, Database $database, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; - $this->app = $app; + $this->appHelper = $appHelper; $this->session = $session; $this->config = $config; $this->page = $page; @@ -95,7 +98,7 @@ class Profile extends BaseProfile protected function content(array $request = []): string { - $profile = ProfileModel::load($this->app, $this->parameters['nickname'] ?? ''); + $profile = ProfileModel::load($this->appHelper, $this->parameters['nickname'] ?? ''); if (!$profile) { throw new HTTPException\NotFoundException($this->t('Profile not found.')); } @@ -374,10 +377,10 @@ class Profile extends BaseProfile /** * Clean the provided input to prevent XSS problems - * @param int $uri_id - * @param string $input - * @return string - * @throws InternalServerErrorException + * @param int $uri_id + * @param string $input + * @return string + * @throws InternalServerErrorException */ private function cleanInput(int $uri_id, string $input): string { diff --git a/src/Module/Profile/Restricted.php b/src/Module/Profile/Restricted.php index 2fa55f3c98..13de7b3c14 100644 --- a/src/Module/Profile/Restricted.php +++ b/src/Module/Profile/Restricted.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Profile; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -19,19 +21,19 @@ use Psr\Log\LoggerInterface; class Restricted extends BaseModule { - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; - public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->app = $app; + $this->appHelper = $appHelper; } protected function content(array $request = []): string { - $profile = Profile::load($this->app, $this->parameters['nickname'] ?? '', false); + $profile = Profile::load($this->appHelper, $this->parameters['nickname'] ?? '', false); if (!$profile) { throw new HTTPException\NotFoundException($this->t('Profile not found.')); } diff --git a/src/Module/RandomProfile.php b/src/Module/RandomProfile.php index 4393bb579b..bc43d48511 100644 --- a/src/Module/RandomProfile.php +++ b/src/Module/RandomProfile.php @@ -18,13 +18,13 @@ class RandomProfile extends BaseModule { protected function content(array $request = []): string { - $a = DI::app(); + $appHelper = DI::appHelper(); $contact = Contact::getRandomContact(); if (!empty($contact)) { $link = Contact::magicLinkByContact($contact); - $a->redirect($link); + $appHelper->redirect($link); } DI::baseUrl()->redirect('profile'); diff --git a/src/Module/Register.php b/src/Module/Register.php index 2cba4b97c8..927264e2a5 100644 --- a/src/Module/Register.php +++ b/src/Module/Register.php @@ -7,7 +7,8 @@ namespace Friendica\Module; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\BaseModule; use Friendica\Content\Text\BBCode; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -41,7 +42,7 @@ class Register extends BaseModule /** @var IHandleUserSessions */ private $session; - public function __construct(IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = []) + public function __construct(IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IManageConfigValues $config, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -277,7 +278,7 @@ class Register extends BaseModule $regdata = ['email' => $arr['email'], 'nickname' => $arr['nickname'], 'username' => $arr['username']]; DI::baseUrl()->redirect('register?' . http_build_query($regdata)); } - + //Check if nickname contains only US-ASCII and do not start with a digit if (!preg_match('/^[a-zA-Z][a-zA-Z0-9]*$/', $arr['nickname'])) { if (is_numeric(substr($arr['nickname'], 0, 1))) { @@ -289,7 +290,7 @@ class Register extends BaseModule DI::baseUrl()->redirect('register?' . http_build_query($regdata)); return; } - + $arr['blocked'] = $blocked; $arr['verified'] = $verified; $arr['language'] = L10n::detectLanguage($_SERVER, $_GET, DI::config()->get('system', 'language')); @@ -433,6 +434,6 @@ class Register extends BaseModule return intval(DI::config()->get('config', 'register_policy')); } } - return self::CLOSED; + return self::CLOSED; } } diff --git a/src/Module/Security/Login.php b/src/Module/Security/Login.php index 6ee72dde4d..39fa9035ac 100644 --- a/src/Module/Security/Login.php +++ b/src/Module/Security/Login.php @@ -76,7 +76,6 @@ class Login extends BaseModule if (!empty($request['auth-params']) && $request['auth-params'] === 'login') { $this->auth->withPassword( - DI::app(), trim($request['username']), trim($request['password']), !empty($request['remember']), diff --git a/src/Module/Security/OpenID.php b/src/Module/Security/OpenID.php index d84f86030e..c8b8f9a95c 100644 --- a/src/Module/Security/OpenID.php +++ b/src/Module/Security/OpenID.php @@ -57,7 +57,7 @@ class OpenID extends BaseModule // successful OpenID login $session->remove('openid'); - DI::auth()->setForUser(DI::app(), $user, true, true); + DI::auth()->setForUser($user, true, true); $this->baseUrl->redirect(DI::session()->pop('return_path', '')); } diff --git a/src/Module/Security/TwoFactor/Recovery.php b/src/Module/Security/TwoFactor/Recovery.php index 504c51f395..e93b446f1b 100644 --- a/src/Module/Security/TwoFactor/Recovery.php +++ b/src/Module/Security/TwoFactor/Recovery.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Security\TwoFactor; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -29,18 +31,18 @@ class Recovery extends BaseModule { /** @var IHandleUserSessions */ protected $session; - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; /** @var Authentication */ protected $auth; - public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Authentication $auth, IHandleUserSessions $session, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Authentication $auth, IHandleUserSessions $session, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->app = $app; - $this->auth = $auth; - $this->session = $session; + $this->appHelper = $appHelper; + $this->auth = $auth; + $this->session = $session; } protected function post(array $request = []) @@ -59,7 +61,7 @@ class Recovery extends BaseModule $this->session->set('2fa', true); DI::sysmsg()->addInfo($this->t('Remaining recovery codes: %d', RecoveryCode::countValidForUser($this->session->getLocalUserId()))); - $this->auth->setForUser($this->app, User::getById($this->session->getLocalUserId()), true, true); + $this->auth->setForUser(User::getById($this->session->getLocalUserId()), true, true); $this->baseUrl->redirect($this->session->pop('return_path', '')); } else { diff --git a/src/Module/Security/TwoFactor/Trust.php b/src/Module/Security/TwoFactor/Trust.php index a2a40ea5e6..f5ce8c930f 100644 --- a/src/Module/Security/TwoFactor/Trust.php +++ b/src/Module/Security/TwoFactor/Trust.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Security\TwoFactor; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -33,8 +35,8 @@ use Psr\Log\LoggerInterface; */ class Trust extends BaseModule { - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; /** @var Authentication */ protected $auth; /** @var IHandleUserSessions */ @@ -46,11 +48,11 @@ class Trust extends BaseModule /** @var TwoFactor\Repository\TrustedBrowser */ protected $trustedBrowserRepository; - public function __construct(App $app, Authentication $auth, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, IHandleUserSessions $session, Cookie $cookie, TwoFactor\Factory\TrustedBrowser $trustedBrowserFactory, TwoFactor\Repository\TrustedBrowser $trustedBrowserRepository, Response $response, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, Authentication $auth, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, IHandleUserSessions $session, Cookie $cookie, TwoFactor\Factory\TrustedBrowser $trustedBrowserFactory, TwoFactor\Repository\TrustedBrowser $trustedBrowserRepository, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->app = $app; + $this->appHelper = $appHelper; $this->auth = $auth; $this->session = $session; $this->cookie = $cookie; @@ -88,7 +90,7 @@ class Trust extends BaseModule } try { - $this->auth->setForUser($this->app, User::getById($this->session->getLocalUserId()), true, true); + $this->auth->setForUser(User::getById($this->session->getLocalUserId()), true, true); $this->baseUrl->redirect($this->session->pop('return_path', '')); } catch (FoundException | TemporaryRedirectException | MovedPermanentlyException $e) { // exception wanted! @@ -109,7 +111,7 @@ class Trust extends BaseModule try { $trustedBrowser = $this->trustedBrowserRepository->selectOneByHash($this->cookie->get('2fa_cookie_hash')); if (!$trustedBrowser->trusted) { - $this->auth->setForUser($this->app, User::getById($this->session->getLocalUserId()), true, true); + $this->auth->setForUser(User::getById($this->session->getLocalUserId()), true, true); $this->baseUrl->redirect($this->session->pop('return_path', '')); } } catch (TrustedBrowserNotFoundException $exception) { diff --git a/src/Module/Settings/Account.php b/src/Module/Settings/Account.php index 8e8bd5a909..3046e28775 100644 --- a/src/Module/Settings/Account.php +++ b/src/Module/Settings/Account.php @@ -40,8 +40,6 @@ class Account extends BaseSettings self::checkFormSecurityTokenRedirectOnError($redirectUrl, 'settings'); - $a = DI::app(); - $user = User::getById($this->session->getLocalUserId()); if (!empty($request['password-submit'])) { @@ -111,7 +109,7 @@ class Account extends BaseSettings } if (strlen($timezone) && $timezone != $user['timezone']) { - $a->setTimeZone($timezone); + DI::appHelper()->setTimeZone($timezone); } $fields = [ @@ -383,8 +381,6 @@ class Account extends BaseSettings return ''; } - $a = DI::app(); - $user = User::getById($this->session->getLocalUserId()); $username = $user['username']; @@ -404,7 +400,7 @@ class Account extends BaseSettings $expire_network_only = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'expire', 'network_only', false); if (!strlen($user['timezone'])) { - $timezone = $a->getTimeZone(); + $timezone = DI::appHelper()->getTimeZone(); } // Set the account type to "Community" when the page is a community page but the account type doesn't fit diff --git a/src/Module/Settings/Display.php b/src/Module/Settings/Display.php index 71e22c5fd2..b918dfa9db 100644 --- a/src/Module/Settings/Display.php +++ b/src/Module/Settings/Display.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Settings; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\ContactSelector; use Friendica\Content\Conversation\Collection\Timelines; use Friendica\Content\Text\BBCode; @@ -40,8 +43,8 @@ class Display extends BaseSettings private $config; /** @var IManagePersonalConfigValues */ private $pConfig; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; /** @var SystemMessages */ private $systemMessages; /** @var ChannelFactory */ @@ -55,13 +58,13 @@ class Display extends BaseSettings /** @var TimelineFactory */ protected $timeline; - public function __construct(Repository\UserDefinedChannel $userDefinedChannel, NetworkFactory $network, CommunityFactory $community, ChannelFactory $channel, TimelineFactory $timeline, SystemMessages $systemMessages, App $app, IManagePersonalConfigValues $pConfig, IManageConfigValues $config, IHandleUserSessions $session, App\Page $page, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Repository\UserDefinedChannel $userDefinedChannel, NetworkFactory $network, CommunityFactory $community, ChannelFactory $channel, TimelineFactory $timeline, SystemMessages $systemMessages, AppHelper $appHelper, IManagePersonalConfigValues $pConfig, IManageConfigValues $config, IHandleUserSessions $session, Page $page, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($session, $page, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->config = $config; $this->pConfig = $pConfig; - $this->app = $app; + $this->appHelper = $appHelper; $this->systemMessages = $systemMessages; $this->timeline = $timeline; $this->channel = $channel; @@ -168,7 +171,7 @@ class Display extends BaseSettings // call theme_post only if theme has not been changed if ($themeconfigfile = Theme::getConfigFile($theme)) { require_once $themeconfigfile; - theme_post($this->app); + theme_post($this->appHelper); } } else { User::update(['theme' => $theme], $uid); @@ -305,7 +308,7 @@ class Display extends BaseSettings $theme_config = ''; if ($themeconfigfile = Theme::getConfigFile($theme_selected)) { require_once $themeconfigfile; - $theme_config = theme_content($this->app); + $theme_config = theme_content($this->appHelper); } $tpl = Renderer::getMarkupTemplate('settings/display.tpl'); diff --git a/src/Module/Update/Display.php b/src/Module/Update/Display.php index 3704a5b8f0..657a70ac13 100644 --- a/src/Module/Update/Display.php +++ b/src/Module/Update/Display.php @@ -41,7 +41,7 @@ class Display extends DisplayModule throw new HTTPException\NotFoundException($this->t('The requested item doesn\'t exist or has been deleted.')); } - $this->app->setProfileOwner($item['uid'] ?: $profileUid); + $this->appHelper->setProfileOwner($item['uid'] ?: $profileUid); $parentUriId = $item['parent-uri-id']; if (empty($force)) { diff --git a/src/Module/Update/Profile.php b/src/Module/Update/Profile.php index 97c9ad4d07..b9360d7360 100644 --- a/src/Module/Update/Profile.php +++ b/src/Module/Update/Profile.php @@ -23,21 +23,21 @@ class Profile extends BaseModule { protected function rawContent(array $request = []) { - $a = DI::app(); + $appHelper = DI::appHelper(); // Ensure we've got a profile owner if updating. - $a->setProfileOwner((int)($request['p'] ?? 0)); + $appHelper->setProfileOwner((int)($request['p'] ?? 0)); - if (DI::config()->get('system', 'block_public') && !DI::userSession()->getLocalUserId() && !DI::userSession()->getRemoteContactID($a->getProfileOwner())) { + if (DI::config()->get('system', 'block_public') && !DI::userSession()->getLocalUserId() && !DI::userSession()->getRemoteContactID($appHelper->getProfileOwner())) { throw new ForbiddenException(); } - $remote_contact = DI::userSession()->getRemoteContactID($a->getProfileOwner()); - $is_owner = DI::userSession()->getLocalUserId() == $a->getProfileOwner(); - $last_updated_key = "profile:" . $a->getProfileOwner() . ":" . DI::userSession()->getLocalUserId() . ":" . $remote_contact; + $remote_contact = DI::userSession()->getRemoteContactID($appHelper->getProfileOwner()); + $is_owner = DI::userSession()->getLocalUserId() == $appHelper->getProfileOwner(); + $last_updated_key = "profile:" . $appHelper->getProfileOwner() . ":" . DI::userSession()->getLocalUserId() . ":" . $remote_contact; if (!DI::userSession()->isAuthenticated()) { - $user = User::getById($a->getProfileOwner(), ['hidewall']); + $user = User::getById($appHelper->getProfileOwner(), ['hidewall']); if ($user['hidewall']) { throw new ForbiddenException(DI::l10n()->t('Access to this profile has been restricted.')); } @@ -50,7 +50,7 @@ class Profile extends BaseModule } // Get permissions SQL - if $remote_contact is true, our remote user has been pre-verified and we already have fetched their circles - $sql_extra = Item::getPermissionsSQLByUserId($a->getProfileOwner()); + $sql_extra = Item::getPermissionsSQLByUserId($appHelper->getProfileOwner()); $last_updated_array = DI::session()->get('last_updated', []); @@ -58,7 +58,7 @@ class Profile extends BaseModule $condition = ["`uid` = ? AND NOT `contact-blocked` AND NOT `contact-pending` AND `visible` AND (NOT `deleted` OR `gravity` = ?) - AND `wall` " . $sql_extra, $a->getProfileOwner(), Item::GRAVITY_ACTIVITY]; + AND `wall` " . $sql_extra, $appHelper->getProfileOwner(), Item::GRAVITY_ACTIVITY]; if ($request['force'] && !empty($request['item'])) { // When the parent is provided, we only fetch this @@ -90,7 +90,7 @@ class Profile extends BaseModule $last_updated_array[$last_updated_key] = time(); DI::session()->set('last_updated', $last_updated_array); - if ($is_owner && !$a->getProfileOwner() && ProfileModel::shouldDisplayEventList(DI::userSession()->getLocalUserId(), DI::mode())) { + if ($is_owner && !$appHelper->getProfileOwner() && ProfileModel::shouldDisplayEventList(DI::userSession()->getLocalUserId(), DI::mode())) { $o .= ProfileModel::getBirthdays(DI::userSession()->getLocalUserId()); $o .= ProfileModel::getEventsReminderHTML(DI::userSession()->getLocalUserId(), DI::userSession()->getPublicContactId()); } @@ -102,7 +102,7 @@ class Profile extends BaseModule } } - $o .= DI::conversation()->render($items, Conversation::MODE_PROFILE, $a->getProfileOwner(), false, 'received', $a->getProfileOwner()); + $o .= DI::conversation()->render($items, Conversation::MODE_PROFILE, $appHelper->getProfileOwner(), false, 'received', $appHelper->getProfileOwner()); System::htmlUpdateExit($o); } diff --git a/src/Module/User/Delegation.php b/src/Module/User/Delegation.php index d43bfd1fd7..2c13891348 100644 --- a/src/Module/User/Delegation.php +++ b/src/Module/User/Delegation.php @@ -7,7 +7,9 @@ namespace Friendica\Module\User; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Contact\Introduction\Repository\Introduction; use Friendica\Core\Hook; @@ -42,10 +44,10 @@ class Delegation extends BaseModule private $notify; /** @var Introduction */ private $intro; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; - public function __construct(App $app, Introduction $intro, Notify $notify, SystemMessages $systemMessages, Authentication $auth, Database $db, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Util\Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, Introduction $intro, Notify $notify, SystemMessages $systemMessages, Authentication $auth, Database $db, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Util\Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -55,7 +57,7 @@ class Delegation extends BaseModule $this->systemMessages = $systemMessages; $this->notify = $notify; $this->intro = $intro; - $this->app = $app; + $this->appHelper = $appHelper; } protected function post(array $request = []) @@ -120,7 +122,7 @@ class Delegation extends BaseModule $this->session->clear(); - $this->auth->setForUser($this->app, $user, true, true); + $this->auth->setForUser($user, true, true); if ($limited_id) { $this->session->setSubManagedUserId($original_id); diff --git a/src/Object/Thread.php b/src/Object/Thread.php index a39ea10e02..2363ab197d 100644 --- a/src/Object/Thread.php +++ b/src/Object/Thread.php @@ -57,7 +57,7 @@ class Thread return; } - $a = DI::app(); + $appHelper = DI::appHelper(); switch ($mode) { case Conversation::MODE_NETWORK: @@ -67,7 +67,7 @@ class Thread break; case Conversation::MODE_PROFILE: case Conversation::MODE_DISPLAY: - $this->profile_owner = $a->getProfileOwner(); + $this->profile_owner = $appHelper->getProfileOwner(); $this->writable = Security::canWriteToUserWall($this->profile_owner) || $writable; break; case Conversation::MODE_CHANNEL: diff --git a/src/Protocol/ActivityPub/Queue.php b/src/Protocol/ActivityPub/Queue.php index 84d49adbf1..8d78620c3e 100644 --- a/src/Protocol/ActivityPub/Queue.php +++ b/src/Protocol/ActivityPub/Queue.php @@ -192,7 +192,7 @@ class Queue } if (!empty($entry['wid'])) { - $worker = DI::app()->getQueue(); + $worker = DI::appHelper()->getQueue(); $wid = $worker['id'] ?? 0; if ($entry['wid'] != $wid) { $workerqueue = DBA::selectFirst('workerqueue', ['pid'], ['id' => $entry['wid'], 'done' => false]); diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index 1da524ed23..82227b3b47 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -1014,7 +1014,7 @@ class Feed // Display events in the user's timezone if (strlen($owner['timezone'])) { - DI::app()->setTimeZone($owner['timezone']); + DI::appHelper()->setTimeZone($owner['timezone']); } $previous_created = $last_update; diff --git a/src/Security/Authentication.php b/src/Security/Authentication.php index ee7005936c..719873390f 100644 --- a/src/Security/Authentication.php +++ b/src/Security/Authentication.php @@ -8,7 +8,10 @@ namespace Friendica\Security; use Exception; -use Friendica\App; +use Friendica\App\BaseURL; +use Friendica\App\Mode; +use Friendica\App\Request; +use Friendica\AppHelper; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; use Friendica\Core\Hook; @@ -25,6 +28,7 @@ use LightOpenID; use Friendica\Core\L10n; use Friendica\Core\Worker; use Friendica\Model\Contact; +use Friendica\Model\User\Cookie; use Friendica\Util\Strings; use Psr\Log\LoggerInterface; @@ -35,9 +39,9 @@ class Authentication { /** @var IManageConfigValues */ private $config; - /** @var App\Mode */ + /** @var Mode */ private $mode; - /** @var App\BaseURL */ + /** @var BaseURL */ private $baseUrl; /** @var L10n */ private $l10n; @@ -45,12 +49,14 @@ class Authentication private $dba; /** @var LoggerInterface */ private $logger; - /** @var User\Cookie */ + /** @var Cookie */ private $cookie; /** @var IHandleUserSessions */ private $session; /** @var IManagePersonalConfigValues */ private $pConfig; + /** @var AppHelper */ + private $appHelper; /** @var string */ private $remoteAddress; @@ -70,18 +76,29 @@ class Authentication * Authentication constructor. * * @param IManageConfigValues $config - * @param App\Mode $mode - * @param App\BaseURL $baseUrl + * @param Mode $mode + * @param BaseURL $baseUrl * @param L10n $l10n * @param Database $dba * @param LoggerInterface $logger - * @param User\Cookie $cookie + * @param Cookie $cookie * @param IHandleUserSessions $session * @param IManagePersonalConfigValues $pConfig - * @param App\Request $request + * @param Request $request */ - public function __construct(IManageConfigValues $config, App\Mode $mode, App\BaseURL $baseUrl, L10n $l10n, Database $dba, LoggerInterface $logger, User\Cookie $cookie, IHandleUserSessions $session, IManagePersonalConfigValues $pConfig, App\Request $request) - { + public function __construct( + IManageConfigValues $config, + Mode $mode, + BaseURL $baseUrl, + L10n $l10n, + Database $dba, + LoggerInterface $logger, + Cookie $cookie, + IHandleUserSessions $session, + IManagePersonalConfigValues $pConfig, + AppHelper $appHelper, + Request $request + ) { $this->config = $config; $this->mode = $mode; $this->baseUrl = $baseUrl; @@ -91,18 +108,17 @@ class Authentication $this->cookie = $cookie; $this->session = $session; $this->pConfig = $pConfig; + $this->appHelper = $appHelper; $this->remoteAddress = $request->getRemoteAddress(); } /** * Tries to auth the user from the cookie or session * - * @param App $a The Friendica Application context - * * @throws HttpException\InternalServerErrorException In case of Friendica internal exceptions * @throws Exception In case of general exceptions (like SQL Grammar) */ - public function withSession(App $a) + public function withSession() { // When the "Friendica" cookie is set, take the value to authenticate and renew the cookie. if ($this->cookie->get('uid')) { @@ -133,7 +149,7 @@ class Authentication // Do the authentication if not done by now if (!$this->session->isAuthenticated()) { - $this->setForUser($a, $user); + $this->setForUser($user); if ($this->config->get('system', 'paranoia')) { $this->session->set('addr', $this->cookie->get('ip')); @@ -145,7 +161,7 @@ class Authentication if ($this->session->isVisitor()) { $contact = $this->dba->selectFirst('contact', ['id'], ['id' => $this->session->get('visitor_id')]); if ($this->dba->isResult($contact)) { - $a->setContactId($contact['id']); + $this->appHelper->setContactId($contact['id']); } } @@ -179,7 +195,7 @@ class Authentication $this->baseUrl->redirect(); } - $this->setForUser($a, $user); + $this->setForUser($user); } } @@ -218,7 +234,6 @@ class Authentication /** * Attempts to authenticate using login/password * - * @param App $a The Friendica Application context * @param string $username * @param string $password Clear password * @param bool $remember Whether to set the session remember flag @@ -230,7 +245,7 @@ class Authentication * @throws HTTPException\MovedPermanentlyException * @throws HTTPException\TemporaryRedirectException */ - public function withPassword(App $a, string $username, string $password, bool $remember, string $return_path = '') + public function withPassword(string $username, string $password, bool $remember, string $return_path = '') { $record = null; @@ -271,7 +286,7 @@ class Authentication $return_path = '/security/password_too_long?' . http_build_query(['return_path' => $return_path]); } - $this->setForUser($a, $record, true, true); + $this->setForUser($record, true, true); $this->baseUrl->redirect($return_path); } @@ -279,7 +294,6 @@ class Authentication /** * Sets the provided user's authenticated session * - * @param App $a The Friendica application context * @param array $user_record The current "user" record * @param bool $login_initial * @param bool $interactive @@ -293,7 +307,7 @@ class Authentication * @throws HTTPException\InternalServerErrorException In case of Friendica specific exceptions * */ - public function setForUser(App $a, array $user_record, bool $login_initial = false, bool $interactive = false, bool $refresh_login = true) + public function setForUser(array $user_record, bool $login_initial = false, bool $interactive = false, bool $refresh_login = true) { $my_url = $this->baseUrl . '/profile/' . $user_record['nickname']; @@ -315,12 +329,12 @@ class Authentication $this->session->set('new_member', time() < ($member_since + (60 * 60 * 24 * 14))); if (strlen($user_record['timezone'])) { - $a->setTimeZone($user_record['timezone']); + $this->appHelper->setTimeZone($user_record['timezone']); } $contact = $this->dba->selectFirst('contact', ['id'], ['uid' => $user_record['uid'], 'self' => true]); if ($this->dba->isResult($contact)) { - $a->setContactId($contact['id']); + $this->appHelper->setContactId($contact['id']); $this->session->set('cid', $contact['id']); } @@ -442,10 +456,10 @@ class Authentication if (Strings::compareLink($this->session->get('visitor_home') ?: '', $url)) { return; } - + $this->session->set('my_url', $url); $this->session->set('authenticated', 0); - + $remote_contact = Contact::getByURL($url, false, ['subscribe']); if (!empty($remote_contact['subscribe'])) { $this->session->set('remote_comment', $remote_contact['subscribe']); diff --git a/src/Security/BasicAuth.php b/src/Security/BasicAuth.php index dc37a4c555..5de8e8780e 100644 --- a/src/Security/BasicAuth.php +++ b/src/Security/BasicAuth.php @@ -169,7 +169,7 @@ class BasicAuth throw new UnauthorizedException("This API requires login"); } - DI::auth()->setForUser($a, $record, false, false, false); + DI::auth()->setForUser($record, false, false, false); Hook::callAll('logged_in', $record); diff --git a/src/Security/OpenWebAuth.php b/src/Security/OpenWebAuth.php index b860550eae..4090fa7378 100644 --- a/src/Security/OpenWebAuth.php +++ b/src/Security/OpenWebAuth.php @@ -114,7 +114,7 @@ class OpenWebAuth */ public static function init(string $token) { - $a = DI::app(); + $appHelper = DI::appHelper(); // Clean old OpenWebAuthToken entries. OpenWebAuthToken::purge('owt', '3 MINUTE'); @@ -144,7 +144,7 @@ class OpenWebAuth */ Hook::callAll('magic_auth_success', $arr); - $a->setContactId($arr['visitor']['id']); + $appHelper->setContactId($arr['visitor']['id']); DI::sysmsg()->addInfo(DI::l10n()->t('OpenWebAuth: %1$s welcomes %2$s', DI::baseUrl()->getHost(), $visitor['name'])); @@ -160,7 +160,7 @@ class OpenWebAuth */ public static function addVisitorCookieForHandle(string $handle): array { - $a = DI::app(); + $appHelper = DI::appHelper(); // Try to find the public contact entry of the visitor. $cid = Contact::getIdForURL($handle); @@ -183,7 +183,7 @@ class OpenWebAuth DI::userSession()->setVisitorsContacts($visitor['url']); - $a->setContactId($visitor['id']); + $appHelper->setContactId($visitor['id']); Logger::info('Authenticated visitor', ['url' => $visitor['url']]); diff --git a/src/Util/Temporal.php b/src/Util/Temporal.php index d3ed346908..098b60d5e8 100644 --- a/src/Util/Temporal.php +++ b/src/Util/Temporal.php @@ -264,7 +264,7 @@ class Temporal $input_text, DI::l10n()->t( 'Time zone: %s Change in Settings', - str_replace('_', ' ', DI::app()->getTimeZone()) . ' (GMT ' . DateTimeFormat::localNow('P') . ')', + str_replace('_', ' ', DI::appHelper()->getTimeZone()) . ' (GMT ' . DateTimeFormat::localNow('P') . ')', DI::baseUrl() . '/settings' ), $required ? '*' : '', diff --git a/src/Worker/Cron.php b/src/Worker/Cron.php index 1c21bf5065..c10a548559 100644 --- a/src/Worker/Cron.php +++ b/src/Worker/Cron.php @@ -21,7 +21,7 @@ class Cron { public static function execute() { - $a = DI::app(); + $basepath = DI::appHelper()->getBasePath(); $last = DI::keyValue()->get('last_cron'); @@ -39,7 +39,6 @@ class Cron // Ensure to have a .htaccess file. // this is a precaution for systems that update automatically - $basepath = $a->getBasePath(); if (!file_exists($basepath . '/.htaccess') && is_writable($basepath)) { copy($basepath . '/.htaccess-dist', $basepath . '/.htaccess'); } diff --git a/src/Worker/DBUpdate.php b/src/Worker/DBUpdate.php index cea9df49c0..4e01e62898 100644 --- a/src/Worker/DBUpdate.php +++ b/src/Worker/DBUpdate.php @@ -19,7 +19,7 @@ class DBUpdate { // Just in case the last update wasn't failed if (DI::config()->get('system', 'update', Update::SUCCESS) != Update::FAILED) { - Update::run(DI::app()->getBasePath()); + Update::run(DI::appHelper()->getBasePath()); } } } diff --git a/src/Worker/Expire.php b/src/Worker/Expire.php index e7d77fdbd7..baaef454ff 100644 --- a/src/Worker/Expire.php +++ b/src/Worker/Expire.php @@ -21,7 +21,7 @@ class Expire { public static function execute($param = '', $hook_function = '') { - $a = DI::app(); + $appHelper = DI::appHelper(); Hook::loadHooks(); @@ -48,7 +48,7 @@ class Expire $r = DBA::select('user', ['uid', 'username'], ["`expire` != ?", 0]); while ($row = DBA::fetch($r)) { Logger::info('Calling expiry', ['user' => $row['uid'], 'username' => $row['username']]); - Worker::add(['priority' => $a->getQueueValue('priority'), 'created' => $a->getQueueValue('created'), 'dont_fork' => true], + Worker::add(['priority' => $appHelper->getQueueValue('priority'), 'created' => $appHelper->getQueueValue('created'), 'dont_fork' => true], 'Expire', (int)$row['uid']); } DBA::close($r); @@ -56,7 +56,7 @@ class Expire Logger::notice('calling hooks'); foreach (Hook::getByName('expire') as $hook) { Logger::info('Calling expire', ['hook' => $hook[1]]); - Worker::add(['priority' => $a->getQueueValue('priority'), 'created' => $a->getQueueValue('created'), 'dont_fork' => true], + Worker::add(['priority' => $appHelper->getQueueValue('priority'), 'created' => $appHelper->getQueueValue('created'), 'dont_fork' => true], 'Expire', 'hook', $hook[1]); } diff --git a/src/Worker/FetchMissingActivity.php b/src/Worker/FetchMissingActivity.php index b5319c85fd..5b6e8ffd03 100644 --- a/src/Worker/FetchMissingActivity.php +++ b/src/Worker/FetchMissingActivity.php @@ -40,7 +40,7 @@ class FetchMissingActivity Logger::info('Defer limit reached, activity could not be fetched', ['url' => $url]); // recursively delete all entries that belong to this worker task - $queue = DI::app()->getQueue(); + $queue = DI::appHelper()->getQueue(); if (!empty($queue['id'])) { Queue::deleteByWorkerId($queue['id']); } diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index 438c0e5e77..42868e4e0e 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -42,7 +42,7 @@ class Notifier { public static function execute(string $cmd, int $post_uriid, int $sender_uid = 0) { - $a = DI::app(); + $appHelper = DI::appHelper(); Logger::info('Invoked', ['cmd' => $cmd, 'target' => $post_uriid, 'sender_uid' => $sender_uid]); @@ -69,7 +69,7 @@ class Notifier foreach ($inboxes as $inbox => $receivers) { $ap_contacts = array_merge($ap_contacts, $receivers); Logger::info('Delivery via ActivityPub', ['cmd' => $cmd, 'target' => $target_id, 'inbox' => $inbox]); - Worker::add(['priority' => Worker::PRIORITY_HIGH, 'created' => $a->getQueueValue('created'), 'dont_fork' => true], + Worker::add(['priority' => Worker::PRIORITY_HIGH, 'created' => $appHelper->getQueueValue('created'), 'dont_fork' => true], 'APDelivery', $cmd, $target_id, $inbox, $uid, $receivers, $post_uriid); } } elseif ($cmd == Delivery::SUGGESTION) { @@ -77,7 +77,7 @@ class Notifier $uid = $suggest->uid; $recipients[] = $suggest->cid; } elseif ($cmd == Delivery::REMOVAL) { - return self::notifySelfRemoval($target_id, $a->getQueueValue('priority'), $a->getQueueValue('created')); + return self::notifySelfRemoval($target_id, $appHelper->getQueueValue('priority'), $appHelper->getQueueValue('created')); } elseif ($cmd == Delivery::RELOCATION) { $uid = $target_id; @@ -319,7 +319,7 @@ class Notifier $recipients = $recipients_followup; } - $apdelivery = self::activityPubDelivery($cmd, $target_item, $parent, $thr_parent, $a->getQueueValue('priority'), $a->getQueueValue('created'), $recipients); + $apdelivery = self::activityPubDelivery($cmd, $target_item, $parent, $thr_parent, $appHelper->getQueueValue('priority'), $appHelper->getQueueValue('created'), $recipients); $ap_contacts = $apdelivery['contacts']; $delivery_queue_count += $apdelivery['count']; @@ -375,7 +375,7 @@ class Notifier if (!empty($target_item)) { Logger::info('Calling hooks for ' . $cmd . ' ' . $target_id); - Hook::fork($a->getQueueValue('priority'), 'notifier_normal', $target_item); + Hook::fork($appHelper->getQueueValue('priority'), 'notifier_normal', $target_item); Hook::callAll('notifier_end', $target_item); @@ -414,7 +414,7 @@ class Notifier */ private static function delivery(string $cmd, int $post_uriid, int $sender_uid, array $target_item, array $parent, array $thr_parent, array $owner, bool $batch_delivery, bool $in_batch, array $contacts, array $ap_contacts, array $conversants = []): int { - $a = DI::app(); + $appHelper = DI::appHelper(); $delivery_queue_count = 0; if (!empty($target_item['verb']) && ($target_item['verb'] == Activity::ANNOUNCE)) { @@ -513,10 +513,10 @@ class Notifier // Situation is that sometimes Friendica servers receive Friendica posts over the Diaspora protocol first. // The conversion in Markdown reduces the formatting, so these posts should arrive after the Friendica posts. // This is only important for high and medium priority tasks and not for Low priority jobs like deletions. - if (($contact['network'] == Protocol::DIASPORA) && in_array($a->getQueueValue('priority'), [Worker::PRIORITY_HIGH, Worker::PRIORITY_MEDIUM])) { - $deliver_options = ['priority' => $a->getQueueValue('priority'), 'dont_fork' => true]; + if (($contact['network'] == Protocol::DIASPORA) && in_array($appHelper->getQueueValue('priority'), [Worker::PRIORITY_HIGH, Worker::PRIORITY_MEDIUM])) { + $deliver_options = ['priority' => $appHelper->getQueueValue('priority'), 'dont_fork' => true]; } else { - $deliver_options = ['priority' => $a->getQueueValue('priority'), 'created' => $a->getQueueValue('created'), 'dont_fork' => true]; + $deliver_options = ['priority' => $appHelper->getQueueValue('priority'), 'created' => $appHelper->getQueueValue('created'), 'dont_fork' => true]; } if (!empty($contact['gsid']) && DI::config()->get('system', 'bulk_delivery')) { diff --git a/src/Worker/ProfileUpdate.php b/src/Worker/ProfileUpdate.php index 8490aad74e..685229b3b5 100644 --- a/src/Worker/ProfileUpdate.php +++ b/src/Worker/ProfileUpdate.php @@ -30,13 +30,13 @@ class ProfileUpdate { return; } - $a = DI::app(); + $appHelper = DI::appHelper(); $inboxes = ActivityPub\Transmitter::fetchTargetInboxesforUser($uid); foreach ($inboxes as $inbox => $receivers) { Logger::info('Profile update for user ' . $uid . ' to ' . $inbox .' via ActivityPub'); - Worker::add(['priority' => $a->getQueueValue('priority'), 'created' => $a->getQueueValue('created'), 'dont_fork' => true], + Worker::add(['priority' => $appHelper->getQueueValue('priority'), 'created' => $appHelper->getQueueValue('created'), 'dont_fork' => true], 'APDelivery', Delivery::PROFILEUPDATE, 0, diff --git a/static/dependencies.config.php b/static/dependencies.config.php index 0a1e56b873..615319336b 100644 --- a/static/dependencies.config.php +++ b/static/dependencies.config.php @@ -23,6 +23,8 @@ use Dice\Dice; use Friendica\App; +use Friendica\AppHelper; +use Friendica\AppLegacy; use Friendica\Core\Cache; use Friendica\Core\Config; use Friendica\Core\Hooks\Capability\ICanCreateInstances; @@ -93,6 +95,9 @@ return [ [Dice::INSTANCE => Dice::SELF], ], ], + AppHelper::class => [ + 'instanceOf' => AppLegacy::class, + ], ICanCreateInstances::class => [ 'instanceOf' => DiceInstanceManager::class, 'constructParams' => [ diff --git a/tests/src/Factory/Api/Twitter/StatusTest.php b/tests/src/Factory/Api/Twitter/StatusTest.php index c2289ddb3c..c92b08f243 100644 --- a/tests/src/Factory/Api/Twitter/StatusTest.php +++ b/tests/src/Factory/Api/Twitter/StatusTest.php @@ -7,6 +7,7 @@ namespace Friendica\Test\src\Factory\Api\Twitter; +use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Factory\Api\Friendica\Activities; use Friendica\Factory\Api\Twitter\Attachment; @@ -123,6 +124,9 @@ class StatusTest extends FixtureTest */ public function testApiFormatItems() { + // This call is needed for this test + Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine'); + $posts = DI::dba()->selectToArray('post-view', ['uri-id']); foreach ($posts as $item) { $status = $this->statusFactory diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 460746db80..6d6b24475c 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2024.12-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-16 18:59+0000\n" +"POT-Creation-Date: 2024-11-17 20:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -46,36 +46,36 @@ msgstr "" #: mod/item.php:449 mod/message.php:54 mod/message.php:100 mod/notes.php:33 #: mod/photos.php:135 mod/photos.php:627 src/Model/Event.php:506 -#: src/Module/Attach.php:41 src/Module/BaseApi.php:89 -#: src/Module/BaseNotifications.php:84 src/Module/BaseSettings.php:36 -#: src/Module/Calendar/Event/API.php:74 src/Module/Calendar/Event/Form.php:70 -#: src/Module/Calendar/Export.php:68 src/Module/Calendar/Show.php:68 +#: src/Module/Attach.php:41 src/Module/BaseApi.php:91 +#: src/Module/BaseNotifications.php:83 src/Module/BaseSettings.php:38 +#: src/Module/Calendar/Event/API.php:75 src/Module/Calendar/Event/Form.php:70 +#: src/Module/Calendar/Export.php:68 src/Module/Calendar/Show.php:71 #: src/Module/Circle.php:27 src/Module/Circle.php:70 #: src/Module/Contact/Advanced.php:46 src/Module/Contact/Follow.php:77 #: src/Module/Contact/Follow.php:145 src/Module/Contact/MatchInterests.php:73 #: src/Module/Contact/Suggestions.php:40 src/Module/Contact/Unfollow.php:52 #: src/Module/Contact/Unfollow.php:66 src/Module/Contact/Unfollow.php:98 -#: src/Module/FollowConfirm.php:24 src/Module/FriendSuggest.php:43 +#: src/Module/FollowConfirm.php:24 src/Module/FriendSuggest.php:44 #: src/Module/Invite.php:28 src/Module/Invite.php:117 #: src/Module/Notifications/Notification.php:62 #: src/Module/Notifications/Notification.php:93 -#: src/Module/OStatus/Subscribe.php:54 src/Module/Post/Edit.php:62 -#: src/Module/Profile/Common.php:61 src/Module/Profile/Contacts.php:64 -#: src/Module/Profile/Photos.php:78 src/Module/Profile/Schedule.php:25 -#: src/Module/Profile/Schedule.php:42 src/Module/Register.php:70 -#: src/Module/Register.php:83 src/Module/Register.php:199 -#: src/Module/Register.php:238 src/Module/Search/Directory.php:23 -#: src/Module/Settings/Account.php:36 src/Module/Settings/Account.php:377 +#: src/Module/OStatus/Subscribe.php:54 src/Module/Post/Edit.php:67 +#: src/Module/Profile/Common.php:63 src/Module/Profile/Contacts.php:66 +#: src/Module/Profile/Photos.php:81 src/Module/Profile/Schedule.php:25 +#: src/Module/Profile/Schedule.php:42 src/Module/Register.php:71 +#: src/Module/Register.php:84 src/Module/Register.php:200 +#: src/Module/Register.php:239 src/Module/Search/Directory.php:23 +#: src/Module/Settings/Account.php:36 src/Module/Settings/Account.php:375 #: src/Module/Settings/Channels.php:52 src/Module/Settings/Channels.php:127 -#: src/Module/Settings/Delegation.php:76 src/Module/Settings/Display.php:77 -#: src/Module/Settings/Display.php:191 +#: src/Module/Settings/Delegation.php:76 src/Module/Settings/Display.php:80 +#: src/Module/Settings/Display.php:194 #: src/Module/Settings/Profile/Photo/Crop.php:151 #: src/Module/Settings/Profile/Photo/Index.php:96 #: src/Module/Settings/RemoveMe.php:105 src/Module/Settings/UserExport.php:64 #: src/Module/Settings/UserExport.php:100 #: src/Module/Settings/UserExport.php:199 #: src/Module/Settings/UserExport.php:219 -#: src/Module/Settings/UserExport.php:284 src/Module/User/Delegation.php:140 +#: src/Module/Settings/UserExport.php:284 src/Module/User/Delegation.php:142 #: src/Module/User/Import.php:71 src/Module/User/Import.php:78 msgid "Permission denied." msgstr "" @@ -142,7 +142,7 @@ msgstr "" msgid "Enter your email address and submit to have your password reset. Then check your email for further instructions." msgstr "" -#: mod/lostpass.php:118 src/Module/Security/Login.php:150 +#: mod/lostpass.php:118 src/Module/Security/Login.php:149 msgid "Nickname or Email: " msgstr "" @@ -150,7 +150,7 @@ msgstr "" msgid "Reset" msgstr "" -#: mod/lostpass.php:134 src/Module/Security/Login.php:162 +#: mod/lostpass.php:134 src/Module/Security/Login.php:161 msgid "Password Reset" msgstr "" @@ -271,18 +271,18 @@ msgstr "" msgid "Your message:" msgstr "" -#: mod/message.php:186 mod/message.php:341 src/Content/Conversation.php:355 -#: src/Module/Post/Edit.php:117 +#: mod/message.php:186 mod/message.php:341 src/Content/Conversation.php:356 +#: src/Module/Post/Edit.php:122 msgid "Upload photo" msgstr "" -#: mod/message.php:187 mod/message.php:342 src/Module/Post/Edit.php:121 +#: mod/message.php:187 mod/message.php:342 src/Module/Post/Edit.php:126 msgid "Insert web link" msgstr "" #: mod/message.php:188 mod/message.php:344 mod/photos.php:1255 -#: src/Content/Conversation.php:386 src/Content/Conversation.php:1562 -#: src/Module/Item/Compose.php:199 src/Module/Post/Edit.php:131 +#: src/Content/Conversation.php:387 src/Content/Conversation.php:1563 +#: src/Module/Item/Compose.php:202 src/Module/Post/Edit.php:136 #: src/Object/Post.php:604 msgid "Please wait" msgstr "" @@ -295,16 +295,16 @@ msgstr "" #: src/Module/Debug/ActivityPubConversion.php:128 #: src/Module/Debug/Babel.php:279 src/Module/Debug/Localtime.php:50 #: src/Module/Debug/Probe.php:40 src/Module/Debug/WebFinger.php:37 -#: src/Module/FriendSuggest.php:131 src/Module/Install.php:221 -#: src/Module/Install.php:261 src/Module/Install.php:296 -#: src/Module/Invite.php:164 src/Module/Item/Compose.php:182 -#: src/Module/Moderation/Item/Source.php:71 +#: src/Module/FriendSuggest.php:132 src/Module/Install.php:220 +#: src/Module/Install.php:260 src/Module/Install.php:295 +#: src/Module/Invite.php:164 src/Module/Item/Compose.php:185 +#: src/Module/Moderation/Item/Source.php:74 #: src/Module/Moderation/Report/Create.php:154 #: src/Module/Moderation/Report/Create.php:169 #: src/Module/Moderation/Report/Create.php:197 #: src/Module/Moderation/Report/Create.php:249 -#: src/Module/Profile/Profile.php:262 src/Module/Settings/Profile/Index.php:248 -#: src/Module/Settings/Server/Action.php:65 src/Module/User/Delegation.php:175 +#: src/Module/Profile/Profile.php:265 src/Module/Settings/Profile/Index.php:248 +#: src/Module/Settings/Server/Action.php:65 src/Module/User/Delegation.php:177 #: src/Object/Post.php:1145 view/theme/duepuntozero/config.php:73 #: view/theme/frio/config.php:155 view/theme/quattro/config.php:75 #: view/theme/vier/config.php:123 @@ -361,7 +361,7 @@ msgid_plural "%d messages" msgstr[0] "" msgstr[1] "" -#: mod/notes.php:40 src/Module/BaseProfile.php:94 +#: mod/notes.php:40 src/Module/BaseProfile.php:93 msgid "Personal Notes" msgstr "" @@ -371,39 +371,39 @@ msgstr "" #: mod/notes.php:45 src/Content/Text/HTML.php:847 #: src/Module/Admin/Storage.php:128 src/Module/Filer/SaveTag.php:60 -#: src/Module/Post/Edit.php:115 src/Module/Settings/Channels.php:215 +#: src/Module/Post/Edit.php:120 src/Module/Settings/Channels.php:215 msgid "Save" msgstr "" #: mod/photos.php:54 mod/photos.php:117 mod/photos.php:537 -#: src/Model/Event.php:498 src/Model/Profile.php:213 -#: src/Module/Calendar/Export.php:60 src/Module/Calendar/Show.php:60 +#: src/Model/Event.php:498 src/Model/Profile.php:212 +#: src/Module/Calendar/Export.php:60 src/Module/Calendar/Show.php:63 #: src/Module/Feed.php:52 src/Module/HCard.php:37 -#: src/Module/Profile/Common.php:48 src/Module/Profile/Common.php:57 -#: src/Module/Profile/Contacts.php:50 src/Module/Profile/Contacts.php:58 -#: src/Module/Profile/Conversations.php:77 src/Module/Profile/Media.php:42 -#: src/Module/Profile/Photos.php:69 src/Module/Profile/RemoteFollow.php:57 -#: src/Module/Register.php:260 +#: src/Module/Profile/Common.php:50 src/Module/Profile/Common.php:59 +#: src/Module/Profile/Contacts.php:52 src/Module/Profile/Contacts.php:60 +#: src/Module/Profile/Conversations.php:81 src/Module/Profile/Media.php:42 +#: src/Module/Profile/Photos.php:72 src/Module/Profile/RemoteFollow.php:57 +#: src/Module/Register.php:261 msgid "User not found." msgstr "" -#: mod/photos.php:91 src/Module/BaseProfile.php:54 -#: src/Module/Profile/Photos.php:361 +#: mod/photos.php:91 src/Module/BaseProfile.php:53 +#: src/Module/Profile/Photos.php:364 msgid "Photo Albums" msgstr "" -#: mod/photos.php:92 src/Module/Profile/Photos.php:362 -#: src/Module/Profile/Photos.php:382 +#: mod/photos.php:92 src/Module/Profile/Photos.php:365 +#: src/Module/Profile/Photos.php:385 msgid "Recent Photos" msgstr "" -#: mod/photos.php:94 mod/photos.php:826 src/Module/Profile/Photos.php:364 -#: src/Module/Profile/Photos.php:384 +#: mod/photos.php:94 mod/photos.php:826 src/Module/Profile/Photos.php:367 +#: src/Module/Profile/Photos.php:387 msgid "Upload New Photos" msgstr "" -#: mod/photos.php:106 src/Module/BaseSettings.php:58 -#: src/Module/Profile/Photos.php:345 +#: mod/photos.php:106 src/Module/BaseSettings.php:60 +#: src/Module/Profile/Photos.php:348 msgid "everybody" msgstr "" @@ -437,7 +437,7 @@ msgid "%1$s was tagged in %2$s by %3$s" msgstr "" #: mod/photos.php:541 src/Module/Conversation/Community.php:148 -#: src/Module/Directory.php:35 src/Module/Profile/Photos.php:279 +#: src/Module/Directory.php:35 src/Module/Profile/Photos.php:282 #: src/Module/Search/Index.php:51 msgid "Public access denied." msgstr "" @@ -467,8 +467,8 @@ msgstr "" msgid "Do not show a status post for this upload" msgstr "" -#: mod/photos.php:690 mod/photos.php:1051 src/Content/Conversation.php:388 -#: src/Module/Calendar/Event/Form.php:239 src/Module/Post/Edit.php:169 +#: mod/photos.php:690 mod/photos.php:1051 src/Content/Conversation.php:389 +#: src/Module/Calendar/Event/Form.php:239 src/Module/Post/Edit.php:174 msgid "Permissions" msgstr "" @@ -480,11 +480,11 @@ msgstr "" msgid "Delete Album" msgstr "" -#: mod/photos.php:757 mod/photos.php:857 src/Content/Conversation.php:403 +#: mod/photos.php:757 mod/photos.php:857 src/Content/Conversation.php:404 #: src/Module/Contact/Follow.php:158 src/Module/Contact/Revoke.php:92 #: src/Module/Contact/Unfollow.php:112 -#: src/Module/Media/Attachment/Browser.php:63 -#: src/Module/Media/Photo/Browser.php:74 src/Module/Post/Edit.php:153 +#: src/Module/Media/Attachment/Browser.php:64 +#: src/Module/Media/Photo/Browser.php:76 src/Module/Post/Edit.php:158 #: src/Module/Post/Tag/Remove.php:95 src/Module/Profile/RemoteFollow.php:120 #: src/Module/Security/TwoFactor/SignOut.php:111 msgid "Cancel" @@ -506,7 +506,7 @@ msgstr "" msgid "Show Oldest First" msgstr "" -#: mod/photos.php:811 src/Module/Profile/Photos.php:332 +#: mod/photos.php:811 src/Module/Profile/Photos.php:335 msgid "View Photo" msgstr "" @@ -587,35 +587,35 @@ msgid "Rotate CCW (left)" msgstr "" #: mod/photos.php:1093 mod/photos.php:1149 mod/photos.php:1229 -#: src/Module/Contact.php:600 src/Module/Item/Compose.php:181 +#: src/Module/Contact.php:600 src/Module/Item/Compose.php:184 #: src/Object/Post.php:1142 msgid "This is you" msgstr "" #: mod/photos.php:1095 mod/photos.php:1151 mod/photos.php:1231 -#: src/Module/Moderation/Reports.php:102 src/Object/Post.php:598 +#: src/Module/Moderation/Reports.php:105 src/Object/Post.php:598 #: src/Object/Post.php:1144 msgid "Comment" msgstr "" #: mod/photos.php:1097 mod/photos.php:1153 mod/photos.php:1233 -#: src/Content/Conversation.php:400 src/Module/Calendar/Event/Form.php:234 -#: src/Module/Item/Compose.php:194 src/Module/Post/Edit.php:151 +#: src/Content/Conversation.php:401 src/Module/Calendar/Event/Form.php:234 +#: src/Module/Item/Compose.php:197 src/Module/Post/Edit.php:156 #: src/Object/Post.php:1158 msgid "Preview" msgstr "" -#: mod/photos.php:1098 src/Content/Conversation.php:354 -#: src/Module/Post/Edit.php:116 src/Object/Post.php:1146 +#: mod/photos.php:1098 src/Content/Conversation.php:355 +#: src/Module/Post/Edit.php:121 src/Object/Post.php:1146 msgid "Loading..." msgstr "" -#: mod/photos.php:1190 src/Content/Conversation.php:1484 +#: mod/photos.php:1190 src/Content/Conversation.php:1485 #: src/Object/Post.php:260 msgid "Select" msgstr "" -#: mod/photos.php:1191 src/Content/Conversation.php:1485 +#: mod/photos.php:1191 src/Content/Conversation.php:1486 #: src/Module/Moderation/Users/Active.php:122 #: src/Module/Moderation/Users/Blocked.php:122 #: src/Module/Moderation/Users/Index.php:137 @@ -644,104 +644,100 @@ msgstr "" msgid "Map" msgstr "" -#: src/App.php:432 -msgid "No system theme config value set." -msgstr "" - -#: src/App.php:540 +#: src/App.php:467 msgid "Apologies but the website is unavailable at the moment." msgstr "" -#: src/App/Page.php:236 +#: src/App/Page.php:237 msgid "Delete this item?" msgstr "" -#: src/App/Page.php:237 +#: src/App/Page.php:238 msgid "Block this author? They won't be able to follow you nor see your public posts, and you won't be able to see their posts and their notifications." msgstr "" -#: src/App/Page.php:238 +#: src/App/Page.php:239 msgid "Ignore this author? You won't be able to see their posts and their notifications." msgstr "" -#: src/App/Page.php:239 +#: src/App/Page.php:240 msgid "Collapse this author's posts?" msgstr "" -#: src/App/Page.php:240 +#: src/App/Page.php:241 msgid "Ignore this author's server?" msgstr "" -#: src/App/Page.php:241 src/Module/Settings/Server/Action.php:47 +#: src/App/Page.php:242 src/Module/Settings/Server/Action.php:47 #: src/Module/Settings/Server/Index.php:94 msgid "You won't see any content from this server including reshares in your Network page, the community pages and individual conversations." msgstr "" -#: src/App/Page.php:243 +#: src/App/Page.php:244 msgid "Like not successful" msgstr "" -#: src/App/Page.php:244 +#: src/App/Page.php:245 msgid "Dislike not successful" msgstr "" -#: src/App/Page.php:245 +#: src/App/Page.php:246 msgid "Sharing not successful" msgstr "" -#: src/App/Page.php:246 +#: src/App/Page.php:247 msgid "Attendance unsuccessful" msgstr "" -#: src/App/Page.php:247 +#: src/App/Page.php:248 msgid "Backend error" msgstr "" -#: src/App/Page.php:248 +#: src/App/Page.php:249 msgid "Network error" msgstr "" -#: src/App/Page.php:251 +#: src/App/Page.php:252 msgid "Drop files here to upload" msgstr "" -#: src/App/Page.php:252 +#: src/App/Page.php:253 msgid "Your browser does not support drag and drop file uploads." msgstr "" -#: src/App/Page.php:253 +#: src/App/Page.php:254 msgid "Please use the fallback form below to upload your files like in the olden days." msgstr "" -#: src/App/Page.php:254 +#: src/App/Page.php:255 msgid "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB." msgstr "" -#: src/App/Page.php:255 +#: src/App/Page.php:256 msgid "You can't upload files of this type." msgstr "" -#: src/App/Page.php:256 +#: src/App/Page.php:257 msgid "Server responded with {{statusCode}} code." msgstr "" -#: src/App/Page.php:257 +#: src/App/Page.php:258 msgid "Cancel upload" msgstr "" -#: src/App/Page.php:258 +#: src/App/Page.php:259 msgid "Upload canceled." msgstr "" -#: src/App/Page.php:259 +#: src/App/Page.php:260 msgid "Are you sure you want to cancel this upload?" msgstr "" -#: src/App/Page.php:260 +#: src/App/Page.php:261 msgid "Remove file" msgstr "" -#: src/App/Page.php:261 +#: src/App/Page.php:262 msgid "You can't upload any more files." msgstr "" @@ -763,6 +759,10 @@ msgstr "" msgid "You must be logged in to use addons. " msgstr "" +#: src/AppLegacy.php:317 +msgid "No system theme config value set." +msgstr "" + #: src/BaseModule.php:393 msgid "The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before submitting it." msgstr "" @@ -792,15 +792,15 @@ msgstr "" msgid "Common" msgstr "" -#: src/Console/Addon.php:163 src/Console/Addon.php:187 +#: src/Console/Addon.php:162 src/Console/Addon.php:186 msgid "Addon not found" msgstr "" -#: src/Console/Addon.php:167 +#: src/Console/Addon.php:166 msgid "Addon already enabled" msgstr "" -#: src/Console/Addon.php:191 +#: src/Console/Addon.php:190 msgid "Addon already disabled" msgstr "" @@ -818,13 +818,13 @@ msgid "The avatar cache needs to be disabled in local.config.php to use this com msgstr "" #: src/Console/GlobalCommunityBlock.php:82 -#: src/Module/Moderation/Blocklist/Contact.php:51 +#: src/Module/Moderation/Blocklist/Contact.php:53 #, php-format msgid "Could not find any contact entry for this URL (%s)" msgstr "" #: src/Console/GlobalCommunityBlock.php:87 -#: src/Module/Moderation/Blocklist/Contact.php:68 +#: src/Module/Moderation/Blocklist/Contact.php:70 msgid "The contact has been blocked from the node" msgstr "" @@ -917,24 +917,24 @@ msgstr "" msgid "Quit on invalid photo %s" msgstr "" -#: src/Console/PostUpdate.php:73 +#: src/Console/PostUpdate.php:77 #, php-format msgid "Post update version number has been set to %s." msgstr "" -#: src/Console/PostUpdate.php:81 +#: src/Console/PostUpdate.php:85 msgid "Check for pending update actions." msgstr "" -#: src/Console/PostUpdate.php:83 +#: src/Console/PostUpdate.php:87 msgid "Done." msgstr "" -#: src/Console/PostUpdate.php:85 +#: src/Console/PostUpdate.php:89 msgid "Execute pending post updates." msgstr "" -#: src/Console/PostUpdate.php:91 +#: src/Console/PostUpdate.php:95 msgid "All pending post updates are done." msgstr "" @@ -943,7 +943,7 @@ msgid "Enter user nickname: " msgstr "" #: src/Console/User.php:168 src/Model/User.php:831 -#: src/Module/Api/Twitter/ContactEndpoint.php:60 +#: src/Module/Api/Twitter/ContactEndpoint.php:62 #: src/Module/Moderation/Users/Active.php:57 #: src/Module/Moderation/Users/Blocked.php:57 #: src/Module/Moderation/Users/Index.php:64 @@ -956,12 +956,12 @@ msgid "Enter new password: " msgstr "" #: src/Console/User.php:196 src/Module/Security/PasswordTooLong.php:55 -#: src/Module/Settings/Account.php:61 +#: src/Module/Settings/Account.php:59 msgid "Password update failed. Please try again." msgstr "" #: src/Console/User.php:199 src/Module/Security/PasswordTooLong.php:58 -#: src/Module/Settings/Account.php:64 +#: src/Module/Settings/Account.php:62 msgid "Password changed." msgstr "" @@ -1130,374 +1130,374 @@ msgstr "" msgid "%s (via %s)" msgstr "" -#: src/Content/Conversation.php:212 +#: src/Content/Conversation.php:213 msgid "and" msgstr "" -#: src/Content/Conversation.php:215 +#: src/Content/Conversation.php:216 #, php-format msgid "and %d other people" msgstr "" -#: src/Content/Conversation.php:221 +#: src/Content/Conversation.php:222 #, php-format msgid "%2$s likes this." msgid_plural "%2$s like this." msgstr[0] "" msgstr[1] "" -#: src/Content/Conversation.php:223 +#: src/Content/Conversation.php:224 #, php-format msgid "%2$s doesn't like this." msgid_plural "%2$s don't like this." msgstr[0] "" msgstr[1] "" -#: src/Content/Conversation.php:225 +#: src/Content/Conversation.php:226 #, php-format msgid "%2$s attends." msgid_plural "%2$s attend." msgstr[0] "" msgstr[1] "" -#: src/Content/Conversation.php:227 +#: src/Content/Conversation.php:228 #, php-format msgid "%2$s doesn't attend." msgid_plural "%2$s don't attend." msgstr[0] "" msgstr[1] "" -#: src/Content/Conversation.php:229 +#: src/Content/Conversation.php:230 #, php-format msgid "%2$s attends maybe." msgid_plural "%2$s attend maybe." msgstr[0] "" msgstr[1] "" -#: src/Content/Conversation.php:231 +#: src/Content/Conversation.php:232 #, php-format msgid "%2$s reshared this." msgid_plural "%2$s reshared this." msgstr[0] "" msgstr[1] "" -#: src/Content/Conversation.php:262 +#: src/Content/Conversation.php:263 #, php-format msgid " likes this" msgid_plural " like this" msgstr[0] "" msgstr[1] "" -#: src/Content/Conversation.php:265 +#: src/Content/Conversation.php:266 #, php-format msgid " doesn't like this" msgid_plural " don't like this" msgstr[0] "" msgstr[1] "" -#: src/Content/Conversation.php:268 +#: src/Content/Conversation.php:269 #, php-format msgid " attends" msgid_plural " attend" msgstr[0] "" msgstr[1] "" -#: src/Content/Conversation.php:271 +#: src/Content/Conversation.php:272 #, php-format msgid " doesn't attend" msgid_plural " don't attend" msgstr[0] "" msgstr[1] "" -#: src/Content/Conversation.php:274 +#: src/Content/Conversation.php:275 #, php-format msgid " attends maybe" msgid_plural " attend maybe" msgstr[0] "" msgstr[1] "" -#: src/Content/Conversation.php:277 +#: src/Content/Conversation.php:278 #, php-format msgid " reshared this" msgid_plural " reshared this" msgstr[0] "" msgstr[1] "" -#: src/Content/Conversation.php:323 +#: src/Content/Conversation.php:324 msgid "Visible to everybody" msgstr "" -#: src/Content/Conversation.php:324 src/Module/Item/Compose.php:193 +#: src/Content/Conversation.php:325 src/Module/Item/Compose.php:196 #: src/Object/Post.php:1157 msgid "Please enter a image/video/audio/webpage URL:" msgstr "" -#: src/Content/Conversation.php:325 +#: src/Content/Conversation.php:326 msgid "Tag term:" msgstr "" -#: src/Content/Conversation.php:326 src/Module/Filer/SaveTag.php:59 +#: src/Content/Conversation.php:327 src/Module/Filer/SaveTag.php:59 msgid "Save to Folder:" msgstr "" -#: src/Content/Conversation.php:327 +#: src/Content/Conversation.php:328 msgid "Where are you right now?" msgstr "" -#: src/Content/Conversation.php:328 +#: src/Content/Conversation.php:329 msgid "Delete item(s)?" msgstr "" -#: src/Content/Conversation.php:340 src/Module/Item/Compose.php:168 +#: src/Content/Conversation.php:341 src/Module/Item/Compose.php:171 msgid "Created at" msgstr "" -#: src/Content/Conversation.php:350 +#: src/Content/Conversation.php:351 msgid "New Post" msgstr "" -#: src/Content/Conversation.php:353 +#: src/Content/Conversation.php:354 msgid "Share" msgstr "" -#: src/Content/Conversation.php:356 src/Module/Post/Edit.php:118 +#: src/Content/Conversation.php:357 src/Module/Post/Edit.php:123 msgid "upload photo" msgstr "" -#: src/Content/Conversation.php:357 src/Module/Post/Edit.php:119 +#: src/Content/Conversation.php:358 src/Module/Post/Edit.php:124 msgid "Attach file" msgstr "" -#: src/Content/Conversation.php:358 src/Module/Post/Edit.php:120 +#: src/Content/Conversation.php:359 src/Module/Post/Edit.php:125 msgid "attach file" msgstr "" -#: src/Content/Conversation.php:359 src/Module/Item/Compose.php:183 -#: src/Module/Post/Edit.php:157 src/Object/Post.php:1147 +#: src/Content/Conversation.php:360 src/Module/Item/Compose.php:186 +#: src/Module/Post/Edit.php:162 src/Object/Post.php:1147 msgid "Bold" msgstr "" -#: src/Content/Conversation.php:360 src/Module/Item/Compose.php:184 -#: src/Module/Post/Edit.php:158 src/Object/Post.php:1148 +#: src/Content/Conversation.php:361 src/Module/Item/Compose.php:187 +#: src/Module/Post/Edit.php:163 src/Object/Post.php:1148 msgid "Italic" msgstr "" -#: src/Content/Conversation.php:361 src/Module/Item/Compose.php:185 -#: src/Module/Post/Edit.php:159 src/Object/Post.php:1149 +#: src/Content/Conversation.php:362 src/Module/Item/Compose.php:188 +#: src/Module/Post/Edit.php:164 src/Object/Post.php:1149 msgid "Underline" msgstr "" -#: src/Content/Conversation.php:362 src/Module/Item/Compose.php:186 -#: src/Module/Post/Edit.php:160 src/Object/Post.php:1151 +#: src/Content/Conversation.php:363 src/Module/Item/Compose.php:189 +#: src/Module/Post/Edit.php:165 src/Object/Post.php:1151 msgid "Quote" msgstr "" -#: src/Content/Conversation.php:363 src/Module/Item/Compose.php:187 -#: src/Module/Post/Edit.php:161 src/Object/Post.php:1152 +#: src/Content/Conversation.php:364 src/Module/Item/Compose.php:190 +#: src/Module/Post/Edit.php:166 src/Object/Post.php:1152 msgid "Add emojis" msgstr "" -#: src/Content/Conversation.php:364 src/Module/Item/Compose.php:188 +#: src/Content/Conversation.php:365 src/Module/Item/Compose.php:191 #: src/Object/Post.php:1150 msgid "Content Warning" msgstr "" -#: src/Content/Conversation.php:365 src/Module/Item/Compose.php:189 -#: src/Module/Post/Edit.php:162 src/Object/Post.php:1153 +#: src/Content/Conversation.php:366 src/Module/Item/Compose.php:192 +#: src/Module/Post/Edit.php:167 src/Object/Post.php:1153 msgid "Code" msgstr "" -#: src/Content/Conversation.php:366 src/Module/Item/Compose.php:190 +#: src/Content/Conversation.php:367 src/Module/Item/Compose.php:193 #: src/Object/Post.php:1154 msgid "Image" msgstr "" -#: src/Content/Conversation.php:367 src/Module/Item/Compose.php:191 -#: src/Module/Post/Edit.php:163 src/Object/Post.php:1155 +#: src/Content/Conversation.php:368 src/Module/Item/Compose.php:194 +#: src/Module/Post/Edit.php:168 src/Object/Post.php:1155 msgid "Link" msgstr "" -#: src/Content/Conversation.php:368 src/Module/Item/Compose.php:192 -#: src/Module/Post/Edit.php:164 src/Object/Post.php:1156 +#: src/Content/Conversation.php:369 src/Module/Item/Compose.php:195 +#: src/Module/Post/Edit.php:169 src/Object/Post.php:1156 msgid "Link or Media" msgstr "" -#: src/Content/Conversation.php:369 +#: src/Content/Conversation.php:370 msgid "Video" msgstr "" -#: src/Content/Conversation.php:370 src/Module/Item/Compose.php:195 -#: src/Module/Post/Edit.php:127 +#: src/Content/Conversation.php:371 src/Module/Item/Compose.php:198 +#: src/Module/Post/Edit.php:132 msgid "Set your location" msgstr "" -#: src/Content/Conversation.php:371 src/Module/Post/Edit.php:128 +#: src/Content/Conversation.php:372 src/Module/Post/Edit.php:133 msgid "set location" msgstr "" -#: src/Content/Conversation.php:372 src/Module/Post/Edit.php:129 +#: src/Content/Conversation.php:373 src/Module/Post/Edit.php:134 msgid "Clear browser location" msgstr "" -#: src/Content/Conversation.php:373 src/Module/Post/Edit.php:130 +#: src/Content/Conversation.php:374 src/Module/Post/Edit.php:135 msgid "clear location" msgstr "" -#: src/Content/Conversation.php:375 src/Module/Item/Compose.php:200 -#: src/Module/Post/Edit.php:143 +#: src/Content/Conversation.php:376 src/Module/Item/Compose.php:203 +#: src/Module/Post/Edit.php:148 msgid "Set title" msgstr "" -#: src/Content/Conversation.php:377 src/Module/Item/Compose.php:201 -#: src/Module/Post/Edit.php:145 +#: src/Content/Conversation.php:378 src/Module/Item/Compose.php:204 +#: src/Module/Post/Edit.php:150 msgid "Categories (comma-separated list)" msgstr "" -#: src/Content/Conversation.php:382 src/Module/Item/Compose.php:217 +#: src/Content/Conversation.php:383 src/Module/Item/Compose.php:220 msgid "Scheduled at" msgstr "" -#: src/Content/Conversation.php:387 src/Module/Post/Edit.php:132 +#: src/Content/Conversation.php:388 src/Module/Post/Edit.php:137 msgid "Permission settings" msgstr "" -#: src/Content/Conversation.php:396 src/Module/Post/Edit.php:141 +#: src/Content/Conversation.php:397 src/Module/Post/Edit.php:146 msgid "Public post" msgstr "" -#: src/Content/Conversation.php:410 src/Content/Widget/VCard.php:121 -#: src/Model/Profile.php:462 src/Module/Admin/Logs/View.php:80 -#: src/Module/Post/Edit.php:167 +#: src/Content/Conversation.php:411 src/Content/Widget/VCard.php:121 +#: src/Model/Profile.php:461 src/Module/Admin/Logs/View.php:80 +#: src/Module/Post/Edit.php:172 msgid "Message" msgstr "" -#: src/Content/Conversation.php:411 src/Module/Post/Edit.php:168 +#: src/Content/Conversation.php:412 src/Module/Post/Edit.php:173 #: src/Module/Settings/TwoFactor/Trusted.php:129 msgid "Browser" msgstr "" -#: src/Content/Conversation.php:413 src/Module/Post/Edit.php:171 +#: src/Content/Conversation.php:414 src/Module/Post/Edit.php:176 msgid "Open Compose page" msgstr "" -#: src/Content/Conversation.php:580 +#: src/Content/Conversation.php:581 msgid "remove" msgstr "" -#: src/Content/Conversation.php:584 +#: src/Content/Conversation.php:585 msgid "Delete Selected Items" msgstr "" -#: src/Content/Conversation.php:712 src/Content/Conversation.php:715 -#: src/Content/Conversation.php:718 src/Content/Conversation.php:721 -#: src/Content/Conversation.php:724 +#: src/Content/Conversation.php:713 src/Content/Conversation.php:716 +#: src/Content/Conversation.php:719 src/Content/Conversation.php:722 +#: src/Content/Conversation.php:725 #, php-format msgid "You had been addressed (%s)." msgstr "" -#: src/Content/Conversation.php:727 +#: src/Content/Conversation.php:728 #, php-format msgid "You are following %s." msgstr "" -#: src/Content/Conversation.php:732 +#: src/Content/Conversation.php:733 #, php-format msgid "You subscribed to %s." msgstr "" -#: src/Content/Conversation.php:734 +#: src/Content/Conversation.php:735 msgid "You subscribed to one or more tags in this post." msgstr "" -#: src/Content/Conversation.php:754 +#: src/Content/Conversation.php:755 #, php-format msgid "%s reshared this." msgstr "" -#: src/Content/Conversation.php:756 +#: src/Content/Conversation.php:757 msgid "Reshared" msgstr "" -#: src/Content/Conversation.php:756 +#: src/Content/Conversation.php:757 #, php-format msgid "Reshared by %s <%s>" msgstr "" -#: src/Content/Conversation.php:759 +#: src/Content/Conversation.php:760 #, php-format msgid "%s is participating in this thread." msgstr "" -#: src/Content/Conversation.php:762 +#: src/Content/Conversation.php:763 msgid "Stored for general reasons" msgstr "" -#: src/Content/Conversation.php:765 +#: src/Content/Conversation.php:766 msgid "Global post" msgstr "" -#: src/Content/Conversation.php:768 +#: src/Content/Conversation.php:769 msgid "Sent via an relay server" msgstr "" -#: src/Content/Conversation.php:768 +#: src/Content/Conversation.php:769 #, php-format msgid "Sent via the relay server %s <%s>" msgstr "" -#: src/Content/Conversation.php:771 +#: src/Content/Conversation.php:772 msgid "Fetched" msgstr "" -#: src/Content/Conversation.php:771 +#: src/Content/Conversation.php:772 #, php-format msgid "Fetched because of %s <%s>" msgstr "" -#: src/Content/Conversation.php:774 +#: src/Content/Conversation.php:775 msgid "Stored because of a child post to complete this thread." msgstr "" -#: src/Content/Conversation.php:777 +#: src/Content/Conversation.php:778 msgid "Local delivery" msgstr "" -#: src/Content/Conversation.php:780 +#: src/Content/Conversation.php:781 msgid "Stored because of your activity (like, comment, star, ...)" msgstr "" -#: src/Content/Conversation.php:783 +#: src/Content/Conversation.php:784 msgid "Distributed" msgstr "" -#: src/Content/Conversation.php:786 +#: src/Content/Conversation.php:787 msgid "Pushed to us" msgstr "" -#: src/Content/Conversation.php:1504 src/Object/Post.php:247 +#: src/Content/Conversation.php:1505 src/Object/Post.php:247 msgid "Pinned item" msgstr "" -#: src/Content/Conversation.php:1521 src/Object/Post.php:541 +#: src/Content/Conversation.php:1522 src/Object/Post.php:541 #: src/Object/Post.php:542 #, php-format msgid "View %s's profile @ %s" msgstr "" -#: src/Content/Conversation.php:1535 src/Object/Post.php:529 +#: src/Content/Conversation.php:1536 src/Object/Post.php:529 msgid "Categories:" msgstr "" -#: src/Content/Conversation.php:1536 src/Object/Post.php:530 +#: src/Content/Conversation.php:1537 src/Object/Post.php:530 msgid "Filed under:" msgstr "" -#: src/Content/Conversation.php:1544 src/Object/Post.php:556 +#: src/Content/Conversation.php:1545 src/Object/Post.php:556 #, php-format msgid "%s from %s" msgstr "" -#: src/Content/Conversation.php:1560 +#: src/Content/Conversation.php:1561 msgid "View in context" msgstr "" @@ -1731,7 +1731,7 @@ msgid "Display posts with the selected protocols." msgstr "" #: src/Content/Feature.php:119 src/Content/Widget.php:558 -#: src/Module/Settings/Account.php:433 +#: src/Module/Settings/Account.php:429 msgid "Account Types" msgstr "" @@ -1740,8 +1740,8 @@ msgid "Display posts done by accounts with the selected account type." msgstr "" #: src/Content/Feature.php:120 src/Content/Widget.php:607 -#: src/Module/Admin/Site.php:464 src/Module/BaseSettings.php:111 -#: src/Module/Settings/Channels.php:211 src/Module/Settings/Display.php:320 +#: src/Module/Admin/Site.php:464 src/Module/BaseSettings.php:113 +#: src/Module/Settings/Channels.php:211 src/Module/Settings/Display.php:323 msgid "Channels" msgstr "" @@ -1867,7 +1867,7 @@ msgid "View Photos" msgstr "" #: src/Content/Item.php:418 src/Model/Contact.php:1213 -#: src/Model/Profile.php:447 +#: src/Model/Profile.php:446 msgid "Network Posts" msgstr "" @@ -1882,7 +1882,7 @@ msgstr "" #: src/Content/Item.php:421 src/Module/Contact.php:449 #: src/Module/Contact/Profile.php:524 -#: src/Module/Moderation/Blocklist/Contact.php:102 +#: src/Module/Moderation/Blocklist/Contact.php:104 #: src/Module/Moderation/Users/Active.php:123 #: src/Module/Moderation/Users/Index.php:138 msgid "Block" @@ -1941,7 +1941,7 @@ msgstr "" msgid "@name, !group, #tags, content" msgstr "" -#: src/Content/Nav.php:208 src/Module/Security/Login.php:147 +#: src/Content/Nav.php:208 src/Module/Security/Login.php:146 msgid "Logout" msgstr "" @@ -1950,7 +1950,7 @@ msgid "End this session" msgstr "" #: src/Content/Nav.php:210 src/Module/Bookmarklet.php:30 -#: src/Module/Security/Login.php:148 +#: src/Module/Security/Login.php:147 msgid "Login" msgstr "" @@ -1958,7 +1958,7 @@ msgstr "" msgid "Sign in" msgstr "" -#: src/Content/Nav.php:215 src/Module/BaseProfile.php:43 +#: src/Content/Nav.php:215 src/Module/BaseProfile.php:42 #: src/Module/Contact.php:493 msgid "Conversations" msgstr "" @@ -1967,9 +1967,9 @@ msgstr "" msgid "Conversations you started" msgstr "" -#: src/Content/Nav.php:216 src/Module/BaseProfile.php:35 -#: src/Module/BaseSettings.php:84 src/Module/Contact.php:485 -#: src/Module/Contact/Profile.php:431 src/Module/Profile/Profile.php:256 +#: src/Content/Nav.php:216 src/Module/BaseProfile.php:34 +#: src/Module/BaseSettings.php:86 src/Module/Contact.php:485 +#: src/Module/Contact/Profile.php:431 src/Module/Profile/Profile.php:259 #: src/Module/Welcome.php:43 view/theme/frio/theme.php:221 msgid "Profile" msgstr "" @@ -1978,8 +1978,8 @@ msgstr "" msgid "Your profile page" msgstr "" -#: src/Content/Nav.php:217 src/Module/BaseProfile.php:51 -#: src/Module/Media/Photo/Browser.php:60 view/theme/frio/theme.php:225 +#: src/Content/Nav.php:217 src/Module/BaseProfile.php:50 +#: src/Module/Media/Photo/Browser.php:62 view/theme/frio/theme.php:225 msgid "Photos" msgstr "" @@ -1987,8 +1987,8 @@ msgstr "" msgid "Your photos" msgstr "" -#: src/Content/Nav.php:218 src/Module/BaseProfile.php:59 -#: src/Module/BaseProfile.php:62 src/Module/Contact.php:509 +#: src/Content/Nav.php:218 src/Module/BaseProfile.php:58 +#: src/Module/BaseProfile.php:61 src/Module/Contact.php:509 #: view/theme/frio/theme.php:226 msgid "Media" msgstr "" @@ -1998,9 +1998,9 @@ msgid "Your postings with media" msgstr "" #: src/Content/Nav.php:219 src/Content/Nav.php:279 -#: src/Module/BaseProfile.php:71 src/Module/BaseProfile.php:74 -#: src/Module/BaseProfile.php:82 src/Module/BaseProfile.php:85 -#: src/Module/Settings/Display.php:321 view/theme/frio/theme.php:227 +#: src/Module/BaseProfile.php:70 src/Module/BaseProfile.php:73 +#: src/Module/BaseProfile.php:81 src/Module/BaseProfile.php:84 +#: src/Module/Settings/Display.php:324 view/theme/frio/theme.php:227 #: view/theme/frio/theme.php:231 msgid "Calendar" msgstr "" @@ -2025,8 +2025,8 @@ msgstr "" msgid "Home Page" msgstr "" -#: src/Content/Nav.php:241 src/Module/Register.php:161 -#: src/Module/Security/Login.php:114 +#: src/Content/Nav.php:241 src/Module/Register.php:162 +#: src/Module/Security/Login.php:113 msgid "Register" msgstr "" @@ -2073,8 +2073,8 @@ msgid "Tags" msgstr "" #: src/Content/Nav.php:260 src/Content/Nav.php:315 -#: src/Content/Text/HTML.php:864 src/Module/BaseProfile.php:113 -#: src/Module/BaseProfile.php:116 src/Module/Contact.php:407 +#: src/Content/Text/HTML.php:864 src/Module/BaseProfile.php:112 +#: src/Module/BaseProfile.php:115 src/Module/Contact.php:407 #: src/Module/Contact.php:517 view/theme/frio/theme.php:234 msgid "Contacts" msgstr "" @@ -2096,7 +2096,7 @@ msgid "People directory" msgstr "" #: src/Content/Nav.php:284 src/Module/BaseAdmin.php:71 -#: src/Module/BaseModeration.php:94 +#: src/Module/BaseModeration.php:97 msgid "Information" msgstr "" @@ -2105,7 +2105,7 @@ msgid "Information about this friendica instance" msgstr "" #: src/Content/Nav.php:287 src/Module/Admin/Tos.php:64 -#: src/Module/BaseAdmin.php:81 src/Module/Register.php:169 +#: src/Module/BaseAdmin.php:81 src/Module/Register.php:170 #: src/Module/Tos.php:87 msgid "Terms of Service" msgstr "" @@ -2134,7 +2134,7 @@ msgstr "" msgid "Friend Requests" msgstr "" -#: src/Content/Nav.php:299 src/Module/BaseNotifications.php:135 +#: src/Content/Nav.php:299 src/Module/BaseNotifications.php:134 #: src/Module/Notifications/Introductions.php:61 msgid "Notifications" msgstr "" @@ -2172,7 +2172,7 @@ msgid "Manage other pages" msgstr "" #: src/Content/Nav.php:313 src/Module/Admin/Addons/Details.php:100 -#: src/Module/Admin/Themes/Details.php:85 src/Module/BaseSettings.php:168 +#: src/Module/Admin/Themes/Details.php:85 src/Module/BaseSettings.php:170 #: src/Module/Welcome.php:38 view/theme/frio/theme.php:233 msgid "Settings" msgstr "" @@ -2193,13 +2193,13 @@ msgstr "" msgid "Site setup and configuration" msgstr "" -#: src/Content/Nav.php:321 src/Module/BaseModeration.php:114 -#: src/Module/Moderation/Blocklist/Contact.php:96 -#: src/Module/Moderation/Blocklist/Server/Add.php:107 -#: src/Module/Moderation/Blocklist/Server/Import.php:102 -#: src/Module/Moderation/Blocklist/Server/Index.php:81 +#: src/Content/Nav.php:321 src/Module/BaseModeration.php:117 +#: src/Module/Moderation/Blocklist/Contact.php:98 +#: src/Module/Moderation/Blocklist/Server/Add.php:110 +#: src/Module/Moderation/Blocklist/Server/Import.php:105 +#: src/Module/Moderation/Blocklist/Server/Index.php:84 #: src/Module/Moderation/Item/Delete.php:47 -#: src/Module/Moderation/Reports.php:96 src/Module/Moderation/Summary.php:61 +#: src/Module/Moderation/Reports.php:99 src/Module/Moderation/Summary.php:64 #: src/Module/Moderation/Users/Active.php:119 #: src/Module/Moderation/Users/Blocked.php:119 #: src/Module/Moderation/Users/Deleted.php:66 @@ -2257,11 +2257,11 @@ msgstr "" msgid "Encrypted content" msgstr "" -#: src/Content/Text/BBCode.php:2207 +#: src/Content/Text/BBCode.php:2208 msgid "Invalid source protocol" msgstr "" -#: src/Content/Text/BBCode.php:2226 +#: src/Content/Text/BBCode.php:2227 msgid "Invalid link protocol" msgstr "" @@ -2274,7 +2274,7 @@ msgid "The end" msgstr "" #: src/Content/Text/HTML.php:847 src/Content/Widget/VCard.php:117 -#: src/Model/Profile.php:456 src/Module/Contact/Profile.php:484 +#: src/Model/Profile.php:455 src/Module/Contact/Profile.php:484 msgid "Follow" msgstr "" @@ -2400,7 +2400,7 @@ msgstr "" msgid "Relays" msgstr "" -#: src/Content/Widget.php:560 src/Module/Moderation/BaseUsers.php:56 +#: src/Content/Widget.php:560 src/Module/Moderation/BaseUsers.php:58 msgid "All" msgstr "" @@ -2447,50 +2447,50 @@ msgid "More Trending Tags" msgstr "" #: src/Content/Widget/VCard.php:95 src/Model/Contact.php:1207 -#: src/Model/Profile.php:441 +#: src/Model/Profile.php:440 msgid "Post to group" msgstr "" #: src/Content/Widget/VCard.php:100 src/Model/Contact.php:1211 -#: src/Model/Profile.php:445 src/Module/Moderation/Item/Source.php:77 +#: src/Model/Profile.php:444 src/Module/Moderation/Item/Source.php:80 msgid "Mention" msgstr "" -#: src/Content/Widget/VCard.php:110 src/Model/Profile.php:360 -#: src/Module/Contact/Profile.php:420 src/Module/Profile/Profile.php:187 +#: src/Content/Widget/VCard.php:110 src/Model/Profile.php:359 +#: src/Module/Contact/Profile.php:420 src/Module/Profile/Profile.php:190 msgid "XMPP:" msgstr "" -#: src/Content/Widget/VCard.php:111 src/Model/Profile.php:361 -#: src/Module/Contact/Profile.php:422 src/Module/Profile/Profile.php:191 +#: src/Content/Widget/VCard.php:111 src/Model/Profile.php:360 +#: src/Module/Contact/Profile.php:422 src/Module/Profile/Profile.php:194 msgid "Matrix:" msgstr "" #: src/Content/Widget/VCard.php:112 src/Model/Event.php:68 #: src/Model/Event.php:95 src/Model/Event.php:457 src/Model/Event.php:946 -#: src/Model/Profile.php:355 src/Module/Contact/Profile.php:418 +#: src/Model/Profile.php:354 src/Module/Contact/Profile.php:418 #: src/Module/Directory.php:134 src/Module/Notifications/Introductions.php:180 -#: src/Module/Profile/Profile.php:209 +#: src/Module/Profile/Profile.php:212 msgid "Location:" msgstr "" -#: src/Content/Widget/VCard.php:115 src/Model/Profile.php:469 +#: src/Content/Widget/VCard.php:115 src/Model/Profile.php:468 #: src/Module/Notifications/Introductions.php:194 msgid "Network:" msgstr "" #: src/Content/Widget/VCard.php:119 src/Model/Contact.php:1239 -#: src/Model/Contact.php:1251 src/Model/Profile.php:458 +#: src/Model/Contact.php:1251 src/Model/Profile.php:457 #: src/Module/Contact/Profile.php:476 msgid "Unfollow" msgstr "" #: src/Content/Widget/VCard.php:125 src/Model/Contact.php:1209 -#: src/Model/Profile.php:443 +#: src/Model/Profile.php:442 msgid "View group" msgstr "" -#: src/Core/ACL.php:152 src/Module/Profile/Profile.php:257 +#: src/Core/ACL.php:152 src/Module/Profile/Profile.php:260 msgid "Yourself" msgstr "" @@ -2532,11 +2532,11 @@ msgstr "" msgid "Except to:" msgstr "" -#: src/Core/ACL.php:313 src/Module/Post/Edit.php:140 +#: src/Core/ACL.php:313 src/Module/Post/Edit.php:145 msgid "CC: email addresses" msgstr "" -#: src/Core/ACL.php:314 src/Module/Post/Edit.php:146 +#: src/Core/ACL.php:314 src/Module/Post/Edit.php:151 msgid "Example: bob@example.com, mary@example.com" msgstr "" @@ -2552,8 +2552,8 @@ msgstr "" msgid "You may need to import the file \"database.sql\" manually using phpmyadmin or mysql." msgstr "" -#: src/Core/Installer.php:184 src/Module/Install.php:194 -#: src/Module/Install.php:337 +#: src/Core/Installer.php:184 src/Module/Install.php:193 +#: src/Module/Install.php:336 msgid "Please see the file \"doc/INSTALL.md\"." msgstr "" @@ -2839,37 +2839,37 @@ msgid "%s (%s)" msgstr "" #: src/Core/L10n.php:485 src/Model/Event.php:416 -#: src/Module/Settings/Display.php:289 +#: src/Module/Settings/Display.php:292 msgid "Monday" msgstr "" #: src/Core/L10n.php:485 src/Model/Event.php:417 -#: src/Module/Settings/Display.php:290 +#: src/Module/Settings/Display.php:293 msgid "Tuesday" msgstr "" #: src/Core/L10n.php:485 src/Model/Event.php:418 -#: src/Module/Settings/Display.php:291 +#: src/Module/Settings/Display.php:294 msgid "Wednesday" msgstr "" #: src/Core/L10n.php:485 src/Model/Event.php:419 -#: src/Module/Settings/Display.php:292 +#: src/Module/Settings/Display.php:295 msgid "Thursday" msgstr "" #: src/Core/L10n.php:485 src/Model/Event.php:420 -#: src/Module/Settings/Display.php:293 +#: src/Module/Settings/Display.php:296 msgid "Friday" msgstr "" #: src/Core/L10n.php:485 src/Model/Event.php:421 -#: src/Module/Settings/Display.php:294 +#: src/Module/Settings/Display.php:297 msgid "Saturday" msgstr "" #: src/Core/L10n.php:485 src/Model/Event.php:415 -#: src/Module/Settings/Display.php:288 +#: src/Module/Settings/Display.php:291 msgid "Sunday" msgstr "" @@ -3028,32 +3028,32 @@ msgstr "" msgid "Enter a valid existing folder" msgstr "" -#: src/Core/Update.php:104 +#: src/Core/Update.php:103 #, php-format msgid "Updates from version %s are not supported. Please update at least to version 2021.01 and wait until the postupdate finished version 1383." msgstr "" -#: src/Core/Update.php:115 +#: src/Core/Update.php:114 #, php-format msgid "Updates from postupdate version %s are not supported. Please update at least to version 2021.01 and wait until the postupdate finished version 1383." msgstr "" -#: src/Core/Update.php:207 +#: src/Core/Update.php:206 #, php-format msgid "%s: executing pre update %d" msgstr "" -#: src/Core/Update.php:249 +#: src/Core/Update.php:248 #, php-format msgid "%s: executing post update %d" msgstr "" -#: src/Core/Update.php:323 +#: src/Core/Update.php:322 #, php-format msgid "Update %s failed. See error logs." msgstr "" -#: src/Core/Update.php:363 +#: src/Core/Update.php:362 #, php-format msgid "" "\n" @@ -3063,16 +3063,16 @@ msgid "" "\t\t\t\tfriendica developer if you can not help me on your own. My database might be invalid." msgstr "" -#: src/Core/Update.php:369 +#: src/Core/Update.php:368 #, php-format msgid "The error message is\\n[pre]%s[/pre]" msgstr "" -#: src/Core/Update.php:373 src/Core/Update.php:401 +#: src/Core/Update.php:372 src/Core/Update.php:400 msgid "[Friendica Notify] Database update" msgstr "" -#: src/Core/Update.php:395 +#: src/Core/Update.php:394 #, php-format msgid "" "\n" @@ -3209,7 +3209,7 @@ msgstr "" msgid "Group" msgstr "" -#: src/Model/Contact.php:1758 src/Module/Moderation/BaseUsers.php:120 +#: src/Model/Contact.php:1758 src/Module/Moderation/BaseUsers.php:122 msgid "Relay" msgstr "" @@ -3217,7 +3217,7 @@ msgstr "" msgid "Disallowed profile URL." msgstr "" -#: src/Model/Contact.php:3078 src/Module/Friendica.php:86 +#: src/Model/Contact.php:3078 src/Module/Friendica.php:88 msgid "Blocked domain" msgstr "" @@ -3292,23 +3292,23 @@ msgstr "" msgid "Sept" msgstr "" -#: src/Model/Event.php:448 src/Module/Calendar/Show.php:114 +#: src/Model/Event.php:448 src/Module/Calendar/Show.php:117 #: src/Util/Temporal.php:329 msgid "today" msgstr "" -#: src/Model/Event.php:449 src/Module/Calendar/Show.php:115 -#: src/Module/Settings/Display.php:299 src/Util/Temporal.php:339 +#: src/Model/Event.php:449 src/Module/Calendar/Show.php:118 +#: src/Module/Settings/Display.php:302 src/Util/Temporal.php:339 msgid "month" msgstr "" -#: src/Model/Event.php:450 src/Module/Calendar/Show.php:116 -#: src/Module/Settings/Display.php:300 src/Util/Temporal.php:340 +#: src/Model/Event.php:450 src/Module/Calendar/Show.php:119 +#: src/Module/Settings/Display.php:303 src/Util/Temporal.php:340 msgid "week" msgstr "" -#: src/Model/Event.php:451 src/Module/Calendar/Show.php:117 -#: src/Module/Settings/Display.php:301 src/Util/Temporal.php:341 +#: src/Model/Event.php:451 src/Module/Calendar/Show.php:120 +#: src/Module/Settings/Display.php:304 src/Util/Temporal.php:341 msgid "day" msgstr "" @@ -3321,7 +3321,7 @@ msgstr "" msgid "Access to this profile has been restricted." msgstr "" -#: src/Model/Event.php:544 src/Module/Calendar/Event/Show.php:53 +#: src/Model/Event.php:544 src/Module/Calendar/Event/Show.php:52 msgid "Event not found." msgstr "" @@ -3468,148 +3468,148 @@ msgstr "" msgid "Wall Photos" msgstr "" -#: src/Model/Profile.php:343 src/Module/Profile/Profile.php:271 -#: src/Module/Profile/Profile.php:273 +#: src/Model/Profile.php:342 src/Module/Profile/Profile.php:274 +#: src/Module/Profile/Profile.php:276 msgid "Edit profile" msgstr "" -#: src/Model/Profile.php:345 +#: src/Model/Profile.php:344 msgid "Change profile photo" msgstr "" -#: src/Model/Profile.php:358 src/Module/Directory.php:139 -#: src/Module/Profile/Profile.php:197 +#: src/Model/Profile.php:357 src/Module/Directory.php:139 +#: src/Module/Profile/Profile.php:200 msgid "Homepage:" msgstr "" -#: src/Model/Profile.php:359 src/Module/Contact/Profile.php:424 +#: src/Model/Profile.php:358 src/Module/Contact/Profile.php:424 #: src/Module/Notifications/Introductions.php:182 msgid "About:" msgstr "" -#: src/Model/Profile.php:460 +#: src/Model/Profile.php:459 msgid "Atom feed" msgstr "" -#: src/Model/Profile.php:467 +#: src/Model/Profile.php:466 msgid "This website has been verified to belong to the same person." msgstr "" -#: src/Model/Profile.php:518 +#: src/Model/Profile.php:517 msgid "F d" msgstr "" -#: src/Model/Profile.php:582 src/Model/Profile.php:663 +#: src/Model/Profile.php:581 src/Model/Profile.php:662 msgid "[today]" msgstr "" -#: src/Model/Profile.php:591 +#: src/Model/Profile.php:590 msgid "Birthday Reminders" msgstr "" -#: src/Model/Profile.php:592 +#: src/Model/Profile.php:591 msgid "Birthdays this week:" msgstr "" -#: src/Model/Profile.php:608 +#: src/Model/Profile.php:607 msgid "g A l F d" msgstr "" -#: src/Model/Profile.php:650 +#: src/Model/Profile.php:649 msgid "[No description]" msgstr "" -#: src/Model/Profile.php:676 +#: src/Model/Profile.php:675 msgid "Event Reminders" msgstr "" -#: src/Model/Profile.php:677 +#: src/Model/Profile.php:676 msgid "Upcoming events the next 7 days:" msgstr "" -#: src/Model/Profile.php:789 +#: src/Model/Profile.php:786 msgid "Hometown:" msgstr "" -#: src/Model/Profile.php:790 +#: src/Model/Profile.php:787 msgid "Marital Status:" msgstr "" -#: src/Model/Profile.php:791 +#: src/Model/Profile.php:788 msgid "With:" msgstr "" -#: src/Model/Profile.php:792 +#: src/Model/Profile.php:789 msgid "Since:" msgstr "" -#: src/Model/Profile.php:793 +#: src/Model/Profile.php:790 msgid "Sexual Preference:" msgstr "" -#: src/Model/Profile.php:794 +#: src/Model/Profile.php:791 msgid "Political Views:" msgstr "" -#: src/Model/Profile.php:795 +#: src/Model/Profile.php:792 msgid "Religious Views:" msgstr "" -#: src/Model/Profile.php:796 +#: src/Model/Profile.php:793 msgid "Likes:" msgstr "" -#: src/Model/Profile.php:797 +#: src/Model/Profile.php:794 msgid "Dislikes:" msgstr "" -#: src/Model/Profile.php:798 +#: src/Model/Profile.php:795 msgid "Title/Description:" msgstr "" -#: src/Model/Profile.php:799 src/Module/Admin/Summary.php:176 +#: src/Model/Profile.php:796 src/Module/Admin/Summary.php:176 #: src/Module/Moderation/Report/Create.php:266 -#: src/Module/Moderation/Summary.php:62 +#: src/Module/Moderation/Summary.php:65 msgid "Summary" msgstr "" -#: src/Model/Profile.php:800 +#: src/Model/Profile.php:797 msgid "Musical interests" msgstr "" -#: src/Model/Profile.php:801 +#: src/Model/Profile.php:798 msgid "Books, literature" msgstr "" -#: src/Model/Profile.php:802 +#: src/Model/Profile.php:799 msgid "Television" msgstr "" -#: src/Model/Profile.php:803 +#: src/Model/Profile.php:800 msgid "Film/dance/culture/entertainment" msgstr "" -#: src/Model/Profile.php:804 +#: src/Model/Profile.php:801 msgid "Hobbies/Interests" msgstr "" -#: src/Model/Profile.php:805 +#: src/Model/Profile.php:802 msgid "Love/romance" msgstr "" -#: src/Model/Profile.php:806 +#: src/Model/Profile.php:803 msgid "Work/employment" msgstr "" -#: src/Model/Profile.php:807 +#: src/Model/Profile.php:804 msgid "School/education" msgstr "" -#: src/Model/Profile.php:808 +#: src/Model/Profile.php:805 msgid "Contact information and Social Networks" msgstr "" -#: src/Model/Profile.php:856 +#: src/Model/Profile.php:853 #, php-format msgid "Responsible account: %s" msgstr "" @@ -3662,11 +3662,11 @@ msgstr "" msgid "Invalid OpenID url" msgstr "" -#: src/Model/User.php:1225 src/Security/Authentication.php:214 +#: src/Model/User.php:1225 src/Security/Authentication.php:230 msgid "We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID." msgstr "" -#: src/Model/User.php:1225 src/Security/Authentication.php:214 +#: src/Model/User.php:1225 src/Security/Authentication.php:230 msgid "The error message was:" msgstr "" @@ -3873,7 +3873,7 @@ msgid "Disable" msgstr "" #: src/Module/Admin/Addons/Details.php:77 -#: src/Module/Admin/Themes/Details.php:41 src/Module/Settings/Display.php:348 +#: src/Module/Admin/Themes/Details.php:41 src/Module/Settings/Display.php:351 msgid "Enable" msgstr "" @@ -3889,7 +3889,7 @@ msgid "Administration" msgstr "" #: src/Module/Admin/Addons/Details.php:98 src/Module/Admin/Addons/Index.php:60 -#: src/Module/BaseAdmin.php:78 src/Module/BaseSettings.php:125 +#: src/Module/BaseAdmin.php:78 src/Module/BaseSettings.php:127 msgid "Addons" msgstr "" @@ -3920,10 +3920,10 @@ msgstr "" #: src/Module/Admin/Addons/Index.php:61 src/Module/Admin/Features.php:69 #: src/Module/Admin/Logs/Settings.php:76 src/Module/Admin/Site.php:450 #: src/Module/Admin/Themes/Index.php:105 src/Module/Admin/Tos.php:72 -#: src/Module/Settings/Account.php:549 src/Module/Settings/Addons.php:64 +#: src/Module/Settings/Account.php:545 src/Module/Settings/Addons.php:64 #: src/Module/Settings/Connectors.php:149 #: src/Module/Settings/Connectors.php:235 -#: src/Module/Settings/Delegation.php:179 src/Module/Settings/Display.php:314 +#: src/Module/Settings/Delegation.php:179 src/Module/Settings/Display.php:317 #: src/Module/Settings/Features.php:61 msgid "Save Settings" msgstr "" @@ -3997,14 +3997,14 @@ msgstr "" #: src/Module/Admin/Features.php:53 #: src/Module/Notifications/Introductions.php:136 -#: src/Module/OAuth/Acknowledge.php:41 src/Module/Register.php:124 +#: src/Module/OAuth/Acknowledge.php:41 src/Module/Register.php:125 #: src/Module/Settings/TwoFactor/Trusted.php:115 msgid "No" msgstr "" #: src/Module/Admin/Features.php:53 src/Module/Contact/Revoke.php:91 #: src/Module/Notifications/Introductions.php:136 -#: src/Module/OAuth/Acknowledge.php:40 src/Module/Register.php:123 +#: src/Module/OAuth/Acknowledge.php:40 src/Module/Register.php:124 #: src/Module/Settings/TwoFactor/Trusted.php:115 msgid "Yes" msgstr "" @@ -4255,7 +4255,7 @@ msgstr "" msgid "Job Parameters" msgstr "" -#: src/Module/Admin/Queue.php:65 src/Module/Moderation/Reports.php:102 +#: src/Module/Admin/Queue.php:65 src/Module/Moderation/Reports.php:105 #: src/Module/Settings/OAuth.php:60 msgid "Created" msgstr "" @@ -4278,11 +4278,11 @@ msgstr "" msgid "%s is no valid input for maximum image size" msgstr "" -#: src/Module/Admin/Site.php:362 src/Module/Settings/Display.php:209 +#: src/Module/Admin/Site.php:362 src/Module/Settings/Display.php:212 msgid "No special theme for mobile devices" msgstr "" -#: src/Module/Admin/Site.php:379 src/Module/Settings/Display.php:219 +#: src/Module/Admin/Site.php:379 src/Module/Settings/Display.php:222 #, php-format msgid "%s - (Experimental)" msgstr "" @@ -4359,7 +4359,7 @@ msgstr "" msgid "Republish users to directory" msgstr "" -#: src/Module/Admin/Site.php:452 src/Module/Register.php:145 +#: src/Module/Admin/Site.php:452 src/Module/Register.php:146 msgid "Registration" msgstr "" @@ -4372,7 +4372,7 @@ msgid "Policies" msgstr "" #: src/Module/Admin/Site.php:455 src/Module/Calendar/Event/Form.php:238 -#: src/Module/Contact.php:528 src/Module/Profile/Profile.php:264 +#: src/Module/Contact.php:528 src/Module/Profile/Profile.php:267 msgid "Advanced" msgstr "" @@ -5177,7 +5177,7 @@ msgid "Can be \"all\" or \"tags\". \"all\" means that every public post should b msgstr "" #: src/Module/Admin/Site.php:584 src/Module/Contact/Profile.php:315 -#: src/Module/Settings/Display.php:256 +#: src/Module/Settings/Display.php:259 #: src/Module/Settings/TwoFactor/Index.php:132 msgid "Disabled" msgstr "" @@ -5456,7 +5456,7 @@ msgstr "" msgid "Themes" msgstr "" -#: src/Module/Admin/Themes/Embed.php:66 +#: src/Module/Admin/Themes/Embed.php:69 msgid "Unknown theme." msgstr "" @@ -5553,15 +5553,15 @@ msgstr "" msgid "Posts from %s can't be unshared" msgstr "" -#: src/Module/Api/Twitter/ContactEndpoint.php:52 +#: src/Module/Api/Twitter/ContactEndpoint.php:54 msgid "Contact not found" msgstr "" -#: src/Module/Apps.php:48 +#: src/Module/Apps.php:49 msgid "No installed applications." msgstr "" -#: src/Module/Apps.php:53 +#: src/Module/Apps.php:54 msgid "Applications" msgstr "" @@ -5570,7 +5570,7 @@ msgid "Item was not found." msgstr "" #: src/Module/BaseAdmin.php:40 src/Module/BaseAdmin.php:44 -#: src/Module/BaseModeration.php:63 src/Module/BaseModeration.php:67 +#: src/Module/BaseModeration.php:66 src/Module/BaseModeration.php:70 msgid "Please login to continue." msgstr "" @@ -5582,15 +5582,15 @@ msgstr "" msgid "Submanaged account can't access the administration pages. Please log back in as the main account." msgstr "" -#: src/Module/BaseAdmin.php:72 src/Module/BaseModeration.php:95 +#: src/Module/BaseAdmin.php:72 src/Module/BaseModeration.php:98 msgid "Overview" msgstr "" -#: src/Module/BaseAdmin.php:75 src/Module/BaseModeration.php:98 +#: src/Module/BaseAdmin.php:75 src/Module/BaseModeration.php:101 msgid "Configuration" msgstr "" -#: src/Module/BaseAdmin.php:80 src/Module/BaseSettings.php:96 +#: src/Module/BaseAdmin.php:80 src/Module/BaseSettings.php:98 msgid "Additional features" msgstr "" @@ -5610,7 +5610,7 @@ msgstr "" msgid "Inspect worker Queue" msgstr "" -#: src/Module/BaseAdmin.php:92 src/Module/BaseModeration.php:106 +#: src/Module/BaseAdmin.php:92 src/Module/BaseModeration.php:109 msgid "Diagnostics" msgstr "" @@ -5638,94 +5638,94 @@ msgstr "" msgid "Addon Features" msgstr "" -#: src/Module/BaseAdmin.php:107 src/Module/BaseModeration.php:115 +#: src/Module/BaseAdmin.php:107 src/Module/BaseModeration.php:118 msgid "User registrations waiting for confirmation" msgstr "" -#: src/Module/BaseApi.php:441 src/Module/BaseApi.php:457 -#: src/Module/BaseApi.php:473 +#: src/Module/BaseApi.php:443 src/Module/BaseApi.php:459 +#: src/Module/BaseApi.php:475 msgid "Too Many Requests" msgstr "" -#: src/Module/BaseApi.php:442 +#: src/Module/BaseApi.php:444 #, php-format msgid "Daily posting limit of %d post reached. The post was rejected." msgid_plural "Daily posting limit of %d posts reached. The post was rejected." msgstr[0] "" msgstr[1] "" -#: src/Module/BaseApi.php:458 +#: src/Module/BaseApi.php:460 #, php-format msgid "Weekly posting limit of %d post reached. The post was rejected." msgid_plural "Weekly posting limit of %d posts reached. The post was rejected." msgstr[0] "" msgstr[1] "" -#: src/Module/BaseApi.php:474 +#: src/Module/BaseApi.php:476 #, php-format msgid "Monthly posting limit of %d post reached. The post was rejected." msgid_plural "Monthly posting limit of %d posts reached. The post was rejected." msgstr[0] "" msgstr[1] "" -#: src/Module/BaseModeration.php:72 +#: src/Module/BaseModeration.php:75 msgid "You don't have access to moderation pages." msgstr "" -#: src/Module/BaseModeration.php:76 +#: src/Module/BaseModeration.php:79 msgid "Submanaged account can't access the moderation pages. Please log back in as the main account." msgstr "" -#: src/Module/BaseModeration.php:96 src/Module/Moderation/Reports.php:101 +#: src/Module/BaseModeration.php:99 src/Module/Moderation/Reports.php:104 msgid "Reports" msgstr "" -#: src/Module/BaseModeration.php:99 src/Module/Moderation/Users/Index.php:134 +#: src/Module/BaseModeration.php:102 src/Module/Moderation/Users/Index.php:134 #: src/Module/Moderation/Users/Index.php:144 msgid "Users" msgstr "" -#: src/Module/BaseModeration.php:101 +#: src/Module/BaseModeration.php:104 msgid "Tools" msgstr "" -#: src/Module/BaseModeration.php:102 +#: src/Module/BaseModeration.php:105 msgid "Contact Blocklist" msgstr "" -#: src/Module/BaseModeration.php:103 +#: src/Module/BaseModeration.php:106 msgid "Server Blocklist" msgstr "" -#: src/Module/BaseModeration.php:104 src/Module/Moderation/Item/Delete.php:48 +#: src/Module/BaseModeration.php:107 src/Module/Moderation/Item/Delete.php:48 msgid "Delete Item" msgstr "" -#: src/Module/BaseModeration.php:107 src/Module/Moderation/Item/Source.php:68 +#: src/Module/BaseModeration.php:110 src/Module/Moderation/Item/Source.php:71 msgid "Item Source" msgstr "" -#: src/Module/BaseProfile.php:38 src/Module/Contact.php:488 +#: src/Module/BaseProfile.php:37 src/Module/Contact.php:488 msgid "Profile Details" msgstr "" -#: src/Module/BaseProfile.php:46 +#: src/Module/BaseProfile.php:45 msgid "Conversations started" msgstr "" -#: src/Module/BaseProfile.php:97 +#: src/Module/BaseProfile.php:96 msgid "Only You Can See This" msgstr "" -#: src/Module/BaseProfile.php:102 src/Module/Profile/Schedule.php:67 +#: src/Module/BaseProfile.php:101 src/Module/Profile/Schedule.php:67 msgid "Scheduled Posts" msgstr "" -#: src/Module/BaseProfile.php:105 +#: src/Module/BaseProfile.php:104 msgid "Posts that are scheduled for publishing" msgstr "" -#: src/Module/BaseProfile.php:124 src/Module/BaseProfile.php:127 +#: src/Module/BaseProfile.php:123 src/Module/BaseProfile.php:126 msgid "Tips for New Members" msgstr "" @@ -5750,40 +5750,40 @@ msgid_plural "%d results were filtered out because your node blocks the domain t msgstr[0] "" msgstr[1] "" -#: src/Module/BaseSettings.php:64 +#: src/Module/BaseSettings.php:66 msgid "Account" msgstr "" -#: src/Module/BaseSettings.php:71 src/Module/Security/TwoFactor/Verify.php:82 +#: src/Module/BaseSettings.php:73 src/Module/Security/TwoFactor/Verify.php:82 #: src/Module/Settings/TwoFactor/Index.php:124 msgid "Two-factor authentication" msgstr "" -#: src/Module/BaseSettings.php:104 +#: src/Module/BaseSettings.php:106 msgid "Display" msgstr "" -#: src/Module/BaseSettings.php:118 src/Module/Settings/Connectors.php:195 +#: src/Module/BaseSettings.php:120 src/Module/Settings/Connectors.php:195 msgid "Social Networks" msgstr "" -#: src/Module/BaseSettings.php:132 src/Module/Settings/Delegation.php:180 +#: src/Module/BaseSettings.php:134 src/Module/Settings/Delegation.php:180 msgid "Manage Accounts" msgstr "" -#: src/Module/BaseSettings.php:139 +#: src/Module/BaseSettings.php:141 msgid "Connected apps" msgstr "" -#: src/Module/BaseSettings.php:146 +#: src/Module/BaseSettings.php:148 msgid "Remote servers" msgstr "" -#: src/Module/BaseSettings.php:153 src/Module/Settings/UserExport.php:84 +#: src/Module/BaseSettings.php:155 src/Module/Settings/UserExport.php:84 msgid "Export personal data" msgstr "" -#: src/Module/BaseSettings.php:160 +#: src/Module/BaseSettings.php:162 msgid "Remove account" msgstr "" @@ -5795,24 +5795,24 @@ msgstr "" msgid "The post was created" msgstr "" -#: src/Module/Calendar/Event/API.php:86 src/Module/Calendar/Event/API.php:121 +#: src/Module/Calendar/Event/API.php:87 src/Module/Calendar/Event/API.php:122 #: src/Module/Calendar/Event/Form.php:66 msgid "Invalid Request" msgstr "" -#: src/Module/Calendar/Event/API.php:95 +#: src/Module/Calendar/Event/API.php:96 msgid "Event id is missing." msgstr "" -#: src/Module/Calendar/Event/API.php:117 +#: src/Module/Calendar/Event/API.php:118 msgid "Failed to remove event" msgstr "" -#: src/Module/Calendar/Event/API.php:173 src/Module/Calendar/Event/API.php:175 +#: src/Module/Calendar/Event/API.php:174 src/Module/Calendar/Event/API.php:176 msgid "Event can not end before it has started." msgstr "" -#: src/Module/Calendar/Event/API.php:182 src/Module/Calendar/Event/API.php:184 +#: src/Module/Calendar/Event/API.php:183 src/Module/Calendar/Event/API.php:185 msgid "Event title and start time are required." msgstr "" @@ -5827,20 +5827,20 @@ msgstr "" #: src/Module/Calendar/Event/Form.php:195 #: src/Module/Calendar/Event/Form.php:223 src/Module/Debug/Probe.php:45 -#: src/Module/Install.php:188 src/Module/Install.php:214 -#: src/Module/Install.php:219 src/Module/Install.php:233 -#: src/Module/Install.php:242 src/Module/Install.php:247 -#: src/Module/Install.php:253 src/Module/Install.php:258 -#: src/Module/Install.php:272 src/Module/Install.php:285 -#: src/Module/Install.php:312 -#: src/Module/Moderation/Blocklist/Server/Add.php:122 -#: src/Module/Moderation/Blocklist/Server/Add.php:124 -#: src/Module/Moderation/Blocklist/Server/Import.php:113 -#: src/Module/Moderation/Blocklist/Server/Index.php:72 -#: src/Module/Moderation/Blocklist/Server/Index.php:73 -#: src/Module/Moderation/Blocklist/Server/Index.php:101 -#: src/Module/Moderation/Blocklist/Server/Index.php:102 -#: src/Module/Moderation/Item/Delete.php:53 src/Module/Register.php:141 +#: src/Module/Install.php:187 src/Module/Install.php:213 +#: src/Module/Install.php:218 src/Module/Install.php:232 +#: src/Module/Install.php:241 src/Module/Install.php:246 +#: src/Module/Install.php:252 src/Module/Install.php:257 +#: src/Module/Install.php:271 src/Module/Install.php:284 +#: src/Module/Install.php:311 +#: src/Module/Moderation/Blocklist/Server/Add.php:125 +#: src/Module/Moderation/Blocklist/Server/Add.php:127 +#: src/Module/Moderation/Blocklist/Server/Import.php:116 +#: src/Module/Moderation/Blocklist/Server/Index.php:75 +#: src/Module/Moderation/Blocklist/Server/Index.php:76 +#: src/Module/Moderation/Blocklist/Server/Index.php:104 +#: src/Module/Moderation/Blocklist/Server/Index.php:105 +#: src/Module/Moderation/Item/Delete.php:53 src/Module/Register.php:142 #: src/Module/Security/TwoFactor/Verify.php:87 #: src/Module/Settings/Channels.php:176 src/Module/Settings/Channels.php:197 #: src/Module/Settings/TwoFactor/Index.php:147 @@ -5876,7 +5876,7 @@ msgstr "" msgid "Share this event" msgstr "" -#: src/Module/Calendar/Event/Form.php:237 src/Module/Profile/Profile.php:263 +#: src/Module/Calendar/Event/Form.php:237 src/Module/Profile/Profile.php:266 msgid "Basic" msgstr "" @@ -5892,19 +5892,19 @@ msgstr "" msgid "calendar" msgstr "" -#: src/Module/Calendar/Show.php:110 +#: src/Module/Calendar/Show.php:113 msgid "Events" msgstr "" -#: src/Module/Calendar/Show.php:111 +#: src/Module/Calendar/Show.php:114 msgid "View" msgstr "" -#: src/Module/Calendar/Show.php:112 +#: src/Module/Calendar/Show.php:115 msgid "Create New Event" msgstr "" -#: src/Module/Calendar/Show.php:118 src/Module/Settings/Display.php:302 +#: src/Module/Calendar/Show.php:121 src/Module/Settings/Display.php:305 msgid "list" msgstr "" @@ -5932,8 +5932,8 @@ msgstr "" #: src/Module/Contact/Posts.php:64 src/Module/Contact/Posts.php:69 #: src/Module/Contact/Posts.php:74 src/Module/Contact/Profile.php:146 #: src/Module/Contact/Profile.php:151 src/Module/Contact/Profile.php:170 -#: src/Module/Contact/Redir.php:77 src/Module/Contact/Redir.php:131 -#: src/Module/FriendSuggest.php:57 src/Module/FriendSuggest.php:95 +#: src/Module/Contact/Redir.php:79 src/Module/Contact/Redir.php:133 +#: src/Module/FriendSuggest.php:58 src/Module/FriendSuggest.php:96 msgid "Contact not found." msgstr "" @@ -6021,7 +6021,7 @@ msgid "Show all contacts" msgstr "" #: src/Module/Contact.php:333 src/Module/Contact.php:412 -#: src/Module/Moderation/BaseUsers.php:72 +#: src/Module/Moderation/BaseUsers.php:74 msgid "Pending" msgstr "" @@ -6030,7 +6030,7 @@ msgid "Only show pending contacts" msgstr "" #: src/Module/Contact.php:341 src/Module/Contact.php:415 -#: src/Module/Moderation/BaseUsers.php:80 +#: src/Module/Moderation/BaseUsers.php:82 msgid "Blocked" msgstr "" @@ -6089,7 +6089,7 @@ msgid "Update" msgstr "" #: src/Module/Contact.php:449 src/Module/Contact/Profile.php:524 -#: src/Module/Moderation/Blocklist/Contact.php:103 +#: src/Module/Moderation/Blocklist/Contact.php:105 #: src/Module/Moderation/Users/Blocked.php:124 #: src/Module/Moderation/Users/Index.php:140 msgid "Unblock" @@ -6165,8 +6165,8 @@ msgid "Return to contact editor" msgstr "" #: src/Module/Contact/Advanced.php:120 -#: src/Module/Moderation/Blocklist/Contact.php:108 -#: src/Module/Moderation/Reports.php:102 +#: src/Module/Moderation/Blocklist/Contact.php:110 +#: src/Module/Moderation/Reports.php:105 #: src/Module/Moderation/Users/Active.php:112 #: src/Module/Moderation/Users/Blocked.php:112 #: src/Module/Moderation/Users/Create.php:56 @@ -6197,59 +6197,59 @@ msgstr "" msgid "No known contacts." msgstr "" -#: src/Module/Contact/Contacts.php:89 src/Module/Profile/Common.php:114 +#: src/Module/Contact/Contacts.php:89 src/Module/Profile/Common.php:116 msgid "No common contacts." msgstr "" -#: src/Module/Contact/Contacts.php:101 src/Module/Profile/Contacts.php:121 +#: src/Module/Contact/Contacts.php:101 src/Module/Profile/Contacts.php:123 #, php-format msgid "Follower (%s)" msgid_plural "Followers (%s)" msgstr[0] "" msgstr[1] "" -#: src/Module/Contact/Contacts.php:105 src/Module/Profile/Contacts.php:124 +#: src/Module/Contact/Contacts.php:105 src/Module/Profile/Contacts.php:126 #, php-format msgid "Following (%s)" msgid_plural "Following (%s)" msgstr[0] "" msgstr[1] "" -#: src/Module/Contact/Contacts.php:109 src/Module/Profile/Contacts.php:127 +#: src/Module/Contact/Contacts.php:109 src/Module/Profile/Contacts.php:129 #, php-format msgid "Mutual friend (%s)" msgid_plural "Mutual friends (%s)" msgstr[0] "" msgstr[1] "" -#: src/Module/Contact/Contacts.php:111 src/Module/Profile/Contacts.php:129 +#: src/Module/Contact/Contacts.php:111 src/Module/Profile/Contacts.php:131 #, php-format msgid "These contacts both follow and are followed by %s." msgstr "" -#: src/Module/Contact/Contacts.php:117 src/Module/Profile/Common.php:102 +#: src/Module/Contact/Contacts.php:117 src/Module/Profile/Common.php:104 #, php-format msgid "Common contact (%s)" msgid_plural "Common contacts (%s)" msgstr[0] "" msgstr[1] "" -#: src/Module/Contact/Contacts.php:119 src/Module/Profile/Common.php:104 +#: src/Module/Contact/Contacts.php:119 src/Module/Profile/Common.php:106 #, php-format msgid "Both %s and yourself have publicly interacted with these contacts (follow, comment or likes on public posts)." msgstr "" -#: src/Module/Contact/Contacts.php:125 src/Module/Profile/Contacts.php:135 +#: src/Module/Contact/Contacts.php:125 src/Module/Profile/Contacts.php:137 #, php-format msgid "Contact (%s)" msgid_plural "Contacts (%s)" msgstr[0] "" msgstr[1] "" -#: src/Module/Contact/Follow.php:56 src/Module/Contact/Redir.php:45 -#: src/Module/Contact/Redir.php:206 src/Module/Conversation/Community.php:154 +#: src/Module/Contact/Follow.php:56 src/Module/Contact/Redir.php:47 +#: src/Module/Contact/Redir.php:208 src/Module/Conversation/Community.php:154 #: src/Module/Debug/ItemBody.php:30 src/Module/Diaspora/Receive.php:45 -#: src/Module/Item/Display.php:82 src/Module/Item/Feed.php:45 +#: src/Module/Item/Display.php:83 src/Module/Item/Feed.php:45 #: src/Module/Item/Follow.php:27 src/Module/Item/Ignore.php:27 #: src/Module/Item/Language.php:39 src/Module/Item/Pin.php:27 #: src/Module/Item/Pin.php:42 src/Module/Item/Searchtext.php:39 @@ -6284,8 +6284,8 @@ msgstr "" #: src/Module/Contact/Follow.php:155 src/Module/Contact/Profile.php:414 #: src/Module/Contact/Unfollow.php:115 -#: src/Module/Moderation/Blocklist/Contact.php:117 -#: src/Module/Moderation/Reports.php:109 +#: src/Module/Moderation/Blocklist/Contact.php:119 +#: src/Module/Moderation/Reports.php:112 #: src/Module/Notifications/Introductions.php:121 #: src/Module/Notifications/Introductions.php:191 msgid "Profile URL" @@ -6293,7 +6293,7 @@ msgstr "" #: src/Module/Contact/Follow.php:156 src/Module/Contact/Profile.php:426 #: src/Module/Notifications/Introductions.php:184 -#: src/Module/Profile/Profile.php:222 +#: src/Module/Profile/Profile.php:225 msgid "Tags:" msgstr "" @@ -6628,7 +6628,7 @@ msgstr "" msgid "Revoke the follow from this contact" msgstr "" -#: src/Module/Contact/Redir.php:125 +#: src/Module/Contact/Redir.php:127 msgid "Bad Request." msgstr "" @@ -6690,21 +6690,21 @@ msgstr "" msgid "Not available." msgstr "" -#: src/Module/Conversation/Network.php:202 +#: src/Module/Conversation/Network.php:205 msgid "No such circle" msgstr "" -#: src/Module/Conversation/Network.php:206 +#: src/Module/Conversation/Network.php:209 #, php-format msgid "Circle: %s" msgstr "" -#: src/Module/Conversation/Network.php:226 +#: src/Module/Conversation/Network.php:229 #, php-format msgid "Error %d (%s) while fetching the timeline." msgstr "" -#: src/Module/Conversation/Network.php:304 +#: src/Module/Conversation/Network.php:307 msgid "Network feed not available." msgstr "" @@ -6741,7 +6741,7 @@ msgid "Result Item" msgstr "" #: src/Module/Debug/ActivityPubConversion.php:117 -#: src/Module/Moderation/Item/Source.php:79 +#: src/Module/Moderation/Item/Source.php:82 #: src/Module/Security/TwoFactor/Verify.php:84 msgid "Error" msgid_plural "Errors" @@ -7004,69 +7004,69 @@ msgstr "" msgid "- select -" msgstr "" -#: src/Module/FriendSuggest.php:68 +#: src/Module/FriendSuggest.php:69 msgid "Suggested contact not found." msgstr "" -#: src/Module/FriendSuggest.php:86 +#: src/Module/FriendSuggest.php:87 msgid "Friend suggestion sent." msgstr "" -#: src/Module/FriendSuggest.php:123 +#: src/Module/FriendSuggest.php:124 msgid "Suggest Friends" msgstr "" -#: src/Module/FriendSuggest.php:126 +#: src/Module/FriendSuggest.php:127 #, php-format msgid "Suggest a friend for %s" msgstr "" -#: src/Module/Friendica.php:67 +#: src/Module/Friendica.php:69 msgid "Installed addons/apps:" msgstr "" -#: src/Module/Friendica.php:72 +#: src/Module/Friendica.php:74 msgid "No installed addons/apps" msgstr "" -#: src/Module/Friendica.php:77 +#: src/Module/Friendica.php:79 #, php-format msgid "Read about the Terms of Service of this node." msgstr "" -#: src/Module/Friendica.php:84 +#: src/Module/Friendica.php:86 msgid "On this server the following remote servers are blocked." msgstr "" -#: src/Module/Friendica.php:87 -#: src/Module/Moderation/Blocklist/Server/Index.php:73 -#: src/Module/Moderation/Blocklist/Server/Index.php:97 +#: src/Module/Friendica.php:89 +#: src/Module/Moderation/Blocklist/Server/Index.php:76 +#: src/Module/Moderation/Blocklist/Server/Index.php:100 #: src/Module/Settings/Channels.php:218 msgid "Reason for the block" msgstr "" -#: src/Module/Friendica.php:89 +#: src/Module/Friendica.php:91 msgid "Download this list in CSV format" msgstr "" -#: src/Module/Friendica.php:103 +#: src/Module/Friendica.php:105 #, php-format msgid "This is Friendica, version %s that is running at the web location %s. The database version is %s, the post update version is %s." msgstr "" -#: src/Module/Friendica.php:108 +#: src/Module/Friendica.php:110 msgid "Please visit Friendi.ca to learn more about the Friendica project." msgstr "" -#: src/Module/Friendica.php:109 +#: src/Module/Friendica.php:111 msgid "Bug reports and issues: please visit" msgstr "" -#: src/Module/Friendica.php:109 +#: src/Module/Friendica.php:111 msgid "the bugtracker at github" msgstr "" -#: src/Module/Friendica.php:110 +#: src/Module/Friendica.php:112 msgid "Suggestions, praise, etc. - please email \"info\" at \"friendi - dot - ca" msgstr "" @@ -7087,132 +7087,132 @@ msgstr "" msgid "Welcome to %s" msgstr "" -#: src/Module/Install.php:176 +#: src/Module/Install.php:175 msgid "Friendica Communications Server - Setup" msgstr "" -#: src/Module/Install.php:187 +#: src/Module/Install.php:186 msgid "System check" msgstr "" -#: src/Module/Install.php:189 src/Module/Install.php:234 -#: src/Module/Install.php:313 +#: src/Module/Install.php:188 src/Module/Install.php:233 +#: src/Module/Install.php:312 msgid "Requirement not satisfied" msgstr "" -#: src/Module/Install.php:190 +#: src/Module/Install.php:189 msgid "Optional requirement not satisfied" msgstr "" -#: src/Module/Install.php:191 +#: src/Module/Install.php:190 msgid "OK" msgstr "" -#: src/Module/Install.php:195 +#: src/Module/Install.php:194 msgid "Next" msgstr "" -#: src/Module/Install.php:196 +#: src/Module/Install.php:195 msgid "Check again" msgstr "" -#: src/Module/Install.php:209 +#: src/Module/Install.php:208 msgid "Base settings" msgstr "" -#: src/Module/Install.php:211 +#: src/Module/Install.php:210 msgid "Base path to installation" msgstr "" -#: src/Module/Install.php:213 +#: src/Module/Install.php:212 msgid "If the system cannot detect the correct path to your installation, enter the correct path here. This setting should only be set if you are using a restricted system and symbolic links to your webroot." msgstr "" -#: src/Module/Install.php:216 +#: src/Module/Install.php:215 msgid "The Friendica system URL" msgstr "" -#: src/Module/Install.php:218 +#: src/Module/Install.php:217 msgid "Overwrite this field in case the system URL determination isn't right, otherwise leave it as is." msgstr "" -#: src/Module/Install.php:229 +#: src/Module/Install.php:228 msgid "Database connection" msgstr "" -#: src/Module/Install.php:230 +#: src/Module/Install.php:229 msgid "In order to install Friendica we need to know how to connect to your database." msgstr "" -#: src/Module/Install.php:231 +#: src/Module/Install.php:230 msgid "Please contact your hosting provider or site administrator if you have questions about these settings." msgstr "" -#: src/Module/Install.php:232 +#: src/Module/Install.php:231 msgid "The database you specify below should already exist. If it does not, please create it before continuing." msgstr "" -#: src/Module/Install.php:239 +#: src/Module/Install.php:238 msgid "Database Server Name" msgstr "" -#: src/Module/Install.php:244 +#: src/Module/Install.php:243 msgid "Database Login Name" msgstr "" -#: src/Module/Install.php:250 +#: src/Module/Install.php:249 msgid "Database Login Password" msgstr "" -#: src/Module/Install.php:252 +#: src/Module/Install.php:251 msgid "For security reasons the password must not be empty" msgstr "" -#: src/Module/Install.php:255 +#: src/Module/Install.php:254 msgid "Database Name" msgstr "" -#: src/Module/Install.php:259 src/Module/Install.php:287 +#: src/Module/Install.php:258 src/Module/Install.php:286 msgid "Please select a default timezone for your website" msgstr "" -#: src/Module/Install.php:274 +#: src/Module/Install.php:273 msgid "Site settings" msgstr "" -#: src/Module/Install.php:282 +#: src/Module/Install.php:281 msgid "Site administrator email address" msgstr "" -#: src/Module/Install.php:284 +#: src/Module/Install.php:283 msgid "Your account email address must match this in order to use the web admin panel." msgstr "" -#: src/Module/Install.php:291 +#: src/Module/Install.php:290 msgid "System Language:" msgstr "" -#: src/Module/Install.php:293 +#: src/Module/Install.php:292 msgid "Set the default language for your Friendica installation interface and to send emails." msgstr "" -#: src/Module/Install.php:305 +#: src/Module/Install.php:304 msgid "Your Friendica site database has been installed." msgstr "" -#: src/Module/Install.php:315 +#: src/Module/Install.php:314 msgid "Installation finished" msgstr "" -#: src/Module/Install.php:335 +#: src/Module/Install.php:334 msgid "

What next

" msgstr "" -#: src/Module/Install.php:336 +#: src/Module/Install.php:335 msgid "IMPORTANT: You will need to [manually] setup a scheduled task for the worker." msgstr "" -#: src/Module/Install.php:339 +#: src/Module/Install.php:338 #, php-format msgid "Go to your new Friendica node registration page and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel." msgstr "" @@ -7302,39 +7302,39 @@ msgstr "" msgid "For more information about the Friendica project and why we feel it is important, please visit http://friendi.ca" msgstr "" -#: src/Module/Item/Compose.php:80 +#: src/Module/Item/Compose.php:83 msgid "Please enter a post body." msgstr "" -#: src/Module/Item/Compose.php:91 +#: src/Module/Item/Compose.php:94 msgid "This feature is only available with the frio theme." msgstr "" -#: src/Module/Item/Compose.php:115 +#: src/Module/Item/Compose.php:118 msgid "Compose new personal note" msgstr "" -#: src/Module/Item/Compose.php:124 +#: src/Module/Item/Compose.php:127 msgid "Compose new post" msgstr "" -#: src/Module/Item/Compose.php:180 +#: src/Module/Item/Compose.php:183 msgid "Visibility" msgstr "" -#: src/Module/Item/Compose.php:196 +#: src/Module/Item/Compose.php:199 msgid "Clear the location" msgstr "" -#: src/Module/Item/Compose.php:197 +#: src/Module/Item/Compose.php:200 msgid "Location services are unavailable on your device" msgstr "" -#: src/Module/Item/Compose.php:198 +#: src/Module/Item/Compose.php:201 msgid "Location services are disabled. Please check the website's permissions on your device" msgstr "" -#: src/Module/Item/Compose.php:204 +#: src/Module/Item/Compose.php:207 msgid "You can make this page always open when you use the New Post button in the Theme Customization settings." msgstr "" @@ -7358,17 +7358,17 @@ msgstr "" msgid "A Decentralized Social Network" msgstr "" -#: src/Module/Media/Attachment/Browser.php:44 -#: src/Module/Media/Photo/Browser.php:45 +#: src/Module/Media/Attachment/Browser.php:45 +#: src/Module/Media/Photo/Browser.php:47 msgid "You need to be logged in to access this page." msgstr "" -#: src/Module/Media/Attachment/Browser.php:60 +#: src/Module/Media/Attachment/Browser.php:61 msgid "Files" msgstr "" -#: src/Module/Media/Attachment/Browser.php:65 -#: src/Module/Media/Photo/Browser.php:76 +#: src/Module/Media/Attachment/Browser.php:66 +#: src/Module/Media/Photo/Browser.php:78 #: src/Module/Settings/Profile/Photo/Index.php:113 msgid "Upload" msgstr "" @@ -7391,112 +7391,112 @@ msgid "File upload failed." msgstr "" #: src/Module/Media/Photo/Upload.php:136 src/Module/Media/Photo/Upload.php:137 -#: src/Module/Profile/Photos.php:201 +#: src/Module/Profile/Photos.php:204 #: src/Module/Settings/Profile/Photo/Index.php:53 msgid "Unable to process image." msgstr "" -#: src/Module/Media/Photo/Upload.php:162 src/Module/Profile/Photos.php:221 +#: src/Module/Media/Photo/Upload.php:162 src/Module/Profile/Photos.php:224 #: src/Module/Settings/Profile/Photo/Index.php:80 msgid "Image upload failed." msgstr "" -#: src/Module/Moderation/BaseUsers.php:59 +#: src/Module/Moderation/BaseUsers.php:61 msgid "List of all users" msgstr "" -#: src/Module/Moderation/BaseUsers.php:64 +#: src/Module/Moderation/BaseUsers.php:66 msgid "Active" msgstr "" -#: src/Module/Moderation/BaseUsers.php:67 +#: src/Module/Moderation/BaseUsers.php:69 msgid "List of active accounts" msgstr "" -#: src/Module/Moderation/BaseUsers.php:75 +#: src/Module/Moderation/BaseUsers.php:77 msgid "List of pending registrations" msgstr "" -#: src/Module/Moderation/BaseUsers.php:83 +#: src/Module/Moderation/BaseUsers.php:85 msgid "List of blocked users" msgstr "" -#: src/Module/Moderation/BaseUsers.php:88 +#: src/Module/Moderation/BaseUsers.php:90 msgid "Deleted" msgstr "" -#: src/Module/Moderation/BaseUsers.php:91 +#: src/Module/Moderation/BaseUsers.php:93 msgid "List of pending user deletions" msgstr "" -#: src/Module/Moderation/BaseUsers.php:108 src/Module/Settings/Account.php:473 +#: src/Module/Moderation/BaseUsers.php:110 src/Module/Settings/Account.php:469 msgid "Normal Account Page" msgstr "" -#: src/Module/Moderation/BaseUsers.php:109 src/Module/Settings/Account.php:480 +#: src/Module/Moderation/BaseUsers.php:111 src/Module/Settings/Account.php:476 msgid "Soapbox Page" msgstr "" -#: src/Module/Moderation/BaseUsers.php:110 src/Module/Settings/Account.php:487 +#: src/Module/Moderation/BaseUsers.php:112 src/Module/Settings/Account.php:483 msgid "Public Group" msgstr "" -#: src/Module/Moderation/BaseUsers.php:111 src/Module/Settings/Account.php:494 +#: src/Module/Moderation/BaseUsers.php:113 src/Module/Settings/Account.php:490 msgid "Public Group - Restricted" msgstr "" -#: src/Module/Moderation/BaseUsers.php:112 src/Module/Settings/Account.php:501 +#: src/Module/Moderation/BaseUsers.php:114 src/Module/Settings/Account.php:497 msgid "Automatic Friend Page" msgstr "" -#: src/Module/Moderation/BaseUsers.php:113 +#: src/Module/Moderation/BaseUsers.php:115 msgid "Private Group" msgstr "" -#: src/Module/Moderation/BaseUsers.php:116 src/Module/Moderation/Summary.php:39 -#: src/Module/Settings/Account.php:444 +#: src/Module/Moderation/BaseUsers.php:118 src/Module/Moderation/Summary.php:42 +#: src/Module/Settings/Account.php:440 msgid "Personal Page" msgstr "" -#: src/Module/Moderation/BaseUsers.php:117 src/Module/Moderation/Summary.php:40 -#: src/Module/Settings/Account.php:451 +#: src/Module/Moderation/BaseUsers.php:119 src/Module/Moderation/Summary.php:43 +#: src/Module/Settings/Account.php:447 msgid "Organisation Page" msgstr "" -#: src/Module/Moderation/BaseUsers.php:118 src/Module/Moderation/Summary.php:41 -#: src/Module/Settings/Account.php:458 +#: src/Module/Moderation/BaseUsers.php:120 src/Module/Moderation/Summary.php:44 +#: src/Module/Settings/Account.php:454 msgid "News Page" msgstr "" -#: src/Module/Moderation/BaseUsers.php:119 src/Module/Moderation/Summary.php:42 -#: src/Module/Settings/Account.php:465 +#: src/Module/Moderation/BaseUsers.php:121 src/Module/Moderation/Summary.php:45 +#: src/Module/Settings/Account.php:461 msgid "Community Group" msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:56 +#: src/Module/Moderation/Blocklist/Contact.php:58 msgid "You can't block a local contact, please block the user instead" msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:75 +#: src/Module/Moderation/Blocklist/Contact.php:77 #, php-format msgid "%s contact unblocked" msgid_plural "%s contacts unblocked" msgstr[0] "" msgstr[1] "" -#: src/Module/Moderation/Blocklist/Contact.php:97 +#: src/Module/Moderation/Blocklist/Contact.php:99 msgid "Remote Contact Blocklist" msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:98 +#: src/Module/Moderation/Blocklist/Contact.php:100 msgid "This page allows you to prevent any message from a remote contact to reach your node." msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:99 +#: src/Module/Moderation/Blocklist/Contact.php:101 msgid "Block Remote Contact" msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:100 +#: src/Module/Moderation/Blocklist/Contact.php:102 #: src/Module/Moderation/Users/Active.php:121 #: src/Module/Moderation/Users/Blocked.php:121 #: src/Module/Moderation/Users/Index.php:135 @@ -7504,77 +7504,77 @@ msgstr "" msgid "select all" msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:101 +#: src/Module/Moderation/Blocklist/Contact.php:103 msgid "select none" msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:104 +#: src/Module/Moderation/Blocklist/Contact.php:106 msgid "No remote contact is blocked from this node." msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:106 +#: src/Module/Moderation/Blocklist/Contact.php:108 msgid "Blocked Remote Contacts" msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:107 +#: src/Module/Moderation/Blocklist/Contact.php:109 msgid "Block New Remote Contact" msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:108 -#: src/Module/Moderation/Reports.php:102 +#: src/Module/Moderation/Blocklist/Contact.php:110 +#: src/Module/Moderation/Reports.php:105 msgid "Photo" msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:108 +#: src/Module/Moderation/Blocklist/Contact.php:110 msgid "Reason" msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:114 +#: src/Module/Moderation/Blocklist/Contact.php:116 #, php-format msgid "%s total blocked contact" msgid_plural "%s total blocked contacts" msgstr[0] "" msgstr[1] "" -#: src/Module/Moderation/Blocklist/Contact.php:117 +#: src/Module/Moderation/Blocklist/Contact.php:119 msgid "URL of the remote contact to block." msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:118 +#: src/Module/Moderation/Blocklist/Contact.php:120 msgid "Also purge contact" msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:118 +#: src/Module/Moderation/Blocklist/Contact.php:120 msgid "Removes all content related to this contact from the node. Keeps the contact record. This action cannot be undone." msgstr "" -#: src/Module/Moderation/Blocklist/Contact.php:119 -#: src/Module/Moderation/Blocklist/Server/Import.php:108 +#: src/Module/Moderation/Blocklist/Contact.php:121 +#: src/Module/Moderation/Blocklist/Server/Import.php:111 msgid "Block Reason" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:66 +#: src/Module/Moderation/Blocklist/Server/Add.php:69 msgid "Server domain pattern added to the blocklist." msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:74 +#: src/Module/Moderation/Blocklist/Server/Add.php:77 #, php-format msgid "%s server scheduled to be purged." msgid_plural "%s servers scheduled to be purged." msgstr[0] "" msgstr[1] "" -#: src/Module/Moderation/Blocklist/Server/Add.php:106 -#: src/Module/Moderation/Blocklist/Server/Import.php:101 +#: src/Module/Moderation/Blocklist/Server/Add.php:109 +#: src/Module/Moderation/Blocklist/Server/Import.php:104 msgid "← Return to the list" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:108 +#: src/Module/Moderation/Blocklist/Server/Add.php:111 msgid "Block A New Server Domain Pattern" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:109 -#: src/Module/Moderation/Blocklist/Server/Index.php:85 +#: src/Module/Moderation/Blocklist/Server/Add.php:112 +#: src/Module/Moderation/Blocklist/Server/Index.php:88 msgid "" "

The server domain pattern syntax is case-insensitive shell wildcard, comprising the following special characters:

\n" "
    \n" @@ -7583,192 +7583,192 @@ msgid "" "
" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:114 -#: src/Module/Moderation/Blocklist/Server/Index.php:93 +#: src/Module/Moderation/Blocklist/Server/Add.php:117 +#: src/Module/Moderation/Blocklist/Server/Index.php:96 msgid "Check pattern" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:115 +#: src/Module/Moderation/Blocklist/Server/Add.php:118 msgid "Matching known servers" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:116 +#: src/Module/Moderation/Blocklist/Server/Add.php:119 #: src/Module/Settings/Server/Action.php:62 #: src/Module/Settings/Server/Index.php:92 msgid "Server Name" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:117 +#: src/Module/Moderation/Blocklist/Server/Add.php:120 msgid "Server Domain" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:118 +#: src/Module/Moderation/Blocklist/Server/Add.php:121 msgid "Known Contacts" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:119 +#: src/Module/Moderation/Blocklist/Server/Add.php:122 #, php-format msgid "%d known server" msgid_plural "%d known servers" msgstr[0] "" msgstr[1] "" -#: src/Module/Moderation/Blocklist/Server/Add.php:120 +#: src/Module/Moderation/Blocklist/Server/Add.php:123 msgid "Add pattern to the blocklist" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:122 -#: src/Module/Moderation/Blocklist/Server/Index.php:102 +#: src/Module/Moderation/Blocklist/Server/Add.php:125 +#: src/Module/Moderation/Blocklist/Server/Index.php:105 msgid "Server Domain Pattern" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:122 -#: src/Module/Moderation/Blocklist/Server/Index.php:102 +#: src/Module/Moderation/Blocklist/Server/Add.php:125 +#: src/Module/Moderation/Blocklist/Server/Index.php:105 msgid "The domain pattern of the new server to add to the blocklist. Do not include the protocol." msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:123 +#: src/Module/Moderation/Blocklist/Server/Add.php:126 msgid "Purge server" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:123 +#: src/Module/Moderation/Blocklist/Server/Add.php:126 msgid "Also purges all the locally stored content authored by the known contacts registered on that server. Keeps the contacts and the server records. This action cannot be undone." msgid_plural "Also purges all the locally stored content authored by the known contacts registered on these servers. Keeps the contacts and the servers records. This action cannot be undone." msgstr[0] "" msgstr[1] "" -#: src/Module/Moderation/Blocklist/Server/Add.php:124 +#: src/Module/Moderation/Blocklist/Server/Add.php:127 msgid "Block reason" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Add.php:124 +#: src/Module/Moderation/Blocklist/Server/Add.php:127 msgid "The reason why you blocked this server domain pattern. This reason will be shown publicly in the server information page." msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:60 -#: src/Module/Moderation/Blocklist/Server/Import.php:67 +#: src/Module/Moderation/Blocklist/Server/Import.php:63 +#: src/Module/Moderation/Blocklist/Server/Import.php:70 msgid "Error importing pattern file" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:74 +#: src/Module/Moderation/Blocklist/Server/Import.php:77 msgid "Local blocklist replaced with the provided file." msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:78 +#: src/Module/Moderation/Blocklist/Server/Import.php:81 #, php-format msgid "%d pattern was added to the local blocklist." msgid_plural "%d patterns were added to the local blocklist." msgstr[0] "" msgstr[1] "" -#: src/Module/Moderation/Blocklist/Server/Import.php:80 +#: src/Module/Moderation/Blocklist/Server/Import.php:83 msgid "No pattern was added to the local blocklist." msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:103 +#: src/Module/Moderation/Blocklist/Server/Import.php:106 msgid "Import a Server Domain Pattern Blocklist" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:104 +#: src/Module/Moderation/Blocklist/Server/Import.php:107 msgid "

This file can be downloaded from the /friendica path of any Friendica server.

" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:105 -#: src/Module/Moderation/Blocklist/Server/Index.php:92 +#: src/Module/Moderation/Blocklist/Server/Import.php:108 +#: src/Module/Moderation/Blocklist/Server/Index.php:95 msgid "Upload file" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:106 +#: src/Module/Moderation/Blocklist/Server/Import.php:109 msgid "Patterns to import" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:107 +#: src/Module/Moderation/Blocklist/Server/Import.php:110 msgid "Domain Pattern" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:109 +#: src/Module/Moderation/Blocklist/Server/Import.php:112 msgid "Import Mode" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:110 +#: src/Module/Moderation/Blocklist/Server/Import.php:113 msgid "Import Patterns" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:111 +#: src/Module/Moderation/Blocklist/Server/Import.php:114 #, php-format msgid "%d total pattern" msgid_plural "%d total patterns" msgstr[0] "" msgstr[1] "" -#: src/Module/Moderation/Blocklist/Server/Import.php:113 -#: src/Module/Moderation/Blocklist/Server/Index.php:101 +#: src/Module/Moderation/Blocklist/Server/Import.php:116 +#: src/Module/Moderation/Blocklist/Server/Index.php:104 msgid "Server domain pattern blocklist CSV file" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:114 +#: src/Module/Moderation/Blocklist/Server/Import.php:117 msgid "Append" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:114 +#: src/Module/Moderation/Blocklist/Server/Import.php:117 msgid "Imports patterns from the file that weren't already existing in the current blocklist." msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:115 +#: src/Module/Moderation/Blocklist/Server/Import.php:118 msgid "Replace" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Import.php:115 +#: src/Module/Moderation/Blocklist/Server/Import.php:118 msgid "Replaces the current blocklist by the imported patterns." msgstr "" -#: src/Module/Moderation/Blocklist/Server/Index.php:72 -#: src/Module/Moderation/Blocklist/Server/Index.php:96 +#: src/Module/Moderation/Blocklist/Server/Index.php:75 +#: src/Module/Moderation/Blocklist/Server/Index.php:99 #: src/Module/Settings/Channels.php:217 msgid "Blocked server domain pattern" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Index.php:74 +#: src/Module/Moderation/Blocklist/Server/Index.php:77 msgid "Delete server domain pattern" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Index.php:74 +#: src/Module/Moderation/Blocklist/Server/Index.php:77 msgid "Check to delete this entry from the blocklist" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Index.php:82 +#: src/Module/Moderation/Blocklist/Server/Index.php:85 msgid "Server Domain Pattern Blocklist" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Index.php:83 +#: src/Module/Moderation/Blocklist/Server/Index.php:86 msgid "This page can be used to define a blocklist of server domain patterns from the federated network that are not allowed to interact with your node. For each domain pattern you should also provide the reason why you block it." msgstr "" -#: src/Module/Moderation/Blocklist/Server/Index.php:84 +#: src/Module/Moderation/Blocklist/Server/Index.php:87 msgid "The list of blocked server domain patterns will be made publically available on the /friendica page so that your users and people investigating communication problems can find the reason easily." msgstr "" -#: src/Module/Moderation/Blocklist/Server/Index.php:90 +#: src/Module/Moderation/Blocklist/Server/Index.php:93 msgid "Import server domain pattern blocklist" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Index.php:91 +#: src/Module/Moderation/Blocklist/Server/Index.php:94 msgid "Add new entry to the blocklist" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Index.php:94 +#: src/Module/Moderation/Blocklist/Server/Index.php:97 msgid "Save changes to the blocklist" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Index.php:95 +#: src/Module/Moderation/Blocklist/Server/Index.php:98 msgid "Current Entries in the Blocklist" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Index.php:98 +#: src/Module/Moderation/Blocklist/Server/Index.php:101 msgid "Delete entry from the blocklist" msgstr "" -#: src/Module/Moderation/Blocklist/Server/Index.php:99 +#: src/Module/Moderation/Blocklist/Server/Index.php:102 msgid "Delete entry from the blocklist?" msgstr "" @@ -7796,54 +7796,54 @@ msgstr "" msgid "The GUID of the item you want to delete." msgstr "" -#: src/Module/Moderation/Item/Source.php:69 +#: src/Module/Moderation/Item/Source.php:72 msgid "Item Id" msgstr "" -#: src/Module/Moderation/Item/Source.php:70 +#: src/Module/Moderation/Item/Source.php:73 msgid "Item URI" msgstr "" -#: src/Module/Moderation/Item/Source.php:72 +#: src/Module/Moderation/Item/Source.php:75 msgid "Terms" msgstr "" -#: src/Module/Moderation/Item/Source.php:73 +#: src/Module/Moderation/Item/Source.php:76 msgid "Tag" msgstr "" -#: src/Module/Moderation/Item/Source.php:74 +#: src/Module/Moderation/Item/Source.php:77 #: src/Module/Moderation/Users/Active.php:112 #: src/Module/Moderation/Users/Blocked.php:112 #: src/Module/Moderation/Users/Index.php:126 msgid "Type" msgstr "" -#: src/Module/Moderation/Item/Source.php:75 +#: src/Module/Moderation/Item/Source.php:78 msgid "Term" msgstr "" -#: src/Module/Moderation/Item/Source.php:76 +#: src/Module/Moderation/Item/Source.php:79 msgid "URL" msgstr "" -#: src/Module/Moderation/Item/Source.php:78 +#: src/Module/Moderation/Item/Source.php:81 msgid "Implicit Mention" msgstr "" -#: src/Module/Moderation/Item/Source.php:80 +#: src/Module/Moderation/Item/Source.php:83 msgid "Item not found" msgstr "" -#: src/Module/Moderation/Item/Source.php:81 +#: src/Module/Moderation/Item/Source.php:84 msgid "No source recorded" msgstr "" -#: src/Module/Moderation/Item/Source.php:82 +#: src/Module/Moderation/Item/Source.php:85 msgid "Please make sure the debug.store_source config key is set in config/local.config.php for future items to have sources." msgstr "" -#: src/Module/Moderation/Item/Source.php:84 +#: src/Module/Moderation/Item/Source.php:87 msgid "Item Guid" msgstr "" @@ -8020,42 +8020,42 @@ msgstr "" msgid "3. Pick posts" msgstr "" -#: src/Module/Moderation/Reports.php:97 +#: src/Module/Moderation/Reports.php:100 msgid "List of reports" msgstr "" -#: src/Module/Moderation/Reports.php:98 +#: src/Module/Moderation/Reports.php:101 msgid "This page display reports created by our or remote users." msgstr "" -#: src/Module/Moderation/Reports.php:99 +#: src/Module/Moderation/Reports.php:102 msgid "No report exists at this node." msgstr "" -#: src/Module/Moderation/Reports.php:102 +#: src/Module/Moderation/Reports.php:105 msgid "Category" msgstr "" -#: src/Module/Moderation/Reports.php:106 +#: src/Module/Moderation/Reports.php:109 #, php-format msgid "%s total report" msgid_plural "%s total reports" msgstr[0] "" msgstr[1] "" -#: src/Module/Moderation/Reports.php:109 +#: src/Module/Moderation/Reports.php:112 msgid "URL of the reported contact." msgstr "" -#: src/Module/Moderation/Summary.php:43 src/Module/Settings/Account.php:422 +#: src/Module/Moderation/Summary.php:46 src/Module/Settings/Account.php:418 msgid "Channel Relay" msgstr "" -#: src/Module/Moderation/Summary.php:63 +#: src/Module/Moderation/Summary.php:66 msgid "Registered users" msgstr "" -#: src/Module/Moderation/Summary.php:65 +#: src/Module/Moderation/Summary.php:68 msgid "Pending registrations" msgstr "" @@ -8335,11 +8335,11 @@ msgstr "" msgid "Show unread" msgstr "" -#: src/Module/Notifications/Ping.php:206 +#: src/Module/Notifications/Ping.php:208 msgid "{0} requested registration" msgstr "" -#: src/Module/Notifications/Ping.php:215 +#: src/Module/Notifications/Ping.php:217 #, php-format msgid "{0} and %d others requested registration" msgstr "" @@ -8445,31 +8445,31 @@ msgstr "" msgid "Invalid photo with id %s." msgstr "" -#: src/Module/Post/Edit.php:68 src/Module/Post/Edit.php:82 +#: src/Module/Post/Edit.php:73 src/Module/Post/Edit.php:87 msgid "Post not found." msgstr "" -#: src/Module/Post/Edit.php:88 +#: src/Module/Post/Edit.php:93 msgid "Edit post" msgstr "" -#: src/Module/Post/Edit.php:122 +#: src/Module/Post/Edit.php:127 msgid "web link" msgstr "" -#: src/Module/Post/Edit.php:123 +#: src/Module/Post/Edit.php:128 msgid "Insert video link" msgstr "" -#: src/Module/Post/Edit.php:124 +#: src/Module/Post/Edit.php:129 msgid "video link" msgstr "" -#: src/Module/Post/Edit.php:125 +#: src/Module/Post/Edit.php:130 msgid "Insert audio link" msgstr "" -#: src/Module/Post/Edit.php:126 +#: src/Module/Post/Edit.php:131 msgid "audio link" msgstr "" @@ -8538,90 +8538,90 @@ msgstr "" msgid "%d more" msgstr "" -#: src/Module/Profile/Contacts.php:145 +#: src/Module/Profile/Contacts.php:147 msgid "No contacts." msgstr "" -#: src/Module/Profile/Conversations.php:92 src/Module/Profile/Profile.php:339 +#: src/Module/Profile/Conversations.php:96 src/Module/Profile/Profile.php:342 #: src/Protocol/Feed.php:1097 #, php-format msgid "%s's posts" msgstr "" -#: src/Module/Profile/Conversations.php:93 src/Module/Profile/Profile.php:340 +#: src/Module/Profile/Conversations.php:97 src/Module/Profile/Profile.php:343 #: src/Protocol/Feed.php:1100 #, php-format msgid "%s's comments" msgstr "" -#: src/Module/Profile/Conversations.php:94 src/Module/Profile/Profile.php:341 +#: src/Module/Profile/Conversations.php:98 src/Module/Profile/Profile.php:344 #: src/Protocol/Feed.php:1093 #, php-format msgid "%s's timeline" msgstr "" -#: src/Module/Profile/Photos.php:150 src/Module/Profile/Photos.php:153 -#: src/Module/Profile/Photos.php:178 +#: src/Module/Profile/Photos.php:153 src/Module/Profile/Photos.php:156 +#: src/Module/Profile/Photos.php:181 #: src/Module/Settings/Profile/Photo/Index.php:44 #, php-format msgid "Image exceeds size limit of %s" msgstr "" -#: src/Module/Profile/Photos.php:156 +#: src/Module/Profile/Photos.php:159 msgid "Image upload didn't complete, please try again" msgstr "" -#: src/Module/Profile/Photos.php:159 +#: src/Module/Profile/Photos.php:162 msgid "Image file is missing" msgstr "" -#: src/Module/Profile/Photos.php:164 +#: src/Module/Profile/Photos.php:167 msgid "Server can't accept new file upload at this time, please contact your administrator" msgstr "" -#: src/Module/Profile/Photos.php:186 +#: src/Module/Profile/Photos.php:189 msgid "Image file is empty." msgstr "" -#: src/Module/Profile/Photos.php:338 +#: src/Module/Profile/Photos.php:341 msgid "View Album" msgstr "" -#: src/Module/Profile/Profile.php:100 src/Module/Profile/Restricted.php:36 +#: src/Module/Profile/Profile.php:103 src/Module/Profile/Restricted.php:38 msgid "Profile not found." msgstr "" -#: src/Module/Profile/Profile.php:146 +#: src/Module/Profile/Profile.php:149 #, php-format msgid "You're currently viewing your profile as %s Cancel" msgstr "" -#: src/Module/Profile/Profile.php:155 +#: src/Module/Profile/Profile.php:158 msgid "Full Name:" msgstr "" -#: src/Module/Profile/Profile.php:160 +#: src/Module/Profile/Profile.php:163 msgid "Member since:" msgstr "" -#: src/Module/Profile/Profile.php:166 +#: src/Module/Profile/Profile.php:169 msgid "j F, Y" msgstr "" -#: src/Module/Profile/Profile.php:167 +#: src/Module/Profile/Profile.php:170 msgid "j F" msgstr "" -#: src/Module/Profile/Profile.php:175 src/Util/Temporal.php:154 +#: src/Module/Profile/Profile.php:178 src/Util/Temporal.php:154 msgid "Birthday:" msgstr "" -#: src/Module/Profile/Profile.php:178 src/Module/Settings/Profile/Index.php:282 +#: src/Module/Profile/Profile.php:181 src/Module/Settings/Profile/Index.php:282 #: src/Util/Temporal.php:156 msgid "Age: " msgstr "" -#: src/Module/Profile/Profile.php:178 src/Module/Settings/Profile/Index.php:282 +#: src/Module/Profile/Profile.php:181 src/Module/Settings/Profile/Index.php:282 #: src/Util/Temporal.php:156 #, php-format msgid "%d year old" @@ -8629,19 +8629,19 @@ msgid_plural "%d years old" msgstr[0] "" msgstr[1] "" -#: src/Module/Profile/Profile.php:183 src/Module/Settings/Profile/Index.php:275 +#: src/Module/Profile/Profile.php:186 src/Module/Settings/Profile/Index.php:275 msgid "Description:" msgstr "" -#: src/Module/Profile/Profile.php:249 +#: src/Module/Profile/Profile.php:252 msgid "Groups:" msgstr "" -#: src/Module/Profile/Profile.php:261 +#: src/Module/Profile/Profile.php:264 msgid "View profile as:" msgstr "" -#: src/Module/Profile/Profile.php:278 +#: src/Module/Profile/Profile.php:281 msgid "View as" msgstr "" @@ -8679,11 +8679,11 @@ msgstr "" msgid "Your Webfinger address or profile URL:" msgstr "" -#: src/Module/Profile/Restricted.php:45 +#: src/Module/Profile/Restricted.php:47 msgid "Restricted profile" msgstr "" -#: src/Module/Profile/Restricted.php:46 +#: src/Module/Profile/Restricted.php:48 msgid "This profile has been restricted which prevents access to their public content from anonymous visitors." msgstr "" @@ -8699,156 +8699,156 @@ msgstr "" msgid "Remove post" msgstr "" -#: src/Module/Register.php:77 +#: src/Module/Register.php:78 msgid "Only parent users can create additional accounts." msgstr "" -#: src/Module/Register.php:92 src/Module/User/Import.php:98 +#: src/Module/Register.php:93 src/Module/User/Import.php:98 msgid "This site has exceeded the number of allowed daily account registrations. Please try again tomorrow." msgstr "" -#: src/Module/Register.php:109 +#: src/Module/Register.php:110 msgid "You may (optionally) fill in this form via OpenID by supplying your OpenID and clicking \"Register\"." msgstr "" -#: src/Module/Register.php:110 +#: src/Module/Register.php:111 msgid "If you are not familiar with OpenID, please leave that field blank and fill in the rest of the items." msgstr "" -#: src/Module/Register.php:111 +#: src/Module/Register.php:112 msgid "Your OpenID (optional): " msgstr "" -#: src/Module/Register.php:120 +#: src/Module/Register.php:121 msgid "Include your profile in member directory?" msgstr "" -#: src/Module/Register.php:141 +#: src/Module/Register.php:142 msgid "Note for the admin" msgstr "" -#: src/Module/Register.php:141 +#: src/Module/Register.php:142 msgid "Leave a message for the admin, why you want to join this node" msgstr "" -#: src/Module/Register.php:142 +#: src/Module/Register.php:143 msgid "Membership on this site is by invitation only." msgstr "" -#: src/Module/Register.php:143 +#: src/Module/Register.php:144 msgid "Your invitation code: " msgstr "" -#: src/Module/Register.php:151 +#: src/Module/Register.php:152 msgid "Your Display Name (as you would like it to be displayed on this system" msgstr "" -#: src/Module/Register.php:152 +#: src/Module/Register.php:153 msgid "Your Email Address: (Initial information will be send there, so this has to be an existing address.)" msgstr "" -#: src/Module/Register.php:153 +#: src/Module/Register.php:154 msgid "Please repeat your e-mail address:" msgstr "" -#: src/Module/Register.php:155 src/Module/Security/PasswordTooLong.php:86 -#: src/Module/Settings/Account.php:555 +#: src/Module/Register.php:156 src/Module/Security/PasswordTooLong.php:86 +#: src/Module/Settings/Account.php:551 msgid "New Password:" msgstr "" -#: src/Module/Register.php:155 +#: src/Module/Register.php:156 msgid "Leave empty for an auto generated password." msgstr "" -#: src/Module/Register.php:156 src/Module/Security/PasswordTooLong.php:87 -#: src/Module/Settings/Account.php:556 +#: src/Module/Register.php:157 src/Module/Security/PasswordTooLong.php:87 +#: src/Module/Settings/Account.php:552 msgid "Confirm:" msgstr "" -#: src/Module/Register.php:157 +#: src/Module/Register.php:158 #, php-format msgid "Choose a profile nickname. This must begin with a text character. Your profile address on this site will then be \"nickname@%s\"." msgstr "" -#: src/Module/Register.php:158 +#: src/Module/Register.php:159 msgid "Choose a nickname: " msgstr "" -#: src/Module/Register.php:166 src/Module/User/Import.php:104 +#: src/Module/Register.php:167 src/Module/User/Import.php:104 msgid "Import" msgstr "" -#: src/Module/Register.php:167 +#: src/Module/Register.php:168 msgid "Import your profile to this friendica instance" msgstr "" -#: src/Module/Register.php:174 +#: src/Module/Register.php:175 msgid "Note: This node explicitly contains adult content" msgstr "" -#: src/Module/Register.php:176 src/Module/Settings/Delegation.php:167 +#: src/Module/Register.php:177 src/Module/Settings/Delegation.php:167 msgid "Parent Password:" msgstr "" -#: src/Module/Register.php:176 src/Module/Settings/Delegation.php:167 +#: src/Module/Register.php:177 src/Module/Settings/Delegation.php:167 msgid "Please enter the password of the parent account to legitimize your request." msgstr "" -#: src/Module/Register.php:205 +#: src/Module/Register.php:206 msgid "Password doesn't match." msgstr "" -#: src/Module/Register.php:211 +#: src/Module/Register.php:212 msgid "Please enter your password." msgstr "" -#: src/Module/Register.php:253 +#: src/Module/Register.php:254 msgid "You have entered too much information." msgstr "" -#: src/Module/Register.php:276 +#: src/Module/Register.php:277 msgid "Please enter the identical mail address in the second field." msgstr "" -#: src/Module/Register.php:284 +#: src/Module/Register.php:285 msgid "Nickname cannot start with a digit." msgstr "" -#: src/Module/Register.php:286 +#: src/Module/Register.php:287 msgid "Nickname can only contain US-ASCII characters." msgstr "" -#: src/Module/Register.php:315 +#: src/Module/Register.php:316 msgid "The additional account was created." msgstr "" -#: src/Module/Register.php:340 +#: src/Module/Register.php:341 msgid "Registration successful. Please check your email for further instructions." msgstr "" -#: src/Module/Register.php:347 +#: src/Module/Register.php:348 #, php-format msgid "Failed to send email message. Here your accout details:
login: %s
password: %s

You can change your password after login." msgstr "" -#: src/Module/Register.php:353 +#: src/Module/Register.php:354 msgid "Registration successful." msgstr "" -#: src/Module/Register.php:362 src/Module/Register.php:369 -#: src/Module/Register.php:379 +#: src/Module/Register.php:363 src/Module/Register.php:370 +#: src/Module/Register.php:380 msgid "Your registration can not be processed." msgstr "" -#: src/Module/Register.php:368 +#: src/Module/Register.php:369 msgid "You have to leave a request note for the admin." msgstr "" -#: src/Module/Register.php:378 +#: src/Module/Register.php:379 msgid "An internal error occured." msgstr "" -#: src/Module/Register.php:400 +#: src/Module/Register.php:401 msgid "Your registration is pending approval by the site owner." msgstr "" @@ -8881,47 +8881,47 @@ msgstr "" msgid "Search term was not removed." msgstr "" -#: src/Module/Security/Login.php:113 +#: src/Module/Security/Login.php:112 msgid "Create a New Account" msgstr "" -#: src/Module/Security/Login.php:132 +#: src/Module/Security/Login.php:131 msgid "Your OpenID: " msgstr "" -#: src/Module/Security/Login.php:135 +#: src/Module/Security/Login.php:134 msgid "Please enter your username and password to add the OpenID to your existing account." msgstr "" -#: src/Module/Security/Login.php:137 +#: src/Module/Security/Login.php:136 msgid "Or login using OpenID: " msgstr "" -#: src/Module/Security/Login.php:151 +#: src/Module/Security/Login.php:150 msgid "Password: " msgstr "" -#: src/Module/Security/Login.php:152 +#: src/Module/Security/Login.php:151 msgid "Remember me" msgstr "" -#: src/Module/Security/Login.php:161 +#: src/Module/Security/Login.php:160 msgid "Forgot your password?" msgstr "" -#: src/Module/Security/Login.php:164 +#: src/Module/Security/Login.php:163 msgid "Website Terms of Service" msgstr "" -#: src/Module/Security/Login.php:165 +#: src/Module/Security/Login.php:164 msgid "terms of service" msgstr "" -#: src/Module/Security/Login.php:167 +#: src/Module/Security/Login.php:166 msgid "Website Privacy Policy" msgstr "" -#: src/Module/Security/Login.php:168 +#: src/Module/Security/Login.php:167 msgid "privacy policy" msgstr "" @@ -8946,7 +8946,7 @@ msgid "Account not found. Please register a new account or login to your existin msgstr "" #: src/Module/Security/PasswordTooLong.php:43 -#: src/Module/Settings/Account.php:53 +#: src/Module/Settings/Account.php:51 msgid "Passwords do not match." msgstr "" @@ -8955,7 +8955,7 @@ msgid "Password does not need changing." msgstr "" #: src/Module/Security/PasswordTooLong.php:63 -#: src/Module/Settings/Account.php:67 +#: src/Module/Settings/Account.php:65 msgid "Password unchanged." msgstr "" @@ -8972,54 +8972,54 @@ msgid "Update Password" msgstr "" #: src/Module/Security/PasswordTooLong.php:85 -#: src/Module/Settings/Account.php:557 +#: src/Module/Settings/Account.php:553 msgid "Current Password:" msgstr "" #: src/Module/Security/PasswordTooLong.php:85 -#: src/Module/Settings/Account.php:557 +#: src/Module/Settings/Account.php:553 msgid "Your current password to confirm the changes" msgstr "" #: src/Module/Security/PasswordTooLong.php:86 -#: src/Module/Settings/Account.php:541 +#: src/Module/Settings/Account.php:537 msgid "Allowed characters are a-z, A-Z, 0-9 and special characters except white spaces and accentuated letters." msgstr "" #: src/Module/Security/PasswordTooLong.php:86 -#: src/Module/Settings/Account.php:542 +#: src/Module/Settings/Account.php:538 msgid "Password length is limited to 72 characters." msgstr "" -#: src/Module/Security/TwoFactor/Recovery.php:60 +#: src/Module/Security/TwoFactor/Recovery.php:62 #, php-format msgid "Remaining recovery codes: %d" msgstr "" -#: src/Module/Security/TwoFactor/Recovery.php:66 +#: src/Module/Security/TwoFactor/Recovery.php:68 #: src/Module/Security/TwoFactor/Verify.php:63 #: src/Module/Settings/TwoFactor/Verify.php:84 msgid "Invalid code, please retry." msgstr "" -#: src/Module/Security/TwoFactor/Recovery.php:85 +#: src/Module/Security/TwoFactor/Recovery.php:87 msgid "Two-factor recovery" msgstr "" -#: src/Module/Security/TwoFactor/Recovery.php:86 +#: src/Module/Security/TwoFactor/Recovery.php:88 msgid "

You can enter one of your one-time recovery codes in case you lost access to your mobile device.

" msgstr "" -#: src/Module/Security/TwoFactor/Recovery.php:87 +#: src/Module/Security/TwoFactor/Recovery.php:89 #, php-format msgid "Don’t have your phone? Enter a two-factor recovery code" msgstr "" -#: src/Module/Security/TwoFactor/Recovery.php:88 +#: src/Module/Security/TwoFactor/Recovery.php:90 msgid "Please enter a recovery code" msgstr "" -#: src/Module/Security/TwoFactor/Recovery.php:89 +#: src/Module/Security/TwoFactor/Recovery.php:91 msgid "Submit recovery code and complete login" msgstr "" @@ -9039,27 +9039,27 @@ msgstr "" msgid "Trust and sign out" msgstr "" -#: src/Module/Security/TwoFactor/Trust.php:82 +#: src/Module/Security/TwoFactor/Trust.php:84 msgid "Couldn't save browser to Cookie." msgstr "" -#: src/Module/Security/TwoFactor/Trust.php:127 +#: src/Module/Security/TwoFactor/Trust.php:129 msgid "Trust this browser?" msgstr "" -#: src/Module/Security/TwoFactor/Trust.php:128 +#: src/Module/Security/TwoFactor/Trust.php:130 msgid "

If you choose to trust this browser, you will not be asked for a verification code the next time you sign in.

" msgstr "" -#: src/Module/Security/TwoFactor/Trust.php:129 +#: src/Module/Security/TwoFactor/Trust.php:131 msgid "Not now" msgstr "" -#: src/Module/Security/TwoFactor/Trust.php:130 +#: src/Module/Security/TwoFactor/Trust.php:132 msgid "Don't trust" msgstr "" -#: src/Module/Security/TwoFactor/Trust.php:131 +#: src/Module/Security/TwoFactor/Trust.php:133 msgid "Trust" msgstr "" @@ -9081,445 +9081,445 @@ msgstr "" msgid "Verify code and complete login" msgstr "" -#: src/Module/Settings/Account.php:82 +#: src/Module/Settings/Account.php:80 msgid "Please use a shorter name." msgstr "" -#: src/Module/Settings/Account.php:85 +#: src/Module/Settings/Account.php:83 msgid "Name too short." msgstr "" -#: src/Module/Settings/Account.php:94 +#: src/Module/Settings/Account.php:92 msgid "Wrong Password." msgstr "" -#: src/Module/Settings/Account.php:99 +#: src/Module/Settings/Account.php:97 msgid "Invalid email." msgstr "" -#: src/Module/Settings/Account.php:103 +#: src/Module/Settings/Account.php:101 msgid "Cannot change to that email." msgstr "" -#: src/Module/Settings/Account.php:132 src/Module/Settings/Account.php:181 -#: src/Module/Settings/Account.php:202 src/Module/Settings/Account.php:286 -#: src/Module/Settings/Account.php:315 +#: src/Module/Settings/Account.php:130 src/Module/Settings/Account.php:179 +#: src/Module/Settings/Account.php:200 src/Module/Settings/Account.php:284 +#: src/Module/Settings/Account.php:313 msgid "Settings were not updated." msgstr "" -#: src/Module/Settings/Account.php:333 +#: src/Module/Settings/Account.php:331 msgid "Contact CSV file upload error" msgstr "" -#: src/Module/Settings/Account.php:352 +#: src/Module/Settings/Account.php:350 msgid "Importing Contacts done" msgstr "" -#: src/Module/Settings/Account.php:365 +#: src/Module/Settings/Account.php:363 msgid "Relocate message has been send to your contacts" msgstr "" -#: src/Module/Settings/Account.php:382 +#: src/Module/Settings/Account.php:380 msgid "Unable to find your profile. Please contact your admin." msgstr "" -#: src/Module/Settings/Account.php:424 +#: src/Module/Settings/Account.php:420 msgid "Account for a service that automatically shares content based on user defined channels." msgstr "" -#: src/Module/Settings/Account.php:434 +#: src/Module/Settings/Account.php:430 msgid "Personal Page Subtypes" msgstr "" -#: src/Module/Settings/Account.php:435 +#: src/Module/Settings/Account.php:431 msgid "Community Group Subtypes" msgstr "" -#: src/Module/Settings/Account.php:446 +#: src/Module/Settings/Account.php:442 msgid "Account for a personal profile." msgstr "" -#: src/Module/Settings/Account.php:453 +#: src/Module/Settings/Account.php:449 msgid "Account for an organisation that automatically approves contact requests as \"Followers\"." msgstr "" -#: src/Module/Settings/Account.php:460 +#: src/Module/Settings/Account.php:456 msgid "Account for a news reflector that automatically approves contact requests as \"Followers\"." msgstr "" -#: src/Module/Settings/Account.php:467 +#: src/Module/Settings/Account.php:463 msgid "Account for community discussions." msgstr "" -#: src/Module/Settings/Account.php:475 +#: src/Module/Settings/Account.php:471 msgid "Account for a regular personal profile that requires manual approval of \"Friends\" and \"Followers\"." msgstr "" -#: src/Module/Settings/Account.php:482 +#: src/Module/Settings/Account.php:478 msgid "Account for a public profile that automatically approves contact requests as \"Followers\"." msgstr "" -#: src/Module/Settings/Account.php:489 +#: src/Module/Settings/Account.php:485 msgid "Automatically approves all contact requests." msgstr "" -#: src/Module/Settings/Account.php:496 +#: src/Module/Settings/Account.php:492 msgid "Contact requests have to be manually approved." msgstr "" -#: src/Module/Settings/Account.php:503 +#: src/Module/Settings/Account.php:499 msgid "Account for a popular profile that automatically approves contact requests as \"Friends\"." msgstr "" -#: src/Module/Settings/Account.php:508 +#: src/Module/Settings/Account.php:504 msgid "Private Group [Experimental]" msgstr "" -#: src/Module/Settings/Account.php:510 +#: src/Module/Settings/Account.php:506 msgid "Requires manual approval of contact requests." msgstr "" -#: src/Module/Settings/Account.php:519 +#: src/Module/Settings/Account.php:515 msgid "OpenID:" msgstr "" -#: src/Module/Settings/Account.php:519 +#: src/Module/Settings/Account.php:515 msgid "(Optional) Allow this OpenID to login to this account." msgstr "" -#: src/Module/Settings/Account.php:527 +#: src/Module/Settings/Account.php:523 msgid "Publish your profile in your local site directory?" msgstr "" -#: src/Module/Settings/Account.php:527 +#: src/Module/Settings/Account.php:523 #, php-format msgid "Your profile will be published in this node's local directory. Your profile details may be publicly visible depending on the system settings." msgstr "" -#: src/Module/Settings/Account.php:533 +#: src/Module/Settings/Account.php:529 #, php-format msgid "Your profile will also be published in the global friendica directories (e.g. %s)." msgstr "" -#: src/Module/Settings/Account.php:546 +#: src/Module/Settings/Account.php:542 msgid "Account Settings" msgstr "" -#: src/Module/Settings/Account.php:547 +#: src/Module/Settings/Account.php:543 #, php-format msgid "Your Identity Address is '%s' or '%s'." msgstr "" -#: src/Module/Settings/Account.php:554 +#: src/Module/Settings/Account.php:550 msgid "Password Settings" msgstr "" -#: src/Module/Settings/Account.php:556 +#: src/Module/Settings/Account.php:552 msgid "Leave password fields blank unless changing" msgstr "" -#: src/Module/Settings/Account.php:558 +#: src/Module/Settings/Account.php:554 msgid "Password:" msgstr "" -#: src/Module/Settings/Account.php:558 +#: src/Module/Settings/Account.php:554 msgid "Your current password to confirm the changes of the email address" msgstr "" -#: src/Module/Settings/Account.php:561 +#: src/Module/Settings/Account.php:557 msgid "Delete OpenID URL" msgstr "" -#: src/Module/Settings/Account.php:563 +#: src/Module/Settings/Account.php:559 msgid "Basic Settings" msgstr "" -#: src/Module/Settings/Account.php:564 +#: src/Module/Settings/Account.php:560 #: src/Module/Settings/Profile/Index.php:274 msgid "Display name:" msgstr "" -#: src/Module/Settings/Account.php:565 +#: src/Module/Settings/Account.php:561 msgid "Email Address:" msgstr "" -#: src/Module/Settings/Account.php:566 +#: src/Module/Settings/Account.php:562 msgid "Your Timezone:" msgstr "" -#: src/Module/Settings/Account.php:567 +#: src/Module/Settings/Account.php:563 msgid "Your Language:" msgstr "" -#: src/Module/Settings/Account.php:567 +#: src/Module/Settings/Account.php:563 msgid "Set the language we use to show you friendica interface and to send you emails" msgstr "" -#: src/Module/Settings/Account.php:568 +#: src/Module/Settings/Account.php:564 msgid "Default Post Location:" msgstr "" -#: src/Module/Settings/Account.php:569 +#: src/Module/Settings/Account.php:565 msgid "Use Browser Location:" msgstr "" -#: src/Module/Settings/Account.php:571 +#: src/Module/Settings/Account.php:567 msgid "Security and Privacy Settings" msgstr "" -#: src/Module/Settings/Account.php:573 +#: src/Module/Settings/Account.php:569 msgid "Maximum Friend Requests/Day:" msgstr "" -#: src/Module/Settings/Account.php:573 +#: src/Module/Settings/Account.php:569 msgid "(to prevent spam abuse)" msgstr "" -#: src/Module/Settings/Account.php:575 +#: src/Module/Settings/Account.php:571 msgid "Allow your profile to be searchable globally?" msgstr "" -#: src/Module/Settings/Account.php:575 +#: src/Module/Settings/Account.php:571 msgid "Activate this setting if you want others to easily find and follow you. Your profile will be searchable on remote systems. This setting also determines whether Friendica will inform search engines that your profile should be indexed or not." msgstr "" -#: src/Module/Settings/Account.php:576 +#: src/Module/Settings/Account.php:572 msgid "Hide your contact/friend list from viewers of your profile?" msgstr "" -#: src/Module/Settings/Account.php:576 +#: src/Module/Settings/Account.php:572 msgid "A list of your contacts is displayed on your profile page. Activate this option to disable the display of your contact list." msgstr "" -#: src/Module/Settings/Account.php:577 +#: src/Module/Settings/Account.php:573 msgid "Hide your public content from anonymous viewers" msgstr "" -#: src/Module/Settings/Account.php:577 +#: src/Module/Settings/Account.php:573 msgid "Anonymous visitors will only see your basic profile details. Your public posts and replies will still be freely accessible on the remote servers of your followers and through relays." msgstr "" -#: src/Module/Settings/Account.php:578 +#: src/Module/Settings/Account.php:574 msgid "Make public posts unlisted" msgstr "" -#: src/Module/Settings/Account.php:578 +#: src/Module/Settings/Account.php:574 msgid "Your public posts will not appear on the community pages or in search results, nor be sent to relay servers. However they can still appear on public feeds on remote servers." msgstr "" -#: src/Module/Settings/Account.php:579 +#: src/Module/Settings/Account.php:575 msgid "Make all posted pictures accessible" msgstr "" -#: src/Module/Settings/Account.php:579 +#: src/Module/Settings/Account.php:575 msgid "This option makes every posted picture accessible via the direct link. This is a workaround for the problem that most other networks can't handle permissions on pictures. Non public pictures still won't be visible for the public on your photo albums though." msgstr "" -#: src/Module/Settings/Account.php:580 +#: src/Module/Settings/Account.php:576 msgid "Allow friends to post to your profile page?" msgstr "" -#: src/Module/Settings/Account.php:580 +#: src/Module/Settings/Account.php:576 msgid "Your contacts may write posts on your profile wall. These posts will be distributed to your contacts" msgstr "" -#: src/Module/Settings/Account.php:581 +#: src/Module/Settings/Account.php:577 msgid "Allow friends to tag your posts?" msgstr "" -#: src/Module/Settings/Account.php:581 +#: src/Module/Settings/Account.php:577 msgid "Your contacts can add additional tags to your posts." msgstr "" -#: src/Module/Settings/Account.php:582 +#: src/Module/Settings/Account.php:578 msgid "Default privacy circle for new contacts" msgstr "" -#: src/Module/Settings/Account.php:583 +#: src/Module/Settings/Account.php:579 msgid "Default privacy circle for new group contacts" msgstr "" -#: src/Module/Settings/Account.php:584 +#: src/Module/Settings/Account.php:580 msgid "Default Post Permissions" msgstr "" -#: src/Module/Settings/Account.php:588 +#: src/Module/Settings/Account.php:584 msgid "Expiration settings" msgstr "" -#: src/Module/Settings/Account.php:589 +#: src/Module/Settings/Account.php:585 msgid "Automatically expire posts after this many days:" msgstr "" -#: src/Module/Settings/Account.php:589 +#: src/Module/Settings/Account.php:585 msgid "If empty, posts will not expire. Expired posts will be deleted" msgstr "" -#: src/Module/Settings/Account.php:590 +#: src/Module/Settings/Account.php:586 msgid "Expire posts" msgstr "" -#: src/Module/Settings/Account.php:590 +#: src/Module/Settings/Account.php:586 msgid "When activated, posts and comments will be expired." msgstr "" -#: src/Module/Settings/Account.php:591 +#: src/Module/Settings/Account.php:587 msgid "Expire personal notes" msgstr "" -#: src/Module/Settings/Account.php:591 +#: src/Module/Settings/Account.php:587 msgid "When activated, the personal notes on your profile page will be expired." msgstr "" -#: src/Module/Settings/Account.php:592 +#: src/Module/Settings/Account.php:588 msgid "Expire starred posts" msgstr "" -#: src/Module/Settings/Account.php:592 +#: src/Module/Settings/Account.php:588 msgid "Starring posts keeps them from being expired. That behaviour is overwritten by this setting." msgstr "" -#: src/Module/Settings/Account.php:593 +#: src/Module/Settings/Account.php:589 msgid "Only expire posts by others" msgstr "" -#: src/Module/Settings/Account.php:593 +#: src/Module/Settings/Account.php:589 msgid "When activated, your own posts never expire. Then the settings above are only valid for posts you received." msgstr "" -#: src/Module/Settings/Account.php:596 +#: src/Module/Settings/Account.php:592 msgid "Notification Settings" msgstr "" -#: src/Module/Settings/Account.php:597 +#: src/Module/Settings/Account.php:593 msgid "Send a notification email when:" msgstr "" -#: src/Module/Settings/Account.php:598 +#: src/Module/Settings/Account.php:594 msgid "You receive an introduction" msgstr "" -#: src/Module/Settings/Account.php:599 +#: src/Module/Settings/Account.php:595 msgid "Your introductions are confirmed" msgstr "" -#: src/Module/Settings/Account.php:600 +#: src/Module/Settings/Account.php:596 msgid "Someone writes on your profile wall" msgstr "" -#: src/Module/Settings/Account.php:601 +#: src/Module/Settings/Account.php:597 msgid "Someone writes a followup comment" msgstr "" -#: src/Module/Settings/Account.php:602 +#: src/Module/Settings/Account.php:598 msgid "You receive a private message" msgstr "" -#: src/Module/Settings/Account.php:603 +#: src/Module/Settings/Account.php:599 msgid "You receive a friend suggestion" msgstr "" -#: src/Module/Settings/Account.php:604 +#: src/Module/Settings/Account.php:600 msgid "You are tagged in a post" msgstr "" -#: src/Module/Settings/Account.php:606 +#: src/Module/Settings/Account.php:602 msgid "Create a desktop notification when:" msgstr "" -#: src/Module/Settings/Account.php:607 +#: src/Module/Settings/Account.php:603 msgid "Someone tagged you" msgstr "" -#: src/Module/Settings/Account.php:608 +#: src/Module/Settings/Account.php:604 msgid "Someone directly commented on your post" msgstr "" -#: src/Module/Settings/Account.php:609 +#: src/Module/Settings/Account.php:605 msgid "Someone liked your content" msgstr "" -#: src/Module/Settings/Account.php:609 src/Module/Settings/Account.php:610 +#: src/Module/Settings/Account.php:605 src/Module/Settings/Account.php:606 msgid "Can only be enabled, when the direct comment notification is enabled." msgstr "" -#: src/Module/Settings/Account.php:610 +#: src/Module/Settings/Account.php:606 msgid "Someone shared your content" msgstr "" -#: src/Module/Settings/Account.php:611 +#: src/Module/Settings/Account.php:607 msgid "Someone commented in your thread" msgstr "" -#: src/Module/Settings/Account.php:612 +#: src/Module/Settings/Account.php:608 msgid "Someone commented in a thread where you commented" msgstr "" -#: src/Module/Settings/Account.php:613 +#: src/Module/Settings/Account.php:609 msgid "Someone commented in a thread where you interacted" msgstr "" -#: src/Module/Settings/Account.php:615 +#: src/Module/Settings/Account.php:611 msgid "Activate desktop notifications" msgstr "" -#: src/Module/Settings/Account.php:615 +#: src/Module/Settings/Account.php:611 msgid "Show desktop popup on new notifications" msgstr "" -#: src/Module/Settings/Account.php:619 +#: src/Module/Settings/Account.php:615 msgid "Text-only notification emails" msgstr "" -#: src/Module/Settings/Account.php:621 +#: src/Module/Settings/Account.php:617 msgid "Send text only notification emails, without the html part" msgstr "" -#: src/Module/Settings/Account.php:625 +#: src/Module/Settings/Account.php:621 msgid "Show detailled notifications" msgstr "" -#: src/Module/Settings/Account.php:627 +#: src/Module/Settings/Account.php:623 msgid "Per default, notifications are condensed to a single notification per item. When enabled every notification is displayed." msgstr "" -#: src/Module/Settings/Account.php:631 +#: src/Module/Settings/Account.php:627 msgid "Show notifications of ignored contacts" msgstr "" -#: src/Module/Settings/Account.php:633 +#: src/Module/Settings/Account.php:629 msgid "You don't see posts from ignored contacts. But you still see their comments. This setting controls if you want to still receive regular notifications that are caused by ignored contacts or not." msgstr "" -#: src/Module/Settings/Account.php:636 +#: src/Module/Settings/Account.php:632 msgid "Advanced Account/Page Type Settings" msgstr "" -#: src/Module/Settings/Account.php:637 +#: src/Module/Settings/Account.php:633 msgid "Change the behaviour of this account for special situations" msgstr "" -#: src/Module/Settings/Account.php:640 +#: src/Module/Settings/Account.php:636 msgid "Import Contacts" msgstr "" -#: src/Module/Settings/Account.php:641 +#: src/Module/Settings/Account.php:637 msgid "Upload a CSV file that contains the handle of your followed accounts in the first column you exported from the old account." msgstr "" -#: src/Module/Settings/Account.php:642 +#: src/Module/Settings/Account.php:638 msgid "Upload File" msgstr "" -#: src/Module/Settings/Account.php:645 +#: src/Module/Settings/Account.php:641 msgid "Relocate" msgstr "" -#: src/Module/Settings/Account.php:646 +#: src/Module/Settings/Account.php:642 msgid "If you have moved this profile from another server, and some of your contacts don't receive your updates, try pushing this button." msgstr "" -#: src/Module/Settings/Account.php:647 +#: src/Module/Settings/Account.php:643 msgid "Resend relocate message to contacts" msgstr "" @@ -9548,12 +9548,12 @@ msgid "When selected, the channel results are reshared. This only works for publ msgstr "" #: src/Module/Settings/Channels.php:176 src/Module/Settings/Channels.php:197 -#: src/Module/Settings/Display.php:346 +#: src/Module/Settings/Display.php:349 msgid "Label" msgstr "" #: src/Module/Settings/Channels.php:177 src/Module/Settings/Channels.php:198 -#: src/Module/Settings/Display.php:347 +#: src/Module/Settings/Display.php:350 #: src/Module/Settings/TwoFactor/AppSpecific.php:124 msgid "Description" msgstr "" @@ -9912,218 +9912,218 @@ msgstr "" msgid "No entries." msgstr "" -#: src/Module/Settings/Display.php:177 +#: src/Module/Settings/Display.php:180 msgid "The theme you chose isn't available." msgstr "" -#: src/Module/Settings/Display.php:217 +#: src/Module/Settings/Display.php:220 #, php-format msgid "%s - (Unsupported)" msgstr "" -#: src/Module/Settings/Display.php:257 +#: src/Module/Settings/Display.php:260 msgid "Color/Black" msgstr "" -#: src/Module/Settings/Display.php:258 view/theme/frio/php/scheme.php:95 +#: src/Module/Settings/Display.php:261 view/theme/frio/php/scheme.php:95 msgid "Black" msgstr "" -#: src/Module/Settings/Display.php:259 +#: src/Module/Settings/Display.php:262 msgid "Color/White" msgstr "" -#: src/Module/Settings/Display.php:260 +#: src/Module/Settings/Display.php:263 msgid "White" msgstr "" -#: src/Module/Settings/Display.php:265 +#: src/Module/Settings/Display.php:268 msgid "No preview" msgstr "" -#: src/Module/Settings/Display.php:266 +#: src/Module/Settings/Display.php:269 msgid "No image" msgstr "" -#: src/Module/Settings/Display.php:267 +#: src/Module/Settings/Display.php:270 msgid "Small Image" msgstr "" -#: src/Module/Settings/Display.php:268 +#: src/Module/Settings/Display.php:271 msgid "Large Image" msgstr "" -#: src/Module/Settings/Display.php:313 +#: src/Module/Settings/Display.php:316 msgid "Display Settings" msgstr "" -#: src/Module/Settings/Display.php:315 +#: src/Module/Settings/Display.php:318 msgid "General Theme Settings" msgstr "" -#: src/Module/Settings/Display.php:316 +#: src/Module/Settings/Display.php:319 msgid "Custom Theme Settings" msgstr "" -#: src/Module/Settings/Display.php:317 +#: src/Module/Settings/Display.php:320 msgid "Content Settings" msgstr "" -#: src/Module/Settings/Display.php:318 view/theme/duepuntozero/config.php:74 +#: src/Module/Settings/Display.php:321 view/theme/duepuntozero/config.php:74 #: view/theme/frio/config.php:156 view/theme/quattro/config.php:76 #: view/theme/vier/config.php:124 msgid "Theme settings" msgstr "" -#: src/Module/Settings/Display.php:319 +#: src/Module/Settings/Display.php:322 msgid "Timelines" msgstr "" -#: src/Module/Settings/Display.php:326 +#: src/Module/Settings/Display.php:329 msgid "Display Theme:" msgstr "" -#: src/Module/Settings/Display.php:327 +#: src/Module/Settings/Display.php:330 msgid "Mobile Theme:" msgstr "" -#: src/Module/Settings/Display.php:330 +#: src/Module/Settings/Display.php:333 msgid "Number of items to display per page:" msgstr "" -#: src/Module/Settings/Display.php:330 src/Module/Settings/Display.php:331 +#: src/Module/Settings/Display.php:333 src/Module/Settings/Display.php:334 msgid "Maximum of 100 items" msgstr "" -#: src/Module/Settings/Display.php:331 +#: src/Module/Settings/Display.php:334 msgid "Number of items to display per page when viewed from mobile device:" msgstr "" -#: src/Module/Settings/Display.php:332 +#: src/Module/Settings/Display.php:335 msgid "Update browser every xx seconds" msgstr "" -#: src/Module/Settings/Display.php:332 +#: src/Module/Settings/Display.php:335 msgid "Minimum of 10 seconds. Enter -1 to disable it." msgstr "" -#: src/Module/Settings/Display.php:333 +#: src/Module/Settings/Display.php:336 msgid "Display emoticons" msgstr "" -#: src/Module/Settings/Display.php:333 +#: src/Module/Settings/Display.php:336 msgid "When enabled, emoticons are replaced with matching symbols." msgstr "" -#: src/Module/Settings/Display.php:334 +#: src/Module/Settings/Display.php:337 msgid "Infinite scroll" msgstr "" -#: src/Module/Settings/Display.php:334 +#: src/Module/Settings/Display.php:337 msgid "Automatic fetch new items when reaching the page end." msgstr "" -#: src/Module/Settings/Display.php:335 +#: src/Module/Settings/Display.php:338 msgid "Enable Smart Threading" msgstr "" -#: src/Module/Settings/Display.php:335 +#: src/Module/Settings/Display.php:338 msgid "Enable the automatic suppression of extraneous thread indentation." msgstr "" -#: src/Module/Settings/Display.php:336 +#: src/Module/Settings/Display.php:339 msgid "Display the Dislike feature" msgstr "" -#: src/Module/Settings/Display.php:336 +#: src/Module/Settings/Display.php:339 msgid "Display the Dislike button and dislike reactions on posts and comments." msgstr "" -#: src/Module/Settings/Display.php:337 +#: src/Module/Settings/Display.php:340 msgid "Display the resharer" msgstr "" -#: src/Module/Settings/Display.php:337 +#: src/Module/Settings/Display.php:340 msgid "Display the first resharer as icon and text on a reshared item." msgstr "" -#: src/Module/Settings/Display.php:338 +#: src/Module/Settings/Display.php:341 msgid "Stay local" msgstr "" -#: src/Module/Settings/Display.php:338 +#: src/Module/Settings/Display.php:341 msgid "Don't go to a remote system when following a contact link." msgstr "" -#: src/Module/Settings/Display.php:339 +#: src/Module/Settings/Display.php:342 msgid "Show the post deletion checkbox" msgstr "" -#: src/Module/Settings/Display.php:339 +#: src/Module/Settings/Display.php:342 msgid "Display the checkbox for the post deletion on the network page." msgstr "" -#: src/Module/Settings/Display.php:340 +#: src/Module/Settings/Display.php:343 msgid "DIsplay the event list" msgstr "" -#: src/Module/Settings/Display.php:340 +#: src/Module/Settings/Display.php:343 msgid "Display the birthday reminder and event list on the network page." msgstr "" -#: src/Module/Settings/Display.php:341 +#: src/Module/Settings/Display.php:344 msgid "Link preview mode" msgstr "" -#: src/Module/Settings/Display.php:341 +#: src/Module/Settings/Display.php:344 msgid "Appearance of the link preview that is added to each post with a link." msgstr "" -#: src/Module/Settings/Display.php:342 +#: src/Module/Settings/Display.php:345 msgid "Hide pictures with empty alternative text" msgstr "" -#: src/Module/Settings/Display.php:342 +#: src/Module/Settings/Display.php:345 msgid "Don't display pictures that are missing the alternative text." msgstr "" -#: src/Module/Settings/Display.php:343 +#: src/Module/Settings/Display.php:346 msgid "Hide custom emojis" msgstr "" -#: src/Module/Settings/Display.php:343 +#: src/Module/Settings/Display.php:346 msgid "Don't display custom emojis." msgstr "" -#: src/Module/Settings/Display.php:344 +#: src/Module/Settings/Display.php:347 msgid "Platform icons style" msgstr "" -#: src/Module/Settings/Display.php:344 +#: src/Module/Settings/Display.php:347 msgid "Style of the platform icons" msgstr "" -#: src/Module/Settings/Display.php:349 +#: src/Module/Settings/Display.php:352 msgid "Bookmark" msgstr "" -#: src/Module/Settings/Display.php:351 +#: src/Module/Settings/Display.php:354 msgid "Enable timelines that you want to see in the channels widget. Bookmark timelines that you want to see in the top menu." msgstr "" -#: src/Module/Settings/Display.php:353 +#: src/Module/Settings/Display.php:356 msgid "Channel languages:" msgstr "" -#: src/Module/Settings/Display.php:353 +#: src/Module/Settings/Display.php:356 msgid "Select all languages that you want to see in your channels." msgstr "" -#: src/Module/Settings/Display.php:355 +#: src/Module/Settings/Display.php:358 msgid "Beginning of week:" msgstr "" -#: src/Module/Settings/Display.php:356 +#: src/Module/Settings/Display.php:359 msgid "Default calendar view:" msgstr "" @@ -10775,24 +10775,24 @@ msgstr "" msgid "The requested item doesn't exist or has been deleted." msgstr "" -#: src/Module/User/Delegation.php:132 +#: src/Module/User/Delegation.php:134 #, php-format msgid "You are now logged in as %s" msgstr "" -#: src/Module/User/Delegation.php:171 +#: src/Module/User/Delegation.php:173 msgid "Switch between your accounts" msgstr "" -#: src/Module/User/Delegation.php:172 +#: src/Module/User/Delegation.php:174 msgid "Manage your accounts" msgstr "" -#: src/Module/User/Delegation.php:173 +#: src/Module/User/Delegation.php:175 msgid "Toggle between different identities or community/group pages which share your account details or which you have been granted \"manage\" permissions" msgstr "" -#: src/Module/User/Delegation.php:174 +#: src/Module/User/Delegation.php:176 msgid "Select an identity to manage: " msgstr "" @@ -11736,20 +11736,20 @@ msgstr "" msgid "The folder %s must be writable by webserver." msgstr "" -#: src/Security/Authentication.php:200 +#: src/Security/Authentication.php:216 msgid "Login failed." msgstr "" -#: src/Security/Authentication.php:245 +#: src/Security/Authentication.php:260 msgid "Login failed. Please check your credentials." msgstr "" -#: src/Security/Authentication.php:359 +#: src/Security/Authentication.php:373 #, php-format msgid "Welcome %s" msgstr "" -#: src/Security/Authentication.php:360 +#: src/Security/Authentication.php:374 msgid "Please upload a profile photo." msgstr "" diff --git a/view/theme/duepuntozero/config.php b/view/theme/duepuntozero/config.php index 59acb109d2..1c70b4414c 100644 --- a/view/theme/duepuntozero/config.php +++ b/view/theme/duepuntozero/config.php @@ -7,11 +7,11 @@ * */ -use Friendica\App; +use Friendica\AppHelper; use Friendica\Core\Renderer; use Friendica\DI; -function theme_content(App $a) +function theme_content(AppHelper $appHelper) { if (!DI::userSession()->getLocalUserId()) { return; @@ -20,10 +20,10 @@ function theme_content(App $a) $colorset = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'duepuntozero', 'colorset'); $user = true; - return clean_form($a, $colorset, $user); + return clean_form($appHelper, $colorset, $user); } -function theme_post(App $a) +function theme_post(AppHelper $appHelper) { if (!DI::userSession()->getLocalUserId()) { return; @@ -34,23 +34,23 @@ function theme_post(App $a) } } -function theme_admin(App $a) +function theme_admin(AppHelper $appHelper) { $colorset = DI::config()->get('duepuntozero', 'colorset'); $user = false; - return clean_form($a, $colorset, $user); + return clean_form($appHelper, $colorset, $user); } -function theme_admin_post(App $a) +function theme_admin_post(AppHelper $appHelper) { if (isset($_POST['duepuntozero-settings-submit'])) { DI::config()->set('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']); } } -/// @TODO $a is no longer used -function clean_form(App $a, &$colorset, $user) +/// @TODO $appHelper is no longer used +function clean_form(AppHelper $appHelper, &$colorset, $user) { $colorset = [ 'default' => DI::l10n()->t('default'), diff --git a/view/theme/duepuntozero/theme.php b/view/theme/duepuntozero/theme.php index a9466b2350..9ab5dd4ce3 100644 --- a/view/theme/duepuntozero/theme.php +++ b/view/theme/duepuntozero/theme.php @@ -7,7 +7,8 @@ * */ -use Friendica\App; +use Friendica\App\Mode; +use Friendica\AppHelper; use Friendica\Core\Renderer; use Friendica\DI; @@ -15,13 +16,13 @@ use Friendica\DI; * This script can be included even when the app is in maintenance mode which requires us to avoid any config call */ -function duepuntozero_init(App $a) { +function duepuntozero_init(AppHelper $appHelper) { Renderer::setActiveTemplateEngine('smarty3'); $colorset = null; - if (DI::mode()->has(App\Mode::MAINTENANCEDISABLED)) { + if (DI::mode()->has(Mode::MAINTENANCEDISABLED)) { $colorset = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'duepuntozero', 'colorset'); if (!$colorset) $colorset = DI::config()->get('duepuntozero', 'colorset'); // user setting have priority, then node settings diff --git a/view/theme/frio/config.php b/view/theme/frio/config.php index d157b58a2d..8556420a1e 100644 --- a/view/theme/frio/config.php +++ b/view/theme/frio/config.php @@ -7,7 +7,7 @@ * */ -use Friendica\App; +use Friendica\AppHelper; use Friendica\Content\ContactSelector; use Friendica\Core\Renderer; use Friendica\DI; @@ -15,7 +15,7 @@ use Friendica\DI; require_once 'view/theme/frio/php/Image.php'; require_once 'view/theme/frio/php/scheme.php'; -function theme_post(App $a) +function theme_post(AppHelper $appHelper) { if (!DI::userSession()->getLocalUserId()) { return; diff --git a/view/theme/frio/php/frio_boot.php b/view/theme/frio/php/frio_boot.php index 26f32d42ab..2a1734bda0 100644 --- a/view/theme/frio/php/frio_boot.php +++ b/view/theme/frio/php/frio_boot.php @@ -9,7 +9,7 @@ * */ -use Friendica\App; +use Friendica\AppHelper; use Friendica\DI; /** @@ -17,19 +17,19 @@ use Friendica\DI; * * @todo Check if this is really needed. */ -function load_page(App $a) +function load_page(AppHelper $appHelper) { if (isset($_GET['mode']) && ($_GET['mode'] == 'minimal')) { require 'view/theme/frio/minimal.php'; } elseif ((isset($_GET['mode']) && ($_GET['mode'] == 'none'))) { require 'view/theme/frio/none.php'; } else { - $template = 'view/theme/' . $a->getCurrentTheme() . '/' + $template = 'view/theme/' . $appHelper->getCurrentTheme() . '/' . ((DI::page()['template'] ?? '') ?: 'default' ) . '.php'; if (file_exists($template)) { require_once $template; } else { - require_once str_replace('theme/' . $a->getCurrentTheme() . '/', '', $template); + require_once str_replace('theme/' . $appHelper->getCurrentTheme() . '/', '', $template); } } } diff --git a/view/theme/frio/php/scheme.php b/view/theme/frio/php/scheme.php index a7673d7ea2..5c11c8a5d1 100644 --- a/view/theme/frio/php/scheme.php +++ b/view/theme/frio/php/scheme.php @@ -29,7 +29,7 @@ require_once 'view/theme/frio/theme.php'; function get_scheme_info($scheme) { - $theme = DI::app()->getCurrentTheme(); + $theme = DI::appHelper()->getCurrentTheme(); $themepath = 'view/theme/' . $theme . '/'; $scheme = Strings::sanitizeFilePathItem($scheme) ?: FRIO_DEFAULT_SCHEME; diff --git a/view/theme/frio/theme.php b/view/theme/frio/theme.php index 7ae9c03925..a1ab35805b 100644 --- a/view/theme/frio/theme.php +++ b/view/theme/frio/theme.php @@ -12,7 +12,8 @@ * Maintainer: Hypolite Petovan */ -use Friendica\App; +use Friendica\App\Mode; +use Friendica\AppHelper; use Friendica\Content\Text\Plaintext; use Friendica\Core\Hook; use Friendica\Core\Logger; @@ -36,12 +37,12 @@ const FRIO_CUSTOM_SCHEME = '---'; * This script can be included even when the app is in maintenance mode which requires us to avoid any config call */ -function frio_init(App $a) +function frio_init(AppHelper $appHelper) { global $frio; $frio = 'view/theme/frio'; - $a->setThemeInfoValue('videowidth', 622); + $appHelper->setThemeInfoValue('videowidth', 622); Renderer::setActiveTemplateEngine('smarty3'); @@ -179,13 +180,12 @@ function frio_contact_photo_menu(&$args) * Some links will point to the local pages because the user would expect * local page (these pages are: search, community, help, apps, directory). * - * @param App $a The App class * @param array $nav_info The original nav info array: nav, banner, userinfo, sitelocation * @throws Exception */ function frio_remote_nav(array &$nav_info) { - if (DI::mode()->has(App\Mode::MAINTENANCEDISABLED)) { + if (DI::mode()->has(Mode::MAINTENANCEDISABLED)) { // get the homelink from $_SESSION $homelink = DI::userSession()->getMyUrl(); if (!$homelink) { diff --git a/view/theme/quattro/config.php b/view/theme/quattro/config.php index 77384d9b65..97f68c0579 100644 --- a/view/theme/quattro/config.php +++ b/view/theme/quattro/config.php @@ -7,11 +7,11 @@ * */ -use Friendica\App; +use Friendica\AppHelper; use Friendica\Core\Renderer; use Friendica\DI; -function theme_content(App $a) { +function theme_content(AppHelper $appHelper) { if (!DI::userSession()->getLocalUserId()) { return; } @@ -21,10 +21,10 @@ function theme_content(App $a) { $tfs = DI::pConfig()->get(DI::userSession()->getLocalUserId(),"quattro","tfs"); $pfs = DI::pConfig()->get(DI::userSession()->getLocalUserId(),"quattro","pfs"); - return quattro_form($a,$align, $color, $tfs, $pfs); + return quattro_form($appHelper,$align, $color, $tfs, $pfs); } -function theme_post(App $a) { +function theme_post(AppHelper $appHelper) { if (!DI::userSession()->getLocalUserId()) { return; } @@ -37,16 +37,16 @@ function theme_post(App $a) { } } -function theme_admin(App $a) { +function theme_admin(AppHelper $appHelper) { $align = DI::config()->get('quattro', 'align' ); $color = DI::config()->get('quattro', 'color' ); $tfs = DI::config()->get("quattro","tfs"); $pfs = DI::config()->get("quattro","pfs"); - return quattro_form($a,$align, $color, $tfs, $pfs); + return quattro_form($appHelper,$align, $color, $tfs, $pfs); } -function theme_admin_post(App $a) { +function theme_admin_post(AppHelper $appHelper) { if (isset($_POST['quattro-settings-submit'])){ DI::config()->set('quattro', 'align', $_POST['quattro_align']); DI::config()->set('quattro', 'color', $_POST['quattro_color']); @@ -56,7 +56,7 @@ function theme_admin_post(App $a) { } /// @TODO $a is no longer used here -function quattro_form(App $a, $align, $color, $tfs, $pfs) { +function quattro_form(AppHelper $appHelper, $align, $color, $tfs, $pfs) { $colors = [ "dark" => "Quattro", "lilac" => "Lilac", diff --git a/view/theme/quattro/theme.php b/view/theme/quattro/theme.php index 7e72e2930a..7c2595dc2b 100644 --- a/view/theme/quattro/theme.php +++ b/view/theme/quattro/theme.php @@ -12,14 +12,14 @@ * Maintainer: Tobias */ -use Friendica\App; +use Friendica\AppHelper; use Friendica\DI; /* * This script can be included even when the app is in maintenance mode which requires us to avoid any config call */ -function quattro_init(App $a) { +function quattro_init(AppHelper $appHelper) { DI::page()['htmlhead'] .= ''; DI::page()['htmlhead'] .= '';; } diff --git a/view/theme/smoothly/theme.php b/view/theme/smoothly/theme.php index 2b81898aea..e42ed94364 100644 --- a/view/theme/smoothly/theme.php +++ b/view/theme/smoothly/theme.php @@ -20,7 +20,7 @@ * Screenshot: Screenshot */ -use Friendica\App; +use Friendica\AppHelper; use Friendica\Core\Renderer; use Friendica\DI; @@ -28,7 +28,7 @@ use Friendica\DI; * This script can be included even when the app is in maintenance mode which requires us to avoid any config call */ -function smoothly_init(App $a) { +function smoothly_init(AppHelper $appHelper) { Renderer::setActiveTemplateEngine('smarty3'); $cssFile = null; diff --git a/view/theme/vier/config.php b/view/theme/vier/config.php index 3f61122dd3..f30bf1be7e 100644 --- a/view/theme/vier/config.php +++ b/view/theme/vier/config.php @@ -7,13 +7,13 @@ * */ -use Friendica\App; +use Friendica\AppHelper; use Friendica\Core\Renderer; use Friendica\DI; require_once __DIR__ . '/theme.php'; -function theme_content(App $a) +function theme_content(AppHelper $appHelper) { if (!DI::userSession()->getLocalUserId()) { return; @@ -40,11 +40,11 @@ function theme_content(App $a) $show_friends = get_vier_config('show_friends', true); $show_lastusers = get_vier_config('show_lastusers', true); - return vier_form($a,$style, $show_pages, $show_profiles, $show_helpers, + return vier_form($appHelper,$style, $show_pages, $show_profiles, $show_helpers, $show_services, $show_friends, $show_lastusers); } -function theme_post(App $a) +function theme_post(AppHelper $appHelper) { if (!DI::userSession()->getLocalUserId()) { return; @@ -62,7 +62,7 @@ function theme_post(App $a) } -function theme_admin(App $a) { +function theme_admin(AppHelper $appHelper) { if (!function_exists('get_vier_config')) return; @@ -85,13 +85,13 @@ function theme_admin(App $a) { $show_services = get_vier_config('show_services', true, true); $show_friends = get_vier_config('show_friends', true, true); $show_lastusers = get_vier_config('show_lastusers', true, true); - $o .= vier_form($a,$style, $show_pages, $show_profiles, $show_helpers, $show_services, + $o .= vier_form($appHelper,$style, $show_pages, $show_profiles, $show_helpers, $show_services, $show_friends, $show_lastusers); return $o; } -function theme_admin_post(App $a) { +function theme_admin_post(AppHelper $appHelper) { if (isset($_POST['vier-settings-submit'])){ DI::config()->set('vier', 'style', $_POST['vier_style']); DI::config()->set('vier', 'show_pages', $_POST['vier_show_pages']); @@ -104,8 +104,8 @@ function theme_admin_post(App $a) { } } -/// @TODO $a is no longer used -function vier_form(App $a, $style, $show_pages, $show_profiles, $show_helpers, $show_services, $show_friends, $show_lastusers) { +/// @TODO $appHelper is no longer used +function vier_form(AppHelper $appHelper, $style, $show_pages, $show_profiles, $show_helpers, $show_services, $show_friends, $show_lastusers) { $styles = [ "breathe"=>"Breathe", "netcolour"=>"Coloured Networks",