Commit Graph

24 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
113c120088 Port some templates to Twig
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-05-12 01:26:49 -03:00
Michal Čihař
9e693d8e3f Fix syntax error
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-05-05 13:38:42 +02:00
Michal Čihař
272baec2cc Pass false as cache to Twig
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-05-05 13:28:20 +02:00
Michal Čihař
e852abc344 Fallback to disabled cache in case template loading fails
Fixes #13238

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-05-05 13:27:34 +02:00
Michal Čihař
ae9006e9be Use one temporary directory
Share one directory for Twig cache, SHP import and file uploads.

The code now also validates the cache directory and creates it on the
fly, so it properly detects if the directory can not be used.

Also the documentation has been improved to document securing this
directory.

Fixes #13225
Fixes #13226

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-05-05 11:08:36 +02:00
Maurício Meneghini Fauth
a35f8798f4 Port some templates to Twig
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-05-03 22:52:39 -03:00
Maurício Meneghini Fauth
1b9d125d3e Port some templates to Twig
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-04-20 00:14:06 -03:00
Michal Čihař
fbbbb85c2d Merge pull request #13100 from mauriciofauth/twig-template
Initial support for Twig template engine
2017-04-07 12:41:38 +02:00
Maurício Meneghini Fauth
d71e097593 Add Twig cache generator and bypass escape option
- Add script to generate cache files for all Twig templates
- Add option in Twig extension that bypass autoescaping

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-04-06 20:33:32 -03:00
Maurício Meneghini Fauth
a2d64b8bda Add requested changes and add more tests
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-03-25 15:22:02 -03:00
Maurício Meneghini Fauth
750e42916f Fix some coding standard errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-03-23 11:08:30 -03:00
Maurício Meneghini Fauth
5a4435a40d Add UrlExtension
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-03-18 00:20:01 -03:00
Maurício Meneghini Fauth
d43927c305 Add I18n support
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-03-11 15:55:06 -03:00
Maurício Meneghini Fauth
00c74a2fcd Add Twig support
Add basic support for Twig template engine

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-03-11 13:37:16 -03:00
Michal Čihař
beb243949e Merge branch 'QA_4_6' 2016-06-20 12:21:48 +02:00
Michal Čihař
2674e503f2 Assign helperFunctions before doing extract
This way we avoid possiblity of rewriting it from within the context.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-20 12:07:13 +02:00
Michal Čihař
aa6b320f49 Remove trim parameter from Template::render
It no longer does anything.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-12 15:43:08 +02:00
Michal Čihař
f904df8698 Merge branch 'QA_4_6' 2016-05-12 15:36:49 +02:00
Michal Čihař
288995ba18 Remove trimming from template renderere
This relies on preg_replace correctly handles multibyte chars what is
not true on Windows and it then corrupts the content as it removers
parts of UTF-8 chars. Removal fixes occassional 200 errors on Windows.

Fixes #11705

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-12 15:35:38 +02:00
Madhura Jayaratne
e1f55f4d9c Fix alignment in doc comments
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2016-02-19 22:43:10 +11:00
Atul Pratap Singh
e1a8fc758a Change some function names
Signed-off-by: Atul Pratap Singh <atulpratapsingh05@gmail.com>
2016-01-18 11:25:41 +05:30
Atul Pratap Singh
4e35951b70 Provide for optional parameters while instantiating and rendering template
Signed-off-by: Atul Pratap Singh <atulpratapsingh05@gmail.com>
2016-01-17 22:15:29 +05:30
Atul Pratap Singh
704b02306b Provide for passing data incrementally and passing functions into templates: Issue #11857
Signed-off-by: Atul Pratap Singh <atulpratapsingh05@gmail.com>
2016-01-15 09:08:44 +05:30
Hugues Peccatte
0761fb1801 Rename classes files.
Rename classes.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-09-01 21:30:21 +02:00