[svn:p5ee] r9703 - p5ee/trunk/App-Widget/lib/App

[email protected]
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
Author: spadkins
Date: Thu Jul  5 12:15:59 2007
New Revision: 9703

Modified:
   p5ee/trunk/App-Widget/lib/App/Widget.pm

Log:
get rid of default pink error message at the top of the page (it is often redundant with what the application shows)

Modified: p5ee/trunk/App-Widget/lib/App/Widget.pm
==============================================================================
--- p5ee/trunk/App-Widget/lib/App/Widget.pm	(original)
+++ p5ee/trunk/App-Widget/lib/App/Widget.pm	Thu Jul  5 12:15:59 2007
@@ -211,24 +211,8 @@
     my $event_placeholder = '<input type="hidden" id="app-event-aux" name="app.event" value="">';
     my $onload_support    = '<input type="hidden" id="app-loaded" name="app.loaded" value="">';
 
-    my $messages = $context->get_messages() || "";
-    if ($messages) {
-        $messages =~ s{&}{&amp;}gso;
-        $messages =~ s{<}{&lt;}gso;
-        $messages =~ s{>}{&gt;}gso;
-        $messages =~ s{\"}{&quot;}gso;
-        $messages =~ s{\n}{<br>\n}gso;
-        $messages = <<EOF;
-<table width="100%">
-  <tr>
-    <td bgcolor="#ffaaaa">
-$messages
-    </td>
-  </tr>
-</table>
-EOF
-        delete $self->{messages};
-    }
+    $context->get_messages();  # apparently, this also clears messages
+    delete $self->{messages};
 
     my $content = <<EOF;
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
@@ -237,7 +221,7 @@
 <title>${title}</title>
 $context_head</head>
 <body${bodyoptions}>
-$messages<form method="POST" id="mainform">
+<form method="POST" id="mainform">
 $session_html
 $event_placeholder
 $onload_support
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.