Loading CHANGELOG.md +9 −1054 File changed.Preview size limit exceeded, changes collapsed. Show changes admin/migration/v18IndicateursNumRen.php +107 Changes for admin/migration/v18IndicateursNumRen.php: 107 added lines, 0 removed lines. Original line number Diff line number Diff line <?php class v18IndicateursNumRen extends AbstractMigration { public function description(): string { return "Renomage des indicateurs"; } public function utile(): bool { $bdd = $this->manager->getBdd(); $res = $bdd->select("select numero from indicateur where libelle_singulier like '%disparu%'"); return (int)($res[0]['NUMERO'] ?? 0) == 510; } public function before() { $numeros = [ 410 => 110, 420 => 120, 1010 => 210, 1011 => 220, 1020 => 230, 1021 => 240, 200 => 330, 210 => 310, 220 => 320, 310 => 410, 320 => 420, 330 => 430, 340 => 440, 350 => 450, 360 => 460, 361 => 470, 370 => 480, 380 => 490, 610 => 510, 620 => 520, 630 => 530, 640 => 540, 650 => 550, 660 => 560, 670 => 570, 510 => 610, 710 => 620, 720 => 630, 730 => 640, 740 => 650, 110 => 710, 120 => 720, 130 => 730, 1110 => 810, 1111 => 820, 1120 => 830, 1121 => 840, 910 => 910, 810 => 920, 920 => 930, 820 => 940, ]; $bdd = $this->manager->getBdd(); $c = $this->manager->getOseAdmin()->getConsole(); $ids = []; $res = $bdd->select('SELECT ID, NUMERO FROM indicateur'); foreach ($res as $r) { $ids[(int)$r['NUMERO']] = (int)$r['ID']; } // On gère les suppression d'anciens types d'indicateurs if ($this->manager->hasColumn('INDICATEUR', 'TYPE_INDICATEUR_ID')) { $bdd->exec("UPDATE indicateur SET type_indicateur_id = 7 WHERE type_indicateur_id = 5"); $bdd->exec("UPDATE indicateur SET type_indicateur_id = 10 WHERE type_indicateur_id = 11"); } foreach ($numeros as $ancien => $nouveau) { if (isset($ids[$ancien])) { $id = $ids[$ancien]; $sql = "UPDATE indicateur SET numero = $nouveau WHERE id = $id"; $bdd->exec($sql); } } } } No newline at end of file code/GenerationTraitsInterfaces.php −4 Changes for code/GenerationTraitsInterfaces.php: 0 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -8,10 +8,6 @@ * @var $viewFile string */ phpinfo(); return; $introspection = \UnicaenCode\Util::introspection(); Loading code/template/FormAwareTrait.php +3 −3 Changes for code/template/FormAwareTrait.php: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -32,11 +32,11 @@ trait <classname> public function get<method>(): ?<targetClassname> { if (empty($this-><variable>)){ $this-><variable> = \Application::$container->get('FormElementManager')->get(<targetClassname>::class); if (!empty($this-><variable>)) { return $this-><variable>; } return $this-><variable>; return \Application::$container->get('FormElementManager')->get(<targetClassname>::class); } <endif useGetter> } No newline at end of file config.local.php.default +12 Changes for config.local.php.default: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -126,6 +126,18 @@ return [ /* Actif (si non, alors seuls les comptes locaux seront autorisés à se connecter à OSE) */ 'actif' => true, /* Permet de se connecter avec un compte utilisateur créé dans OSE et non référencé dans le LDAP * Si false alors que le LDAP est aussi à false, alors seule l'authentification par CAS sera possible * Si le CAS est également désactivé, alors la fenêtre de login apparaîtra, mais personne ne pourra se connecter */ 'local' => true, /* Permet de connecter en tant que quelqu'un d'autre, à l'aide d'un login LDAP * exemple si le login 'lecluse' est autorisé à usurper, il peut se connecter en tant que Pascal Durand * à l'aide de son login 'durandp' en entrant comme identifiant 'lecluse=durandp' et comme mot de passe celui de 'lecluse' */ 'autorisationsUrsurpation' => [], /* IP ou nom DNS de la machine hébergeant le serveur LDAP */ 'host' => 'ldap.unicaen.fr', Loading Loading
admin/migration/v18IndicateursNumRen.php +107 Changes for admin/migration/v18IndicateursNumRen.php: 107 added lines, 0 removed lines. Original line number Diff line number Diff line <?php class v18IndicateursNumRen extends AbstractMigration { public function description(): string { return "Renomage des indicateurs"; } public function utile(): bool { $bdd = $this->manager->getBdd(); $res = $bdd->select("select numero from indicateur where libelle_singulier like '%disparu%'"); return (int)($res[0]['NUMERO'] ?? 0) == 510; } public function before() { $numeros = [ 410 => 110, 420 => 120, 1010 => 210, 1011 => 220, 1020 => 230, 1021 => 240, 200 => 330, 210 => 310, 220 => 320, 310 => 410, 320 => 420, 330 => 430, 340 => 440, 350 => 450, 360 => 460, 361 => 470, 370 => 480, 380 => 490, 610 => 510, 620 => 520, 630 => 530, 640 => 540, 650 => 550, 660 => 560, 670 => 570, 510 => 610, 710 => 620, 720 => 630, 730 => 640, 740 => 650, 110 => 710, 120 => 720, 130 => 730, 1110 => 810, 1111 => 820, 1120 => 830, 1121 => 840, 910 => 910, 810 => 920, 920 => 930, 820 => 940, ]; $bdd = $this->manager->getBdd(); $c = $this->manager->getOseAdmin()->getConsole(); $ids = []; $res = $bdd->select('SELECT ID, NUMERO FROM indicateur'); foreach ($res as $r) { $ids[(int)$r['NUMERO']] = (int)$r['ID']; } // On gère les suppression d'anciens types d'indicateurs if ($this->manager->hasColumn('INDICATEUR', 'TYPE_INDICATEUR_ID')) { $bdd->exec("UPDATE indicateur SET type_indicateur_id = 7 WHERE type_indicateur_id = 5"); $bdd->exec("UPDATE indicateur SET type_indicateur_id = 10 WHERE type_indicateur_id = 11"); } foreach ($numeros as $ancien => $nouveau) { if (isset($ids[$ancien])) { $id = $ids[$ancien]; $sql = "UPDATE indicateur SET numero = $nouveau WHERE id = $id"; $bdd->exec($sql); } } } } No newline at end of file
code/GenerationTraitsInterfaces.php −4 Changes for code/GenerationTraitsInterfaces.php: 0 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -8,10 +8,6 @@ * @var $viewFile string */ phpinfo(); return; $introspection = \UnicaenCode\Util::introspection(); Loading
code/template/FormAwareTrait.php +3 −3 Changes for code/template/FormAwareTrait.php: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -32,11 +32,11 @@ trait <classname> public function get<method>(): ?<targetClassname> { if (empty($this-><variable>)){ $this-><variable> = \Application::$container->get('FormElementManager')->get(<targetClassname>::class); if (!empty($this-><variable>)) { return $this-><variable>; } return $this-><variable>; return \Application::$container->get('FormElementManager')->get(<targetClassname>::class); } <endif useGetter> } No newline at end of file
config.local.php.default +12 Changes for config.local.php.default: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -126,6 +126,18 @@ return [ /* Actif (si non, alors seuls les comptes locaux seront autorisés à se connecter à OSE) */ 'actif' => true, /* Permet de se connecter avec un compte utilisateur créé dans OSE et non référencé dans le LDAP * Si false alors que le LDAP est aussi à false, alors seule l'authentification par CAS sera possible * Si le CAS est également désactivé, alors la fenêtre de login apparaîtra, mais personne ne pourra se connecter */ 'local' => true, /* Permet de connecter en tant que quelqu'un d'autre, à l'aide d'un login LDAP * exemple si le login 'lecluse' est autorisé à usurper, il peut se connecter en tant que Pascal Durand * à l'aide de son login 'durandp' en entrant comme identifiant 'lecluse=durandp' et comme mot de passe celui de 'lecluse' */ 'autorisationsUrsurpation' => [], /* IP ou nom DNS de la machine hébergeant le serveur LDAP */ 'host' => 'ldap.unicaen.fr', Loading