From 522220a716be03b4c14cfd2b044f1cb0738310ac Mon Sep 17 00:00:00 2001 From: nuxsmin Date: Mon, 23 Jan 2017 15:30:20 +0100 Subject: [PATCH] * [ADD] New user preference to show accounts search results as cards. * [MOD] UI tweaks to display search results as cards. * [FIX] Fixed issue when account link was set. --- inc/SP/Controller/MainController.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/inc/SP/Controller/MainController.class.php b/inc/SP/Controller/MainController.class.php index a6a80fc7..eeffc96d 100644 --- a/inc/SP/Controller/MainController.class.php +++ b/inc/SP/Controller/MainController.class.php @@ -145,11 +145,13 @@ class MainController extends ControllerBase implements ActionsInterface $this->view->append('jsLinks', Init::$WEBROOT . '/js/js.php?f=' . $themeJsFiles . '&b=' . $themeJsBase . '&v=' . $jsVersionHash); } - $cssVersionHash = md5(implode(Util::getVersion()) . Checks::resultsCardsIsEnabled() . Session::getUserPreferences()->isResultsAsCards()); + $resultsAsCards = Init::isLoggedIn() && Session::getUserPreferences()->isResultsAsCards(); + + $cssVersionHash = md5(implode(Util::getVersion()) . Checks::resultsCardsIsEnabled() . $resultsAsCards); $this->view->append('cssLinks', Init::$WEBROOT . '/css/css.php?v=' . $cssVersionHash); if (isset($themeInfo['css'])) { - if (Checks::resultsCardsIsEnabled() || Session::getUserPreferences()->isResultsAsCards()) { + if (Checks::resultsCardsIsEnabled() || $resultsAsCards) { $themeInfo['css'][] = 'search-card.min.css'; } else { $themeInfo['css'][] = 'search-grid.min.css';