From: tokul Date: Tue, 7 Sep 2004 13:54:11 +0000 (+0000) Subject: removed require_once() calls that are already loaded by include/validate.php X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=b5cd24a854e0e8dad5e9857cc5f3d8437ffcb420 removed require_once() calls that are already loaded by include/validate.php converted $_GET's to sqgetGlobalVar's and added validation. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8032 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/printer_friendly_bottom.php b/src/printer_friendly_bottom.php index 7e022754..a4888333 100644 --- a/src/printer_friendly_bottom.php +++ b/src/printer_friendly_bottom.php @@ -23,12 +23,7 @@ define('SM_PATH','../'); /* SquirrelMail required files. */ require_once(SM_PATH . 'include/validate.php'); -require_once(SM_PATH . 'functions/strings.php'); -require_once(SM_PATH . 'config/config.php'); -require_once(SM_PATH . 'include/load_prefs.php'); require_once(SM_PATH . 'functions/imap.php'); -require_once(SM_PATH . 'functions/page_header.php'); -require_once(SM_PATH . 'functions/html.php'); /* get some of these globals */ sqgetGlobalVar('username', $username, SQ_SESSION); @@ -43,7 +38,7 @@ if (! sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET) ) { } /* end globals */ -$pf_cleandisplay = getPref($data_dir, $username, 'pf_cleandisplay'); +$pf_cleandisplay = getPref($data_dir, $username, 'pf_cleandisplay', false); $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); $mbx_response = sqimap_mailbox_select($imapConnection, $mailbox); if (isset($messages[$mbx_response['UIDVALIDITY']][$passed_id])) { @@ -86,7 +81,7 @@ if ($ent_ar[0] != '') { /* now, if they choose to, we clean up the display a bit... */ -if ( empty($pf_cleandisplay) || $pf_cleandisplay != 'no' ) { +if ($pf_cleandisplay) { $num_leading_spaces = 9; // nine leading spaces for indentation @@ -155,7 +150,16 @@ echo ' \ No newline at end of file diff --git a/src/printer_friendly_main.php b/src/printer_friendly_main.php index b8493e23..37320c28 100644 --- a/src/printer_friendly_main.php +++ b/src/printer_friendly_main.php @@ -1,11 +1,9 @@ ' . "\n"; + echo '' . "\n"; + echo '' . "\n"; + echo "\n"; +} ?> - - - - diff --git a/src/printer_friendly_top.php b/src/printer_friendly_top.php index c7510b7f..fe6c1dc6 100644 --- a/src/printer_friendly_top.php +++ b/src/printer_friendly_top.php @@ -1,14 +1,12 @@ \n".