]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Home.php
Move mod/hcard to src\Module\HoverCard
[friendica.git] / src / Module / Home.php
index f58664f9d70df297744ef2373677c4a5a4acc3ac..e6fb8c349669b241f53b702300c65a22da60f4d1 100644 (file)
@@ -12,16 +12,16 @@ use Friendica\Core\Renderer;
  */
 class Home extends BaseModule
 {
-       public static function init()
+       public static function content(array $parameters = [])
        {
+               $app = self::getApp();
+               $config = $app->getConfig();
+
                // currently no returned data is used
                $ret = [];
 
                Hook::callAll('home_init', $ret);
 
-               $app = self::getApp();
-               $config = $app->getConfig();
-
                if (local_user() && ($app->user['nickname'])) {
                        $app->internalRedirect('network');
                }
@@ -29,26 +29,12 @@ class Home extends BaseModule
                if (strlen($config->get('system', 'singleuser'))) {
                        $app->internalRedirect('/profile/' . $config->get('system', 'singleuser'));
                }
-       }
-
-       public static function content()
-       {
-               if (!empty($_SESSION['theme'])) {
-                       unset($_SESSION['theme']);
-               }
-
-               if (!empty($_SESSION['mobile-theme'])) {
-                       unset($_SESSION['mobile-theme']);
-               }
-
-               $app = self::getApp();
-               $config = $app->getConfig();
 
                $customHome = '';
                $defaultHeader = ($config->get('config', 'sitename') ? L10n::t('Welcome to %s', $config->get('config', 'sitename')) : '');
 
-               $homeFilePath = $app->getBaseURL() . '/home.html';
-               $cssFilePath = $app->getBaseURL() . '/home.css';
+               $homeFilePath = $app->getBasePath() . '/home.html';
+               $cssFilePath = $app->getBasePath() . '/home.css';
 
                if (file_exists($homeFilePath)) {
                        $customHome = $homeFilePath;