issue80, don't call get_tags every time.
authorAndreas Unterkircher <unki@netshadow.at>
Sat, 15 Dec 2007 13:27:48 +0000 (13:27 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Sat, 15 Dec 2007 13:27:48 +0000 (13:27 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@314 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot.class.php

index a2ef4661e8f60dcc0129df8e11f0a06d675b4416..ffd7e7e3d9a4855542ffb98ea3594217956c4012 100644 (file)
@@ -79,8 +79,6 @@ class PHPFSPOT {
       /* check if all necessary indices exist */
       $this->checkDbIndices();
 
-      $this->get_tags();
-
       session_start();
 
       if(!isset($_SESSION['tag_condition']))
@@ -475,6 +473,8 @@ class PHPFSPOT {
     */
    public function getAvailableTags()
    {
+      $this->get_tags();
+
       $output = "";
 
       $result = $this->db->db_query("
@@ -544,6 +544,8 @@ class PHPFSPOT {
     */
    public function getSelectedTags()
    {
+      $this->get_tags();
+
       $output = "";
       foreach($this->avail_tags as $tag)
       {
@@ -1355,6 +1357,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)