summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-06-04 23:02:05 +0200
committerBart Visscher <bartv@thisnet.nl>2012-06-04 23:02:05 +0200
commit4a5973662c78eb5769e7b06d7d559572f57e663f (patch)
tree774e2f775b3789f5f40bd2459ddec05df1b73c31 /core
parent786325a4bb976d92de54c472c2c3bd8a73cbef22 (diff)
parent3fee3a4633e5d4d65f7eabf2d387e209efedbc70 (diff)
downloadnextcloud-server-4a5973662c78eb5769e7b06d7d559572f57e663f.tar.gz
nextcloud-server-4a5973662c78eb5769e7b06d7d559572f57e663f.zip
Merge branch 'unstable'
Conflicts: apps/files_external/tests/config.php apps/files_versions/ajax/getVersions.php apps/files_versions/appinfo/app.php apps/files_versions/history.php apps/files_versions/js/versions.js apps/files_versions/templates/history.php apps/files_versions/versions.php lib/base.php
Diffstat (limited to 'core')
-rw-r--r--core/minimizer.php12
-rw-r--r--core/templates/layout.guest.php6
-rw-r--r--core/templates/layout.user.php6
3 files changed, 24 insertions, 0 deletions
diff --git a/core/minimizer.php b/core/minimizer.php
new file mode 100644
index 00000000000..e5703053024
--- /dev/null
+++ b/core/minimizer.php
@@ -0,0 +1,12 @@
+<?php
+
+if ($service == 'core.css'){
+ $minimizer = new OC_Minimizer_CSS();
+ $files = $minimizer->findFiles(OC_Util::$core_styles);
+ $minimizer->output($files);
+}
+else if ($service == 'core.js'){
+ $minimizer = new OC_Minimizer_JS();
+ $files = $minimizer->findFiles(OC_Util::$core_scripts);
+ $minimizer->output($files);
+}
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index 7ba7abdbf12..7f5a4d50fc6 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -4,6 +4,9 @@
<title>ownCloud</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /><link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" />
+ <?php if (!defined('DEBUG') || !DEBUG): ?>
+ <link rel="stylesheet" href="<?php echo OC_Helper::linkToRemote('core.css', false) ?>" type="text/css" media="screen" />
+ <?php endif ?>
<?php foreach($_['cssfiles'] as $cssfile): ?>
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
<?php endforeach; ?>
@@ -11,6 +14,9 @@
var oc_webroot = '<?php echo OC::$WEBROOT; ?>';
var oc_appswebroot = '<?php echo OC::$APPSWEBROOT; ?>';
</script>
+ <?php if (!defined('DEBUG') || !DEBUG): ?>
+ <script type="text/javascript" src="<?php echo OC_Helper::linkToRemote('core.js', false) ?>"></script>
+ <?php endif ?>
<?php foreach($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
<?php endforeach; ?>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index e9d105ed043..8f6c029007f 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -4,6 +4,9 @@
<title><?php echo isset($_['application']) && !empty($_['application'])?$_['application'].' | ':'' ?>ownCloud <?php echo OC_User::getUser()?' ('.OC_User::getUser().') ':'' ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /><link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" />
+ <?php if (!defined('DEBUG') || !DEBUG): ?>
+ <link rel="stylesheet" href="<?php echo OC_Helper::linkToRemote('core.css', false) ?>" type="text/css" media="screen" />
+ <?php endif ?>
<?php foreach($_['cssfiles'] as $cssfile): ?>
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
<?php endforeach; ?>
@@ -12,6 +15,9 @@
var oc_appswebroot = '<?php echo OC::$APPSWEBROOT; ?>';
var oc_current_user = '<?php echo OC_User::getUser() ?>';
</script>
+ <?php if (!defined('DEBUG') || !DEBUG): ?>
+ <script type="text/javascript" src="<?php echo OC_Helper::linkToRemote('core.js', false) ?>"></script>
+ <?php endif ?>
<?php foreach($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
<?php endforeach; ?>