mirror of
https://tildegit.org/sbgodin/HtmGem.git
synced 2023-08-25 13:53:12 +02:00
Fix getCss() calls
Make ->getCss a method call instead of a property access so that it won't return null always.
This commit is contained in:
parent
fb8134d3e0
commit
6ba8cceb3d
@ -26,7 +26,7 @@ if (empty($url)) {
|
|||||||
http_response_code(403);
|
http_response_code(403);
|
||||||
} else {
|
} else {
|
||||||
$gt_html = new \htmgem\GemTextTranslate_html(file_get_contents("index.gmi"), true, "$php_self?url=", $php_self_dir);
|
$gt_html = new \htmgem\GemTextTranslate_html(file_get_contents("index.gmi"), true, "$php_self?url=", $php_self_dir);
|
||||||
if (empty($gt_html->getCss)) $gt_html->addCss($php_self_dir.DEFAULT_CSS);
|
if (empty($gt_html->getCss())) $gt_html->addCss($php_self_dir.DEFAULT_CSS);
|
||||||
|
|
||||||
// No URL Rewritting assumed
|
// No URL Rewritting assumed
|
||||||
echo \htmgem\html\getHtmlWithMenu($gt_html, $scheme, $domain, $php_self, "$php_self?url=");
|
echo \htmgem\html\getHtmlWithMenu($gt_html, $scheme, $domain, $php_self, "$php_self?url=");
|
||||||
@ -66,7 +66,7 @@ if ($go404) {
|
|||||||
http_response_code(404);
|
http_response_code(404);
|
||||||
$page404 = \htmgem\html\get404GmiPage($url);
|
$page404 = \htmgem\html\get404GmiPage($url);
|
||||||
$gt_html = new \htmgem\GemTextTranslate_html($page404);
|
$gt_html = new \htmgem\GemTextTranslate_html($page404);
|
||||||
if (empty($gt_html->getCss)) $gt_html->addCss($php_self_dir."/css/htmgem.css");
|
if (empty($gt_html->getCss())) $gt_html->addCss($php_self_dir."/css/htmgem.css");
|
||||||
if ($urlRewriting)
|
if ($urlRewriting)
|
||||||
echo \htmgem\html\getHtmlWithMenu($gt_html, $scheme, $domain, $url);
|
echo \htmgem\html\getHtmlWithMenu($gt_html, $scheme, $domain, $url);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user