cvs: pearweb /public_html wishlist.php

From: Date: Thu, 08 May 2008 18:47:37 +0000
Subject: cvs: pearweb /public_html wishlist.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-7526@lists.php.net to get a copy of this message
dufuz Thu May 8 18:47:37 2008 UTC Modified files: /pearweb/public_html wishlist.php Log: $user is never set better error msg cosmetics http://cvs.php.net/viewvc.cgi/pearweb/public_html/wishlist.php?r1=1.6&r2=1.7&diff_format=u Index: pearweb/public_html/wishlist.php diff -u pearweb/public_html/wishlist.php:1.6 pearweb/public_html/wishlist.php:1.7 --- pearweb/public_html/wishlist.php:1.6 Sat Dec 29 00:06:01 2007 +++ pearweb/public_html/wishlist.php Thu May 8 18:47:37 2008 @@ -15,11 +15,10 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: wishlist.php,v 1.6 2007/12/29 00:06:01 dufuz Exp $ + $Id: wishlist.php,v 1.7 2008/05/08 18:47:37 dufuz Exp $ */ -if (empty($user)) { - $user = @$_GET['handle']; -} + +$user = @$_GET['handle']; if (empty($user)) { $user = basename($_SERVER['PATH_INFO']); } @@ -27,9 +26,8 @@ PEAR::setErrorHandling(PEAR_ERROR_RETURN); $url = $dbh->getOne('SELECT wishlist FROM users WHERE handle = ?', array($user)); if (empty($url) || PEAR::isError($url)) { - header("HTTP/1.0 404 Not found"); - die("<h1>User not found</h1>\n"); + header('HTTP/1.0 404 Not found'); + die("<h1>User not found or has no wishlist</h1>\n"); } -header("Location: $url"); -printf("<a href=\"%s\">click here to go to %s's wishlist</a>", $url, $user); \ No newline at end of file +header('Location: ' . $url); \ No newline at end of file

« previous php.pear.core (#7526) next »