Overview
Comment: | Permettre self_url sans query string, permettre de changer une date en timestamp |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
ef1b8f1267f403bdf5ee5dd8eeb4457b |
User & Date: | bohwaz on 2015-02-19 06:53:33 |
Other Links: | manifest | tags |
Context
2015-02-19
| ||
06:53 | formattage rapprochement définitif check-in: 90f06b9e42 user: bohwaz tags: trunk | |
06:53 | Permettre self_url sans query string, permettre de changer une date en timestamp check-in: ef1b8f1267 user: bohwaz tags: trunk | |
06:52 | Mise en commun des éléments check-in: 0c1f27c28d user: bohwaz tags: trunk | |
Changes
Modified src/include/lib/Garradin/Template.php from [31d36787f2] to [3428aae4cb].
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | $this->compile_check = true; $this->reserved_template_varname = 'tpl'; $this->assign('www_url', WWW_URL); $this->assign('self_url', Utils::getSelfUrl()); $this->assign('is_logged', false); } } $tpl = Template::getInstance(); | > | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | $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); } } $tpl = Template::getInstance(); |
︙ | ︙ |
Modified src/include/lib/Garradin/Utils.php from [9eefb1f3b8] to [f6e82cd370].
︙ | ︙ | |||
68 69 70 71 72 73 74 | } static public function makeTimestampFromForm($d) { return mktime($d['h'], $d['min'], 0, $d['m'], $d['d'], $d['y']); } | | | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | } static public function makeTimestampFromForm($d) { return mktime($d['h'], $d['min'], 0, $d['m'], $d['d'], $d['y']); } static public function modifyDate($str, $change, $as_timestamp = false) { $date = \DateTime::createFromFormat('Y-m-d', $str); $date->modify($change); return ($as_timestamp ? $date->getTimestamp() : $date->format('Y-m-d')); } static public function checkDate($str) { if (!preg_match('!^(\d{4})-(\d{2})-(\d{2})$!', $str, $match)) return false; |
︙ | ︙ |