issue52, check if phpfspot.db is writeable
authorAndreas Unterkircher <unki@netshadow.at>
Sat, 21 Jul 2007 17:55:35 +0000 (17:55 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Sat, 21 Jul 2007 17:55:35 +0000 (17:55 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@236 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot.class.php

index ffb511d97361df9c475132a27bb0c9e4cc6d7f99..23eb541c337d451e516a635d79ec964381a4ca73 100644 (file)
@@ -58,8 +58,13 @@ class PHPFSPOT {
       }
          
       $this->cfg_db = new PHPFSPOT_DB(&$this, $this->cfg->phpfspot_db);
       }
          
       $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();
 
       $this->check_config_table();
 
+
       $this->tmpl = new PHPFSPOT_TMPL($this);
 
       $this->get_tags();
       $this->tmpl = new PHPFSPOT_TMPL($this);
 
       $this->get_tags();