X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot.class.php;h=e2b24a861b6296589511f8487c05c112e1af721f;hp=a2ef4661e8f60dcc0129df8e11f0a06d675b4416;hb=619b9b0e189637fcebb2161f473a015d3cbcdbc5;hpb=1a8de008cd10b695444681c5f0d87514ffbb5e51 diff --git a/phpfspot.class.php b/phpfspot.class.php index a2ef466..e2b24a8 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -54,6 +54,10 @@ class PHPFSPOT { } $this->db = new PHPFSPOT_DB($this, $this->cfg->fspot_db); + if(!is_writeable($this->cfg->fspot_db)) { + print $this->cfg->fspot_db ." is not writeable for user ". $this->getuid() ."\n"; + exit(1); + } if(!is_writeable(dirname($this->cfg->phpfspot_db))) { print dirname($this->cfg->phpfspot_db) .": directory is not writeable!"; @@ -79,8 +83,6 @@ class PHPFSPOT { /* check if all necessary indices exist */ $this->checkDbIndices(); - $this->get_tags(); - session_start(); if(!isset($_SESSION['tag_condition'])) @@ -475,6 +477,8 @@ class PHPFSPOT { */ public function getAvailableTags() { + $this->get_tags(); + $output = ""; $result = $this->db->db_query(" @@ -544,6 +548,8 @@ class PHPFSPOT { */ public function getSelectedTags() { + $this->get_tags(); + $output = ""; foreach($this->avail_tags as $tag) { @@ -1355,6 +1361,8 @@ class PHPFSPOT { */ public function startSearch($searchfor, $sort_order, $from = 0, $to = 0) { + $this->get_tags(); + $_SESSION['searchfor'] = $searchfor; $_SESSION['sort_order'] = $sort_order; if($from != 0)