[Pkg-owncloud-commits] [owncloud] 49/258: add shortcut functions for style and script

David Prévot taffit at moszumanska.debian.org
Sat Oct 11 17:22:19 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit ca121d8438ea0eba6ecf3e3c47c4616d834e787c
Author: Bernhard Posselt <dev at bernhard-posselt.com>
Date:   Sat Sep 6 14:25:28 2014 +0200

    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 46e4827..e4af4aa 100644
--- a/lib/private/template/functions.php
+++ b/lib/private/template/functions.php
@@ -24,6 +24,24 @@ function print_unescaped($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
  * @param string $file file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list