Tadashi Okoshi
slash****@users*****
2005年 7月 3日 (日) 07:12:47 JST
Index: affelio/lib/Affelio/App/Admin/Messaging.pm
diff -u affelio/lib/Affelio/App/Admin/Messaging.pm:1.13 affelio/lib/Affelio/App/Admin/Messaging.pm:1.14
--- affelio/lib/Affelio/App/Admin/Messaging.pm:1.13 Fri Jul 1 16:56:31 2005
+++ affelio/lib/Affelio/App/Admin/Messaging.pm Sun Jul 3 07:12:47 2005
@@ -14,7 +14,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: Messaging.pm,v 1.13 2005/07/01 07:56:31 slash5234 Exp $
+# $Id: Messaging.pm,v 1.14 2005/07/02 22:12:47 slash5234 Exp $
package Affelio::App::Admin::Messaging;
{
@@ -217,6 +217,24 @@
$msg_body =~ s/\r/\n/g;
$msg_body =~ s/\n/<BR>/g;
+ ###############
+ #UserToUser (inter-Affelio massaging
+ ###############
+ #XXX
+ # This part is quite nasty. Since $msg_from is using format
+ # like '<A HREF="url">nickname</A>' due to a weird DB problem,
+ # We have to change the URL to the one through outgoing.cgi
+ # by using ad-hoc regexes....
+ if($msg_type =~ /UserToUser/){
+ $msg_from =~ /<A HREF="(.*)">(.+)<\/A>/;
+ debug_print("show_message_list: \t[$1]");
+ debug_print("show_message_list: \t[$2]");
+
+ $msg_from = '<A HREF="' . $af->{site__web_root} . '/outgoing.cgi?dest_url=' . $1 . '" target="_blank">' . $2 . '</A>';
+ }
+ ###########
+
+
$$output_ref{"msg_timestamp"} = $msg_timestamp;
$$output_ref{"msg_title"} = $msg_title;
$$output_ref{"msg_from"} = $msg_from;
@@ -253,6 +271,24 @@
debug_print("show_message_list: [$msg_body]");
debug_print("show_message_list: [$msg_timestamp]");
+ ###############
+ #UserToUser (inter-Affelio massaging
+ ###############
+ #XXX
+ # This part is quite nasty. Since $msg_from is using format
+ # like '<A HREF="url">nickname</A>' due to a weird DB problem,
+ # We have to change the URL to the one through outgoing.cgi
+ # by using ad-hoc regexes....
+ if($msg_type =~ /UserToUser/){
+ $msg_from =~ /<A HREF="(.*)">(.+)<\/A>/;
+ debug_print("show_message_list: \t[$1]");
+ debug_print("show_message_list: \t[$2]");
+
+ $msg_from = '<A HREF="' . $af->{site__web_root} . '/outgoing.cgi?dest_url=' . $1 . '" target="_blank">' . $2 . '</A>';
+ }
+ ###########
+
+
my $linkurl = "$af->{site__web_root}/admin.cgi?mode=messages&action=show&mid=$msg_mid";
push(@ret_messages,
{