-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshare-topic.php
More file actions
32 lines (21 loc) · 757 Bytes
/
share-topic.php
File metadata and controls
32 lines (21 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
try {
require_once("Sprinkles.php");
$sprink = new Sprinkles();
$topic_id = request_param('id');
if (!$topic_id) die("Internal error: expected id parameter.");
$items = $sprink->topic($topic_id);
if (!$items) die("Internal error: Empty topic $topic_id.");
$topic_head = array_shift($items['replies']);
$smarty->assign('topic_head', $topic_head);
$smarty->assign('topic_id', $topic_id);
$smarty->assign('body_css_id', 'share-topic');
$smarty->assign('current_url', 'share-topic.php?id=' . $topic_id);
$sprink->add_std_hash_elems($smarty);
$smarty->display('share-topic.t');
finish_request('share-topic');
} catch (Exception $e) {
error_log("Exception thrown while preparing page: " . $e->getMessage());
$smarty->display('error.t');
}
?>