X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot.class.php;h=3e1bcee83de1e7bff495074aa954c0e380145a0c;hp=b4d8b17ee5ce27f6533b350ee16ec7104b7b2fd1;hb=33c1f8bce22a28384068c908b909ca7dcd544a1a;hpb=8f46e095700c4c44b0aa3e216ca9b43bcc2fe9e6 diff --git a/phpfspot.class.php b/phpfspot.class.php index b4d8b17..3e1bcee 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -88,6 +88,11 @@ class PHPFSPOT { exit(1); } + if(!is_writeable($this->cfg->thumb_path)) { + print $this->cfg->thumb_path .": 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"; @@ -1117,6 +1122,7 @@ class PHPFSPOT { $this->tmpl->assign('rss_link', $rss_link); $this->tmpl->assign('count', $count); $this->tmpl->assign('width', $this->cfg->thumb_width); + $this->tmpl->assign('preview_width', $this->cfg->photo_width); $this->tmpl->assign('thumb_container_width', $this->cfg->thumb_width); $this->tmpl->assign('thumb_container_height', $this->cfg->thumb_height+20); $this->tmpl->assign('images', $images); @@ -1377,6 +1383,7 @@ class PHPFSPOT { $thumb_sub_path = substr($file_md5, 0, 2); $thumb_path = $this->cfg->thumb_path ."/". $thumb_sub_path ."/". $resolution ."_". $file_md5; + /* if thumbnail-subdirectory does not exist yet, create it */ if(!file_exists(dirname($thumb_path))) { mkdir(dirname($thumb_path), 0755); }