Ignore:
Timestamp:
02/06/18 08:37:50 (15 months ago)
Author:
gogo
Message:

Updates to MootoolsFileManager? - most importantly removal of Flash dependancy, now uses HTML5 file uploads.

Also now updated the default MooTools? to 1.6.0 - you can of course load your own MooTools? first (before Xinha), anything down to about 1.3 works I think, if you load yours then it will be used instead.

Other updates from https://github.com/sleemanj/mootools-filemanager included in this update are:

  • Remove space from allowed characters in filenames, they will be converted to _ on upload
  • Fix for a small (inconsequential) uppercase extension bug
  • Add some more php extensions to the "unsafe" list
  • Fix image resize on upload to be more space efficient
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/MootoolsFileManager/mootools-filemanager/Assets/Connector/FileManager.php

    r1327 r1371  
    10721072                if (empty($document_root_fspath)) 
    10731073                { 
    1074                         $document_root_fspath = realpath($_SERVER['DOCUMENT_ROOT']); 
     1074                        $document_root_fspath = realpath(isset($_SERVER['REDIRECT_DOCUMENT_ROOT']) ? $_SERVER['REDIRECT_DOCUMENT_ROOT'] : $_SERVER['DOCUMENT_ROOT']); 
    10751075                } 
    10761076                $document_root_fspath = strtr($document_root_fspath, '\\', '/'); 
     
    23452345                                else 
    23462346                                { 
     2347          if ($this->options['safe']) 
     2348          { 
     2349            $safeext      = $this->getSafeExtension(preg_replace('/^.*\./', '', $file_arg));            
     2350            $file_arg = preg_replace('/\..*$/', '', $file_arg) . ".$safeext"; 
     2351          } 
     2352           
    23472353                                        $filename = $this->getUniqueName($file_arg, $dir); 
    23482354                                        if ($filename !== null) 
     
    41984204                case 'php4': 
    41994205                case 'php5': 
     4206                case 'php6': 
     4207                case 'php7': 
     4208                case 'php8': 
    42004209                case 'phps': 
    42014210                        return (!empty($safe_extension) ? $safe_extension : $extension); 
     
    42814290                 * an option array to pagetitle(), particularly for large directories. 
    42824291                 */ 
    4283                 $filename = FileManagerUtility::pagetitle($fileinfo['filename'], null, '-_., []()~!@+' /* . '#&' */, '-_,~@+#&'); 
     4292                $filename = FileManagerUtility::pagetitle($fileinfo['filename'], null, '-_.,[]()~!@+' /* . '#&' */, '-_,~@+#&'); 
    42844293                if (!$filename && !$dotfile) 
    42854294                        return null; 
Note: See TracChangeset for help on using the changeset viewer.