From 81c54e3d8d1066ecf0415ed9fbb71c54ec6dee54 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 23 Feb 2013 21:27:50 +0400 Subject: [PATCH] only allow clearing data of active plugins --- classes/pref/prefs.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 4f6c27a3..eb84bde9 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -677,8 +677,10 @@ class Pref_Prefs extends Handler_Protected { print "" . htmlspecialchars($about[2]) . ""; if (count($tmppluginhost->get_all($plugin)) > 0) { - print "".__("Clear data").""; + if (in_array($name, $system_enabled)) { + print "".__("Clear data").""; + } } print ""; @@ -727,7 +729,9 @@ class Pref_Prefs extends Handler_Protected { print "" . htmlspecialchars($about[2]) . ""; if (count($tmppluginhost->get_all($plugin)) > 0) { - print "".__("Clear data").""; + if (in_array($name, $system_enabled) || in_array($name, $user_enabled)) { + print "".__("Clear data").""; + } } print ""; -- 2.39.5