/[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.30, Mon Nov 9 07:29:05 2009 UTC revision 1.31, Wed Nov 11 21:43:33 2009 UTC
# Line 31  class FastGallery { Line 31  class FastGallery {
31     */     */
32    public function rescanGallery() {    public function rescanGallery() {
33      $arGalleries = variable_get('fg_galleries', array());      $arGalleries = variable_get('fg_galleries', array());
34        $storage = $this->getStorageEngine();
35    
36      foreach ($arGalleries as $gallery) {      foreach ($arGalleries as $gallery) {
37        $path = utf8_decode($gallery['fg_path']);        $path = utf8_decode($gallery['fg_path']);
38        if (!is_dir($path)) {        if (!is_dir($path)) {
# Line 39  class FastGallery { Line 41  class FastGallery {
41        // Get current file list hierarchy        // Get current file list hierarchy
42        $files = $this->exploreDir($path, TRUE);        $files = $this->exploreDir($path, TRUE);
43    
       // Delete non-existent files  
       //$this->deletePics();  
   
44        // Process the files        // Process the files
45        $FgImgContainer = array();        $FgImgContainer = array();
46        $this->processFiles($files, $FgImgContainer);        $this->processFiles($files, $FgImgContainer);
47    
48        $storage = $this->getStorageEngine();  
49        $storage->storeImages($FgImgContainer);        $storage->storeImages($FgImgContainer);
50      }      }
51      // Check for orphan images/folders and fix it  
52      //$this->checkHierarchy();      $storage->removeDeletedFiles();
53    }    }
54    
55    /**    /**
# Line 168  class FastGallery { Line 167  class FastGallery {
167      return $bc;      return $bc;
168    }    }
169    
   /**  
    * removing a file that has been deleted from the file system  
    * @param $file  
    * @return unknown_type  
    */  
   public function deleteFile($file) {  
     $storage = $this->getStorageEngine();  
     $storage->deleteFile($file);  
   }  
170  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.2