logo       

CVS: squirrelmail/src view_text.php,1.40,1.41: msg#00162

Subject: CVS: squirrelmail/src view_text.php,1.40,1.41
Update of /cvsroot/squirrelmail/squirrelmail/src
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29583/src

Modified Files:
        view_text.php 
Log Message:
Provide View Unsafe Images link on viewing a text/html attachment.
Thanks `Bicster'


Index: view_text.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/src/view_text.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -w -r1.40 -r1.41
--- view_text.php       5 Aug 2006 14:39:17 -0000       1.40
+++ view_text.php       21 Aug 2006 19:34:27 -0000      1.41
@@ -48,6 +48,9 @@
 $msg_url   = 'read_body.php?' . $QUERY_STRING;
 $msg_url   = set_url_var($msg_url, 'ent_id', 0);
 $dwnld_url = '../src/download.php?' . $QUERY_STRING . '&absolute_dl=true';
+$unsafe_url = 'view_text.php?' . $QUERY_STRING;
+$unsafe_url = set_url_var($unsafe_url, 'view_unsafe_images', 1);
+
 
 $body = mime_fetch_body($imapConnection, $passed_id, $ent_id);
 $body = decodeBody($body, $encoding);
@@ -62,10 +65,12 @@
 }
 
 if ($type1 == 'html' || (isset($override_type1) &&  $override_type1 == 
'html')) {
+    $ishtml = TRUE;
     $body = MagicHTML( $body, $passed_id, $message, $mailbox);
     // html attachment with character set information
-    if (! empty($charset))
+    if (! empty($charset)) {
         $body = charset_decode($charset,$body,false,true);
+    }
 } else {
     translateText($body, $wrap_at, $charset);
 }
@@ -80,6 +85,9 @@
 ?>
 </b></td><tr><tr><td><div style="text-align: center;">
 <?php
+if ( $ishtml ) {
+    echo '<a href="' . $unsafe_url . '">' . _("View Unsafe Images") . '</a> | 
';
+}
 echo '<a href="' . $dwnld_url . '">' . _("Download this as a file") . '</a>';
 ?>
 </div><br />


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe