MyBB Community Forums

Full Version: Delete old warning logs?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can I delete old warning logs in AdminCP? Thank you for your help.
You can't - these "logs" are read from actual warning data in the database, so removing them would also remove warnings.

The only solution is to edit the file that displays admin logs - below this line: https://github.com/mybb/mybb/blob/featur...g.php#L250 you can add something like this:
$where_sql .= ' AND w.dateline > '.(TIME_NOW - 2592000); //60*60*24*30 = 2592000 = 30 days
@Destroy666
I appreciate your suggestion but suppressing the display isn't what I'm after.

Removing the warning would be fine with me if I could also remove the log from the database. This information is years old and serves no purpose. Is this possible? Thanks
You can run this query then:
DELETE FROM mybb_warnings WHERE dateline < 1419984000
Change the UNIX time to any date you want and then rebuild warnings in ACP -> Tools & Maintenance -> Recount & Rebuild.
(2015-04-27, 09:17 PM)Destroy666 Wrote: [ -> ]You can run this query then:
DELETE FROM mybb_warnings WHERE dateline < 1419984000
Change the UNIX time to any date you want and then rebuild warnings in ACP -> Tools & Maintenance -> Recount & Rebuild.

Hi running into the same problem this side Smile ThanksĀ for the explanation! Unfortunately, I can't find any option to rebuild warnings in ACP...Only warning points. So also wish there was a way to clear thisĀ ancient log permanently...
(2015-07-06, 02:02 PM)Dacoolguy Wrote: [ -> ]I can't find any option to rebuild warnings in ACP...Only warning points.

You can't rebuild anything but user points when talking about warnings.. So yes, that's what I meant.