Tadashi Okoshi
slash****@users*****
2005年 12月 17日 (土) 02:29:00 JST
Index: affelio/bin/get_content.cgi
diff -u affelio/bin/get_content.cgi:1.24 affelio/bin/get_content.cgi:1.25
--- affelio/bin/get_content.cgi:1.24 Fri Dec 16 18:04:31 2005
+++ affelio/bin/get_content.cgi Sat Dec 17 02:29:00 2005
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# $Id: get_content.cgi,v 1.24 2005/12/16 09:04:31 slash5234 Exp $
+# $Id: get_content.cgi,v 1.25 2005/12/16 17:29:00 slash5234 Exp $
use strict;
@@ -167,6 +167,7 @@
}
+
############################################################################
#Well, after all, who is it?
############################################################################
@@ -218,7 +219,9 @@
############################################################################
if($module eq "core"){
- if($content eq "/profile/profile_face.jpg"){
+ if($content =~ /^\/profile\/profile\_face([0-9a-zA-Z\_]*)\.jpg$/){
+
+ debug_print("get_content: image!");
#Get summarized permission list for the given user
my @list
@@ -232,14 +235,16 @@
my $permission = $list[5] ;
debug_print("get_content: Pic perm: $permission");
+ my $real_filename = $content;
+ $real_filename =~ s|/profile/||;
+
my $actual_file="";
if( $permission ==1)
{
- $actual_file = "$af->{site__user_dir}/profile_face.jpg";
+ $actual_file = "$af->{site__user_dir}/$real_filename";
}else{
$actual_file = "$af->{site__fs_root}/skins/$af->{userpref__skin}/0_face.jpg";
}
- debug_print("/profile/profile_face.jpg => $actual_file");
open(IMG, "< $actual_file");
print "Content-type: image/jpeg\n";
print "Pragma: no-cache\n\n";