Overview
Comment:Les squelettes de base doivent être sourcés à partir de ROOT, pas DATA_ROOT
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 723dab9518129574f19368a7f16035ee4b402257
User & Date: bohwaz on 2013-02-11 18:26:39
Other Links: manifest | tags
Context
2013-02-11
19:02
Déclenchement de la sauvegarde auto check-in: a8bf949b23 user: bohwaz tags: trunk
18:26
Les squelettes de base doivent être sourcés à partir de ROOT, pas DATA_ROOT check-in: 723dab9518 user: bohwaz tags: trunk
17:38
Utilisation de DATA_ROOT plutôt que ROOT pour stocker toutes les données de l'appli check-in: 1cd81eacbd user: bohwaz tags: trunk
Changes

Modified include/class.squelette.php from [70aece96a9] to [f693f6847c].

498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
...
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
...
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709

    public function fetch($template, $no_display = false)
    {
        $this->currentTemplate = $template;

        $path = file_exists(GARRADIN_DATA_ROOT . '/squelettes/' . $template)
            ? GARRADIN_DATA_ROOT . '/squelettes/' . $template
            : GARRADIN_DATA_ROOT . '/squelettes-dist/' . $template;

        $tpl_id = basename(dirname($path)) . '/' . $template;

        if (!self::compile_check($tpl_id, $path))
        {
            if (!file_exists($path))
            {
................................................................................
    static public function getSource($template)
    {
        if (!preg_match('!^[\w\d_-]+(?:\.[\w\d_-]+)*$!', $template))
            return false;

        $path = file_exists(GARRADIN_DATA_ROOT . '/squelettes/' . $template)
            ? GARRADIN_DATA_ROOT . '/squelettes/' . $template
            : GARRADIN_DATA_ROOT . '/squelettes-dist/' . $template;

        if (!file_exists($path))
            return false;

        return file_get_contents($path);
    }

................................................................................
        return true;
    }

    static public function listSources()
    {
        $sources = array();

        $dir = dir(GARRADIN_DATA_ROOT . '/squelettes-dist');

        while ($file = $dir->read())
        {
            if ($file[0] != '.')
                $sources[] = $file;
        }








|







 







|







 







|







498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
...
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
...
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709

    public function fetch($template, $no_display = false)
    {
        $this->currentTemplate = $template;

        $path = file_exists(GARRADIN_DATA_ROOT . '/squelettes/' . $template)
            ? GARRADIN_DATA_ROOT . '/squelettes/' . $template
            : GARRADIN_ROOT . '/squelettes-dist/' . $template;

        $tpl_id = basename(dirname($path)) . '/' . $template;

        if (!self::compile_check($tpl_id, $path))
        {
            if (!file_exists($path))
            {
................................................................................
    static public function getSource($template)
    {
        if (!preg_match('!^[\w\d_-]+(?:\.[\w\d_-]+)*$!', $template))
            return false;

        $path = file_exists(GARRADIN_DATA_ROOT . '/squelettes/' . $template)
            ? GARRADIN_DATA_ROOT . '/squelettes/' . $template
            : GARRADIN_ROOT . '/squelettes-dist/' . $template;

        if (!file_exists($path))
            return false;

        return file_get_contents($path);
    }

................................................................................
        return true;
    }

    static public function listSources()
    {
        $sources = array();

        $dir = dir(GARRADIN_ROOT . '/squelettes-dist');

        while ($file = $dir->read())
        {
            if ($file[0] != '.')
                $sources[] = $file;
        }