X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot.class.php;h=13517f2550e14444e209e05a7b795c291cf1731b;hp=391589a591d11c2068a34a87d36845b5c12a58d6;hb=91120e6ad96ed11c65375ad027459db36b7fb979;hpb=6a21b6f00cf2d164a0ba5fc14739162cecc77b45 diff --git a/phpfspot.class.php b/phpfspot.class.php index 391589a..13517f2 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -23,8 +23,7 @@ class PHPFSPOT { $this->cfg = new PHPFSPOT_CFG; - $this->db = new PHPFSPOT_DB(&$this, $this->cfg->fspot_db); - + $this->db = new PHPFSPOT_DB(&$this, $this->cfg->fspot_db); $this->cfg_db = new PHPFSPOT_DB(&$this, $this->cfg->phpfspot_db); $this->check_config_table(); @@ -69,6 +68,7 @@ class PHPFSPOT { private function get_tags() { + $this->avail_tags = Array(); $count = 0; @@ -436,9 +436,12 @@ class PHPFSPOT { } $current_tags = ""; - foreach($_SESSION['selected_tags'] as $tag) - $current_tags.= $tag .","; - $current_tags = substr($current_tags, 0, strlen($current_tags)-1); + if($_SESSION['selected_tags'] != "") { + foreach($_SESSION['selected_tags'] as $tag) + $current_tags.= $tag .","; + $current_tags = substr($current_tags, 0, strlen($current_tags)-1); + } + $extern_link = "http://". $_SERVER['SERVER_NAME'] ."/index.php?mode=showpi&tags=". $current_tags; $this->tmpl->assign('extern_link', $extern_link); @@ -846,7 +849,7 @@ class PHPFSPOT { /* Check for HTML_AJAX PEAR package, lent from Horde project */ ini_set('track_errors', 1); - @include 'HTML/AJAX/Server.php'; + @include_once 'HTML/AJAX/Server.php'; if(isset($php_errormsg)) { print "PEAR HTML_AJAX package is missing
\n"; $missing = true;