Created
April 5, 2013 14:55
-
-
Save joshuaadickerson/5319926 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// When was the last time this topic was replied to? Should we warn them about it? | |
$request = $smcFunc['db_query']('', ' | |
SELECT poster_time | |
FROM {db_prefix}messages | |
WHERE id_msg = {int:id_last_msg} | |
LIMIT 1', | |
array( | |
'id_last_msg' => $topicinfo['id_last_msg'], | |
) | |
); | |
list ($lastPostTime) = $smcFunc['db_fetch_row']($request); | |
$smcFunc['db_free_result']($request); | |
$context['oldTopicError'] = !empty($modSettings['oldTopicDays']) && $lastPostTime + $modSettings['oldTopicDays'] * 86400 < time() && empty($topicinfo['is_sticky']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment