summaryrefslogtreecommitdiffstats
path: root/lib/private/Template
Commit message (Collapse)AuthorAgeFilesLines
* Revert rebaseurl function editJohn Molakvoæ (skjnldsv)2018-01-051-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Rollback caching fixJohn Molakvoæ (skjnldsv)2018-01-051-3/+4
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fixup! Proberly detect variable changesJohn Molakvoæ (skjnldsv)2018-01-041-4/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Proberly detect variable changesJohn Molakvoæ (skjnldsv)2018-01-041-0/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fixed url rebase with themingJohn Molakvoæ (skjnldsv)2018-01-041-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fixed testsJohn Molakvoæ (skjnldsv)2018-01-031-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Added tests for various installations typesJohn Molakvoæ (skjnldsv)2018-01-031-8/+10
| | | | | | | | | | | | | - With root installation - Core css - App inside server root - Secondary apps directory outside server root - With an installation in a sub directory - Core css - App inside server root - Secondary apps directory outside server root Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fixup! getWebdir returnJohn Molakvoæ (skjnldsv)2018-01-031-6/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Use OC_Util function for app web pathJohn Molakvoæ (skjnldsv)2018-01-031-11/+14
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* getWebDir functionJohn Molakvoæ (skjnldsv)2018-01-031-15/+19
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fixed webroot for scss filesJohn Molakvoæ (skjnldsv)2018-01-032-5/+17
| | | | | | Fixed tests Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fixed scss url rewritingJohn Molakvoæ (skjnldsv)2018-01-031-6/+9
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* CSSResourceLocator: handle SCSS in apps outside rootKyle Fazzari2017-11-222-69/+74
| | | | | | | | | | | | | | Currently static CSS files work fine in apps outside of the root. However, as soon as an app uses SCSS, Nextcloud starts being unable to find the web root. Fix this problem by backporting select snippets from master specifically targeting this issue, and add a test to ensure it doesn't regress. Fix #5289 Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
* {J,CS}SResourceLocator: account for symlinks in app pathKyle Fazzari2017-11-142-0/+12
| | | | | | | | | | | | Currently, if the app path includes a symlink, the calculated webDir will be incorrect when generating CSS and URLs will be pointing to the wrong place, breaking CSS. Use realpath when retrieving app path, and these issues go away. Fix #6028 Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
* If for some reason the json can't be decoded it is not cachedRoeland Jago Douma2017-11-091-0/+4
| | | | | | Should fix #6898 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do not stop on scss compilation failureJohn Molakvoæ (skjnldsv)2017-09-271-0/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix theming app to also use the prefixJulius Härtl2017-07-021-5/+10
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Make cache and scss caching depend on the baseUrlJulius Härtl2017-07-021-2/+6
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* [stable12] Use realpath to obtain the webrootSebastian Kostka2017-06-222-2/+2
| | | | | Use realpath to obtain the webroot - backport Signed-off-by: Sebastian Kostka sebastian.kostka@gmail.com
* Set SCSS dependencies to memcache on compileRoeland Jago Douma2017-05-211-1/+3
| | | | | | | Else when an upgrade happens we will recompile all the SCSS files all the time (until the cache expires). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Stop infinit loop on invalid settings css/js fileJoas Schilling2017-05-193-0/+26
| | | | | | Don't try to find dirname of false... Signed-off-by: Joas Schilling <coding@schilljs.com>
* Cache deps list to memcache on write not on first readRoeland Jago Douma2017-05-161-2/+4
| | | | | | | | | | Fixes #4886 Caching on first read leads to the bug that if the files are updated we will never cache again. Since we will always fetch from the memcache (which works) and then see that the files are newer. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Implement scss variable injection by OC_DefaultsJulius Haertl2017-04-251-4/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Julius Haertl <jus@bitgrid.net> Add Scss variables to example theme and theming app Signed-off-by: Julius Haertl <jus@bitgrid.net> Use SCSSCacher to build theming css Signed-off-by: Julius Härtl <jus@bitgrid.net> Update theming.scss Signed-off-by: Julius Härtl <jus@bitgrid.net> Code cleanup Signed-off-by: Julius Härtl <jus@bitgrid.net> Fix tests Signed-off-by: Julius Härtl <jus@bitgrid.net> Inject SCSSCacher for easier testing Signed-off-by: Julius Härtl <jus@bitgrid.net> Fix typehint Signed-off-by: Lukas Reschke <lukas@statuscode.ch> Generate absolute URLs Signed-off-by: Lukas Reschke <lukas@statuscode.ch> Fix tests to always use absolute urls for theming images Signed-off-by: Julius Härtl <jus@bitgrid.net> MailheaderColor -> ColorPrimary Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove unused use statementsMorris Jobke2017-04-221-1/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Move OC_Defaults to OCP\DefaultsMorris Jobke2017-04-092-5/+8
| | | | | | | | | | | | | * currently there are two ways to access default values: OCP\Defaults or OC_Defaults (which is extended by OCA\Theming\ThemingDefaults) * our code used a mixture of both of them, which made it hard to work on theme values * this extended the public interface with the missing methods and uses them everywhere to only rely on the public interface Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #4093 from nextcloud/endorse-password-protectionRoeland Jago Douma2017-04-041-0/+4
|\ | | | | Endorse password protection
| * feature endorse password for share linksBjoern Schiessle2017-04-031-0/+4
| | | | | | | | | | | | | | | | works like "enforce password protection", but let the user optionally remove the password protection after the password is set. by Timo Benk Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* | Merge pull request #4131 from nextcloud/fix-jscombinerChristoph Wurst2017-04-031-1/+1
|\ \ | |/ |/| Fix check for cache value in JSCombiner
| * Fix check for cache value in JSCombinerMorris Jobke2017-03-281-1/+1
| | | | | | | | | | | | | | | | | | * fixes following log output, because there was empty string stored in the cache Invalid argument supplied for foreach() at lib/private/Template/JSCombiner.php#108 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Fix gzip files for SafariMorris Jobke2017-03-292-4/+4
|/ | | | | | | * Safari support gzip only if the filename does not end on .gz - so this renames them to .gzip Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix testsRoeland Jago Douma2017-03-281-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Allow to gzip CSS/JS filesRoeland Jago Douma2017-03-282-1/+17
| | | | | | | | | | Since in production the SCSS files are compiled once and the javascript files are combined once we can just as well gzip them aggresively. This means that once they are requested and the browser supports gzip we can just serve the gzipped file saving precious bandwidth. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Don't run JSCombiner when not installedLukas Reschke2017-03-251-3/+6
| | | | | | When the instance is not installed don't run the JSCombiner as the appdata folder does not yet exist. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Add returnRoeland Jago Douma2017-03-241-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add debug modeRoeland Jago Douma2017-03-242-1/+39
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add cachingRoeland Jago Douma2017-03-241-6/+42
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* [PoC] JS CombinerRoeland Jago Douma2017-03-242-1/+159
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Cache SCSS dependency file in memcacheRoeland Jago Douma2017-03-221-8/+20
| | | | | | | Since reading a file from disks can be costly. Lets store the dependency json also in memcache. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add tests for SCSSCacherJulius Härtl2017-03-201-24/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add tests for SCSSCacherJulius Haertl2017-03-201-6/+7
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add variables.scss and import it for each scss fileJulius Haertl2017-03-201-6/+31
| | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
* Merge pull request #3950 from nextcloud/downstream-27149Lukas Reschke2017-03-201-0/+1
|\ | | | | Forbid to upload part files via web UI
| * Add ignore_files to config,Felix Heidecke2017-03-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test files against ignore_files list on upload fix typo and indentation Move blacklist declaration to lib/public/Files/FileInfo.php, Rename *ignored to *blacklisted Mocked blacklist_files for testing Mocked blacklist_files for testing Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | log where a resource was not foundJörn Friedrich Dreyer2017-03-191-1/+1
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Properly calculate webdir using the serverrootRoeland Jago Douma2017-03-101-4/+11
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* SCSS files don't exist on the default fs so just add them to theRoeland Jago Douma2017-03-101-1/+49
| | | | | | resource list Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix SCSS usage in appsMorris Jobke2017-03-101-1/+32
| | | | | | * fix the web root detection of the ResourceLocator for apps Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Allow using import in sass filesRoeland Jago Douma2017-03-091-3/+18
| | | | | | | | | This allows us to combine multiple sass files that we have to always load together anyway. Fixes #3389 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Use intval() for validation of config optionsMorris Jobke2017-02-211-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Improve the UX for sharing settingsMorris Jobke2017-02-211-1/+3
| | | | | | | * shows a info when list is potentially truncated * shows a warning when characters length is not enough Signed-off-by: Morris Jobke <hey@morrisjobke.de>