diff options
| author | root | 2014-11-27 03:09:22 +0100 |
|---|---|---|
| committer | root | 2014-11-27 03:09:22 +0100 |
| commit | 311ad398e06cd2eba270ea70ca5a326d03b490f9 (patch) | |
| tree | c409dafe5d0fa0b84c5f08e982b0596587725876 /linkshorter/index.php | |
| parent | 92babb43a2a0041a71b54db35cbc9d2fba908a63 (diff) | |
| download | tools.iamfabulous.de-311ad398e06cd2eba270ea70ca5a326d03b490f9.tar.gz | |
linkshorter now works with 2 domains
Diffstat (limited to 'linkshorter/index.php')
| -rw-r--r-- | linkshorter/index.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/linkshorter/index.php b/linkshorter/index.php index c60bc82..cca4f20 100644 --- a/linkshorter/index.php +++ b/linkshorter/index.php @@ -45,7 +45,7 @@ if ( ! isset($_REQUEST['checkpassword']) || $_REQUEST['checkpassword'] != 1 ) $options["ttl"] = ""; else { if ( ! preg_match( "/^[0-9]+$/", trim($_REQUEST["ttl"]) ) ){ - _do_output("Failure", "Your Lifetime doesn't look like a valid number."); + _do_output("Failure!", "Your Lifetime doesn't look like a valid number."); } $options["ttl"] = $_REQUEST["ttl"]; } @@ -58,20 +58,20 @@ if ( ! isset($_REQUEST['checkpassword']) || $_REQUEST['checkpassword'] != 1 ) $db = new Database(REDIS_CONNECT, REDIS_SELECT); if ( $options["short"] != "" && $db->exists($options["short"]) ) - _do_output("Failure", "Query string '".htmlentities($options["short"])."' already taken. Please choose a different one."); + _do_output("Failure!", "Query string '".htmlentities($options["short"])."' already taken. Please choose a different one."); if ( $options["short"] == "" ) $options["short"] = getToken(); if ( $options["ttl"] != "" ){ if ( ! $db->set($options["short"], json_encode($options), $options["ttl"]) ){ - _do_output("Failure", "Database went away. :("); + _do_output("Failure!", "Database went away. :("); } } else { if ( ! $db->set($options["short"], json_encode($options)) ){ - _do_output("Failure", "Database went away. :("); + _do_output("Failure!", "Database went away. :("); } } - _do_output("Success!", "Your shortlink is " . SHORTDOMAIN . htmlentities($options["short"]) . "."); + _do_output("Success!", "Your short link is " . SHORTDOMAIN . htmlentities($options["short"]) . "."); } |
