From dece6dc5a5880c6267431ba3299c5758b38662ee Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 2 Feb 2013 23:39:16 -0500 Subject: Create gallery::allow_css_and_js_combining() which lets you disable combining CSS/JS by touching var/DONT_COMBINE. Fixes #1989. --- modules/gallery/helpers/gallery.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index 725a710d..f1f7190c 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -222,4 +222,12 @@ class gallery_Core { static function show_profiler() { return file_exists(VARPATH . "PROFILE"); } + + /** + * Return true if we should allow Javascript and CSS combining for performance reasons. + * Typically we want this, but it's convenient for developers to be able to disable it. + */ + static function allow_css_and_js_combining() { + return !file_exists(VARPATH . "DONT_COMBINE"); + } } \ No newline at end of file -- cgit v1.2.3