diff --git a/apps/maarch_entreprise/xml/log4php.default.xml b/apps/maarch_entreprise/xml/log4php.default.xml old mode 100644 new mode 100755 diff --git a/core/init.php b/core/init.php index ce4a097cded94d944729ba6b0d527b2804ff8d13..5cec04381fe73e0f5b9b2afdb3f2e36d8ba4248d 100644 --- a/core/init.php +++ b/core/init.php @@ -1,5 +1,18 @@ <?php +/** + * Copyright Maarch since 2008 under licence GPLv3. + * See LICENCE.txt file at the root folder for more details. + * This file is part of Maarch software. + * + */ + +/** + * @brief Core Controller + * @author dev@maarch.org + * @ingroup core + */ + require_once dirname(__file__) . '/class/Url.php'; //dynamic session name $sessionName = str_replace("\\","/", dirname(__file__)); @@ -66,8 +79,11 @@ if (isset($_SESSION['custom_override_id']) ); } + if(file_exists('installed.lck')) { + require_once 'vendor/autoload.php'; + } diff --git a/install/class/Class_Install.php b/install/class/Class_Install.php index 0424ffeadac4c4a26a727edf61d0d7bb6ce40ec5..4201e8fcea0325e48f7e18cc51917e9586e37b83 100755 --- a/install/class/Class_Install.php +++ b/install/class/Class_Install.php @@ -2153,29 +2153,30 @@ class Install extends functions $db->query($query, array($sec->getPasswordHash($newPass))); } - public function copy_dir($dir2copy,$dir_paste) + function copy_dir($dir2copy, $dir_paste, $excludeExt=false) { // On vérifie si $dir2copy est un dossier if (is_dir($dir2copy)) { - // Si oui, on l'ouvre if ($dh = opendir($dir2copy)) { - // On liste les dossiers et fichiers de $dir2copy while (($file = readdir($dh)) !== false) { // Si le dossier dans lequel on veut coller n'existe pas, on le cree - if (!is_dir($dir_paste)) mkdir ($dir_paste, 0777); - + if (!is_dir($dir_paste)) { + mkdir ($dir_paste, 0777); + } // S'il s'agit d'un dossier, on relance la fonction recursive - if(is_dir($dir2copy.$file) && $file != '..' && $file != '.') $this->copy_dir ( $dir2copy.$file.'/' , $dir_paste.$file.'/' ); - - // S'il sagit d'un fichier, on le copue simplement - elseif($file != '..' && $file != '.') copy ( $dir2copy.$file , $dir_paste.$file ); + if (is_dir($dir2copy.$file) && $file != '..' && $file != '.') { + $this->copy_dir($dir2copy.$file.'/' , $dir_paste.$file.'/', $excludeExt); + } elseif ($file != '..' && $file != '.') { + if (strtolower($excludeExt) <> strtolower(pathinfo($dir2copy . $file, PATHINFO_EXTENSION))) { + copy($dir2copy.$file, $dir_paste.$file); + } + } } - // On ferme $dir2copy closedir($dh); } diff --git a/install/scripts/deployVersion.php b/install/scripts/deployVersion.php index 36f99a914a05744e6afec03737f1a7f393f1d062..0672152c4a3c18347d861b2ad66d3127d1ef4731 100644 --- a/install/scripts/deployVersion.php +++ b/install/scripts/deployVersion.php @@ -48,7 +48,8 @@ if (empty($finalVersionPath)) { if (!$Class_Install->copy_dir( $finalVersionPath . DIRECTORY_SEPARATOR, //'/opt/maarch/test' . DIRECTORY_SEPARATOR - $_SESSION['config']['corepath'] + $_SESSION['config']['corepath'], + 'xml' ) ) { $return['status'] = 0;