From ad9f73b06a36a832eb88358165fa1f3644581381 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 26 Aug 2008 20:56:53 +0000 Subject: Central: Fixed a few typos/errors [15]. Refs #25 --- central/trunk/includes/instadisc.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'central/trunk/includes') diff --git a/central/trunk/includes/instadisc.php b/central/trunk/includes/instadisc.php index 6b3d630..d00893b 100644 --- a/central/trunk/includes/instadisc.php +++ b/central/trunk/includes/instadisc.php @@ -301,24 +301,24 @@ function instaDisc_addSubscription($username, $url) $page_data = curl_exec($c); curl_close($c); - $headers = split("\n", $page_date); + $headers = split("\n", $page_data); foreach ($headers as $name => $value) { $header = split(": ", $value); $headerMap[$header[0]] = $header[1]; } - if (isset($header['Subscription'])) + if (isset($headerMap['Subscription'])) { - if (isset($header['Title'])) + if (isset($headerMap['Title'])) { - if (isset($header['Category'])) + if (isset($headerMap['Category'])) { - if (isset($header['Key'])) + if (isset($headerMap['Key'])) { - if ($header['Key'] == $getcode3['code']) + if ($headerMap['Key'] == $getcode3['code']) { - $inssub = "INSERT INTO subscriptions (username,url,owner,category) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string($header['Subscription']) . "\", \"true\", \"" . mysql_real_escape_string($header['Category']) . "\")"; + $inssub = "INSERT INTO subscriptions (username,url,owner,category) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string($headerMap['Subscription']) . "\", \"true\", \"" . mysql_real_escape_string($headerMap['Category']) . "\")"; $inssub2 = mysql_query($inssub); $delcode = "DELETE FROM pending2 WHERE username = \"" . mysql_real_escape_string($username) . "\" AND url = \"" . mysql_real_escape_string($url) . "\""; -- cgit 1.4.1