From a447fc2ef622e907aeac5212560a75d1ce1a2e38 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Wed, 16 Dec 2015 11:08:51 +0900 Subject: [PATCH] Update auto set for HTML title, PHP 7.0 class fixes Auto append current page file name to the HTML auto title. Fix class declaration in gettext reader for PHP 7.0 --- www/admin/set_paths.inc | 2 ++ www/libs/gettext.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/www/admin/set_paths.inc b/www/admin/set_paths.inc index 015caf9d..a68a3be7 100644 --- a/www/admin/set_paths.inc +++ b/www/admin/set_paths.inc @@ -36,6 +36,8 @@ // set include & template names $CONTENT_INCLUDE = str_replace(".php", ".tpl", $cms->page_name); $FORM_NAME = !isset($FORM_NAME) || !$FORM_NAME ? str_replace(".php", "", $cms->page_name) : $FORM_NAME; + // set local page title + $L_TITLE = ucfirst(str_replace('_', ' ', $cms->get_page_name(1))).' - '.$G_TITLE; // strip tpl and replace it with inc // php include file per page $cms->INC_TEMPLATE_NAME = str_replace(".tpl", ".inc", $CONTENT_INCLUDE); diff --git a/www/libs/gettext.php b/www/libs/gettext.php index 5064047c..81af5550 100644 --- a/www/libs/gettext.php +++ b/www/libs/gettext.php @@ -98,7 +98,7 @@ class gettext_reader { * @param object Reader the StreamReader object * @param boolean enable_cache Enable or disable caching of strings (default on) */ - function gettext_reader($Reader, $enable_cache = true) { + function __construct($Reader, $enable_cache = true) { // If there isn't a StreamReader, turn on short circuit mode. if (! $Reader || isset($Reader->error) ) { $this->short_circuit = true;