summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-12-30 15:45:39 +0100
committerAndreas Unterkircher <unki@netshadow.at>2007-12-30 15:45:39 +0100
commite2471df59e36592831bb2c36cddb0a002852faf9 (patch)
tree11ed2ca9224bfdb055abe1d6c5ee271e2281fcc8 /phpfspot.class.php
parentcd94f8e46b565a4528dda5ddb602918f0bf13896 (diff)
check if smarty compile directory is writeable for the current user or exit if not
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index bfe4155..ba36687 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -63,15 +63,21 @@ class PHPFSPOT {
$this->dbver = $this->getFspotDBVersion();
if(!is_writeable(dirname($this->cfg->phpfspot_db))) {
- print dirname($this->cfg->phpfspot_db) .": directory is not writeable!";
+ print dirname($this->cfg->phpfspot_db) .": directory is not writeable for user ". $this->getuid() ."\n";
exit(1);
}
-
+
+ if(!is_writeable($this->cfg->base_path ."/templates_c")) {
+ print $this->cfg->base_path ."/templates_c: directory is not writeable for user ". $this->getuid() ."\n";
+ exit(1);
+ }
+
$this->cfg_db = new PHPFSPOT_DB($this, $this->cfg->phpfspot_db);
if(!is_writeable($this->cfg->phpfspot_db)) {
print $this->cfg->phpfspot_db ." is not writeable for user ". $this->getuid() ."\n";
exit(1);
}
+
$this->check_config_table();
/* include Smarty template engine */