mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
stupid, but necessary
This commit is contained in:
parent
864e43ee68
commit
164f8da8f2
1 changed files with 5 additions and 5 deletions
|
@ -21,16 +21,16 @@ class View
|
||||||
|
|
||||||
public static function render($template, array $vars = [])
|
public static function render($template, array $vars = [])
|
||||||
{
|
{
|
||||||
if (!static::exists($template) || substr_count($template, '/') !== 1)
|
|
||||||
{
|
|
||||||
throw new InvalidArgumentException(sprintf('The template "%s" does not exist or is unreadable.', $template));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (static::isMarkdown($template))
|
if (static::isMarkdown($template))
|
||||||
{
|
{
|
||||||
return static::markdownToHtml(static::getFullPath($template));
|
return static::markdownToHtml(static::getFullPath($template));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!static::exists($template) || substr_count($template, '/') !== 1)
|
||||||
|
{
|
||||||
|
throw new InvalidArgumentException(sprintf('The template "%s" does not exist or is unreadable.', $template));
|
||||||
|
}
|
||||||
|
|
||||||
list($module, $view) = explode('/', $template);
|
list($module, $view) = explode('/', $template);
|
||||||
|
|
||||||
$isPartial = $view[0] === '_';
|
$isPartial = $view[0] === '_';
|
||||||
|
|
Loading…
Add table
Reference in a new issue