Skip to content
Snippets Groups Projects
Commit e7568b06 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

Merge branch 'cosmogramme_version' into 'hotline_6.46'

Cosmogramme Version
parents 2e3ce9b6 3f493b6a
Branches
Tags
4 merge requests!258Dev/13872 Orphee Allow Hold Available Items,!228Dev#12992 Custom Fields,!222Master,!221Hotline 6.46
<?PHP
// Constantes
error_reporting(E_ERROR | E_PARSE);
define("VERSION_COSMOGRAMME","6.51");
define("VERSION_COSMOGRAMME","6.52");
define("PATCH_LEVEL","206");
define("APPLI","cosmogramme");
......
......@@ -22,8 +22,10 @@
class Class_Migration_Patchs {
use Trait_StaticFileSystem;
const PATCH_PATH="./cosmogramme/sql/patch";
public $force=false;
public $force = false;
function extensionForFile($file) {
return substr($file, -4);
}
......@@ -40,7 +42,7 @@ class Class_Migration_Patchs {
public function getLastPatchNumber() {
$ids=[];
foreach (self::getFileSystem()->glob(self::PATCH_PATH."/patch_*") as $filename) {
foreach (self::getFileSystem()->glob(PATCH_PATH."patch_*") as $filename) {
$ids[]=$this->versionForFile($filename);
}
if (empty($ids))
......@@ -51,7 +53,7 @@ class Class_Migration_Patchs {
public function getMatchingPatchFiles($patch_level) {
$scripts=[];
foreach (self::getFileSystem()->glob(self::PATCH_PATH."/patch_*") as $filename) {
foreach (self::getFileSystem()->glob(PATCH_PATH."patch_*") as $filename) {
if (!in_array($this->extensionForFile($filename), ['.sql', '.php']))
continue;
$numero = $this->versionForFile($filename);
......
......@@ -106,6 +106,8 @@ function setupConstants() {
defineConstant('MEMCACHED_PORT', '11211');
defineConstant('IMAGE_MAGICK_PATH', 'convert');
defineConstant('PATCH_PATH', ROOT_PATH . '/cosmogramme/sql/patch/');
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment