diff options
Diffstat (limited to 'central/trunk/includes/instadisc.php')
| -rw-r--r-- | central/trunk/includes/instadisc.php | 14 | 
1 files changed, 7 insertions, 7 deletions
| 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) | |||
| 301 | $page_data = curl_exec($c); | 301 | $page_data = curl_exec($c); | 
| 302 | curl_close($c); | 302 | curl_close($c); | 
| 303 | 303 | ||
| 304 | $headers = split("\n", $page_date); | 304 | $headers = split("\n", $page_data); | 
| 305 | foreach ($headers as $name => $value) | 305 | foreach ($headers as $name => $value) | 
| 306 | { | 306 | { | 
| 307 | $header = split(": ", $value); | 307 | $header = split(": ", $value); | 
| 308 | $headerMap[$header[0]] = $header[1]; | 308 | $headerMap[$header[0]] = $header[1]; | 
| 309 | } | 309 | } | 
| 310 | 310 | ||
| 311 | if (isset($header['Subscription'])) | 311 | if (isset($headerMap['Subscription'])) | 
| 312 | { | 312 | { | 
| 313 | if (isset($header['Title'])) | 313 | if (isset($headerMap['Title'])) | 
| 314 | { | 314 | { | 
| 315 | if (isset($header['Category'])) | 315 | if (isset($headerMap['Category'])) | 
| 316 | { | 316 | { | 
| 317 | if (isset($header['Key'])) | 317 | if (isset($headerMap['Key'])) | 
| 318 | { | 318 | { | 
| 319 | if ($header['Key'] == $getcode3['code']) | 319 | if ($headerMap['Key'] == $getcode3['code']) | 
| 320 | { | 320 | { | 
| 321 | $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']) . "\")"; | 321 | $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']) . "\")"; | 
| 322 | $inssub2 = mysql_query($inssub); | 322 | $inssub2 = mysql_query($inssub); | 
| 323 | 323 | ||
| 324 | $delcode = "DELETE FROM pending2 WHERE username = \"" . mysql_real_escape_string($username) . "\" AND url = \"" . mysql_real_escape_string($url) . "\""; | 324 | $delcode = "DELETE FROM pending2 WHERE username = \"" . mysql_real_escape_string($username) . "\" AND url = \"" . mysql_real_escape_string($url) . "\""; | 
