mirror of
https://github.com/gamaio/unps.us-Shortener.git
synced 2024-11-01 00:37:47 +00:00
Add http:// to links that aren't http or https
This is for people who forget that first part of the url
This commit is contained in:
parent
4807406cdf
commit
d3d8302f94
@ -29,6 +29,9 @@
|
||||
switch ($_POST['linkmod']){
|
||||
case "shorten":
|
||||
$short = sanitize($_POST['link']);
|
||||
if(strpos($short, "http://") === false && strpos($short, "https://") === false){
|
||||
$short = "http://$short";
|
||||
}
|
||||
echo $unpsAPI->shorten($apidb, $key, $shortdb, $short);
|
||||
break;
|
||||
case "dellink":
|
||||
|
Loading…
Reference in New Issue
Block a user