From 8f93ff5aea99ca98693a47d3f09043f65dee9ac2 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 1 May 2012 22:03:05 +0200 Subject: use function to generate links to css files Signed-off-by: Florian Pritz --- application/helpers/filebin_helper.php | 11 +++++++++++ application/views/file/header.php | 2 +- application/views/file/html_header.php | 4 ++-- application/views/file/upload_form.php | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) (limited to 'application') diff --git a/application/helpers/filebin_helper.php b/application/helpers/filebin_helper.php index ac09da7d2..4c1423725 100644 --- a/application/helpers/filebin_helper.php +++ b/application/helpers/filebin_helper.php @@ -201,4 +201,15 @@ function random_alphanum($min_length, $max_length = null) return $random; } +function link_with_mtime($file) +{ + $link = base_url($file); + + if (file_exists(FCPATH.$file)) { + $link .= "?".filemtime(FCPATH.$file); + } + + return $link; +} + # vim: set noet: diff --git a/application/views/file/header.php b/application/views/file/header.php index ca540c805..733c6788e 100644 --- a/application/views/file/header.php +++ b/application/views/file/header.php @@ -3,7 +3,7 @@ <?php echo isset($title) ? $title : ''; ?> - " media="screen" /> + " media="screen" /> diff --git a/application/views/file/html_header.php b/application/views/file/html_header.php index 284844410..b2c49c3b2 100644 --- a/application/views/file/html_header.php +++ b/application/views/file/html_header.php @@ -2,8 +2,8 @@ <?php echo $title; ?> - " /> - " /> + " /> + " />
diff --git a/application/views/file/upload_form.php b/application/views/file/upload_form.php index e0bdef935..f4d325e0b 100644 --- a/application/views/file/upload_form.php +++ b/application/views/file/upload_form.php @@ -18,7 +18,7 @@ var max_upload_size = ""; /* ]]> */ - +
You have to to be able to upload/paste. -- cgit v1.2.3-24-g4f1b