diff options
Diffstat (limited to 'central/trunk/includes')
-rw-r--r-- | central/trunk/includes/instadisc.php | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/central/trunk/includes/instadisc.php b/central/trunk/includes/instadisc.php index d07e53b..6b3d630 100644 --- a/central/trunk/includes/instadisc.php +++ b/central/trunk/includes/instadisc.php | |||
@@ -294,9 +294,6 @@ function instaDisc_addSubscription($username, $url) | |||
294 | $getcode3 = mysql_fetch_array($getcode2); | 294 | $getcode3 = mysql_fetch_array($getcode2); |
295 | if ($getcode3['username'] == $username) | 295 | if ($getcode3['username'] == $username) |
296 | { | 296 | { |
297 | $delcode = "DELETE FROM pending2 WHERE username = \"" . mysql_real_escape_string($username) . "\" AND url = \"" . mysql_real_escape_string($url) . "\""; | ||
298 | $delcode2 = mysql_query($delcode); | ||
299 | |||
300 | $c = curl_init(); | 297 | $c = curl_init(); |
301 | curl_setopt($c, CURLOPT_URL, $url); | 298 | curl_setopt($c, CURLOPT_URL, $url); |
302 | curl_setopt($c, CURLOPT_HEADER, false); | 299 | curl_setopt($c, CURLOPT_HEADER, false); |
@@ -324,15 +321,30 @@ function instaDisc_addSubscription($username, $url) | |||
324 | $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($header['Subscription']) . "\", \"true\", \"" . mysql_real_escape_string($header['Category']) . "\")"; |
325 | $inssub2 = mysql_query($inssub); | 322 | $inssub2 = mysql_query($inssub); |
326 | 323 | ||
327 | return true; | 324 | $delcode = "DELETE FROM pending2 WHERE username = \"" . mysql_real_escape_string($username) . "\" AND url = \"" . mysql_real_escape_string($url) . "\""; |
325 | $delcode2 = mysql_query($delcode); | ||
326 | |||
327 | return 0; | ||
328 | } else { | ||
329 | return 4; | ||
328 | } | 330 | } |
331 | } else { | ||
332 | return 3; | ||
329 | } | 333 | } |
334 | } else { | ||
335 | return 3; | ||
330 | } | 336 | } |
337 | } else { | ||
338 | return 3; | ||
331 | } | 339 | } |
340 | } else { | ||
341 | return 3; | ||
332 | } | 342 | } |
343 | } else { | ||
344 | return 2; | ||
333 | } | 345 | } |
334 | 346 | ||
335 | return false; | 347 | return 1; |
336 | } | 348 | } |
337 | 349 | ||
338 | function instaDisc_listPendingSubscriptions($username) | 350 | function instaDisc_listPendingSubscriptions($username) |