mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-31 02:10:37 +02:00
SystemPlugin: use Core::VERSION to compare Monstra CMS version.
This commit is contained in:
@@ -12,11 +12,11 @@
|
||||
function checkMonstraVersion() {
|
||||
echo ('
|
||||
<script type="text/javascript">
|
||||
$.getJSON("http://monstra.org/api/basic.php?jsoncallback=?",
|
||||
$.getJSON("http://monstra.org/api/version.php?jsoncallback=?",
|
||||
function(data){
|
||||
var current_monstra_version_id = '.MONSTRA_VERSION_ID.';
|
||||
var api_monstra_version_id = data.version_id;
|
||||
if (current_monstra_version_id < api_monstra_version_id) {
|
||||
var current_monstra_version = '.Core::VERSION.';
|
||||
var stable_monstra_version = data.version;
|
||||
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>")).'");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user