Ignore:
Timestamp:
03/29/11 01:39:55 (8 years ago)
Author:
gogo
Message:

Update the MootoolsFileManager? to the latest cpojer with some modifications.
Add a demo for the MFM examples/mootools-file-manager.php
Change the default config for ImageManager? and ExtendedFileManager? for added security.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/MootoolsFileManager-Update/plugins/MootoolsFileManager/backend.php

    r1297 r1300  
    7777require_once('config.php'); 
    7878 
     79// Ensure thumbnail path is OK 
     80if(!isset($IMConfig['files_dir']) || !isset($IMConfig['images_dir'])) 
     81{ 
     82  unset($IMConfig['thumbs_dir']); 
     83  unset($IMConfig['thumbs_url']); 
     84} 
     85else 
     86{  
     87  if(!file_exists($IMConfig['thumbs_dir'])) @mkdir($IMConfig['thumbs_dir']); 
     88} 
     89 
    7990switch ( @$_REQUEST[ "__function" ] ) 
    8091{ 
     
    8798 
    8899  case 'image-manager': 
    89     include('mootools-filemanager/Backend/FileManager.php'); 
     100    include('mootools-filemanager/Assets/Connector/FileManager.php'); 
    90101 
    91102    $browser = new FileManager(array( 
    92103      'directory'     => $IMConfig['images_dir'], 
    93104      'baseURL'       => $IMConfig['images_url'], 
     105      'thumbnailPath' => $IMConfig['thumbs_dir'], 
    94106       
    95107      'assetBasePath' => $IMConfig['base_url'] .'/mootools-filemanager/Assets', 
    96108       
    97109      'upload'        => $IMConfig['allow_images_upload'], 
     110      'create'        => $IMConfig['allow_images_upload'], 
    98111      'maxUploadSize' => size_to_bytes($IMConfig['max_images_upload_size']), 
    99112       
     
    109122   
    110123  case 'file-manager': 
    111     include('mootools-filemanager/Backend/FileManager.php'); 
     124    include('mootools-filemanager/Assets/Connector/FileManager.php'); 
    112125 
    113126    $browser = new FileManager(array( 
    114127      'directory'     => $IMConfig['files_dir'], 
    115128      'baseURL'       => $IMConfig['files_url'], 
     129      'thumbnailPath' => $IMConfig['thumbs_dir'], 
    116130       
    117131      'assetBasePath' => $IMConfig['base_url'] .'/mootools-filemanager/Assets', 
    118132       
    119133      'upload'        => $IMConfig['allow_files_upload'], 
     134      'create'        => $IMConfig['allow_files_upload'], 
    120135      'maxUploadSize' => size_to_bytes($IMConfig['max_files_upload_size']), 
    121136       
Note: See TracChangeset for help on using the changeset viewer.