diff --git a/src/add_share.php b/src/add_share.php
index 42f0bbf..a6e79e0 100644
--- a/src/add_share.php
+++ b/src/add_share.php
@@ -43,5 +43,5 @@ $new_share = [
"expiration" => $_POST['expiration'],
"expires" => current_date_offset($_POST['expiration'])
];
-$new_share["link"] = "./read.php?id=" . gen_identifier($new_share);
+$new_share["link"] = "read.php?id=" . gen_identifier($new_share);
?>
diff --git a/src/common.php b/src/common.php
index ac9ea9f..563b2fb 100644
--- a/src/common.php
+++ b/src/common.php
@@ -211,6 +211,13 @@ function error_code($int)
exit();
}
+function absolute_link($relpath)
+{
+ $scheme = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
+ $base_uri = $_SERVER['SERVER_NAME'] . dirname($_SERVER['REQUEST_URI']);
+ return $scheme . $base_uri . $relpath;
+}
+
function _($var)
{
print($var);
diff --git a/src/new_share_template.php b/src/new_share_template.php
index 6d7cf1e..52f92aa 100644
--- a/src/new_share_template.php
+++ b/src/new_share_template.php
@@ -1,4 +1,4 @@
-Share " with following link : ">
+Share " with following link : ">