mirror of
https://github.com/friendica/friendica
synced 2025-01-03 13:22:19 +00:00
Fix cs in App and AppLegacy classes
This commit is contained in:
parent
ae75ffc31a
commit
e6b39e5f1c
2 changed files with 26 additions and 37 deletions
39
src/App.php
39
src/App.php
|
@ -262,18 +262,6 @@ class App implements AppHelper
|
||||||
return $this->appHelper->getBasePath();
|
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(
|
public function __construct(
|
||||||
Request $request,
|
Request $request,
|
||||||
Authentication $auth,
|
Authentication $auth,
|
||||||
|
@ -288,17 +276,17 @@ class App implements AppHelper
|
||||||
DbaDefinition $dbaDefinition,
|
DbaDefinition $dbaDefinition,
|
||||||
ViewDefinition $viewDefinition
|
ViewDefinition $viewDefinition
|
||||||
) {
|
) {
|
||||||
$this->requestId = $request->getRequestId();
|
$this->requestId = $request->getRequestId();
|
||||||
$this->auth = $auth;
|
$this->auth = $auth;
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->mode = $mode;
|
$this->mode = $mode;
|
||||||
$this->baseURL = $baseURL;
|
$this->baseURL = $baseURL;
|
||||||
$this->profiler = $profiler;
|
$this->profiler = $profiler;
|
||||||
$this->logger = $logger;
|
$this->logger = $logger;
|
||||||
$this->l10n = $l10n;
|
$this->l10n = $l10n;
|
||||||
$this->args = $args;
|
$this->args = $args;
|
||||||
$this->session = $session;
|
$this->session = $session;
|
||||||
$this->appHelper = DI::apphelper();
|
$this->appHelper = DI::apphelper();
|
||||||
|
|
||||||
$this->load($dbaDefinition, $viewDefinition);
|
$this->load($dbaDefinition, $viewDefinition);
|
||||||
}
|
}
|
||||||
|
@ -328,7 +316,8 @@ class App implements AppHelper
|
||||||
get_include_path() . PATH_SEPARATOR
|
get_include_path() . PATH_SEPARATOR
|
||||||
. $this->appHelper->getBasePath() . DIRECTORY_SEPARATOR . 'include' . PATH_SEPARATOR
|
. $this->appHelper->getBasePath() . DIRECTORY_SEPARATOR . 'include' . PATH_SEPARATOR
|
||||||
. $this->appHelper->getBasePath() . DIRECTORY_SEPARATOR . 'library' . PATH_SEPARATOR
|
. $this->appHelper->getBasePath() . DIRECTORY_SEPARATOR . 'library' . PATH_SEPARATOR
|
||||||
. $this->appHelper->getBasePath());
|
. $this->appHelper->getBasePath()
|
||||||
|
);
|
||||||
|
|
||||||
$this->profiler->reset();
|
$this->profiler->reset();
|
||||||
|
|
||||||
|
@ -592,7 +581,7 @@ class App implements AppHelper
|
||||||
|
|
||||||
// Let the module run its internal process (init, get, post, ...)
|
// Let the module run its internal process (init, get, post, ...)
|
||||||
$timestamp = microtime(true);
|
$timestamp = microtime(true);
|
||||||
$response = $module->run($httpException, $input);
|
$response = $module->run($httpException, $input);
|
||||||
$this->profiler->set(microtime(true) - $timestamp, 'content');
|
$this->profiler->set(microtime(true) - $timestamp, 'content');
|
||||||
|
|
||||||
// Wrapping HTML responses in the theme template
|
// Wrapping HTML responses in the theme template
|
||||||
|
|
|
@ -52,7 +52,7 @@ final class AppLegacy implements AppHelper
|
||||||
// Allow themes to control internal parameters
|
// Allow themes to control internal parameters
|
||||||
// by changing App values in theme.php
|
// by changing App values in theme.php
|
||||||
private $theme_info = [
|
private $theme_info = [
|
||||||
'videowidth' => 425,
|
'videowidth' => 425,
|
||||||
'videoheight' => 350,
|
'videoheight' => 350,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -101,12 +101,12 @@ final class AppLegacy implements AppHelper
|
||||||
IHandleUserSessions $session
|
IHandleUserSessions $session
|
||||||
) {
|
) {
|
||||||
$this->database = $database;
|
$this->database = $database;
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->mode = $mode;
|
$this->mode = $mode;
|
||||||
$this->l10n = $l10n;
|
$this->l10n = $l10n;
|
||||||
$this->baseURL = $baseURL;
|
$this->baseURL = $baseURL;
|
||||||
$this->pConfig = $pConfig;
|
$this->pConfig = $pConfig;
|
||||||
$this->session = $session;
|
$this->session = $session;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -320,7 +320,7 @@ final class AppLegacy implements AppHelper
|
||||||
// Sane default
|
// Sane default
|
||||||
$this->setCurrentTheme($system_theme);
|
$this->setCurrentTheme($system_theme);
|
||||||
|
|
||||||
$page_theme = null;
|
$page_theme = null;
|
||||||
$profile_owner = $this->getProfileOwner();
|
$profile_owner = $this->getProfileOwner();
|
||||||
|
|
||||||
// Find the theme that belongs to the user whose stuff we are looking at
|
// 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);
|
$theme_name = Strings::sanitizeFilePathItem($theme_name);
|
||||||
if ($theme_name
|
if ($theme_name
|
||||||
&& in_array($theme_name, Theme::getAllowedList())
|
&& in_array($theme_name, Theme::getAllowedList())
|
||||||
&& (file_exists('view/theme/' . $theme_name . '/style.css')
|
&& (file_exists('view/theme/' . $theme_name . '/style.css')
|
||||||
|| file_exists('view/theme/' . $theme_name . '/style.php'))
|
|| file_exists('view/theme/' . $theme_name . '/style.php'))
|
||||||
) {
|
) {
|
||||||
$this->setCurrentTheme($theme_name);
|
$this->setCurrentTheme($theme_name);
|
||||||
}
|
}
|
||||||
|
@ -356,7 +356,7 @@ final class AppLegacy implements AppHelper
|
||||||
$this->setCurrentMobileTheme($system_mobile_theme);
|
$this->setCurrentMobileTheme($system_mobile_theme);
|
||||||
|
|
||||||
$page_mobile_theme = null;
|
$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
|
// Find the theme that belongs to the user whose stuff we are looking at
|
||||||
if (!empty($profile_owner) && ($profile_owner != $this->session->getLocalUserId())) {
|
if (!empty($profile_owner) && ($profile_owner != $this->session->getLocalUserId())) {
|
||||||
|
|
Loading…
Reference in a new issue