Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

2.5.13 (Unreleased)
-------------------
- Enh: Automated code refactoring for HumHub 1.18.1 using Rector

2.5.12 (August 4, 2026)
-----------------------
- Fix #436: Fix subpages box width on small screens
Expand Down
4 changes: 1 addition & 3 deletions models/WikiPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,7 @@ public function afterMove(?ContentContainerActiveRecord $container = null)

public function getIsCategory(): bool
{
if (!isset($this->_isCategory)) {
$this->_isCategory = !$this->isNewRecord && $this->findChildren()->exists();
}
$this->_isCategory ??= !$this->isNewRecord && $this->findChildren()->exists();

return $this->_isCategory;
}
Expand Down
8 changes: 5 additions & 3 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
"id": "wiki",
"name": "Wiki",
"description": "Create and edit pages with this powerful tool. Build a collaborative knowledge base, view and share information with your colleagues.",
"keywords": ["wiki"],
"version": "2.5.12",
"keywords": [
"wiki"
],
"version": "2.5.13",
"humhub": {
"minVersion": "1.18.1",
"maxVersion": "1.18"
Expand All @@ -29,4 +31,4 @@
"resources/screenshot6.png",
"resources/screenshot7.png"
]
}
}
16 changes: 4 additions & 12 deletions widgets/CategoryListItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,9 @@ public function run()
return '';
}

if ($this->showDrag === null) {
$this->showDrag = $this->canAdminister();
}
$this->showDrag ??= $this->canAdminister();

if ($this->showAddPage === null) {
$this->showAddPage = $this->canCreate();
}
$this->showAddPage ??= $this->canCreate();

$displaySubPages = $this->maxLevel === null || $this->level < $this->maxLevel;

Expand Down Expand Up @@ -137,18 +133,14 @@ public static function clear()

private function canAdminister()
{
if (static::$canAdminister === null) {
static::$canAdminister = $this->contentContainer->can(AdministerPages::class);
}
static::$canAdminister ??= $this->contentContainer->can(AdministerPages::class);

return static::$canAdminister;
}

private function canCreate()
{
if (static::$canCreate === null) {
static::$canCreate = (new WikiPage($this->contentContainer))->content->canEdit();
}
static::$canCreate ??= (new WikiPage($this->contentContainer))->content->canEdit();

return static::$canCreate;
}
Expand Down
4 changes: 1 addition & 3 deletions widgets/CategoryListView.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ public function init()
{
parent::init();

if ($this->service === null) {
$this->service = new HierarchyListService($this->contentContainer);
}
$this->service ??= new HierarchyListService($this->contentContainer);
}

/**
Expand Down
4 changes: 1 addition & 3 deletions widgets/WikiSearchForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ public function init()
{
parent::init();

if (!isset($this->placeholder)) {
$this->placeholder = Yii::t('WikiModule.base', 'Search');
}
$this->placeholder ??= Yii::t('WikiModule.base', 'Search');
}

/**
Expand Down