clipbucket/upload/cb_install/upgradeable.php

40 lines
956 B
PHP
Raw Normal View History

2013-10-07 12:17:06 +00:00
<?php
$versions = array('1','2.0.4','2.0.5','2.0.6'
,'2.0.7','2.0.8','2.0.9','2.0.91','2.1','2.2'
,'2.3','2.4','2.4.5','2.5','2.5.1','2.6','2.7'
2015-09-14 10:19:47 +00:00
,'2.7.0.1','2.7.0.02','2.7.0.3','2.7.0.4','2.7.0.5'
,'2.7.1','2.7.2','2.7.3','2.7.4','2.7.5','2.7.6','2.8','2.8.1','2.8.2','2.8.3');
2013-10-07 12:17:06 +00:00
/**
* Function used to upgrade ClipBucket
*/
function is_upgradeable()
{
global $versions;
//checking for Installed ClipBucket file
if(file_exists("../includes/clipbucket.php"))
{
$contents = file_get_contents("../includes/clipbucket.php");
if($contents)
{
preg_match("/define\(\"VERSION\",\"([\d.]+)\"\);/i",$contents,$matches);
}
$version = $matches[1];
}
if(in_array(@$version,$versions) && $version < VERSION)
return $version;
else
return false;
}
/**
* ClipBucket v2.1 Installaer
*/
//Checking if clipbucket is upgradable
$upgrade = is_upgradeable();
?>