Skip to content

Commit

Permalink
fix empty setting
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhahnweilheim committed Aug 19, 2023
1 parent 48cee0a commit 903ce72
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 903ce72

Please sign in to comment.