Add add and fix lots of minor staff: topic watching, a:target thingie, etc
This commit is contained in:
@@ -645,6 +645,25 @@ function Display()
|
||||
// Set the callback. (do you REALIZE how much memory all the messages would take?!?)
|
||||
$context['get_message'] = 'prepareDisplayContext';
|
||||
|
||||
// Check if the topic is been watched by user
|
||||
if ($user_info['is_guest']) {
|
||||
$context['is_watched'] == false;
|
||||
} else {
|
||||
$result = db_query("
|
||||
SELECT watch FROM {$db_prefix}watch_topics
|
||||
WHERE
|
||||
ID_MEMBER='{$ID_MEMBER}' AND
|
||||
ID_TOPIC='{$topic}'",
|
||||
__FILE__, __LINE__);
|
||||
if(mysql_num_rows($result) == 0) {
|
||||
$context['is_watched'] = false;
|
||||
} else {
|
||||
list($w) = mysql_fetch_row($result);
|
||||
$context['is_watched'] = (bool) $w;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Basic settings.... may be converted over at some point.
|
||||
$context['allow_hide_email'] = !empty($modSettings['allow_hideEmail']) || ($user_info['is_guest'] && !empty($modSettings['guest_hideContacts']));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user