Differences From Artifact [bfc98c00e2]:

To Artifact [a6110f17d2]:


1
2
3
4
5
6

7
8
9
10
11
12
13
<?php

namespace Garradin;

use KD2\ErrorManager;
use KD2\Security;


error_reporting(-1);

/*
 * Version de Garradin
 */







>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php

namespace Garradin;

use KD2\ErrorManager;
use KD2\Security;
use KD2\Form;

error_reporting(-1);

/*
 * Version de Garradin
 */

261
262
263
264
265
266
267
268











269
270
271
272
273
274
275
{
    $key = base64_encode(Security::random_bytes(64));
    Install::setLocalConfig('SECRET_KEY', $key);
    define('Garradin\SECRET_KEY', $key);
}

// Intégration du secret pour les tokens
Security::tokenSetSecret(SECRET_KEY);












/*
 * Vérifications pour enclencher le processus d'installation ou de mise à jour
 */

if (!defined('Garradin\INSTALL_PROCESS') && !defined('Garradin\UPGRADE_PROCESS'))
{







|
>
>
>
>
>
>
>
>
>
>
>







262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
{
    $key = base64_encode(Security::random_bytes(64));
    Install::setLocalConfig('SECRET_KEY', $key);
    define('Garradin\SECRET_KEY', $key);
}

// Intégration du secret pour les tokens
Form::tokenSetSecret(SECRET_KEY);

// Fonctions utilitaires bien utiles d'avoir dans le namespace global de Garradin
function obj_has($obj, $pattern)
{
    return \KD2\Helpers::obj_has($obj, $pattern);
}

function obj_get($src, $pattern, $default = null)
{
    return \KD2\Helpers::obj_get($src, $pattern, $default);
}

/*
 * Vérifications pour enclencher le processus d'installation ou de mise à jour
 */

if (!defined('Garradin\INSTALL_PROCESS') && !defined('Garradin\UPGRADE_PROCESS'))
{