summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
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; ?>