From 27e355cd56549000022c0d4853ce18f42368d4b8 Mon Sep 17 00:00:00 2001 From: Martynas Barzda Date: Mon, 29 Oct 2012 17:12:28 +0200 Subject: [PATCH] System Plugin: updated checkMonstraVersion function --- plugins/box/system/system.admin.php | 37 +++++++++++++++++++---------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/plugins/box/system/system.admin.php b/plugins/box/system/system.admin.php index 2e5e669..163be44 100755 --- a/plugins/box/system/system.admin.php +++ b/plugins/box/system/system.admin.php @@ -9,20 +9,33 @@ /** * Check Monstra version */ - function checkMonstraVersion() { - echo (' + function checkMonstraVersion() { + + if(!Session::exists('stable_monstra_version')){ + + preg_match('/"version" : "(.*)"/', CURL::get('http://monstra.org/api/version.php'), $version); + + if(isset($version[1])){ + + $stable_version = $version[1]; + Session::set('stable_monstra_version', $stable_version); + + } + + }else{ + $stable_version = Session::get('stable_monstra_version'); + } + + if(Core::VERSION < $stable_version){ + + echo (' - '); + '); + + } + } class SystemAdmin extends Backend {