diff --git a/src/init.php b/src/init.php index d3d5d8e..dce4792 100644 --- a/src/init.php +++ b/src/init.php @@ -5,6 +5,8 @@ Licensed under the GNU GPL v2 license. See file COPYRIGHT for details. */ +define('MTT_VERSION', '@VERSION'); + ##### MyTinyTodo requires php 5.4.0 and above! ##### if (version_compare(PHP_VERSION, '5.4.0') < 0) { die("PHP 5.4+ is required"); @@ -171,6 +173,12 @@ function get_mttinfo($v) case 'title': $_mttinfo['title'] = (Config::get('title') != '') ? htmlarray(Config::get('title')) : __('My Tiny Todolist'); return $_mttinfo['title']; + case 'version': + if (MTT_VERSION != '@VERSION') { + $_mttinfo['version'] = MTT_VERSION; + return $_mttinfo['version']; + } + return date('Ymd-His'); //force no-cache for dev needs } } diff --git a/src/themes/default/index.php b/src/themes/default/index.php index ab082e8..bb4e0da 100644 --- a/src/themes/default/index.php +++ b/src/themes/default/index.php @@ -4,15 +4,15 @@