diff --git a/build/index.php b/build/index.php index 7231bc0..6413b2a 100644 --- a/build/index.php +++ b/build/index.php @@ -263,7 +263,7 @@ Actions: /////////////////////////////////////////////////////////////////////////////////////////////// /////////////// Do not edit below this line unless you know what you are doing! /////////////// /////////////////////////////////////////////////////////////////////////////////////////////// -$version = "0.8"; +$version = "v0.9-dev"; $env = new stdClass(); $env->action = $settings->defaultaction; $env->page = ""; @@ -618,7 +618,7 @@ class page_renderer @@ -630,7 +630,7 @@ class page_renderer

From {sitename}, which is managed by {admin-details-name}.

{footer-message}

Timed at {generation-date}

-

Powered by Pepperminty Wiki.

+

Powered by Pepperminty Wiki v0.9-dev.

"; // An array of functions that have been registered to process the @@ -659,7 +659,7 @@ class page_renderer public static function render($title, $content, $body_template = false) { - global $settings, $start_time; + global $settings, $start_time, $version; if($body_template === false) $body_template = self::$main_content_template; @@ -685,6 +685,7 @@ class page_renderer "{body}" => $body_template, "{sitename}" => $logo_html, + "v0.9-dev" => $version, "{favicon-url}" => $settings->favicon, "{header-html}" => self::get_css_as_html(), diff --git a/core.php b/core.php index d361d73..d25dbe7 100644 --- a/core.php +++ b/core.php @@ -6,7 +6,7 @@ $start_time = time(true); /////////////////////////////////////////////////////////////////////////////////////////////// /////////////// Do not edit below this line unless you know what you are doing! /////////////// /////////////////////////////////////////////////////////////////////////////////////////////// -$version = "0.8"; +$version = "{version}"; $env = new stdClass(); $env->action = $settings->defaultaction; $env->page = ""; @@ -361,7 +361,7 @@ class page_renderer @@ -373,7 +373,7 @@ class page_renderer

From {sitename}, which is managed by {admin-details-name}.

{footer-message}

Timed at {generation-date}

-

Powered by Pepperminty Wiki.

+

Powered by Pepperminty Wiki {version}.

"; // An array of functions that have been registered to process the @@ -402,7 +402,7 @@ class page_renderer public static function render($title, $content, $body_template = false) { - global $settings, $start_time; + global $settings, $start_time, $version; if($body_template === false) $body_template = self::$main_content_template; @@ -428,6 +428,7 @@ class page_renderer "{body}" => $body_template, "{sitename}" => $logo_html, + "{version}" => $version, "{favicon-url}" => $settings->favicon, "{header-html}" => self::get_css_as_html(), diff --git a/pack.php b/pack.php index 17e8984..b7e8fb0 100644 --- a/pack.php +++ b/pack.php @@ -32,7 +32,13 @@ if(php_sapi_name() == "cli") echo("Reading in core files..."); $core = file_get_contents("core.php"); $settings = file_get_contents("settings.fragment.php"); $settings = str_replace([ "" ], "", $settings); -$core = str_replace("{settings}", $settings, $core); +$core = str_replace([ + "{settings}", + "{version}" +], [ + $settings, + file_get_contents("version") +], $core); $result = $core; diff --git a/version b/version new file mode 100644 index 0000000..835c4cc --- /dev/null +++ b/version @@ -0,0 +1 @@ +v0.9-dev \ No newline at end of file