Merge branch 'master' into develop

This commit is contained in:
Lucas Bartholemy 2022-10-05 14:14:37 +02:00
commit f1be83ce4a
7 changed files with 24 additions and 11 deletions

View File

@ -6,6 +6,9 @@ HumHub Changelog
- Fix #5851: Admin User Settings cannot saved
- Fix #5856: Fix SMTPS Config Migration
- Fix #5854: Don't validate user language on approve
- Fix #5875: LDAP user creation broken without email address
- Fix #5877: Fix wrong empty profile stream message
- Fix #5874: Fix adding licence key after removing it from marketplace
1.12.1 (August 15, 2022)

View File

@ -22,6 +22,7 @@ use yii\base\Component;
* @property-read bool $isThirdParty
* @property-read bool $isPartner
* @property-read bool $isDeprecated
* @property-read bool $isNonFree
* @property-read array $categories
*
* @author Lucas Bartholemy <lucas@bartholemy.com>
@ -134,4 +135,9 @@ class OnlineModule extends Component
{
return (bool) $this->info('isDeprecated');
}
public function getIsNonFree(): bool
{
return $this->info('purchased') || $this->info('price_eur') || $this->info('price_request_quote');
}
}

View File

@ -133,7 +133,7 @@ class ModuleControls extends Menu
}
$onlineModule = new OnlineModule(['module' => $this->module]);
if ($onlineModule->info('purchased')) {
if ($onlineModule->isNonFree) {
$this->addEntry(new MenuLink([
'id' => 'marketplace-licence-key',
'label' => Yii::t('AdminModule.base', 'Add Licence Key'),

View File

@ -672,7 +672,7 @@ humhub.module('stream.Stream', function (module, require, $) {
};
Stream.prototype.hasActiveFilters = function () {
return this.filter && this.filter.getActiveFilterCount({exclude: ['sort']}) > 0;
return this.filter && this.filter.getActiveFilterCount({exclude: ['sort', 'scope']}) > 0;
};
/**

View File

@ -357,6 +357,8 @@ class StreamCest
$I->wait(1);
$I->waitForElementVisible('[data-filter-id=date_from]');
$I->fillDateFilter('date_from', $today);
/* FIX ME
$I->waitForText($postTitle, 10, '.s2_streamContent');
$I->amGoingTo('filter stream by date until yesterday');
@ -364,6 +366,7 @@ class StreamCest
$I->fillDateFilter('date_to', $yesterday);
$I->waitForElement('.s2_streamContent > .stream-end', 10);
$I->dontSee($postTitle, '.s2_streamContent');
*/
}
// Filtering

View File

@ -181,6 +181,9 @@ class User extends ContentContainerActiveRecord implements IdentityInterface, Se
return $rules;
}
/**
* @inheritdoc
*/
public function isEmailRequired(): bool
{
/* @var $userModule Module */
@ -555,7 +558,7 @@ class User extends ContentContainerActiveRecord implements IdentityInterface, Se
}
if (empty($this->email)) {
$this->email = new \yii\db\Expression('NULL');
$this->email = null;
}
return parent::beforeSave($insert);

View File

@ -50,14 +50,12 @@ class StreamViewer extends BaseStreamViewer
$this->messageStreamEmptyCss = 'placeholder-empty-stream';
}
if (empty($this->messageStreamEmpty)) {
if ($canCreatePost) {
$this->messageStreamEmpty = $this->contentContainer->is(Yii::$app->user->getIdentity())
? Yii::t('UserModule.profile', '<b>Your profile stream is still empty</b><br>Get started and post something...')
: Yii::t('UserModule.profile', '<b>This profile stream is still empty</b><br>Be the first and post something...');
} else {
$this->messageStreamEmpty = Yii::t('UserModule.profile', '<b>This profile stream is still empty!</b>');
}
if ($canCreatePost) {
$this->messageStreamEmpty = $this->contentContainer->is(Yii::$app->user->getIdentity())
? Yii::t('UserModule.profile', '<b>Your profile stream is still empty</b><br>Get started and post something...')
: Yii::t('UserModule.profile', '<b>This profile stream is still empty</b><br>Be the first and post something...');
} else {
$this->messageStreamEmpty = Yii::t('UserModule.profile', '<b>This profile stream is still empty!</b>');
}
}