/[drupal]/contributions/modules/fast_gallery/fast_gallery.class.php
ViewVC logotype

Diff of /contributions/modules/fast_gallery/fast_gallery.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.29, Thu Nov 5 04:53:17 2009 UTC revision 1.30, Mon Nov 9 07:29:05 2009 UTC
# Line 54  class FastGallery { Line 54  class FastGallery {
54    }    }
55    
56    /**    /**
57     * Return the storage engine     * Return the storage engine. We first find out which storage engine is
58       * used, then we load specified file and then we call the function that
59       * needs to be in the storage engine file "fast_gallery_get_storage,
60       * which then returns the correct storage engine
61     * @return Istorage     * @return Istorage
62     */     */
63    public function getStorageEngine() {    public function getStorageEngine() {
64      $engines = module_invoke_all('fast_gallery_info');      $storage_engine_info = variable_get('fg_storage_engine', array());
65    
66        //we fetch the file with the storage engine
67        include_once($storage_engine_info['path'] . '/' . $storage_engine_info['file']);
68        return fast_gallery_get_storage();//and call the function to return it.
69    
     $file = variable_get('fg_storage_engine', FG_DEFAULT_STORAGE_ENGINE);  
   
     include_once($engines['storageengine'][$file]['path'].'/'.$engines['storageengine'][$file]['file']);  
     switch ($file) {  
       case 'default':  
         print 'hallo welt';  
         return new DefaultStorage();  
     }  
70    }    }
71    
72    /**    /**
# Line 168  class FastGallery { Line 167  class FastGallery {
167      }      }
168      return $bc;      return $bc;
169    }    }
170    
171      /**
172       * removing a file that has been deleted from the file system
173       * @param $file
174       * @return unknown_type
175       */
176      public function deleteFile($file) {
177        $storage = $this->getStorageEngine();
178        $storage->deleteFile($file);
179      }
180  }  }

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

  ViewVC Help
Powered by ViewVC 1.1.2