includes/pageprocess.php
changeset 698 40f9528b6348
parent 696 bd5069e1f19a
child 741 a216e412c439
--- a/includes/pageprocess.php	Tue Aug 19 20:57:17 2008 -0400
+++ b/includes/pageprocess.php	Tue Aug 19 20:57:57 2008 -0400
@@ -640,6 +640,7 @@
   function rollback_log_entry($log_id)
   {
     global $db, $session, $paths, $template, $plugins; // Common objects
+    global $cache;
     
     // Verify permissions
     if ( !$this->perms->get_permissions('history_rollback') )
@@ -698,6 +699,8 @@
         
         // FIXME: l10n
         // rollback_extra is required because usually only moderators can undo page deletion AND restore the content.
+        // potential flaw here - once recreated, can past revisions be restored by users without rollback_extra? should
+        // probably modify editor routine to deny revert access if the timestamp < timestamp of last deletion if any.
         if ( !$this->perms->get_permissions('history_rollback_extra') )
           return 'Administrative privileges are required for page undeletion.';
         
@@ -738,6 +741,8 @@
         if ( !$e )
           $db->die_json();
         
+        $cache->purge('page_meta');
+        
         return array(
             'success' => true,
             'dateline' => $dateline,