diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-04-28 23:15:38 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-04-28 23:15:38 +0200 |
commit | 2d5bae555d40423c9b687d46e78bad2129b9e014 (patch) | |
tree | f9dbc84588a4d6ee985f8aa27c0a12fdbe3c03b9 /phpBB/phpbb | |
parent | 8d9fb27edc01522bffd8cf83826f97d92903136f (diff) | |
download | forums-2d5bae555d40423c9b687d46e78bad2129b9e014.tar forums-2d5bae555d40423c9b687d46e78bad2129b9e014.tar.gz forums-2d5bae555d40423c9b687d46e78bad2129b9e014.tar.bz2 forums-2d5bae555d40423c9b687d46e78bad2129b9e014.tar.xz forums-2d5bae555d40423c9b687d46e78bad2129b9e014.zip |
[ticket/12273] Find events.md relative from the path not the phpbb root
PHPBB3-12273
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/event/md_exporter.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/phpBB/phpbb/event/md_exporter.php b/phpBB/phpbb/event/md_exporter.php index a8d9eb1f3c..8fea393c10 100644 --- a/phpBB/phpbb/event/md_exporter.php +++ b/phpBB/phpbb/event/md_exporter.php @@ -67,7 +67,7 @@ class md_exporter $this->path .= 'ext/' . $extension . '/'; } - $this->crawl_eventsmd($md_file, 'adm', $extension); + $this->crawl_eventsmd($this->path . $md_file, 'adm', $extension); $file_list = $this->get_recursive_file_list($this->path . 'adm/style/'); foreach ($file_list as $file) @@ -93,7 +93,7 @@ class md_exporter $this->path .= 'ext/' . $extension . '/'; } - $this->crawl_eventsmd($md_file, 'styles', $extension); + $this->crawl_eventsmd($this->path . $md_file, 'styles', $extension); $styles = array('prosilver', 'subsilver2'); foreach ($styles as $style) @@ -121,7 +121,12 @@ class md_exporter */ public function crawl_eventsmd($md_file, $filter, $extension = null) { - $file_content = file_get_contents($this->root_path . $md_file); + if (!file_exists($md_file)) + { + throw new \LogicException("The event docs file '{$md_file}' could not be found"); + } + + $file_content = file_get_contents($md_file); $this->filter = $filter; $events = explode("\n\n", $file_content); |