You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
581 B
PHTML
22 lines
581 B
PHTML
5 years ago
|
<?php
|
||
|
require_once "lib/MiniTemplator.class.php";
|
||
|
|
||
|
class Templator extends MiniTemplator {
|
||
|
|
||
|
/* this reads tt-rss template from templates.local/ or templates/ if only base filename is given */
|
||
|
function readTemplateFromFile ($fileName) {
|
||
|
if (strpos($fileName, "/") === FALSE) {
|
||
|
|
||
|
$fileName = basename($fileName);
|
||
|
|
||
|
if (file_exists("templates.local/$fileName"))
|
||
|
return parent::readTemplateFromFile("templates.local/$fileName");
|
||
|
else
|
||
|
return parent::readTemplateFromFile("templates/$fileName");
|
||
|
|
||
|
} else {
|
||
|
return parent::readTemplateFromFile($fileName);
|
||
|
}
|
||
|
}
|
||
|
}
|