Artifact c5890b7ab39e0e4edf572a49559b7aa8d177a224:


<?php
namespace Garradin;

require_once __DIR__ . '/_inc.php';

$q = trim(Utils::get('q'));

$tpl->assign('recherche', $q);

if (Utils::get('q'))
{
    $r = $wiki->search($q);
    $tpl->assign('resultats', $r);
    $tpl->assign('nb_resultats', count($r));
}

function tpl_clean_snippet($str)
{
    return preg_replace('!&lt;(/?b)&gt;!', '<$1>', $str);
}

$tpl->register_modifier('clean_snippet', 'Garradin\tpl_clean_snippet');

$tpl->display('admin/wiki/chercher.tpl');

?>