Gazelle/sections/userhistory/thread_subscribe.php

26 lines
461 B
PHP
Raw Permalink Normal View History

2011-03-28 14:21:28 +00:00
<?
// perform the back end of subscribing to topics
authorize();
2013-04-13 08:00:19 +00:00
if (!empty($LoggedUser['DisableForums'])) {
2011-03-28 14:21:28 +00:00
error(403);
}
2013-04-13 08:00:19 +00:00
if (!is_number($_GET['topicid'])) {
2011-03-28 14:21:28 +00:00
error(0);
}
2013-08-28 23:08:41 +00:00
$TopicID = (int)$_GET['topicid'];
$DB->query("
SELECT f.ID
FROM forums_topics AS t
JOIN forums AS f ON f.ID = t.ForumID
WHERE t.ID = $TopicID");
2011-10-12 08:00:15 +00:00
list($ForumID) = $DB->next_record();
2013-08-28 23:08:41 +00:00
if (!Forums::check_forumperm($ForumID)) {
2011-03-28 14:21:28 +00:00
die();
}
2013-08-28 23:08:41 +00:00
Subscriptions::subscribe($_GET['topicid']);