Merge pull request #12019 from owncloud/fix-template-shortcuts
second parameter in template shortcuts script() and style() is optional
This commit is contained in:
commit
88c329b394
1 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ function print_unescaped($string) {
|
|||
* @param string|string[] $file the filename,
|
||||
* if an array is given it will add all scripts
|
||||
*/
|
||||
function script($app, $file) {
|
||||
function script($app, $file = null) {
|
||||
if(is_array($file)) {
|
||||
foreach($file as $f) {
|
||||
OC_Util::addScript($app, $f);
|
||||
|
@ -61,7 +61,7 @@ function vendor_script($app, $file = null) {
|
|||
* @param string|string[] $file the filename,
|
||||
* if an array is given it will add all styles
|
||||
*/
|
||||
function style($app, $file) {
|
||||
function style($app, $file = null) {
|
||||
if(is_array($file)) {
|
||||
foreach($file as $f) {
|
||||
OC_Util::addStyle($app, $f);
|
||||
|
|
Loading…
Reference in a new issue