From: Andrew Dolgov Date: Sat, 23 Feb 2013 17:27:50 +0000 (+0400) Subject: only allow clearing data of active plugins X-Git-Tag: 1.7.1~46 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=81c54e3d8d1066ecf0415ed9fbb71c54ec6dee54;p=tt-rss.git only allow clearing data of active plugins --- 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 "";