Fix cs in App and AppLegacy classes

This commit is contained in:
Art4 2024-11-10 11:42:59 +00:00
parent ae75ffc31a
commit e6b39e5f1c
2 changed files with 26 additions and 37 deletions

View file

@ -262,18 +262,6 @@ class App implements AppHelper
return $this->appHelper->getBasePath();
}
/**
* @param IManageConfigValues $config The Configuration
* @param 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 IHandleUserSessions $session The (User)Session handler
* @param DbaDefinition $dbaDefinition
* @param ViewDefinition $viewDefinition
*/
public function __construct(
Request $request,
Authentication $auth,
@ -288,17 +276,17 @@ class App implements AppHelper
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->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);
}
@ -328,7 +316,8 @@ class App implements AppHelper
get_include_path() . PATH_SEPARATOR
. $this->appHelper->getBasePath() . DIRECTORY_SEPARATOR . 'include' . PATH_SEPARATOR
. $this->appHelper->getBasePath() . DIRECTORY_SEPARATOR . 'library' . PATH_SEPARATOR
. $this->appHelper->getBasePath());
. $this->appHelper->getBasePath()
);
$this->profiler->reset();
@ -592,7 +581,7 @@ class App implements AppHelper
// 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

View file

@ -52,7 +52,7 @@ final class AppLegacy implements AppHelper
// Allow themes to control internal parameters
// by changing App values in theme.php
private $theme_info = [
'videowidth' => 425,
'videowidth' => 425,
'videoheight' => 350,
];
@ -101,12 +101,12 @@ final class AppLegacy implements AppHelper
IHandleUserSessions $session
) {
$this->database = $database;
$this->config = $config;
$this->mode = $mode;
$this->l10n = $l10n;
$this->baseURL = $baseURL;
$this->pConfig = $pConfig;
$this->session = $session;
$this->config = $config;
$this->mode = $mode;
$this->l10n = $l10n;
$this->baseURL = $baseURL;
$this->pConfig = $pConfig;
$this->session = $session;
}
/**
@ -320,7 +320,7 @@ final class AppLegacy implements AppHelper
// Sane default
$this->setCurrentTheme($system_theme);
$page_theme = null;
$page_theme = null;
$profile_owner = $this->getProfileOwner();
// Find the theme that belongs to the user whose stuff we are looking at
@ -337,9 +337,9 @@ final class AppLegacy implements AppHelper
$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'))
&& 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);
}
@ -356,7 +356,7 @@ final class AppLegacy implements AppHelper
$this->setCurrentMobileTheme($system_mobile_theme);
$page_mobile_theme = null;
$profile_owner = $this->getProfileOwner();
$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())) {