mirror of
https://github.com/humhub/humhub.git
synced 2025-02-12 03:26:25 +01:00
Merge branch 'master' into develop
This commit is contained in:
commit
17b7bb3e8f
@ -343,7 +343,7 @@ class HForm extends \yii\base\Component
|
||||
}
|
||||
|
||||
if(!empty($definition['hint']) && $field instanceof ActiveField) {
|
||||
$field->hint(Html::encode($definition['hint']));
|
||||
$field->hint(Html::encode($definition['hint'], false));
|
||||
}
|
||||
|
||||
return $field;
|
||||
|
@ -1,6 +1,14 @@
|
||||
HumHub Change Log
|
||||
=================
|
||||
|
||||
1.5.3 (Unreleased)
|
||||
--------------------
|
||||
- Fix #4168: Erroneous pagination in notification overview
|
||||
- Fix #4060: Profile description and text regex error message not translatable
|
||||
- Fix #4153: Administration: Email transport configuration 'Save & Test' Gives No Result
|
||||
- Fix #4187: Use of invalid LivePushAsset namespace
|
||||
- Fix #4140: Profile field hint is double encoded
|
||||
|
||||
1.5.2 (May 20, 2020)
|
||||
--------------------
|
||||
|
||||
|
@ -19,6 +19,7 @@ use humhub\modules\admin\models\forms\OEmbedProviderForm;
|
||||
use humhub\modules\admin\models\forms\ProxySettingsForm;
|
||||
use humhub\modules\admin\models\forms\StatisticSettingsForm;
|
||||
use humhub\modules\admin\permissions\ManageSettings;
|
||||
use humhub\modules\user\models\User;
|
||||
use humhub\modules\web\pwa\widgets\SiteIcon;
|
||||
use Yii;
|
||||
use humhub\libs\Helpers;
|
||||
@ -202,15 +203,22 @@ class SettingController extends Controller
|
||||
|
||||
public function actionMailingServerTest()
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = Yii::$app->user->getIdentity();
|
||||
|
||||
try {
|
||||
$mail = Yii::$app->mailer->compose(['html' => '@humhub/views/mail/TextOnly'], [
|
||||
'message' => Yii::t('AdminModule.settings', 'Test message')
|
||||
]);
|
||||
$mail->setTo(Yii::$app->user->getIdentity()->email);
|
||||
$mail->setTo($user->email);
|
||||
$mail->setSubject(Yii::t('AdminModule.settings', 'Test message'));
|
||||
|
||||
if ($mail->send()) {
|
||||
$this->view->saved();
|
||||
$this->view->info(
|
||||
Yii::t('AdminModule.settings', 'Saved and sent test email to: {address}',
|
||||
['address' => $user->email]
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->view->error(Yii::t('AdminModule.settings', 'Could not send test email.'));
|
||||
}
|
||||
|
@ -1,12 +1,11 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace modules\live\assets;
|
||||
namespace humhub\modules\live\assets;
|
||||
|
||||
|
||||
use humhub\assets\SocketIoAsset;
|
||||
use humhub\components\assets\AssetBundle;
|
||||
use humhub\modules\live\assets\LiveAsset;
|
||||
|
||||
class LivePushAsset extends AssetBundle
|
||||
{
|
||||
@ -19,7 +18,7 @@ class LivePushAsset extends AssetBundle
|
||||
* @inheritdoc
|
||||
*/
|
||||
public $js = [
|
||||
'js/humhub.live.poll.js',
|
||||
'js/humhub.live.push.js',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -9,7 +9,6 @@
|
||||
namespace humhub\modules\live\driver;
|
||||
|
||||
use Firebase\JWT\JWT;
|
||||
use modules\live\assets\LivePushAsset;
|
||||
use Yii;
|
||||
use yii\helpers\Json;
|
||||
use yii\helpers\Url;
|
||||
@ -17,8 +16,8 @@ use yii\base\InvalidConfigException;
|
||||
use yii\redis\Connection;
|
||||
use yii\di\Instance;
|
||||
use humhub\modules\user\models\User;
|
||||
use humhub\modules\live\driver\BaseDriver;
|
||||
use humhub\modules\live\components\LiveEvent;
|
||||
use humhub\modules\live\assets\LivePushAsset;
|
||||
use humhub\modules\live\live\LegitimationChanged;
|
||||
|
||||
/**
|
||||
|
@ -50,10 +50,10 @@ class OverviewController extends Controller
|
||||
|
||||
if ($filterForm->hasFilter()) {
|
||||
$query = $filterForm->createQuery();
|
||||
$notifications = $this->prepareNotifications($query->all());
|
||||
$pagination = $this->preparePagination($query);
|
||||
$overview = OverviewWidget::widget([
|
||||
'notifications' => $notifications,
|
||||
'pagination' => $this->preparePagination($query)
|
||||
'notifications' => $this->prepareNotifications($query->all()),
|
||||
'pagination' => $pagination
|
||||
]);
|
||||
} else {
|
||||
$overview = OverviewWidget::widget([
|
||||
|
@ -236,7 +236,7 @@ class Profile extends ActiveRecord
|
||||
$fieldDefinition = $profileField->fieldType->getFieldFormDefinition();
|
||||
|
||||
if(isset($fieldDefinition[$profileField->internal_name]) && !empty($profileField->description)) {
|
||||
$fieldDefinition[$profileField->internal_name]['hint'] = $profileField->description;
|
||||
$fieldDefinition[$profileField->internal_name]['hint'] = Yii::t($profileFieldCategory->getTranslationCategory(), $profileField->description);
|
||||
}
|
||||
|
||||
$category['elements'] = array_merge($category['elements'], $fieldDefinition);
|
||||
|
@ -177,9 +177,12 @@ class Text extends BaseType
|
||||
|
||||
if ($this->regexp != "") {
|
||||
$errorMsg = $this->regexpErrorMessage;
|
||||
if ($errorMsg == "") {
|
||||
$errorMsg = "Invalid!";
|
||||
if (empty($errorMsg)) {
|
||||
$errorMsg = Yii::t('UserModule.profile',"Invalid!");
|
||||
} else {
|
||||
$errorMsg = Yii::t($this->profileField->getTranslationCategory(), $errorMsg);
|
||||
}
|
||||
|
||||
$rules[] = [$this->profileField->internal_name, 'match', 'pattern' => $this->regexp, 'message' => $errorMsg];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user