aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/sys/utils.php
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2011-12-18 14:25:13 +0100
committerKevin Chabowski <kevin@kch42.de>2011-12-18 14:25:13 +0100
commit7d6a5eca4e0a38ae615634542859d29ab79c94e8 (patch)
tree371d03aed7bbbc87a005ac2d33e6138163d9e0b8 /ratatoeskr/sys/utils.php
parent58ca56ac72724ed86690cbb75f91cdde8f5b2737 (diff)
downloadratatoeskr-cms-7d6a5eca4e0a38ae615634542859d29ab79c94e8.tar.gz
ratatoeskr-cms-7d6a5eca4e0a38ae615634542859d29ab79c94e8.tar.bz2
ratatoeskr-cms-7d6a5eca4e0a38ae615634542859d29ab79c94e8.zip
Modified db-model for plugins and fixed a bug in the frontend.
* The db-model for plugins was updated, so it is compatible with the plugin packages. * Preview of comments now works again.
Diffstat (limited to 'ratatoeskr/sys/utils.php')
-rw-r--r--ratatoeskr/sys/utils.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/ratatoeskr/sys/utils.php b/ratatoeskr/sys/utils.php
index 5d0c3dc..d6093ca 100644
--- a/ratatoeskr/sys/utils.php
+++ b/ratatoeskr/sys/utils.php
@@ -200,6 +200,28 @@ function htmlesc($text)
}
/*
+ * Function: delete_directory
+ * Delete a directory and all of its content.
+ */
+function delete_directory($dir)
+{
+ $dir_content = scandir($dir);
+ foreach($dir_content as $f)
+ {
+ if(($f == "..") or ($f == "."))
+ continue;
+
+ $f = "$dir/$f";
+
+ if(is_dir($f))
+ delete_directory($f);
+ else
+ unlink($f);
+ }
+ rmdir($dir);
+}
+
+/*
* Constant: SITE_BASE_PATH
* The Base path of this ratatoeskr site.
*/