From 7b1b9e6b9b91db3fcfb4f252b7de6fe809ac533b Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 24 Feb 2009 14:45:28 +0000 Subject: Default icons are preserved. git-svn-id: https://code.elgg.org/elgg/trunk@2922 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/profile/icon.php | 5 ++++- mod/profile/icondirect.php | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'mod/profile') diff --git a/mod/profile/icon.php b/mod/profile/icon.php index 347ace505..38a9dc1b2 100644 --- a/mod/profile/icon.php +++ b/mod/profile/icon.php @@ -39,7 +39,10 @@ if (!$success) { global $CONFIG; - $contents = @file_get_contents($CONFIG->pluginspath . "profile/graphics/default{$size}.jpg"); + $path = elgg_view('icon/user/default/'.$size); + header("Location: {$path}"); + exit; + //$contents = @file_get_contents($CONFIG->pluginspath . "profile/graphics/default{$size}.jpg"); } diff --git a/mod/profile/icondirect.php b/mod/profile/icondirect.php index 497420f55..40bfdf98a 100644 --- a/mod/profile/icondirect.php +++ b/mod/profile/icondirect.php @@ -82,6 +82,7 @@ ob_start(); include(dirname(dirname(dirname(__FILE__))).'/simplecache/view.php'); $loc = ob_get_clean(); + echo $loc; header('Location: ' . $loc); exit; //$contents = @file_get_contents(dirname(__FILE__) . "/graphics/default{$size}.jpg"); @@ -95,6 +96,9 @@ } } else { mysql_close($mysql_dblink); + require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); + set_input('username',$username); + set_input('size',$size); require_once(dirname(__FILE__).'/icon.php'); } ?> \ No newline at end of file -- cgit v1.2.3