Skip to content
Snippets Groups Projects
Commit 88c329b3 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #12019 from owncloud/fix-template-shortcuts

second parameter in template shortcuts script() and style() is optional
parents 7d47d507 81e6329c
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ function print_unescaped($string) { ...@@ -29,7 +29,7 @@ function print_unescaped($string) {
* @param string|string[] $file the filename, * @param string|string[] $file the filename,
* if an array is given it will add all scripts * if an array is given it will add all scripts
*/ */
function script($app, $file) { function script($app, $file = null) {
if(is_array($file)) { if(is_array($file)) {
foreach($file as $f) { foreach($file as $f) {
OC_Util::addScript($app, $f); OC_Util::addScript($app, $f);
...@@ -61,7 +61,7 @@ function vendor_script($app, $file = null) { ...@@ -61,7 +61,7 @@ function vendor_script($app, $file = null) {
* @param string|string[] $file the filename, * @param string|string[] $file the filename,
* if an array is given it will add all styles * if an array is given it will add all styles
*/ */
function style($app, $file) { function style($app, $file = null) {
if(is_array($file)) { if(is_array($file)) {
foreach($file as $f) { foreach($file as $f) {
OC_Util::addStyle($app, $f); OC_Util::addStyle($app, $f);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment