mirror of
https://github.com/humhub/humhub.git
synced 2025-03-14 20:19:47 +01:00
Merge branch 'develop' of github.com:humhub/humhub into develop
This commit is contained in:
commit
1ac9efd09d
@ -2,6 +2,9 @@
|
||||
--------------------------
|
||||
- Fix #5603: Syntax error in database view installer
|
||||
- Fix #5608: Remove duplicated field "Hostname" on install
|
||||
- Fix #5612: Fix RichText post process event pass data
|
||||
- Enh #5610: Show menu item "Add Licence Key" for purchased modules
|
||||
- Enh #5599: Introduce a variables in the Space model to call ProfileImage and ProfileBannerImage classes
|
||||
|
||||
|
||||
1.11.0-beta.2 (March 18, 2022)
|
||||
|
@ -8,6 +8,7 @@
|
||||
namespace humhub\modules\admin\widgets;
|
||||
|
||||
use humhub\components\Module;
|
||||
use humhub\components\OnlineModule;
|
||||
use humhub\modules\content\components\ContentContainerModule;
|
||||
use humhub\modules\ui\menu\MenuLink;
|
||||
use humhub\modules\ui\menu\widgets\Menu;
|
||||
@ -130,6 +131,18 @@ class ModuleControls extends Menu
|
||||
'sortOrder' => 400,
|
||||
]));
|
||||
}
|
||||
|
||||
$onlineModule = new OnlineModule(['module' => $this->module]);
|
||||
if ($onlineModule->info('purchased')) {
|
||||
$this->addEntry(new MenuLink([
|
||||
'id' => 'marketplace-licence-key',
|
||||
'label' => Yii::t('AdminModule.base', 'Add Licence Key'),
|
||||
'url' => ['/marketplace/purchase'],
|
||||
'htmlOptions' => ['data-target' => '#globalModal'],
|
||||
'icon' => 'key',
|
||||
'sortOrder' => 500,
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
||||
private function getMarketplaceUrl($module): ?string
|
||||
|
@ -79,6 +79,16 @@ abstract class ContentContainerActiveRecord extends ActiveRecord
|
||||
*/
|
||||
public $blockedUsersField;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $profileImageClass = ProfileImage::class;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $profileBannerImageClass = ProfileBannerImage::class;
|
||||
|
||||
/**
|
||||
* Returns the display name of content container
|
||||
*
|
||||
@ -102,7 +112,7 @@ abstract class ContentContainerActiveRecord extends ActiveRecord
|
||||
*/
|
||||
public function getProfileImage()
|
||||
{
|
||||
return new ProfileImage($this);
|
||||
return new $this->profileImageClass($this);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -112,7 +122,7 @@ abstract class ContentContainerActiveRecord extends ActiveRecord
|
||||
*/
|
||||
public function getProfileBannerImage()
|
||||
{
|
||||
return new ProfileBannerImage($this);
|
||||
return new $this->profileBannerImageClass($this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -238,13 +238,10 @@ abstract class AbstractRichText extends JsWidget
|
||||
$record->updateAttributes([$attribute => $text]);
|
||||
}
|
||||
|
||||
$evt = new Event(['result' => ['text' => $text, 'record' => $record, 'attribute' => $attribute]]);
|
||||
Event::trigger(static::class, static::EVENT_POST_PROCESS, $evt);
|
||||
|
||||
Event::trigger(static::class, static::EVENT_POST_PROCESS,
|
||||
new Event(['data' => ['text' => $text, 'record' => $record, 'attribute' => $attribute]]));
|
||||
|
||||
$result['text'] = $text;
|
||||
|
||||
return $result;
|
||||
return $evt->result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -483,7 +483,7 @@ class Space extends ContentContainerActiveRecord implements Searchable
|
||||
*/
|
||||
public function getProfileImage()
|
||||
{
|
||||
return new ProfileImage($this, 'default_space');
|
||||
return new $this->profileImageClass($this, 'default_space');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user