Merge branch '1.10.x' of github.com:chamilo/chamilo-lms into 1.10.x

1.10.x
Yannick Warnier 8 years ago
commit 4ab7cd9a74
  1. 4
      app/Migrations/Schema/V110/Version20150603181728.php
  2. 15
      main/install/update-files-1.9.0-1.10.0.inc.php

@ -69,8 +69,10 @@ class Version20150603181728 extends AbstractMigrationChamilo
$this->addSql("DELETE FROM c_item_property WHERE c_id NOT IN (SELECT id FROM course)");
$this->addSql("UPDATE c_item_property SET to_group_id = NULL WHERE to_group_id = 0");
$this->addSql("DELETE FROM c_item_property WHERE to_group_id IS NOT NULL AND to_group_id NOT IN (SELECT id FROM c_group_info)");
$this->addSql('UPDATE c_item_property cip SET cip.to_group_id = (SELECT cgi.iid FROM c_group_info cgi WHERE cgi.c_id = cip.c_id AND cgi.id = cip.to_group_id)');
$this->addSql('UPDATE c_item_property SET to_user_id = NULL WHERE to_user_id = 0');
$this->addSql('UPDATE c_item_property SET insert_user_id = NULL WHERE insert_user_id = 0');
$this->addSql('UPDATE c_item_property SET session_id = NULL WHERE session_id = 0');
$this->addSql('ALTER TABLE c_item_property ADD CONSTRAINT FK_1D84C18191D79BD3 FOREIGN KEY (c_id) REFERENCES course(id)');
$this->addSql('ALTER TABLE c_item_property ADD CONSTRAINT FK_1D84C181330D47E9 FOREIGN KEY (to_group_id) REFERENCES c_group_info (iid)');

@ -172,12 +172,12 @@ if (defined('SYSTEM_INSTALLATION')) {
// Move dirs into new structures.
$movePathList = [
api_get_path(SYS_CODE_PATH).'upload/users/groups' => api_get_path(SYS_UPLOAD_PATH),
api_get_path(SYS_CODE_PATH).'upload/users' => api_get_path(SYS_UPLOAD_PATH),
api_get_path(SYS_CODE_PATH).'upload/badges' => api_get_path(SYS_UPLOAD_PATH),
api_get_path(SYS_PATH).'courses' => api_get_path(SYS_APP_PATH),
api_get_path(SYS_CODE_PATH).'upload/users/groups' => api_get_path(SYS_UPLOAD_PATH) . 'groups',
api_get_path(SYS_CODE_PATH).'upload/users' => api_get_path(SYS_UPLOAD_PATH) . 'users',
api_get_path(SYS_CODE_PATH).'upload/badges' => api_get_path(SYS_UPLOAD_PATH) . 'badges',
api_get_path(SYS_PATH).'courses' => api_get_path(SYS_APP_PATH) . 'courses',
api_get_path(SYS_PATH).'searchdb' => api_get_path(SYS_UPLOAD_PATH).'plugins/xapian/',
api_get_path(SYS_PATH).'home' => api_get_path(SYS_APP_PATH)
api_get_path(SYS_PATH).'home' => api_get_path(SYS_APP_PATH) . 'home'
];
if ($debug) {
@ -188,12 +188,13 @@ if (defined('SYSTEM_INSTALLATION')) {
foreach ($movePathList as $origin => $destination) {
if (is_dir($origin)) {
$fs->rename($origin, $destination);
$fs->mirror($origin, $destination);
if ($debug) {
error_log("Renaming: '$origin' to '$destination'");
}
//move($origin, $destination, true, true);
$fs->remove($origin);
}
}

Loading…
Cancel
Save