-
Bug
-
Resolution: Fixed
-
3.0.4
-
None
-
PHP Environment:
Database:
If you create a topic without viewing it and the auto-prune kicks in or you trigger a prune from the administration the new topic gets deleted immediately.
This seems to be caused because topic_last_view_time seems to be initialized with 0 when the topic is created.
My quick fix to this problem is to replace in functions_admin.php
if ($prune_mode == 'viewed')
|
{
|
$sql_and .= " AND topic_last_view_time < $prune_date";
|
}
|
with:
if ($prune_mode == 'viewed')
|
{
|
$sql_and .= " AND topic_last_view_time > 0";
|
$sql_and .= " AND topic_last_view_time < $prune_date";
|
}
|
If you create a topic without viewing it and the auto-prune kicks in or you trigger a prune from the administration the new topic gets deleted immediately.
This seems to be caused because topic_last_view_time seems to be initialized with 0 when the topic is created.
My quick fix to this problem is to replace in functions_admin.php
if ($prune_mode == 'viewed')
|
{
|
$sql_and .= " AND topic_last_view_time < $prune_date";
|
}
|
with:
if ($prune_mode == 'viewed')
|
{
|
$sql_and .= " AND topic_last_view_time > 0";
|
$sql_and .= " AND topic_last_view_time < $prune_date";
|
}
|
Bug #16565 seems to be related to this. But my forum was never converted.
Gregor seems to be related to this. But my forum was never converted.
Gregor