From 0cf0bca9495528ce17d544d8baa840fddcb8cf86 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 11 Jun 2008 11:23:09 +0000 Subject: Fixed icon cache issue. git-svn-id: https://code.elgg.org/elgg/trunk@862 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/profile/actions/iconupload.php | 2 ++ mod/profile/icon.php | 2 ++ mod/profile/views/default/profile/icon.php | 8 +++++++- 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/profile/actions/iconupload.php b/mod/profile/actions/iconupload.php index a1e29b255..7c7e95f37 100644 --- a/mod/profile/actions/iconupload.php +++ b/mod/profile/actions/iconupload.php @@ -43,6 +43,8 @@ $filehandler->write($small); $filehandler->close(); + $_SESSION['user']->icontime = time(); + system_message(elgg_echo("profile:icon:uploaded")); } else { diff --git a/mod/profile/icon.php b/mod/profile/icon.php index efabe1d6d..65723a164 100644 --- a/mod/profile/icon.php +++ b/mod/profile/icon.php @@ -44,6 +44,8 @@ } header("Content-type: image/jpeg"); + header("Pragma: public"); + header("Cache-Control: public"); echo $contents; ?> \ No newline at end of file diff --git a/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php index 036786715..3e96e7d97 100644 --- a/mod/profile/views/default/profile/icon.php +++ b/mod/profile/views/default/profile/icon.php @@ -19,6 +19,12 @@ $name = htmlentities($vars['entity']->name); $username = $vars['entity']->username; + + if ($icontime = $vars['entity']->icontime) { + $icontime = "{$icontime}"; + } else { + $icontime = "default"; + } // Get size if (!in_array($vars['size'],array('small','medium','large','tiny'))) @@ -33,4 +39,4 @@ ?> - title="" /> \ No newline at end of file + title="" /> \ No newline at end of file -- cgit v1.2.3