mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-04 12:17:42 +02:00
SystemPlugin: use Core::VERSION to compare Monstra CMS version.
This commit is contained in:
@@ -12,11 +12,11 @@
|
|||||||
function checkMonstraVersion() {
|
function checkMonstraVersion() {
|
||||||
echo ('
|
echo ('
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$.getJSON("http://monstra.org/api/basic.php?jsoncallback=?",
|
$.getJSON("http://monstra.org/api/version.php?jsoncallback=?",
|
||||||
function(data){
|
function(data){
|
||||||
var current_monstra_version_id = '.MONSTRA_VERSION_ID.';
|
var current_monstra_version = '.Core::VERSION.';
|
||||||
var api_monstra_version_id = data.version_id;
|
var stable_monstra_version = data.version;
|
||||||
if (current_monstra_version_id < api_monstra_version_id) {
|
if (current_monstra_version < stable_monstra_version) {
|
||||||
$("#update-monstra").addClass("alert").html("'.__("Published a new version of the :monstra", "system", array(":monstra" => "<a target='_blank' href='http://monstra.org/download'>Monstra</a>")).'");
|
$("#update-monstra").addClass("alert").html("'.__("Published a new version of the :monstra", "system", array(":monstra" => "<a target='_blank' href='http://monstra.org/download'>Monstra</a>")).'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user