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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26






27
28
29
30
31
32
33
<?php
namespace Garradin;

const LOGIN_PROCESS = true;

require_once __DIR__ . '/_inc.php';

// L'utilisateur est déjà connecté
if ($session->isLogged())
{
    Utils::redirect(ADMIN_URL . '');
}

// Relance session_start et renvoie une image de 1px transparente
if (qg('keepSessionAlive') !== null)
{
    $session->keepAlive();

    header('Cache-Control: no-cache, must-revalidate');
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');

    header('Content-Type: image/gif');
    echo base64_decode("R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==");

    exit;
}







$champs = $config->get('champs_membres');
$id_field = (object) $champs->get($config->get('champ_identifiant'));
$id_field_name = $id_field->title;

$form->runIf('login', function () use ($id_field_name, $session) {
    if (!trim(f('_id'))) {







<
<
<
<
<
<













>
>
>
>
>
>







1
2
3
4
5
6
7






8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
namespace Garradin;

const LOGIN_PROCESS = true;

require_once __DIR__ . '/_inc.php';







// Relance session_start et renvoie une image de 1px transparente
if (qg('keepSessionAlive') !== null)
{
    $session->keepAlive();

    header('Cache-Control: no-cache, must-revalidate');
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');

    header('Content-Type: image/gif');
    echo base64_decode("R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==");

    exit;
}

// L'utilisateur est déjà connecté
if ($session->isLogged())
{
    Utils::redirect(ADMIN_URL . '');
}

$champs = $config->get('champs_membres');
$id_field = (object) $champs->get($config->get('champ_identifiant'));
$id_field_name = $id_field->title;

$form->runIf('login', function () use ($id_field_name, $session) {
    if (!trim(f('_id'))) {