auto-lock.php wrote: return array ('topics' => $pruned_topics);
Possible Correction wrote: return array ('topics' => $locked_topics);
Code: Select all
$sql = "SELECT t.topic_id
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
WHERE t.forum_id = $forum_id
$lock_all
AND ( p.post_id = t.topic_last_post_id
OR t.topic_last_post_id = 0 )";
if ( $lock_date != '' )
{
$sql .= " AND p.post_time < $lock_date";
}
Code: Select all
$sql = "SELECT t.topic_id
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
WHERE t.forum_id = $forum_id
$lock_all
AND p.post_id = t.topic_last_post_id" .
( $lock_date != '' ? " AND p.post_time < $lock_date" : '' ) .
" UNION
SELECT t.topic_id
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
WHERE t.forum_id = $forum_id
$lock_all
AND t.topic_last_post_id = 0" .
( $lock_date != '' ? " AND p.post_time < $lock_date" : '' );
Code: Select all
$sql = "SELECT t.topic_id
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
WHERE t.forum_id = $forum_id
$lock_all
AND t.topic_last_post_id = 0 ";
if ( $lock_date != '' )
{
$sql .= " AND p.post_time < $lock_date";
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain lists of topics to lock', '', __LINE__, __FILE__, $sql);
}
$sql_topics = '';
while( $row = $db->sql_fetchrow($result) )
{
$sql_topics .= ( ( $sql_topics != '' ) ? ', ' : '' ) . $row['topic_id'];
}
$db->sql_freeresult($result);
$sql = "SELECT t.topic_id
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
WHERE t.forum_id = $forum_id
$lock_all
AND p.post_id = t.topic_last_post_id ";
if ( $lock_date != '' )
{
$sql .= " AND p.post_time < $lock_date";
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain lists of topics to lock', '', __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
$sql_topics .= ( ( $sql_topics != '' ) ? ', ' : '' ) . $row['topic_id'];
}
$db->sql_freeresult($result);
bluesomething wrote: i've installed the mod. Everything looks fine, but when I set the enable forum autolocking to yes in the admin panel configuration and then click ok, it will be reset to no.
anyone know how i solve this?
Code: Select all
Parse error: parse error, unexpected T_STRING in /var/www/asgard/admin/admin_forums.php on line 506
Code: Select all
505: $sql = "UPDATE " . FORUMS_TABLE . "
SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", forum_view_threshold = " . intval($HTTP_POST_VARS['forumviewthreshold']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . ", auto_lock_enable = " . intval($HTTP_POST_VARS['auto_lock_enable'])
506: WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL])
Code: Select all
505: $sql = "UPDATE " . FORUMS_TABLE . "
SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", forum_view_threshold = " . intval($HTTP_POST_VARS['forumviewthreshold']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
506: WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL])