Fixed #43: LastComments plugin will not even attempt to delete or rebuild LastComments caches if LastComments plugin is not available.

This commit is contained in:
azett 2022-06-23 19:34:05 +02:00
parent 937b566ff2
commit 7447db1b21

View File

@ -26,6 +26,12 @@ if (class_exists('AdminPanelAction')) {
function onsubmit($data = NULL) {
global $fp_config;
// No action possible if LastComments plugin isn't activated!
if (!function_exists('plugin_lastcomments_cache')) {
$this->smarty->assign('success', -2);
return;
}
if (isset($_POST ['lastcommentadmin_clear'])) {
fs_delete(LASTCOMMENTS_CACHE_FILE);
$this->smarty->assign('success', 1);