summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2011-08-19 16:10:08 +0200
committerMichael Hamann <michael@content-space.de>2011-08-19 16:14:06 +0200
commitc5f927421e944bfe2ed61a7d50177e7a04c7a079 (patch)
tree5ba8744549f772ca89ce370ac62c05c07f4a13c5 /inc/common.php
parent9e4f7880b1e2dfece064b313f5ad1c56b0fdc3d6 (diff)
downloadrpg-c5f927421e944bfe2ed61a7d50177e7a04c7a079.tar.gz
rpg-c5f927421e944bfe2ed61a7d50177e7a04c7a079.tar.bz2
Don't delete meta files when pages are deleted, fixes FS#2301
As we need to keep all core meta files anyway (the only core file that had been deleted but shouldn't be deleted is the .indexed file) and plugins can keep care of their own metadata files using the IO_WIKIPAGE_WRITE event there is no reason for using the expensive metaFiles() function during the deletion of pages.
Diffstat (limited to 'inc/common.php')
-rw-r--r--inc/common.php12
1 files changed, 2 insertions, 10 deletions
diff --git a/inc/common.php b/inc/common.php
index 7522095ab..239cfcf99 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1007,16 +1007,8 @@ function saveWikiText($id,$text,$summary,$minor=false){
$newRev = saveOldRevision($id);
// remove empty file
@unlink($file);
- // remove old meta info...
- $mfiles = metaFiles($id);
- $changelog = metaFN($id, '.changes');
- $metadata = metaFN($id, '.meta');
- $subscribers = metaFN($id, '.mlist');
- foreach ($mfiles as $mfile) {
- // but keep per-page changelog to preserve page history, keep subscriber list and keep meta data
- if (@file_exists($mfile) && $mfile!==$changelog && $mfile!==$metadata && $mfile!==$subscribers) { @unlink($mfile); }
- }
- // purge meta data
+ // don't remove old meta info as it should be saved, plugins can use IO_WIKIPAGE_WRITE for removing their metadata...
+ // purge non-persistant meta data
p_purge_metadata($id);
$del = true;
// autoset summary on deletion