Adding extra fields for CMS

ofaj
jmontoyaa 9 years ago
parent ccd665ef79
commit c0c44ea693
  1. 3
      app/Migrations/Schema/V111/Version20160330103045.php
  2. 8
      main/inc/lib/database.lib.php
  3. 2
      main/install/install.lib.php
  4. 6
      src/Chamilo/UserBundle/Entity/User.php

@ -110,6 +110,9 @@ class Version20160330103045 extends AbstractMigration
$sql = "UPDATE user SET email_canonical = email";
$this->addSql($sql);
$sql = "ALTER TABLE user ADD roles LONGTEXT NOT NULL COMMENT '(DC2Type:array)'";
$this->addSql($sql);
$sql = "UPDATE user SET roles = 'a:0:{}'";
$this->addSql($sql);

@ -135,6 +135,9 @@ class Database
$config->setEntityNamespaces(
array(
'ChamiloClassificationBundle' => 'Chamilo\ClassificationBundle\Entity',
'ChamiloMediaBundle' => 'Chamilo\MediaBundle\Entity',
'ChamiloPageBundle' => 'Chamilo\PageBundle\Entity',
'ChamiloUserBundle' => 'Chamilo\UserBundle\Entity',
'ChamiloCoreBundle' => 'Chamilo\CoreBundle\Entity',
'ChamiloCourseBundle' => 'Chamilo\CourseBundle\Entity',
@ -649,17 +652,18 @@ class Database
$path = !empty($path) ? $path : api_get_path(SYS_PATH);
$paths = array(
$path.'src/Chamilo/ClassificationBundle/Entity',
$path.'src/Chamilo/MediaBundle/Entity',
$path.'src/Chamilo/PageBundle/Entity',
$path.'src/Chamilo/CoreBundle/Entity',
$path.'src/Chamilo/UserBundle/Entity',
$path.'src/Chamilo/CourseBundle/Entity',
$path.'vendor/sonata-project/user-bundle/Entity',
$path.'vendor/sonata-project/user-bundle/Model',
$path.'vendor/friendsofsymfony/user-bundle/FOS/UserBundle/Entity',
);
$proxyDir = $path.'app/cache/';
$proxyDir = '';
return \Doctrine\ORM\Tools\Setup::createAnnotationMetadataConfiguration(
$paths,

@ -2667,7 +2667,7 @@ function finishInstallation(
$installationProfile = ''
) {
$sysPath = !empty($sysPath) ? $sysPath : api_get_path(SYS_PATH);
error_log('0.0.0');
// Inserting data
$data = file_get_contents($sysPath.'main/install/data.sql');
$result = $manager->getConnection()->prepare($data);

@ -322,6 +322,11 @@ class User implements UserInterface//implements ParticipantInterface, ThemeUser
**/
protected $dropBoxSentFiles;
/**
* @ORM\Column(type="array")
*/
protected $roles;
/**
* @ORM\OneToMany(targetEntity="Chamilo\CoreBundle\Entity\JuryMembers", mappedBy="user")
**/
@ -386,7 +391,6 @@ class User implements UserInterface//implements ParticipantInterface, ThemeUser
$this->courses = new ArrayCollection();
$this->items = new ArrayCollection();
$this->classes = new ArrayCollection();
//$this->roles = new ArrayCollection();
$this->curriculumItems = new ArrayCollection();
$this->portals = new ArrayCollection();
$this->dropBoxSentFiles = new ArrayCollection();

Loading…
Cancel
Save