Remove all index.php files inside the old courses directory.

1.10.x
Julio Montoya 11 years ago
parent ef9eb0da00
commit 41952c22d2
  1. 16
      main/install/update-files-1.9.0-1.10.0.inc.php

@ -1,6 +1,9 @@
<?php
/* For licensing terms, see /license.txt */
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Finder\Finder;
/**
* Chamilo LMS
*
@ -161,6 +164,19 @@ if (defined('SYSTEM_INSTALLATION')) {
unlink(api_get_path(SYS_PATH).'courses/.htaccess');
}
// Delete all "courses/ABC/index.php" files.
$finder = new Finder();
$dirs = $finder->directories()->in(api_get_path(SYS_APP_PATH).'courses');
$fs = new Filesystem();
/** @var Symfony\Component\Finder\SplFileInfo $dir */
foreach ($dirs as $dir) {
$indexFile = $dir->getPath().'/index.php';
if ($fs->exists($indexFile)) {
$fs->remove($indexFile);
}
}
// Move dirs into new structures.
$movePathList = [

Loading…
Cancel
Save