Make links compatible more compatible with last commit

This commit is contained in:
alopexc0de 2014-05-07 19:23:53 -05:00
parent 8112bfa43e
commit fd4cda1f09
1 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ class api{
if($result = $sdb->query($sql)){ if($result = $sdb->query($sql)){
if($row = $result->fetch_assoc()){ if($row = $result->fetch_assoc()){
$short = $row['shortlink']; $short = $row['shortlink'];
return "<div id=\"error\">Existing link: <a onclick=\"copyToClipboard('http://unps.us/?$short');\" href=\"http://unps.us/?$short\" target=\"$short\">http://unps.us/?$short</a></div>"; return "<div id=\"error\">Existing link: <a onclick=\"copyToClipboard('http://unps.us/$short');\" href=\"http://unps.us/$short\" target=\"$short\">http://unps.us/?$short</a></div>";
} }
} }
if(checkRemoteFile($link) !== true) return "<div id=\"error\">Dead Link: $link</div>"; if(checkRemoteFile($link) !== true) return "<div id=\"error\">Dead Link: $link</div>";
@ -70,7 +70,7 @@ class api{
else: $sql = "INSERT INTO `links` (link, shortlink, dpass) VALUES ('$link', '$short', '$apikey')"; else: $sql = "INSERT INTO `links` (link, shortlink, dpass) VALUES ('$link', '$short', '$apikey')";
endif; endif;
if($result = $sdb->query($sql)): return "<div id=\"success\">Shortened: <a onclick=\"copyToClipboard('http://unps.us/?$short');\" href=\"http://unps.us/?$short\" target=\"$short\">http://unps.us/?$short</a>"; if($result = $sdb->query($sql)): return "<div id=\"success\">Shortened: <a onclick=\"copyToClipboard('http://unps.us/$short');\" href=\"http://unps.us/$short\" target=\"$short\">http://unps.us/?$short</a>";
else: return '<div id="error">ERROR: ['.$sdb->error.']</div>'; else: return '<div id="error">ERROR: ['.$sdb->error.']</div>';
endif; endif;
} }