View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004584 | Composr | core_cns | public | 2021-02-06 01:48 | 2021-02-06 02:00 |
Reporter | Guest | Assigned To | |||
Severity | Feature-request | ||||
Status | non-assigned | Resolution | open | ||
Product Version | |||||
Fixed in Version | |||||
Summary | 0004584: Script to delete old empty comment topics | ||||
Description | If someone decides to disable the previously-enabled strong_forum_tie option, they will be left over with lots of empty comment topics. Make a Commandr command to clean this up. | ||||
Steps To Reproduce | Basic query would be like this. set_option('is_on_strong_forum_tie', '0'); $db = $GLOBALS['FORUM_DB']; $db->query('DELETE FROM ' . $db->get_table_prefix() . 'f_topics WHERE t_cache_num_posts=1 AND t_description LIKE \'Comment: %\''); $db->query('DELETE FROM ' . $db->get_table_prefix() . 'f_posts p WHERE NOT EXISTS (SELECT * FROM cms_f_topics t WHERE t.id=p.p_topic_id)'); require_lang('cns'); require_code('tasks'); call_user_func_array__long_task(do_lang('CACHE_FORUMS'), null, 'cns_recache'); Should not assume 'Comment' though, needs to check language string. Also should not assume multi-lang-content is disabled, there will be language strings to cleanup. | ||||
Tags | No tags attached. | ||||
Time estimation (hours) | 1 | ||||
Sponsorship open | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2021-02-06 01:48 | Guest | New Issue | |
2021-02-06 01:51 | Chris Graham | Steps to Reproduce Updated | View Revisions |
2021-02-06 02:00 | Chris Graham | Steps to Reproduce Updated | View Revisions |