Overview
Comment:Fix keep alive, fix [7d1ab532b109a467477a542c0de38bc7e12fb14c]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA3-256: 1e3fd4e54279e9de2f206bb0321487ce3f6454bf35cd8b92c5a484527f2f5438
User & Date: bohwaz on 2021-04-05 21:30:20
Other Links: branch diff | manifest | tags
Context
2021-04-05
22:17
Fix [4cd80507894e50f6], add ability to change files from user edit check-in: 198c3b0d10 user: bohwaz tags: dev
21:30
Fix keep alive, fix [7d1ab532b109a467477a542c0de38bc7e12fb14c] check-in: 1e3fd4e542 user: bohwaz tags: dev
14:28
Always change modified time when editing a page fix [feec2edb912f0046] check-in: 84780be961 user: bohwaz tags: dev
Changes

Modified src/www/admin/login.php from [a530e4030b] to [052d532ffd].

     1      1   <?php
     2      2   namespace Garradin;
     3      3   
     4      4   const LOGIN_PROCESS = true;
     5      5   
     6      6   require_once __DIR__ . '/_inc.php';
     7      7   
     8         -// L'utilisateur est déjà connecté
     9         -if ($session->isLogged())
    10         -{
    11         -    Utils::redirect(ADMIN_URL . '');
    12         -}
    13         -
    14      8   // Relance session_start et renvoie une image de 1px transparente
    15      9   if (qg('keepSessionAlive') !== null)
    16     10   {
    17     11       $session->keepAlive();
    18     12   
    19     13       header('Cache-Control: no-cache, must-revalidate');
    20     14       header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
    21     15   
    22     16       header('Content-Type: image/gif');
    23     17       echo base64_decode("R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==");
    24     18   
    25     19       exit;
    26     20   }
           21  +
           22  +// L'utilisateur est déjà connecté
           23  +if ($session->isLogged())
           24  +{
           25  +    Utils::redirect(ADMIN_URL . '');
           26  +}
    27     27   
    28     28   $champs = $config->get('champs_membres');
    29     29   $id_field = (object) $champs->get($config->get('champ_identifiant'));
    30     30   $id_field_name = $id_field->title;
    31     31   
    32     32   $form->runIf('login', function () use ($id_field_name, $session) {
    33     33       if (!trim(f('_id'))) {