mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
Force write the version number in template parser v2
This commit is contained in:
parent
bbd19c814b
commit
a362f27f62
1 changed files with 6 additions and 0 deletions
|
|
@ -120,6 +120,12 @@ class TemplateParser_v2
|
||||||
*/
|
*/
|
||||||
protected function _preprocess(string $content): string
|
protected function _preprocess(string $content): string
|
||||||
{
|
{
|
||||||
|
// Force the version number.
|
||||||
|
if (!str_contains($content, '$this->config->version'))
|
||||||
|
{
|
||||||
|
$content = '<?php $this->config->version = 2; ?>' . $content;
|
||||||
|
}
|
||||||
|
|
||||||
// Prevent direct invocation.
|
// Prevent direct invocation.
|
||||||
$content = '<?php if (!defined("RX_VERSION")) exit(); ?>' . $content;
|
$content = '<?php if (!defined("RX_VERSION")) exit(); ?>' . $content;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue