Skip to content

Commit

Permalink
Merge pull request #152 from humhub/fix/151-wrong-dir-on-creating-cus…
Browse files Browse the repository at this point in the history
…tom-php-page

Check old dir with custom php files
  • Loading branch information
luke- committed Nov 12, 2020
2 parents 0f866c2 + f19ec38 commit 7621dbb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion components/PhpPageContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,12 @@ public function getAllowedPhpViewFileSelection($path = false)
return [];
}

$files = FileHelper::findFiles($this->getPhpViewPathByView(), [
$dirPath = $this->getPhpViewPathByView();
if (!is_dir($dirPath)) {
return [];
}

$files = FileHelper::findFiles($dirPath, [
'only' => ['*.php'],
'recursive' => false
]);
Expand Down
5 changes: 5 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ Changelog
=========


1.1.1 (November 12, 2020)
-------------------------
- Fix #151: Avoid error on creating of custom php page with not existing directory from old settings


1.1.0 (November 3, 2020)
------------------------
The default folders for PHP custom pages were changed.
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Custom Pages",
"description": "Allows admins to create custom pages (html or markdown) or external links to various navigations (e.g. top navigation, account menu).",
"keywords": ["pages", "custom", "iframe", "markdown", "link", "navigation", "spaces"],
"version": "1.1.0",
"version": "1.1.1",
"homepage": "https://github.com/humhub/humhub-modules-custom-pages",
"humhub": {
"minVersion": "1.7"
Expand Down

0 comments on commit 7621dbb

Please sign in to comment.