mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-12 18:36:29 +00:00
26 lines
461 B
PHP
26 lines
461 B
PHP
<?
|
|
// perform the back end of subscribing to topics
|
|
authorize();
|
|
|
|
if (!empty($LoggedUser['DisableForums'])) {
|
|
error(403);
|
|
}
|
|
|
|
if (!is_number($_GET['topicid'])) {
|
|
error(0);
|
|
}
|
|
|
|
$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");
|
|
list($ForumID) = $DB->next_record();
|
|
if (!Forums::check_forumperm($ForumID)) {
|
|
die();
|
|
}
|
|
|
|
Subscriptions::subscribe($_GET['topicid']);
|