More fixes for cache, extension and filter sub-system
[mailer.git] / inc / extensions / ext-cache.php
index d55b2afb552ec3df5997f53e0453c0e9f5e41306..2f42c603c601630f82f338896dd8017b5914305e 100644 (file)
@@ -62,13 +62,14 @@ case "remove": // Do stuff when removing extension
        $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_cache' OR what='cache_stats' LIMIT 2";
 
        // Unregister all filters
-       UNREGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true);
-       UNREGISTER_FILTER('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true);
-       UNREGISTER_FILTER('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true);
-       UNREGISTER_FILTER('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true);
-       UNREGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE');
-       UNREGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true);
-       UNREGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true);
+       UNREGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, !$dry_run);
+       UNREGISTER_FILTER('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, !$dry_run);
+       UNREGISTER_FILTER('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, !$dry_run);
+       UNREGISTER_FILTER('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, !$dry_run);
+       UNREGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, !$dry_run);
+       UNREGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, !$dry_run);
+       UNREGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, !$dry_run);
+       UNREGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', true, !$dry_run);
        break;
 
 case "activate": // Do stuff when admin activates this extension
@@ -179,7 +180,7 @@ case "update": // Update an extension
 
        case "0.1.6": // SQL queries for v0.1.6
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Probleme w&auuml;hrend des Installationsvorganges beseitigt.";
+               $UPDATE_NOTES = "Probleme während des Installationsvorganges beseitigt.";
                break;
 
        case "0.1.7": // SQL queries for v0.1.7
@@ -218,6 +219,7 @@ case "update": // Update an extension
                REGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true);
                REGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true);
                REGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true);
+               REGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', false, true);
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Filter hinzugefügt für Erweiterungsmanagement.";