Commit: 91f6bf75c16bd4ef12e0fd49f476b0a4cf0eb903 Author: Sherif Ramadan <[email protected]> Thu, 13 Dec 2012 15:38:21 -0500 Parents: 579068f599e650715bdc1f2dd0be988deac5038e Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=91f6bf75c16bd4ef12e0fd49f476b0a4cf0eb903 Log: Fixing minor typo and output_buffering issue with site headers. Changed paths: M manual/vote-note.php Diff: diff --git a/manual/vote-note.php b/manual/vote-note.php index bb5af7a..8aa3acc 100644 --- a/manual/vote-note.php +++ b/manual/vote-note.php @@ -10,6 +10,7 @@ include $_SERVER['DOCUMENT_ROOT'] . '/manual/spam_challenge.php'; // Initialize global variables $error = false; $thankyou = false; +$headerset = false; $BACKpage = htmlspecialchars(isset($_REQUEST['page']) ? $_REQUEST['page'] : ''); $BACKid = htmlspecialchars(isset($_REQUEST['id']) ? $_REQUEST['id'] : ''); $link = "/{$BACKpage}#{$BACKid}"; @@ -100,12 +101,13 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { } } else { - $error = "Invalid request.3"; + $error = "Invalid request."; } } else { // Site header site_header("Vote On User Notes"); + $headerset = true; if (!empty($_REQUEST['id']) && !empty($_REQUEST['page']) && ($N = manual_notes_load($_REQUEST['page'])) && array_key_exists($_REQUEST['id'], $N) && !empty($_REQUEST['vote']) && ($_REQUEST['vote'] === 'up' || $_REQUEST['vote'] === 'down')) { ?> @@ -156,7 +158,10 @@ if ($error) { </p> </div> EOL; -if (!headers_sent()) site_header("Error - Voting"); +if (!$headerset) { + site_header("Error - Voting"); + $headerset = true; +} ?> <div class="container" id="notes-dialog" style="width: 100%; padding-bottom: 15px; margin: auto;"> <div style="width: 100%; margin: auto;"><h1>Voting</h1></div> @@ -194,6 +199,7 @@ if (!headers_sent()) site_header("Error - Voting"); } if ($thankyou) { site_header("Thank you for voting!"); + $headerset = true; ?> <div class="container" id="notes-dialog" style="width: 100%; padding: 15px; margin: auto;"> <h1>Thanks for voting!</h1> -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
