blob: 9cfad8d126aac015af2c81cb127e23643e55ffb1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
$url = FULL_BASE_URL . $html->url("/addon/{$addon_id}");
$description = $html->truncateChars(250, $description);
$title = $share_title;
// Grab the URL template for the link sharing service and fill in the
// placeholders with the strings composed above.
$link_data = compact('url', 'title', 'description');
foreach ($link_data as $name => $value) {
$service_url = str_replace(
'{'.strtoupper($name).'}',
rawurlencode($value),
$service_url
);
}
// Finally, bounce the user off to the populated sharing URL.
header('HTTP/1.1 302 Found');
header('Location: ' . $service_url);
exit;
?>
|