From 903ce7218f2e435efee36c236c4335be59e9b379 Mon Sep 17 00:00:00 2001 From: Felix Hahn Date: Sat, 19 Aug 2023 14:29:10 +0200 Subject: [PATCH] fix empty setting --- Module.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Module.php b/Module.php index 660e1d9..723936b 100644 --- a/Module.php +++ b/Module.php @@ -33,26 +33,17 @@ class Module extends \humhub\components\Module const THEME_NAME = "themeOrange"; public static function getCommentLinkSetting() { - $commentLink = Yii::$app->getModule('theme-orange')->settings->get('commentLink'); - if (empty($commentLink)) { - $commentLink = $this->commentLink; - } + $commentLink = Yii::$app->getModule('theme-orange')->settings->get('commentLink', 'icon'); return $commentLink; } public static function getLikeLinkSetting() { - $likeLink = Yii::$app->getModule('theme-orange')->settings->get('likeLink'); - if (empty($likeLink)) { - $likeLink = $this->likeLink; - } + $likeLink = Yii::$app->getModule('theme-orange')->settings->get('likeLink', 'icon'); return $likeLink; } public static function getLikeIcon() { - $likeIcon = Yii::$app->getModule('theme-orange')->settings->get('likeIcon'); - if (empty($likeIcon)) { - $likeIcon = $this->likeIcon; - } + $likeIcon = Yii::$app->getModule('theme-orange')->settings->get('likeIcon', 'heart'); return $likeIcon; }