From 7e4d24420096404e5902e66ff568d0a01f8a662e Mon Sep 17 00:00:00 2001
From: Bernhard Posselt <dev@bernhard-posselt.com>
Date: Sat, 6 Sep 2014 14:25:28 +0200
Subject: [PATCH] add shortcut functions for style and script

---
 lib/private/template/functions.php | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php
index 3cbf0d9748..09db011e74 100644
--- a/lib/private/template/functions.php
+++ b/lib/private/template/functions.php
@@ -23,6 +23,24 @@ function print_unescaped($string) {
 	print($string);
 }
 
+/**
+ * Shortcut for adding scripts to a page
+ * @param string $app the appname
+ * @param string $file the filename
+ */
+function script($app, $file) {
+	OC_Util::addScript($app, $file);
+}
+
+/**
+ * Shortcut for adding styles to a page
+ * @param string $app the appname
+ * @param string $file the filename
+ */
+function style($app, $file) {
+	OC_Util::addStyle($app, $file);
+}
+
 /**
  * make OC_Helper::linkTo available as a simple function
  * @param string $app app
-- 
GitLab