Overview
Comment:Suppression dépendance Template_Lite pour utiliser Smartyer
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: 0b70314e27969a243168dbc3329abbe3b64c4192
User & Date: bohwaz on 2017-01-17 02:54:42
Other Links: branch diff | manifest | tags
Context
2017-01-17
03:57
Passphrase_FR n'existe plus, utilisation de Security et d'un dictionnaire spécialisé check-in: 80db33d7bf user: bohwaz tags: dev
02:54
Suppression dépendance Template_Lite pour utiliser Smartyer check-in: 0b70314e27 user: bohwaz tags: dev
02:44
Create new branch named "dev" check-in: b0743bd868 user: bohwaz tags: dev
Changes

Modified src/include/lib/Garradin/Template.php from [d428ff4e65] to [48b9c62ee7].

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
34
35
36
37
38
39
...
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
...
601
602
603
604
605
606
607
608
609
<?php

namespace Garradin;

require_once ROOT . '/include/lib/Template_Lite/class.template.php';

class Template extends \Template_Lite
{
    static protected $_instance = null;

    static public function getInstance()
    {
        return self::$_instance ?: self::$_instance = new Template;
    }
................................................................................

    private function __clone()
    {
    }

    public function __construct()
    {
        parent::__construct();

        $this->cache = false;

        $this->compile_dir = CACHE_ROOT . '/compiled';
        $this->template_dir = ROOT . '/templates';

        $this->compile_check = true;


        $this->reserved_template_varname = 'tpl';

        $this->assign('www_url', WWW_URL);
        $this->assign('self_url', Utils::getSelfUrl());
        $this->assign('self_url_no_qs', Utils::getSelfUrl(true));

        $this->assign('is_logged', false);
    }
}
................................................................................
    }
    else
    {
        return $v;
    }
}

$tpl->register_compiler('continue', function() { return 'continue;'; });

$tpl->register_function('csrf_field', 'Garradin\tpl_csrf_field');
$tpl->register_function('form_field', 'Garradin\tpl_form_field');
$tpl->register_function('select_compte', 'Garradin\tpl_select_compte');

$tpl->register_function('format_droits', 'Garradin\tpl_format_droits');

$tpl->register_function('pagination', 'Garradin\tpl_pagination');
................................................................................

$tpl->register_modifier('format_sqlite_date_to_french', ['Garradin\Utils', 'sqliteDateToFrench']);

$tpl->register_modifier('format_bytes', ['Garradin\Utils', 'format_bytes']);

$tpl->register_modifier('strftime_fr', 'Garradin\tpl_strftime_fr');
$tpl->register_modifier('date_fr', 'Garradin\tpl_date_fr');

?>




<
<
|







 







<
<
<
<
|
|

<
>

<
<







 







<
<







 







<
<
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
...
562
563
564
565
566
567
568


569
570
571
572
573
574
575
...
591
592
593
594
595
596
597


<?php

namespace Garradin;



class Template extends \KD2\Smartyer
{
    static protected $_instance = null;

    static public function getInstance()
    {
        return self::$_instance ?: self::$_instance = new Template;
    }
................................................................................

    private function __clone()
    {
    }

    public function __construct()
    {




        self::setCompileDir(CACHE_ROOT . '/compiled');
        self::setTemplateDir(ROOT . '/templates');


        parent::__construct();



        $this->assign('www_url', WWW_URL);
        $this->assign('self_url', Utils::getSelfUrl());
        $this->assign('self_url_no_qs', Utils::getSelfUrl(true));

        $this->assign('is_logged', false);
    }
}
................................................................................
    }
    else
    {
        return $v;
    }
}



$tpl->register_function('csrf_field', 'Garradin\tpl_csrf_field');
$tpl->register_function('form_field', 'Garradin\tpl_form_field');
$tpl->register_function('select_compte', 'Garradin\tpl_select_compte');

$tpl->register_function('format_droits', 'Garradin\tpl_format_droits');

$tpl->register_function('pagination', 'Garradin\tpl_pagination');
................................................................................

$tpl->register_modifier('format_sqlite_date_to_french', ['Garradin\Utils', 'sqliteDateToFrench']);

$tpl->register_modifier('format_bytes', ['Garradin\Utils', 'format_bytes']);

$tpl->register_modifier('strftime_fr', 'Garradin\tpl_strftime_fr');
$tpl->register_modifier('date_fr', 'Garradin\tpl_date_fr');


Modified src/templates/admin/index.tpl from [db706138da] to [5b840d80c0].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
..
33
34
35
36
37
38
39
40
41
42
43
{include file="admin/_head.tpl" title="Bonjour `$user.identite` !" current="home"}

<div class="infos_asso">
    <h3>{$config.nom_asso|escape}</h3>
    {if !empty($config.adresse_asso)}
    <p>
        {$config.adresse_asso|escape|nl2br}
    </p>
    {/if}
    {if !empty($config.email_asso)}
    <p>
        E-Mail : {mailto address=$config.email_asso}
    </p>
    {/if}
    {if !empty($config.site_asso)}
    <p>
        Web : <a href="{$config.site_asso|escape}">{$config.site_asso|escape}</a>
    </p>
    {/if}
................................................................................
        {/if}
    </li>
    {/if}
    <li><a href="{$admin_url}mes_cotisations.php">Suivi de mes cotisations</a></li>
</ul>

<div class="wikiContent">
    {$page.contenu.contenu|format_wiki|liens_wiki:'wiki/?'}
</div>

{include file="admin/_foot.tpl"}
|










|







 







|



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
..
33
34
35
36
37
38
39
40
41
42
43
{include file="admin/_head.tpl" title="Bonjour %s !"|args:$user.identite current="home"}

<div class="infos_asso">
    <h3>{$config.nom_asso|escape}</h3>
    {if !empty($config.adresse_asso)}
    <p>
        {$config.adresse_asso|escape|nl2br}
    </p>
    {/if}
    {if !empty($config.email_asso)}
    <p>
        E-Mail : <a href="{$config.email_asso}">{$config.email_asso}</a>
    </p>
    {/if}
    {if !empty($config.site_asso)}
    <p>
        Web : <a href="{$config.site_asso|escape}">{$config.site_asso|escape}</a>
    </p>
    {/if}
................................................................................
        {/if}
    </li>
    {/if}
    <li><a href="{$admin_url}mes_cotisations.php">Suivi de mes cotisations</a></li>
</ul>

<div class="wikiContent">
    {$page.contenu.contenu|raw|format_wiki|liens_wiki:'wiki/?'}
</div>

{include file="admin/_foot.tpl"}

Modified src/www/admin/install.php from [469e7fae31] to [8fc796e697].

52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
$v = \SQLite3::version();

test_requis(
    version_compare($v['versionString'], '3.7.4', '>='),
    'SQLite3 version 3.7.4 ou supérieur requise. Version installée : ' . $v['versionString']
);

test_requis(
    file_exists(__DIR__ . '/../../include/lib/Template_Lite/class.template.php'),
    'Librairie Template_Lite non disponible.'
);

test_requis(
    file_exists(__DIR__ . '/../../include/lib/KD2'),
    'Librairie KD2 non disponible.'
);

const INSTALL_PROCESS = true;








<
<
<
<
<







52
53
54
55
56
57
58





59
60
61
62
63
64
65
$v = \SQLite3::version();

test_requis(
    version_compare($v['versionString'], '3.7.4', '>='),
    'SQLite3 version 3.7.4 ou supérieur requise. Version installée : ' . $v['versionString']
);






test_requis(
    file_exists(__DIR__ . '/../../include/lib/KD2'),
    'Librairie KD2 non disponible.'
);

const INSTALL_PROCESS = true;