mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 12:03:21 +01:00
[ticket/12273] Find events.md relative from the path not the phpbb root
PHPBB3-12273
This commit is contained in:
parent
8d9fb27edc
commit
2d5bae555d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user