From 745da10a479f97893741b171defcd0c9c6c8143c Mon Sep 17 00:00:00 2001 From: root Date: Mon, 22 Sep 2008 15:24:34 +0000 Subject: [PATCH] Improved register_globals --- www/advertising.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/www/advertising.php b/www/advertising.php index 3d7c639..0e7848b 100644 --- a/www/advertising.php +++ b/www/advertising.php @@ -27,8 +27,8 @@ $id = intval($_REQUEST['id']); if($id == 2) $id = 0; - $oldid = intval($_POST['oldid']); - $process = $_POST['process']; + $oldid = array_key_exists('oldid',$_POST)?intval($_POST['oldid']):0; + $process = array_key_exists('process',$_POST)?$_POST['process']:""; loadem("account"); $errmsg = ""; @@ -48,24 +48,24 @@ { $id = 1; $errmsg .= _("You can only place an advertisement for up to 12 months.
"); - unset($process); - unset($oldid); + $process=""; + $oldid=0; } if(strlen($title) <= 5) { $id = 1; $errmsg .= _("Link title was too short.
"); - unset($process); - unset($oldid); + $process=""; + $oldid=0; } if(strlen($link) <= 10) { $id = 1; $errmsg .= _("Link URI was too short.
"); - unset($process); - unset($oldid); + $process=""; + $oldid=0; } }