Overview
Comment: | Indiquons la version dans le query string des fichiers statiques pour les forcer à se rafraîchir lors d'un changement de version |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA1: |
2962b78761ea764d12afe1b510481866 |
User & Date: | bohwaz on 2018-08-20 23:55:06 |
Other Links: | branch diff | manifest | tags |
Context
2018-08-20
| ||
23:58 | Ajout bouton pour voir/cacher le mot de passe sur les champs de mot de passe (pratique sur mobile) check-in: f1dd7f6e09 user: bohwaz tags: dev | |
23:55 | Indiquons la version dans le query string des fichiers statiques pour les forcer à se rafraîchir lors d'un changement de version check-in: 2962b78761 user: bohwaz tags: dev | |
2018-08-19
| ||
23:02 | Suppression envoi message collectif check-in: 310d20ffeb user: bohwaz tags: dev | |
Changes
Modified src/include/lib/Garradin/Template.php from [c681d67078] to [f146e5dca4].
︙ | ︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | { mkdir(CACHE_ROOT . '/compiled', 0777, true); } $this->setTemplatesDir(ROOT . '/templates'); $this->setCompiledDir(CACHE_ROOT . '/compiled'); $this->assign('www_url', WWW_URL); $this->assign('self_url', Utils::getSelfUrl()); $this->assign('self_url_no_qs', Utils::getSelfUrl(false)); $this->assign('is_logged', false); $this->register_compile_function('continue', function ($pos, $block, $name, $raw_args) { | > > > > > > > > | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | { mkdir(CACHE_ROOT . '/compiled', 0777, true); } $this->setTemplatesDir(ROOT . '/templates'); $this->setCompiledDir(CACHE_ROOT . '/compiled'); // Hash de la version pour les éléments statiques (cache) // On ne peut pas utiliser la version directement comme query string // pour les éléments statiques (genre /admin/static/admin.css?v0.9.0) // car cela dévoilerait la version de Garradin utilisée, posant un souci // en cas de faille, on cache donc la version utilisée, chaque instance // aura sa propre version $this->assign('version_hash', substr(sha1(VERSION . ROOT . SECRET_KEY), 0, 10)); $this->assign('www_url', WWW_URL); $this->assign('self_url', Utils::getSelfUrl()); $this->assign('self_url_no_qs', Utils::getSelfUrl(false)); $this->assign('is_logged', false); $this->register_compile_function('continue', function ($pos, $block, $name, $raw_args) { |
︙ | ︙ |
Modified src/templates/admin/_head.tpl from [ed9cd7693b] to [fbf813131c].
1 2 3 4 5 6 7 | <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <meta charset="utf-8" /> <title>{$title}</title> <link rel="icon" type="image/png" href="{$admin_url}static/icon.png" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, target-densitydpi=device-dpi" /> | | | | | | | | | | 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 40 | <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <meta charset="utf-8" /> <title>{$title}</title> <link rel="icon" type="image/png" href="{$admin_url}static/icon.png" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, target-densitydpi=device-dpi" /> <link rel="stylesheet" type="text/css" href="{$admin_url}static/admin.css?{$version_hash}1" media="all" /> {if isset($js) || isset($custom_js)} <script type="text/javascript" src="{$admin_url}static/scripts/global.js?{$version_hash}"></script> {/if} {if isset($custom_js)} {foreach from=$custom_js item="js"} <script type="text/javascript" src="{$admin_url}static/scripts/{$js}?{$version_hash}"></script> {/foreach} {/if} {if isset($custom_css)} {foreach from=$custom_css item="css"} <link rel="stylesheet" type="text/css" href="{$admin_url}static/{$css}?{$version_hash}" media="all" /> {/foreach} {/if} {if isset($plugin_css)} {foreach from=$plugin_css item="css"} <link rel="stylesheet" type="text/css" href="{plugin_url file=$css}?{$version_hash}" /> {/foreach} {/if} {if isset($plugin_js)} {foreach from=$plugin_js item="js"} <script type="text/javascript" src="{plugin_url file=$js}?{$version_hash}"></script> {/foreach} {/if} <link rel="stylesheet" type="text/css" href="{$admin_url}static/print.css?{$version_hash}" media="print" /> <link rel="stylesheet" type="text/css" href="{$admin_url}static/handheld.css?{$version_hash}" media="handheld,screen and (max-width:981px)" /> {if isset($config)} {custom_colors config=$config} {/if} </head> <body{if !empty($body_id)} id="{$body_id}"{/if} data-url="{$admin_url}"> |
︙ | ︙ |