From eb6b0bd5e7640872c9ed07eda6f67ce9825f19ef Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 16 Feb 2009 18:14:48 +0000 Subject: Icondirect now falls back on the cached default view git-svn-id: https://code.elgg.org/elgg/trunk@2772 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/profile/icondirect.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'mod/profile') diff --git a/mod/profile/icondirect.php b/mod/profile/icondirect.php index 4d20de149..ce2cc4785 100644 --- a/mod/profile/icondirect.php +++ b/mod/profile/icondirect.php @@ -48,8 +48,14 @@ } if (empty($contents)) { - global $CONFIG; - $contents = @file_get_contents(dirname(__FILE__) . "/graphics/default{$size}.jpg"); + global $CONFIG, $viewinput; + $viewinput['view'] = 'icon/user/default/'.$size; + ob_start(); + include(dirname(dirname(dirname(__FILE__))).'/simplecache/view.php'); + $loc = ob_get_clean(); + header('Location: ' . $loc); + exit; + //$contents = @file_get_contents(dirname(__FILE__) . "/graphics/default{$size}.jpg"); } -- cgit v1.2.3