affichage du lien complet lors de l'ajout du partage'
This commit is contained in:
parent
20a52c8128
commit
7b8574e986
@ -43,5 +43,5 @@ $new_share = [
|
|||||||
"expiration" => $_POST['expiration'],
|
"expiration" => $_POST['expiration'],
|
||||||
"expires" => current_date_offset($_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);
|
||||||
?>
|
?>
|
||||||
|
@ -211,6 +211,13 @@ function error_code($int)
|
|||||||
exit();
|
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)
|
function _($var)
|
||||||
{
|
{
|
||||||
print($var);
|
print($var);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Share "<?php _($new_share["dir"]) ?> with following link : <a href="<?php _($new_share["link"]) ?>"><?php _($new_share["link"]) ?></a>
|
Share "<?php _($new_share["dir"]) ?> with following link : <a href="./<?php _($new_share["link"]) ?>"><?php _(absolute_link($new_share["link"])) ?></a>
|
||||||
|
|
||||||
</br>
|
</br>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user