summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2011-11-20 01:33:08 +0100
committerMichael Tänzer <neo@nhng.de>2011-11-20 01:33:08 +0100
commit6ff6e31cdb8e03b12860840ccfbb4a5c07af3624 (patch)
tree58d6f5c2de11a37d6abaee16668c3dc6a521f9ee
parentd933011668c5731b82c23a2ae8272a9488f5640c (diff)
parent83479b23af20a17cd59feb89c4b2c2c5ad0c670e (diff)
downloadcacert-devel-6ff6e31cdb8e03b12860840ccfbb4a5c07af3624.tar.gz
cacert-devel-6ff6e31cdb8e03b12860840ccfbb4a5c07af3624.tar.xz
cacert-devel-6ff6e31cdb8e03b12860840ccfbb4a5c07af3624.zip
Merge branch 'bug-968' into release
-rw-r--r--includes/general.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/includes/general.php b/includes/general.php
index ebdf20e..8481018 100644
--- a/includes/general.php
+++ b/includes/general.php
@@ -919,10 +919,13 @@
if($newlayout)
{
$name="../$type/$kind/".intval($id/1000)."/$kind-".intval($id).".$type";
- mkdir("../csr/$kind",0777);
- mkdir("../crt/$kind",0777);
- mkdir("../csr/$kind/".intval($id/1000));
- mkdir("../crt/$kind/".intval($id/1000));
+ if (!is_dir("../csr")) { mkdir("../csr",0777); }
+ if (!is_dir("../crt")) { mkdir("../crt",0777); }
+
+ if (!is_dir("../csr/$kind")) { mkdir("../csr/$kind",0777); }
+ if (!is_dir("../crt/$kind")) { mkdir("../crt/$kind",0777); }
+ if (!is_dir("../csr/$kind/".intval($id/1000))) { mkdir("../csr/$kind/".intval($id/1000)); }
+ if (!is_dir("../crt/$kind/".intval($id/1000))) { mkdir("../crt/$kind/".intval($id/1000)); }
}
return $name;
}