diff options
author | steckbrief <steckbrief@chefmail.de> | 2017-12-28 13:46:55 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2017-12-28 13:46:55 +0100 |
commit | 391875ea8389d043360961cf2c5a69f2b6d7a91a (patch) | |
tree | 7bd8c535cd8c6912f34c193ece35a2efcd73530c /deleteStory.php | |
parent | 31ba0cea75b128a664e777a0a2f4180a19501ec3 (diff) |
Diffstat (limited to '')
-rw-r--r-- | deleteStory.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/deleteStory.php b/deleteStory.php new file mode 100644 index 0000000..17a4901 --- /dev/null +++ b/deleteStory.php @@ -0,0 +1,21 @@ +<?php +require_once(__DIR__.'/lib/commons/functions.common.inc.php'); +require_once(__DIR__.'/lib/commons/functions.http.inc.php'); +require_once(__DIR__.'/lib/commons/functions.files.inc.php'); +require_once(__DIR__.'/lib/functions.stories.inc.php'); + +//print_r($_POST);exit(); + +$storyName = getMandatoryPostParameter('story-name', NULL, true); + +$pathToStory = generatePath(['stories', $storyName], __DIR__); + +if (dir_exists($pathToStory)) { + rm_dir($pathToStory, TRUE); + echo "dir deleted"; +} else { + echo "dir does not exist"; + return 1; +} + +?> |