Overview
Comment:Manage when error ID is invalid
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: a26859e12990f85d960785fb51eab9dfb657b2a4
User & Date: bohwaz on 2020-11-16 21:15:57
Other Links: branch diff | manifest | tags
Context
2020-11-16
21:24
$wiki must always be set, so the method should always be run check-in: 169b994c9e user: bohwaz tags: dev
21:15
Manage when error ID is invalid check-in: a26859e129 user: bohwaz tags: dev
21:04
Some refactoring of forms CSS code check-in: 1ca49eace6 user: bohwaz tags: dev
Changes

Modified src/www/admin/config/logs.php from [3641ab6b53] to [7619c999e9].

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
use KD2\ErrorManager;

require_once __DIR__ . '/_inc.php';

if (qg('type') == 'errors' && ERRORS_ENABLE_LOG_VIEW)
{
    $reports = ErrorManager::getReportsFromLog(null, qg('id'));





    $reports = array_reverse($reports, true);

    foreach ($reports as &$report)
    {
        $report->context->date = strtotime($report->context->date);
    }

................................................................................
    unset($report);

    $errors = [];

    if (qg('id'))
    {
        $tpl->assign('id', qg('id'));
        $tpl->assign('main', $reports[0]);
        $tpl->assign('reports', $reports);
    }
    else
    {
        foreach ($reports as $report)
        {
            if (!isset($errors[$report->context->id]))







>
>
>
>
>







 







|







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
34
35
36
37
use KD2\ErrorManager;

require_once __DIR__ . '/_inc.php';

if (qg('type') == 'errors' && ERRORS_ENABLE_LOG_VIEW)
{
    $reports = ErrorManager::getReportsFromLog(null, qg('id'));

    if (!count($reports)) {
        throw new UserException('Erreur inconnue');
    }

    $reports = array_reverse($reports, true);

    foreach ($reports as &$report)
    {
        $report->context->date = strtotime($report->context->date);
    }

................................................................................
    unset($report);

    $errors = [];

    if (qg('id'))
    {
        $tpl->assign('id', qg('id'));
        $tpl->assign('main', reset($reports));
        $tpl->assign('reports', $reports);
    }
    else
    {
        foreach ($reports as $report)
        {
            if (!isset($errors[$report->context->id]))