Added theme exists check (#149)

* Added theme exists check

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2023-04-10 00:24:00 +07:00 committed by GitHub
parent 92f99ff66b
commit 98cc3b1e40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -23,6 +23,7 @@
- Added Freeleech [\#143](https://github.com/torrentpier/torrentpier-lts/pull/143) ([belomaxorka](https://github.com/belomaxorka))
- Added some new torrent clients into sidebar [\#146](https://github.com/torrentpier/torrentpier-lts/pull/146) ([belomaxorka](https://github.com/belomaxorka))
- Fixed issue with atom feed [\#147](https://github.com/torrentpier/torrentpier-lts/pull/147) ([belomaxorka](https://github.com/belomaxorka))
- Added theme exists check [\#149](https://github.com/torrentpier/torrentpier-lts/pull/149) ([belomaxorka](https://github.com/belomaxorka))
- Minor fixes [\#124](https://github.com/torrentpier/torrentpier-lts/pull/124), [\#133](https://github.com/torrentpier/torrentpier-lts/pull/133), [\#135](https://github.com/torrentpier/torrentpier-lts/pull/135), [\#136](https://github.com/torrentpier/torrentpier-lts/pull/136), [\#139](https://github.com/torrentpier/torrentpier-lts/pull/139), [\#142](https://github.com/torrentpier/torrentpier-lts/pull/142), [\#144](https://github.com/torrentpier/torrentpier-lts/pull/144), [\#145](https://github.com/torrentpier/torrentpier-lts/pull/145), [\#148](https://github.com/torrentpier/torrentpier-lts/pull/148) ([belomaxorka](https://github.com/belomaxorka))
## [v2.1.5-2023.03](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.03) (2023-04-04)

View File

@ -126,6 +126,12 @@ class Template
$this->tpl = basename($root);
$this->lang =& $lang;
$this->use_cache = $bb_cfg['xs_use_cache'];
// Check template exists
if (!file_exists($this->root) || !is_dir($this->root))
{
die("Theme ({$this->tpl}) directory not found");
}
}
/**