summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2010-09-08 01:43:40 +0200
committerRobin Appelman <icewind1991@gmail.com>2010-09-08 01:43:40 +0200
commitcffa4edb722b080091cb417b734dbff1907eafb2 (patch)
treed593cf06ea1b50f053f59c3a7983fb117fa2afbe /inc
parent5da12fcfa13f2c3497470edc97315363aa89e47c (diff)
downloadnextcloud-server-cffa4edb722b080091cb417b734dbff1907eafb2.tar.gz
nextcloud-server-cffa4edb722b080091cb417b734dbff1907eafb2.zip
provide a basic viewer for text files
Diffstat (limited to 'inc')
-rw-r--r--inc/lib_base.php9
-rw-r--r--inc/templates/header.php3
2 files changed, 12 insertions, 0 deletions
diff --git a/inc/lib_base.php b/inc/lib_base.php
index 6cf820207b6..19288f58c73 100644
--- a/inc/lib_base.php
+++ b/inc/lib_base.php
@@ -112,6 +112,7 @@ $loginresult=OC_USER::loginlisener();
*/
class OC_UTIL {
public static $scripts=array();
+ public static $styles=array();
private static $fsSetup=false;
public static function setupFS(){// configure the initial filesystem based on the configuration
@@ -182,6 +183,14 @@ class OC_UTIL {
public static function addScript($url){
self::$scripts[]=$url;
}
+ /**
+ * add a css file
+ *
+ * @param url $url
+ */
+ public static function addStyle($url){
+ self::$styles[]=$url;
+ }
/**
* array to store all the optional navigation buttons of the plugins
diff --git a/inc/templates/header.php b/inc/templates/header.php
index e016cd9f021..f39ac9debb9 100644
--- a/inc/templates/header.php
+++ b/inc/templates/header.php
@@ -31,6 +31,9 @@
foreach(OC_UTIL::$scripts as $script){
echo("<script type='text/ecmascript' src='$WEBROOT/$script'></script>\n");
}
+foreach(OC_UTIL::$styles as $style){
+ echo("<link rel='stylesheet' type='text/css' href='$style'/>\n");
+}
?>
<script type='text/ecmascript'>
var WEBROOT='<?php echo($WEBROOT)?>';