Made Admin:LangManager purge caches properly when uninstalling a language
authorDan
Tue, 22 Jul 2008 17:08:05 -0500
changeset 661 5dd55a9240f8
parent 660 2f4d90b67735
child 662 fcab604da9a7
Made Admin:LangManager purge caches properly when uninstalling a language
plugins/admin/LangManager.php
--- a/plugins/admin/LangManager.php	Tue Jul 22 17:07:23 2008 -0500
+++ b/plugins/admin/LangManager.php	Tue Jul 22 17:08:05 2008 -0500
@@ -16,6 +16,7 @@
 {
   global $db, $session, $paths, $template, $plugins; // Common objects
   global $lang;
+  global $cache;
   if ( $session->auth_level < USER_LEVEL_ADMIN || $session->user_level < USER_LEVEL_ADMIN )
   {
     $login_link = makeUrlNS('Special', 'Login/' . $paths->nslist['Special'] . 'Administration', 'level=' . USER_LEVEL_ADMIN, true);
@@ -494,6 +495,8 @@
           if ( file_exists($cache_file) )
             @unlink($cache_file);
           
+          $cache->purge("lang_{$lang_id}");
+          
           // Remove strings
           $q = $db->sql_query('DELETE FROM ' . table_prefix . "language_strings WHERE lang_id = $lang_id;");
           if ( !$q )