Eliminated "/scripts/1" 404 error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[So, let's see if I get through to squirrelmail-users using another
sender address...]

At Freie Universität Berlin we have recently moved our SquirrelMail
installation from the 1.4.22 release to 1.4.32-svn as of 2014-11-05,
from Debian squeeze to wheezy, and to make it complete, on new hardware. :-)

After the move, I have been combing through the error logs to see how i
can reduce the amount of unimportant warnings and errors so we don't
miss the important ones.

Among others[1] I found lots of error messages of this kind:

File does not exist: /server/webmail/www-live/scripts/1, referer:
https://webmail.zedat.fu-berlin.de/src/printer_friendly_main.php

I found that from printer_friendly_main.php, displayHtmlHeader() is
called with wrong parameters. The fourth parameter is expected as an
array of strings specifying JavaScript library load instructions to be
included in the HTML code, but what is passed here is "true", which
results in the "1" that can be seen on the generated page:

<script language="JavaScript" type="text/javascript"
src="/scripts/1"></script>

Now this is easily fixed. This change eliminates that error:

diff --git a/src/printer_friendly_main.php b/src/printer_friendly_main.php
index c5a5e84..128e1e7 100644
--- a/src/printer_friendly_main.php
+++ b/src/printer_friendly_main.php
@@ -32,7 +32,9 @@ if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) ||
     $passed_id= (int) $passed_id;
     $view_unsafe_images = (bool) $_GET['view_unsafe_images'];
 /* end globals */
-    displayHtmlHeader( _("Printer Friendly"), '', false, true );
+    /* change: 4th param should be script libs array or nil, not 'true'
+     * [nickelsen 2015-01-23] */
+    displayHtmlHeader( _("Printer Friendly"), '', false );
     echo '<frameset rows="60, *">' . "\n";
     echo '<frame src="printer_friendly_top.php" name="top_frame" '
         . 'scrolling="no" noresize="noresize" frameborder="0" />' . "\n";


[1] For some reason my work address didn't get through to the
squirrelmail-users list (but, strangely, to squirrelmail-plugins!), so
Paul Lesniewski was already so kind to repost my messages about the
header encoding/charset issue in functions/i18n.php and
AddressBook::full_address(), which should not be statically, but is, on
January 17.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
-----
squirrelmail-users mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-users@xxxxxxxxxxxxxxxxxxxxx
List archives: http://news.gmane.org/gmane.mail.squirrelmail.user
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-users





[Index of Archives]     [Video For Linux]     [Yosemite News]     [Yosemite Photos]     [gtk]     [KDE]     [Cyrus SASL]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux