summaryrefslogtreecommitdiff
path: root/installer/init_var.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-19 03:31:13 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-19 03:31:13 +0000
commit46d010e89d280d391935648f1f713fc784042050 (patch)
tree0d887e6ab08867821546de8463883baaf2dd305b /installer/init_var.php
parentad71e4263ef61efa0720ea6f08d6a9c582684c9b (diff)
Simplification pass over the installer:
- Flattened the directory structure - Greatly simplified structure in installer; it now only reports environmental checks that fail. Simplified code that prints exceptions. Use only mysql calls for the installer, but select mysqli automatically if it's available. Drop the response file; that's easily replicated with flag support - Create a random password for the admin user - Delete unused controllers - Invert the form of the database config template to be mostly non-PHP with just a few PHP calls
Diffstat (limited to 'installer/init_var.php')
-rw-r--r--installer/init_var.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/installer/init_var.php b/installer/init_var.php
new file mode 100644
index 00000000..42d50c0a
--- /dev/null
+++ b/installer/init_var.php
@@ -0,0 +1,13 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+if (!file_exists(VARPATH)) {
+ if (!@mkdir(VARPATH)) {
+ throw new Exception("Unable to create directory '" . VARPATH . "'");
+ }
+ chmod(VARPATH, 0777);
+}
+foreach (array("resizes", "modules", "uploads", "logs", "albums", "thumbs") as $dir) {
+ if (!@mkdir("var/$dir")) {
+ throw new Exception("Unable to create directory '$dir'");
+ }
+ chmod("var/$dir", 0777);
+} \ No newline at end of file