From 164f8da8f21705472433b0365ef753c6df11fde1 Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Mon, 5 Sep 2016 10:21:52 -0400 Subject: [PATCH] stupid, but necessary --- view/View.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/view/View.class.php b/view/View.class.php index 5df9c674..c96ccd15 100644 --- a/view/View.class.php +++ b/view/View.class.php @@ -21,16 +21,16 @@ class View 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)) { 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); $isPartial = $view[0] === '_';