]> git.mxchange.org Git - friendica.git/blobdiff - src/App.php
Merge pull request #12012 from nupplaphil/feat/move_monolog
[friendica.git] / src / App.php
index 400ea15b195c899ae68ee1fcc8c0ffe2d2a16451..55b3e72e0eb6ca974e8f06c28ede845c91cf2c90 100644 (file)
@@ -58,6 +58,10 @@ use Psr\Log\LoggerInterface;
  */
 class App
 {
+       const PLATFORM = 'Friendica';
+       const CODENAME = 'Giant Rhubarb';
+       const VERSION  = '2022.12-dev';
+
        // Allow themes to control internal parameters
        // by changing App values in theme.php
        private $theme_info = [
@@ -347,6 +351,11 @@ class App
        {
                set_time_limit(0);
 
+               // Normally this constant is defined - but not if "pcntl" isn't installed
+               if (!defined('SIGTERM')) {
+                       define('SIGTERM', 15);
+               }
+
                // Ensure that all "strtotime" operations do run timezone independent
                date_default_timezone_set('UTC');
 
@@ -586,7 +595,7 @@ class App
                $this->profiler->set(microtime(true), 'classinit');
 
                $moduleName = $this->args->getModuleName();
-               $page->setLogging($this->args->getCommand(), $this->args->getMethod());
+               $page->setLogging($this->args->getMethod(), $this->args->getModuleName(), $this->args->getCommand());
 
                try {
                        // Missing DB connection: ERROR
@@ -648,10 +657,6 @@ class App
                                header('X-Account-Management-Status: none');
                        }
 
-                       $_SESSION['sysmsg']       = Core\Session::get('sysmsg', []);
-                       $_SESSION['sysmsg_info']  = Core\Session::get('sysmsg_info', []);
-                       $_SESSION['last_updated'] = Core\Session::get('last_updated', []);
-
                        /*
                         * check_config() is responsible for running update scripts. These automatically
                         * update the DB schema whenever we push a new one out. It also checks to see if
@@ -705,7 +710,8 @@ class App
                        // Initialize module that can set the current theme in the init() method, either directly or via App->setProfileOwner
                        $page['page_title'] = $moduleName;
 
-                       if (!$this->mode->isInstall() && !$this->mode->has(App\Mode::MAINTENANCEDISABLED)) {
+                       // The "view" module is required to show the theme CSS
+                       if (!$this->mode->isInstall() && !$this->mode->has(App\Mode::MAINTENANCEDISABLED) && $moduleName !== 'view') {
                                $module = $router->getModule(Maintenance::class);
                        } else {
                                // determine the module class and save it to the module instance