Fix for delImage and editImg

This commit is contained in:
Arctic Code 2013-07-24 19:09:46 -05:00
parent f1607ae667
commit 2ce9fc4bf5

View File

@ -104,6 +104,7 @@ class api{
if(!$result = $sdb->query($sql)) return 'ERROR: ['.$sdb->error.']'; if(!$result = $sdb->query($sql)) return 'ERROR: ['.$sdb->error.']';
return "Reported $link. Please check back in a day or two"; return "Reported $link. Please check back in a day or two";
} }
// End Short, begin image host // End Short, begin image host
function upImage($apidb, $apikey, $idb, $username, $comment, $tags, $private, $imgdata){ function upImage($apidb, $apikey, $idb, $username, $comment, $tags, $private, $imgdata){
@ -179,7 +180,7 @@ class api{
$apisql = "SELECT * FROM `users` WHERE `key` = '$apikey' LIMIT 1;"; $apisql = "SELECT * FROM `users` WHERE `key` = '$apikey' LIMIT 1;";
if(!$result = $apidb->query($apisql)) return 'ERROR: ['.$apidb->error.']'; if(!$result = $apidb->query($apisql)) return 'ERROR: ['.$apidb->error.']';
if($row = $result->fetch_assoc()){ if($row = $result->fetch_assoc()){
$canImg = $row['short']; $canImg = $row['image'];
$name = $row['name']; $name = $row['name'];
$name = addslashes($name); $name = addslashes($name);
@ -203,7 +204,7 @@ class api{
$apisql = "SELECT * FROM `users` WHERE `key` = '$apikey' LIMIT 1;"; $apisql = "SELECT * FROM `users` WHERE `key` = '$apikey' LIMIT 1;";
if(!$result = $apidb->query($apisql)) return 'ERROR: ['.$apidb->error.']'; if(!$result = $apidb->query($apisql)) return 'ERROR: ['.$apidb->error.']';
if($row = $result->fetch_assoc()){ if($row = $result->fetch_assoc()){
$canImg = $row['short']; $canImg = $row['image'];
$name = $row['name']; $name = $row['name'];
$name = addslashes($name); $name = addslashes($name);