]> git.wh0rd.org Git - tt-rss.git/commitdiff
only allow clearing data of active plugins
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 23 Feb 2013 17:27:50 +0000 (21:27 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 23 Feb 2013 17:27:50 +0000 (21:27 +0400)
classes/pref/prefs.php

index 4f6c27a36131c0f26683c22959045a5c9dfd6408..eb84bde997f6ecb708ded3b573faad85cdd5fbbf 100644 (file)
@@ -677,8 +677,10 @@ class Pref_Prefs extends Handler_Protected {
                                print "<td>" . htmlspecialchars($about[2]) . "</td>";
 
                                if (count($tmppluginhost->get_all($plugin)) > 0) {
-                                       print "<td><a href='#' onclick=\"clearPluginData('$name')\"
-                                               class='visibleLink'>".__("Clear data")."</a></td>";
+                                       if (in_array($name, $system_enabled)) {
+                                               print "<td><a href='#' onclick=\"clearPluginData('$name')\"
+                                                       class='visibleLink'>".__("Clear data")."</a></td>";
+                                       }
                                }
 
                                print "</tr>";
@@ -727,7 +729,9 @@ class Pref_Prefs extends Handler_Protected {
                                print "<td>" . htmlspecialchars($about[2]) . "</td>";
 
                                if (count($tmppluginhost->get_all($plugin)) > 0) {
-                                       print "<td><a href='#' onclick=\"clearPluginData('$name')\" class='visibleLink'>".__("Clear data")."</a></td>";
+                                       if (in_array($name, $system_enabled) || in_array($name, $user_enabled)) {
+                                               print "<td><a href='#' onclick=\"clearPluginData('$name')\" class='visibleLink'>".__("Clear data")."</a></td>";
+                                       }
                                }
 
                                print "</tr>";