diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -53,7 +53,6 @@ require_once __DIR__ . '/vendor/autoload.php'; | |||
53 | // Shaarli library | 53 | // Shaarli library |
54 | require_once 'application/bookmark/LinkUtils.php'; | 54 | require_once 'application/bookmark/LinkUtils.php'; |
55 | require_once 'application/config/ConfigPlugin.php'; | 55 | require_once 'application/config/ConfigPlugin.php'; |
56 | require_once 'application/feed/Cache.php'; | ||
57 | require_once 'application/http/HttpUtils.php'; | 56 | require_once 'application/http/HttpUtils.php'; |
58 | require_once 'application/http/UrlUtils.php'; | 57 | require_once 'application/http/UrlUtils.php'; |
59 | require_once 'application/updater/UpdaterUtils.php'; | 58 | require_once 'application/updater/UpdaterUtils.php'; |
@@ -78,6 +77,7 @@ use Shaarli\Languages; | |||
78 | use Shaarli\Netscape\NetscapeBookmarkUtils; | 77 | use Shaarli\Netscape\NetscapeBookmarkUtils; |
79 | use Shaarli\Plugin\PluginManager; | 78 | use Shaarli\Plugin\PluginManager; |
80 | use Shaarli\Render\PageBuilder; | 79 | use Shaarli\Render\PageBuilder; |
80 | use Shaarli\Render\PageCacheManager; | ||
81 | use Shaarli\Render\ThemeUtils; | 81 | use Shaarli\Render\ThemeUtils; |
82 | use Shaarli\Router; | 82 | use Shaarli\Router; |
83 | use Shaarli\Security\LoginManager; | 83 | use Shaarli\Security\LoginManager; |
@@ -530,6 +530,7 @@ function showLinkList($PAGE, $linkDb, $conf, $pluginManager, $loginManager) | |||
530 | */ | 530 | */ |
531 | function renderPage($conf, $pluginManager, $bookmarkService, $history, $sessionManager, $loginManager) | 531 | function renderPage($conf, $pluginManager, $bookmarkService, $history, $sessionManager, $loginManager) |
532 | { | 532 | { |
533 | $pageCacheManager = new PageCacheManager($conf->get('resource.page_cache')); | ||
533 | $updater = new Updater( | 534 | $updater = new Updater( |
534 | UpdaterUtils::read_updates_file($conf->get('resource.updates')), | 535 | UpdaterUtils::read_updates_file($conf->get('resource.updates')), |
535 | $bookmarkService, | 536 | $bookmarkService, |
@@ -543,6 +544,8 @@ function renderPage($conf, $pluginManager, $bookmarkService, $history, $sessionM | |||
543 | $conf->get('resource.updates'), | 544 | $conf->get('resource.updates'), |
544 | $updater->getDoneUpdates() | 545 | $updater->getDoneUpdates() |
545 | ); | 546 | ); |
547 | |||
548 | $pageCacheManager->invalidateCaches(); | ||
546 | } | 549 | } |
547 | } catch (Exception $e) { | 550 | } catch (Exception $e) { |
548 | die($e->getMessage()); | 551 | die($e->getMessage()); |
@@ -1029,7 +1032,7 @@ function renderPage($conf, $pluginManager, $bookmarkService, $history, $sessionM | |||
1029 | try { | 1032 | try { |
1030 | $conf->write($loginManager->isLoggedIn()); | 1033 | $conf->write($loginManager->isLoggedIn()); |
1031 | $history->updateSettings(); | 1034 | $history->updateSettings(); |
1032 | invalidateCaches($conf->get('resource.page_cache')); | 1035 | $pageCacheManager->invalidateCaches(); |
1033 | } catch (Exception $e) { | 1036 | } catch (Exception $e) { |
1034 | error_log( | 1037 | error_log( |
1035 | 'ERROR while writing config file after configuration update.' . PHP_EOL . | 1038 | 'ERROR while writing config file after configuration update.' . PHP_EOL . |
@@ -1914,6 +1917,7 @@ $app->group('/api/v1', function () { | |||
1914 | 1917 | ||
1915 | $app->group('', function () { | 1918 | $app->group('', function () { |
1916 | $this->get('/login', '\Shaarli\Front\Controller\LoginController:index')->setName('login'); | 1919 | $this->get('/login', '\Shaarli\Front\Controller\LoginController:index')->setName('login'); |
1920 | $this->get('/logout', '\Shaarli\Front\Controller\LogoutController:index')->setName('logout'); | ||
1917 | $this->get('/picture-wall', '\Shaarli\Front\Controller\PictureWallController:index')->setName('picwall'); | 1921 | $this->get('/picture-wall', '\Shaarli\Front\Controller\PictureWallController:index')->setName('picwall'); |
1918 | })->add('\Shaarli\Front\ShaarliMiddleware'); | 1922 | })->add('\Shaarli\Front\ShaarliMiddleware'); |
1919 | 1923 | ||