# HG changeset patch # User Dan # Date 1232320221 18000 # Node ID 58fa63f7f23b0a5170c42fc8bda94c6fba80e711 # Parent 44b68ee8d2f59a8e722515479b989be76f724df8 Pageutils: Also delete page-specific ACL rules when deleting a page (thanks Vadi) diff -r 44b68ee8d2f5 -r 58fa63f7f23b includes/pageutils.php --- a/includes/pageutils.php Sun Jan 18 18:09:55 2009 -0500 +++ b/includes/pageutils.php Sun Jan 18 18:10:21 2009 -0500 @@ -1451,6 +1451,8 @@ if(!$e) $db->_die('The page entry could not be deleted.'); $e = $db->sql_query('DELETE FROM ' . table_prefix.'files WHERE page_id=\'' . $page_id . '\''); if(!$e) $db->_die('The file entry could not be deleted.'); + $e = $db->sql_query('DELETE FROM ' . table_prefix.'acl WHERE page_id=\'' . $page_id . '\' AND namespace=\'' . $namespace . '\''); + if(!$e) $db->_die('The ACL entries associated with the page could not be deleted.'); return('This page has been deleted. Note that there is still a log of edits and actions in the database, and anyone with admin rights can raise this page from the dead unless the log is cleared. If the deleted file is an image, there may still be cached thumbnails of it in the cache/ directory, which is inaccessible to users.'); }