1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?php
- error_log("Starting ".basename(__FILE__));
- global $debug;
- if (defined('SYSTEM_INSTALLATION')) {
-
-
-
-
-
- $exercisePath = api_get_path(SYS_CODE_PATH).'exercice';
- if (is_dir($exercisePath)) {
- @rrmdir($exercisePath);
- }
-
- $lpPath = api_get_path(SYS_CODE_PATH).'newscorm';
- if (is_dir($lpPath)) {
- @rrmdir($lpPath);
- }
-
- $ticketPluginPath = api_get_path(SYS_PLUGIN_PATH).'ticket';
- if (is_dir($ticketPluginPath)) {
- @rrmdir($ticketPluginPath);
- }
-
- $skypePluginPath = api_get_path(SYS_PLUGIN_PATH).'skype';
- if (is_dir($skypePluginPath)) {
- @rrmdir($skypePluginPath);
- }
-
- $entitiesToRemove = [
- api_get_path(SYS_PATH).'src/Chamilo/CoreBundle/Entity/Groups.php',
- api_get_path(SYS_PATH).'src/Chamilo/CoreBundle/Entity/GroupRelGroup.php',
- api_get_path(SYS_PATH).'src/Chamilo/CoreBundle/Entity/GroupRelTag.php',
- api_get_path(SYS_PATH).'src/Chamilo/CoreBundle/Entity/GroupRelUser.php',
- ];
- foreach ($entitiesToRemove as $entity) {
- if (file_exists($entity)) {
- $success = unlink($entity);
- if (!$success) {
- error_log('Could not delete '.$entity.', probably due to permissions. Please delete manually to avoid entities inconsistencies');
- }
- } else {
- error_log('Could not delete. It seems the file '.$entity.' does not exists.');
- }
- }
- $oldDefaultCertificatePath = api_get_path(SYS_CODE_PATH).'default_course_document/certificates/';
- if (is_dir($oldDefaultCertificatePath)) {
- @rrmdir($oldDefaultCertificatePath);
- }
- if ($debug) {
- error_log('Folders cleaned up');
- }
- } else {
- echo 'You are not allowed here !'.__FILE__;
- }
|