diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-28 23:05:47 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-12-20 09:38:45 +0300 |
commit | 22e9cd758120ea570e5d9793a3906975e8376d51 (patch) | |
tree | 140195d520e8f776cd260d243896255311a339b8 /lib | |
parent | e4abb156516f4a7f956352ae344e45efd7cd6f14 (diff) |
Use empty template
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/TemplateManager.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/TemplateManager.php b/lib/TemplateManager.php index 87150a7a..d97af4f9 100644 --- a/lib/TemplateManager.php +++ b/lib/TemplateManager.php @@ -169,13 +169,13 @@ class TemplateManager { * @param File[] $templates * @return File[] */ - private function filterTemplates($templates, $type) { + private function filterTemplates($templates, $type = null) { return array_filter($templates, function (Node $templateFile) use ($type) { if (!($templateFile instanceof File)) { return false; } - if (!in_array($templateFile->getMimeType(), self::$tplTypes[$type])) { + if ($type !== null && !in_array($templateFile->getMimeType(), self::$tplTypes[$type])) { return false; } @@ -185,7 +185,7 @@ class TemplateManager { }); } - private function getEmpty($type) { + private function getEmpty($type = null) { $folder = $this->getEmptyTemplateDir(); $templateFiles = $folder->getDirectoryListing(); @@ -213,7 +213,7 @@ class TemplateManager { * * @return File[] */ - public function getSystem($type) { + public function getSystem($type = null) { $folder = $this->getSystemTemplateDir(); $templateFiles = $folder->getDirectoryListing(); @@ -243,7 +243,7 @@ class TemplateManager { * * @return File[] */ - public function getUser($type) { + public function getUser($type = null) { try { $templateDir = $this->getUserTemplateDir(); $templateFiles = $templateDir->getDirectoryListing(); |