From b5d4716a52aab283e1d3e0527d036134c5787095 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Mar 2013 20:33:46 +0400 Subject: optimize loading of external libraries a bit fix bold text in Unread articles --- include/functions.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'include/functions.php') diff --git a/include/functions.php b/include/functions.php index 66054c23b..d9a3a5963 100644 --- a/include/functions.php +++ b/include/functions.php @@ -4070,4 +4070,25 @@ return $rv; } + function stylesheet_tag($filename) { + $timestamp = filemtime($filename); + + echo "\n"; + } + + function javascript_tag($filename) { + $query = ""; + + if (!(strpos($filename, "?") === FALSE)) { + $query = substr($filename, strpos($filename, "?")+1); + $filename = substr($filename, 0, strpos($filename, "?")); + } + + $timestamp = filemtime($filename); + + if ($query) $timestamp .= "&$query"; + + echo "\n"; + } + ?> -- cgit v1.2.3