summaryrefslogtreecommitdiff
path: root/installer/data/init_var.php
blob: 42d50c0a901708d70689774d2b7ca87dbf425d59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);
}