Overview
Comment:Corriger automatiquement l'uri de la page wiki
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6df386338cc87af400f7047463ee1cacd02bccfa
User & Date: bohwaz on 2015-02-17 17:48:22
Original Comment: Correction positionnement des actions dans la gestion des champs membres
Other Links: manifest | tags
Context
2015-02-17
17:48
Correction positionnement actions check-in: 2104bb3c44 user: bohwaz tags: trunk
17:48
Corriger automatiquement l'uri de la page wiki check-in: 6df386338c user: bohwaz tags: trunk
17:47
Utilisation notation courte et nouvelles méthodes check-in: df3b9a0cea user: bohwaz tags: trunk
Changes

Modified src/www/admin/wiki/index.php from [3739c3a318] to [40c8d1ccc0].

1
2
3
4
5
6
7

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

namespace Garradin;
require_once __DIR__ . '/_inc.php';

if (!empty($_SERVER['QUERY_STRING']))
{

    $page = $wiki->getByURI($_SERVER['QUERY_STRING']);
}
else
{
    $page = $wiki->getByURI($config->get('accueil_wiki'));
}

if (!$page)
{
    $tpl->assign('uri', $_SERVER['QUERY_STRING']);
    $tpl->assign('can_edit', $wiki->canWritePage(Wiki::ECRITURE_NORMAL));
    $tpl->assign('can_read', true);
}
else
{
    $tpl->assign('can_read', $wiki->canReadPage($page['droit_lecture']));
    $tpl->assign('can_edit', $wiki->canWritePage($page['droit_ecriture']));







>
|








|







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
<?php

namespace Garradin;
require_once __DIR__ . '/_inc.php';

if (!empty($_SERVER['QUERY_STRING']))
{
    $page_uri = Wiki::transformTitleToURI(rawurldecode($_SERVER['QUERY_STRING']));
    $page = $wiki->getByURI($page_uri);
}
else
{
    $page = $wiki->getByURI($config->get('accueil_wiki'));
}

if (!$page)
{
    $tpl->assign('uri', $page_uri);
    $tpl->assign('can_edit', $wiki->canWritePage(Wiki::ECRITURE_NORMAL));
    $tpl->assign('can_read', true);
}
else
{
    $tpl->assign('can_read', $wiki->canReadPage($page['droit_lecture']));
    $tpl->assign('can_edit', $wiki->canWritePage($page['droit_ecriture']));