Skip to content

Commit

Permalink
Take templates from inside .phar if dir doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
onigoetz committed Jan 25, 2016
1 parent 3b9307c commit 5d6dc9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Binary file modified daux.phar
Binary file not shown.
5 changes: 5 additions & 0 deletions libs/Format/HTML/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ class Template
*/
public function __construct($base, $theme)
{
// Use templates from the phar archive if the templates dir doesn't exist.
if (!is_dir($base)) {
$base = 'phar://daux.phar/templates';
}

// Create new Plates instance
$this->engine = new Engine($base);
if (!is_dir($theme)) {
Expand Down

0 comments on commit 5d6dc9a

Please sign in to comment.