aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-06-17 12:21:02 +0000
committerMichael Scherer <misc@mageia.org>2011-06-17 12:21:02 +0000
commitda761ec2d088892fe77bd9eb2a15cfdc2bbb83e5 (patch)
tree3e6ed1e0376f7d8cbf2f47f881b4e2bab0238f1e
parentc8de64d912b134c8e2d42a330027604a2a1775f1 (diff)
downloadpuppet-da761ec2d088892fe77bd9eb2a15cfdc2bbb83e5.tar
puppet-da761ec2d088892fe77bd9eb2a15cfdc2bbb83e5.tar.gz
puppet-da761ec2d088892fe77bd9eb2a15cfdc2bbb83e5.tar.bz2
puppet-da761ec2d088892fe77bd9eb2a15cfdc2bbb83e5.tar.xz
puppet-da761ec2d088892fe77bd9eb2a15cfdc2bbb83e5.zip
remove file in config/ directory before removing the directory ( as
rm_dir requires a empty directory )
-rw-r--r--modules/mediawiki/files/init_wiki.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/mediawiki/files/init_wiki.php b/modules/mediawiki/files/init_wiki.php
index bb2137ae..926c52fc 100644
--- a/modules/mediawiki/files/init_wiki.php
+++ b/modules/mediawiki/files/init_wiki.php
@@ -20,5 +20,10 @@ $wgDatabase = $dbc->newFromParams($wgDBserver,
$wgDatabase->initial_setup($wgDBpassword, $wgDBname);
$wgDatabase->setup_database();
-rmdir("$wiki_root/config");
+$dir = "$wiki_root/config";
+foreach (scandir($dir) as $item) {
+ if (!is_dir($item) || is_link($item))
+ unlink($item);
+}
+rmdir("$dir");
?>