From 311ad398e06cd2eba270ea70ca5a326d03b490f9 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 27 Nov 2014 03:09:22 +0100 Subject: linkshorter now works with 2 domains --- linkshorter/index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'linkshorter/index.php') 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"]) . "."); } -- cgit v1.2.3