Made the rank editor actually refresh the ranks cache upon creating/editing/deleting a rank. It's 5 in the morning, I'm going to bed, release is first thing after breakfast and coffee.
authorDan
Sat, 12 Jul 2008 05:11:33 -0400
changeset 633 4f81e21b5590
parent 632 567e4b2c763f
child 634 8d951a34537e
Made the rank editor actually refresh the ranks cache upon creating/editing/deleting a rank. It's 5 in the morning, I'm going to bed, release is first thing after breakfast and coffee.
plugins/admin/UserRanks.php
--- a/plugins/admin/UserRanks.php	Sat Jul 12 05:10:39 2008 -0400
+++ b/plugins/admin/UserRanks.php	Sat Jul 12 05:11:33 2008 -0400
@@ -120,6 +120,9 @@
         $rank_style = $db->escape(@$request['rank_style']);
         $q = $db->sql_query('UPDATE ' . table_prefix . "ranks SET rank_title = '$rank_title', rank_style = '$rank_style' WHERE rank_id = $rank_id;");
         
+        // regenerate the ranks cache
+        generate_cache_userranks();
+        
         echo enano_json_encode(array(
             'mode' => 'success'
           ));
@@ -153,6 +156,9 @@
           return true;
         }
         
+        // regenerate the ranks cache
+        generate_cache_userranks();
+        
         echo enano_json_encode(array(
             'mode' => 'success',
             'rank_id' => $rank_id
@@ -193,6 +199,9 @@
         if ( !$q )
           $db->_die();
         
+        // regenerate the ranks cache
+        generate_cache_userranks();
+        
         echo enano_json_encode(array(
             'mode' => 'success'
           ));