@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** This file is part of KCFinder project |
| 4 | - * |
|
| 5 | - * @desc MIME type detection class |
|
| 6 | - * @package KCFinder |
|
| 7 | - * @version 2.54 |
|
| 8 | - * @author Pavel Tzonkov <[email protected]> |
|
| 9 | - * @copyright 2010-2014 KCFinder Project |
|
| 10 | - * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
| 11 | - * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
| 12 | - * @link http://kcfinder.sunhater.com |
|
| 13 | - */ |
|
| 4 | + * |
|
| 5 | + * @desc MIME type detection class |
|
| 6 | + * @package KCFinder |
|
| 7 | + * @version 2.54 |
|
| 8 | + * @author Pavel Tzonkov <[email protected]> |
|
| 9 | + * @copyright 2010-2014 KCFinder Project |
|
| 10 | + * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
| 11 | + * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
| 12 | + * @link http://kcfinder.sunhater.com |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | class type_mime { |
| 16 | 16 | |
@@ -1,24 +1,24 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** This file is part of KCFinder project |
| 4 | - * |
|
| 5 | - * @desc This file is included first, before each other |
|
| 6 | - * @package KCFinder |
|
| 7 | - * @version 2.54 |
|
| 8 | - * @author Pavel Tzonkov <[email protected]> |
|
| 9 | - * @copyright 2010-2014 KCFinder Project |
|
| 10 | - * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
| 11 | - * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
| 12 | - * @link http://kcfinder.sunhater.com |
|
| 13 | - * |
|
| 14 | - * This file is the place you can put any code (at the end of the file), |
|
| 15 | - * which will be executed before any other. Suitable for: |
|
| 16 | - * 1. Set PHP ini settings using ini_set() |
|
| 17 | - * 2. Custom session save handler with session_set_save_handler() |
|
| 18 | - * 3. Any custom integration code. If you use any global variables |
|
| 19 | - * here, they can be accessed in config.php via $GLOBALS array. |
|
| 20 | - * It's recommended to use constants instead. |
|
| 21 | - */ |
|
| 4 | + * |
|
| 5 | + * @desc This file is included first, before each other |
|
| 6 | + * @package KCFinder |
|
| 7 | + * @version 2.54 |
|
| 8 | + * @author Pavel Tzonkov <[email protected]> |
|
| 9 | + * @copyright 2010-2014 KCFinder Project |
|
| 10 | + * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
| 11 | + * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
| 12 | + * @link http://kcfinder.sunhater.com |
|
| 13 | + * |
|
| 14 | + * This file is the place you can put any code (at the end of the file), |
|
| 15 | + * which will be executed before any other. Suitable for: |
|
| 16 | + * 1. Set PHP ini settings using ini_set() |
|
| 17 | + * 2. Custom session save handler with session_set_save_handler() |
|
| 18 | + * 3. Any custom integration code. If you use any global variables |
|
| 19 | + * here, they can be accessed in config.php via $GLOBALS array. |
|
| 20 | + * It's recommended to use constants instead. |
|
| 21 | + */ |
|
| 22 | 22 | include_once(dirname(__FILE__)."/../../../../../assets/cache/siteManager.php"); |
| 23 | 23 | require_once('../../../includes/protect.inc.php'); |
| 24 | 24 | include_once('../../../includes/config.inc.php'); |
@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** This file is part of KCFinder project |
| 4 | - * |
|
| 5 | - * @desc Browser actions class |
|
| 6 | - * @package KCFinder |
|
| 7 | - * @version 2.54 |
|
| 8 | - * @author Pavel Tzonkov <[email protected]> |
|
| 9 | - * @copyright 2010-2014 KCFinder Project |
|
| 10 | - * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
| 11 | - * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
| 12 | - * @link http://kcfinder.sunhater.com |
|
| 13 | - */ |
|
| 4 | + * |
|
| 5 | + * @desc Browser actions class |
|
| 6 | + * @package KCFinder |
|
| 7 | + * @version 2.54 |
|
| 8 | + * @author Pavel Tzonkov <[email protected]> |
|
| 9 | + * @copyright 2010-2014 KCFinder Project |
|
| 10 | + * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
| 11 | + * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
| 12 | + * @link http://kcfinder.sunhater.com |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | class browser extends uploader { |
| 16 | 16 | protected $action; |
@@ -709,54 +709,54 @@ discard block |
||
| 709 | 709 | die; |
| 710 | 710 | } |
| 711 | 711 | |
| 712 | - protected function getFiles($dir) { |
|
| 713 | - $thumbDir = "{$this->config['uploadDir']}/{$this->config['thumbsDir']}/$dir"; |
|
| 714 | - $dir = "{$this->config['uploadDir']}/$dir"; |
|
| 715 | - $return = array(); |
|
| 716 | - $files = dir::content($dir, array('types' => "file")); |
|
| 717 | - if ($files === false) |
|
| 718 | - return $return; |
|
| 719 | - |
|
| 720 | - foreach ($files as $file) { |
|
| 721 | - $ext = file::getExtension($file); |
|
| 722 | - $smallThumb = false; |
|
| 723 | - if (in_array(strtolower($ext), array('png', 'jpg', 'gif', 'jpeg' )) ) { |
|
| 724 | - $size = @getimagesize($file); |
|
| 725 | - if (is_array($size) && count($size)) { |
|
| 726 | - $thumb_file = "$thumbDir/" . basename($file); |
|
| 727 | - if (!is_file($thumb_file) || filemtime($file) > filemtime($thumb_file)) |
|
| 728 | - $this->makeThumb($file); |
|
| 729 | - $smallThumb = |
|
| 730 | - ($size[0] <= $this->config['thumbWidth']) && |
|
| 731 | - ($size[1] <= $this->config['thumbHeight']) && |
|
| 732 | - in_array($size[2], array(IMAGETYPE_GIF, IMAGETYPE_PNG, IMAGETYPE_JPEG)); |
|
| 733 | - } |
|
| 734 | - } |
|
| 735 | - $stat = stat($file); |
|
| 736 | - if ($stat === false) continue; |
|
| 737 | - $name = basename($file); |
|
| 738 | - $types = $this->config['types']; |
|
| 739 | - $types = explode(' ',$types['images'].' '.$types['image']); |
|
| 740 | - if (substr($name,0,1) == '.' && !$this->config['showHiddenFiles']) continue; |
|
| 741 | - if ($this->type == 'images' && !in_array(strtolower($ext),$types)) continue; |
|
| 742 | - $bigIcon = file_exists("themes/{$this->config['theme']}/img/files/big/$ext.png"); |
|
| 743 | - $smallIcon = file_exists("themes/{$this->config['theme']}/img/files/small/$ext.png"); |
|
| 744 | - $thumb = file_exists("$thumbDir/$name"); |
|
| 745 | - $return[] = array( |
|
| 746 | - 'name' => stripcslashes($name), |
|
| 747 | - 'size' => $stat['size'], |
|
| 748 | - 'mtime' => $stat['mtime'], |
|
| 749 | - 'date' => @strftime($this->dateTimeSmall, $stat['mtime']), |
|
| 750 | - 'readable' => is_readable($file), |
|
| 751 | - 'writable' => file::isWritable($file), |
|
| 752 | - 'bigIcon' => $bigIcon, |
|
| 753 | - 'smallIcon' => $smallIcon, |
|
| 754 | - 'thumb' => $thumb, |
|
| 755 | - 'smallThumb' => $smallThumb |
|
| 756 | - ); |
|
| 757 | - } |
|
| 758 | - return $return; |
|
| 759 | - } |
|
| 712 | + protected function getFiles($dir) { |
|
| 713 | + $thumbDir = "{$this->config['uploadDir']}/{$this->config['thumbsDir']}/$dir"; |
|
| 714 | + $dir = "{$this->config['uploadDir']}/$dir"; |
|
| 715 | + $return = array(); |
|
| 716 | + $files = dir::content($dir, array('types' => "file")); |
|
| 717 | + if ($files === false) |
|
| 718 | + return $return; |
|
| 719 | + |
|
| 720 | + foreach ($files as $file) { |
|
| 721 | + $ext = file::getExtension($file); |
|
| 722 | + $smallThumb = false; |
|
| 723 | + if (in_array(strtolower($ext), array('png', 'jpg', 'gif', 'jpeg' )) ) { |
|
| 724 | + $size = @getimagesize($file); |
|
| 725 | + if (is_array($size) && count($size)) { |
|
| 726 | + $thumb_file = "$thumbDir/" . basename($file); |
|
| 727 | + if (!is_file($thumb_file) || filemtime($file) > filemtime($thumb_file)) |
|
| 728 | + $this->makeThumb($file); |
|
| 729 | + $smallThumb = |
|
| 730 | + ($size[0] <= $this->config['thumbWidth']) && |
|
| 731 | + ($size[1] <= $this->config['thumbHeight']) && |
|
| 732 | + in_array($size[2], array(IMAGETYPE_GIF, IMAGETYPE_PNG, IMAGETYPE_JPEG)); |
|
| 733 | + } |
|
| 734 | + } |
|
| 735 | + $stat = stat($file); |
|
| 736 | + if ($stat === false) continue; |
|
| 737 | + $name = basename($file); |
|
| 738 | + $types = $this->config['types']; |
|
| 739 | + $types = explode(' ',$types['images'].' '.$types['image']); |
|
| 740 | + if (substr($name,0,1) == '.' && !$this->config['showHiddenFiles']) continue; |
|
| 741 | + if ($this->type == 'images' && !in_array(strtolower($ext),$types)) continue; |
|
| 742 | + $bigIcon = file_exists("themes/{$this->config['theme']}/img/files/big/$ext.png"); |
|
| 743 | + $smallIcon = file_exists("themes/{$this->config['theme']}/img/files/small/$ext.png"); |
|
| 744 | + $thumb = file_exists("$thumbDir/$name"); |
|
| 745 | + $return[] = array( |
|
| 746 | + 'name' => stripcslashes($name), |
|
| 747 | + 'size' => $stat['size'], |
|
| 748 | + 'mtime' => $stat['mtime'], |
|
| 749 | + 'date' => @strftime($this->dateTimeSmall, $stat['mtime']), |
|
| 750 | + 'readable' => is_readable($file), |
|
| 751 | + 'writable' => file::isWritable($file), |
|
| 752 | + 'bigIcon' => $bigIcon, |
|
| 753 | + 'smallIcon' => $smallIcon, |
|
| 754 | + 'thumb' => $thumb, |
|
| 755 | + 'smallThumb' => $smallThumb |
|
| 756 | + ); |
|
| 757 | + } |
|
| 758 | + return $return; |
|
| 759 | + } |
|
| 760 | 760 | |
| 761 | 761 | protected function getTree($dir, $index=0) { |
| 762 | 762 | $path = explode("/", $dir); |
@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** This file is part of KCFinder project |
| 4 | - * |
|
| 5 | - * @desc Uploader class |
|
| 6 | - * @package KCFinder |
|
| 7 | - * @version 2.54 |
|
| 8 | - * @author Pavel Tzonkov <[email protected]> |
|
| 9 | - * @copyright 2010-2014 KCFinder Project |
|
| 10 | - * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
| 11 | - * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
| 12 | - * @link http://kcfinder.sunhater.com |
|
| 13 | - */ |
|
| 4 | + * |
|
| 5 | + * @desc Uploader class |
|
| 6 | + * @package KCFinder |
|
| 7 | + * @version 2.54 |
|
| 8 | + * @author Pavel Tzonkov <[email protected]> |
|
| 9 | + * @copyright 2010-2014 KCFinder Project |
|
| 10 | + * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
| 11 | + * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
| 12 | + * @link http://kcfinder.sunhater.com |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | class uploader { |
| 16 | 16 | |
@@ -18,92 +18,92 @@ discard block |
||
| 18 | 18 | const VERSION = "2.54"; |
| 19 | 19 | |
| 20 | 20 | /** Config session-overrided settings |
| 21 | - * @var array */ |
|
| 21 | + * @var array */ |
|
| 22 | 22 | protected $config = array(); |
| 23 | 23 | |
| 24 | 24 | /** Default image driver |
| 25 | - * @var string */ |
|
| 25 | + * @var string */ |
|
| 26 | 26 | protected $imageDriver = "gd"; |
| 27 | 27 | |
| 28 | 28 | /** Opener applocation properties |
| 29 | - * $opener['name'] Got from $_GET['opener']; |
|
| 30 | - * $opener['CKEditor']['funcNum'] CKEditor function number (got from $_GET) |
|
| 31 | - * $opener['TinyMCE'] Boolean |
|
| 32 | - * @var array */ |
|
| 29 | + * $opener['name'] Got from $_GET['opener']; |
|
| 30 | + * $opener['CKEditor']['funcNum'] CKEditor function number (got from $_GET) |
|
| 31 | + * $opener['TinyMCE'] Boolean |
|
| 32 | + * @var array */ |
|
| 33 | 33 | protected $opener = array(); |
| 34 | 34 | |
| 35 | 35 | /** Got from $_GET['type'] or first one $config['types'] array key, if inexistant |
| 36 | - * @var string */ |
|
| 36 | + * @var string */ |
|
| 37 | 37 | protected $type; |
| 38 | 38 | |
| 39 | 39 | /** Helper property. Local filesystem path to the Type Directory |
| 40 | - * Equivalent: $config['uploadDir'] . "/" . $type |
|
| 41 | - * @var string */ |
|
| 40 | + * Equivalent: $config['uploadDir'] . "/" . $type |
|
| 41 | + * @var string */ |
|
| 42 | 42 | protected $typeDir; |
| 43 | 43 | |
| 44 | 44 | /** Helper property. Web URL to the Type Directory |
| 45 | - * Equivalent: $config['uploadURL'] . "/" . $type |
|
| 46 | - * @var string */ |
|
| 45 | + * Equivalent: $config['uploadURL'] . "/" . $type |
|
| 46 | + * @var string */ |
|
| 47 | 47 | protected $typeURL; |
| 48 | 48 | |
| 49 | 49 | /** Linked to $config['types'] |
| 50 | - * @var array */ |
|
| 50 | + * @var array */ |
|
| 51 | 51 | protected $types = array(); |
| 52 | 52 | |
| 53 | 53 | /** Settings which can override default settings if exists as keys in $config['types'][$type] array |
| 54 | - * @var array */ |
|
| 54 | + * @var array */ |
|
| 55 | 55 | protected $typeSettings = array('disabled', 'theme', 'dirPerms', 'filePerms', 'denyZipDownload', 'maxImageWidth', 'maxImageHeight', 'thumbWidth', 'thumbHeight', 'jpegQuality', 'access', 'filenameChangeChars', 'dirnameChangeChars', 'denyExtensionRename', 'deniedExts', 'watermark'); |
| 56 | 56 | |
| 57 | 57 | /** Got from language file |
| 58 | - * @var string */ |
|
| 58 | + * @var string */ |
|
| 59 | 59 | protected $charset; |
| 60 | 60 | |
| 61 | 61 | /** The language got from $_GET['lng'] or $_GET['lang'] or... Please see next property |
| 62 | - * @var string */ |
|
| 62 | + * @var string */ |
|
| 63 | 63 | protected $lang = 'en'; |
| 64 | 64 | |
| 65 | 65 | /** Possible language $_GET keys |
| 66 | - * @var array */ |
|
| 66 | + * @var array */ |
|
| 67 | 67 | protected $langInputNames = array('lang', 'langCode', 'lng', 'language', 'lang_code'); |
| 68 | 68 | |
| 69 | 69 | /** Uploaded file(s) info. Linked to first $_FILES element |
| 70 | - * @var array */ |
|
| 70 | + * @var array */ |
|
| 71 | 71 | protected $file; |
| 72 | 72 | |
| 73 | 73 | /** Next three properties are got from the current language file |
| 74 | - * @var string */ |
|
| 74 | + * @var string */ |
|
| 75 | 75 | protected $dateTimeFull; // Currently not used |
| 76 | 76 | protected $dateTimeMid; // Currently not used |
| 77 | 77 | protected $dateTimeSmall; |
| 78 | 78 | |
| 79 | 79 | /** Contain Specified language labels |
| 80 | - * @var array */ |
|
| 80 | + * @var array */ |
|
| 81 | 81 | protected $labels = array(); |
| 82 | 82 | |
| 83 | 83 | /** Contain unprocessed $_GET array. Please use this instead of $_GET |
| 84 | - * @var array */ |
|
| 84 | + * @var array */ |
|
| 85 | 85 | protected $get; |
| 86 | 86 | |
| 87 | 87 | /** Contain unprocessed $_POST array. Please use this instead of $_POST |
| 88 | - * @var array */ |
|
| 88 | + * @var array */ |
|
| 89 | 89 | protected $post; |
| 90 | 90 | |
| 91 | 91 | /** Contain unprocessed $_COOKIE array. Please use this instead of $_COOKIE |
| 92 | - * @var array */ |
|
| 92 | + * @var array */ |
|
| 93 | 93 | protected $cookie; |
| 94 | 94 | |
| 95 | 95 | /** Session array. Please use this property instead of $_SESSION |
| 96 | - * @var array */ |
|
| 96 | + * @var array */ |
|
| 97 | 97 | protected $session; |
| 98 | 98 | |
| 99 | 99 | /** CMS integration attribute (got from $_GET['cms']) |
| 100 | - * @var string */ |
|
| 100 | + * @var string */ |
|
| 101 | 101 | protected $cms = ""; |
| 102 | 102 | |
| 103 | 103 | protected $modx = null; |
| 104 | 104 | /** Magic method which allows read-only access to protected or private class properties |
| 105 | - * @param string $property |
|
| 106 | - * @return mixed */ |
|
| 105 | + * @param string $property |
|
| 106 | + * @return mixed */ |
|
| 107 | 107 | public function __get($property) { |
| 108 | 108 | return property_exists($this, $property) ? $this->$property : null; |
| 109 | 109 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | ) |
| 133 | 133 | $this->cms = $this->get['cms']; |
| 134 | 134 | |
| 135 | - // LINKING UPLOADED FILE |
|
| 135 | + // LINKING UPLOADED FILE |
|
| 136 | 136 | if (count($_FILES)) |
| 137 | 137 | $this->file = &$_FILES[key($_FILES)]; |
| 138 | 138 | |
@@ -228,8 +228,8 @@ discard block |
||
| 228 | 228 | $this->config['uploadDir'] = strlen($this->config['uploadDir']) |
| 229 | 229 | ? path::normalize($this->config['uploadDir']) |
| 230 | 230 | : path::url2fullPath("/$path"); |
| 231 | - $this->typeDir = "{$this->config['uploadDir']}/{$this->type}"; |
|
| 232 | - $this->typeURL = "{$this->config['siteURL']}/{$this->config['uploadURL']}/{$this->type}"; |
|
| 231 | + $this->typeDir = "{$this->config['uploadDir']}/{$this->type}"; |
|
| 232 | + $this->typeURL = "{$this->config['siteURL']}/{$this->config['uploadURL']}/{$this->type}"; |
|
| 233 | 233 | |
| 234 | 234 | // SITE ROOT |
| 235 | 235 | } elseif ($this->config['uploadURL'] == "/") { |
@@ -365,36 +365,36 @@ discard block |
||
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | |
| 368 | - protected function getTransaliasSettings() { |
|
| 369 | - global $modx; |
|
| 370 | - |
|
| 371 | - // Cleaning uploaded filename? |
|
| 372 | - $setting = $modx->db->select('count(*)', $modx->getFullTableName('system_settings'), 'setting_name="clean_uploaded_filename" AND setting_value=1'); |
|
| 373 | - if ($modx->db->getValue($setting)>0) { |
|
| 374 | - // Transalias plugin active? |
|
| 375 | - $res = $modx->db->select('properties', $modx->getFullTableName('site_plugins'), 'name="TransAlias" AND disabled=0'); |
|
| 376 | - if ($properties = $modx->db->getValue($res)) { |
|
| 377 | - $properties = $modx->parseProperties($properties, 'TransAlias', 'plugin'); |
|
| 378 | - } else { |
|
| 379 | - $properties = NULL; |
|
| 380 | - } |
|
| 381 | - } else { |
|
| 382 | - $properties = NULL; |
|
| 383 | - } |
|
| 384 | - return $properties; |
|
| 385 | - } |
|
| 386 | - |
|
| 387 | - |
|
| 388 | - protected function normalizeFilename($filename) { |
|
| 389 | - if ($this->getTransaliasSettings()) { |
|
| 390 | - $format = strrchr($filename, "."); |
|
| 391 | - $filename = str_replace($format, "", $filename); |
|
| 392 | - $filename = $this->modx->stripAlias($filename).$format; |
|
| 393 | - } |
|
| 394 | - return $filename; |
|
| 395 | - } |
|
| 396 | - |
|
| 397 | - protected function normalizeDirname($dirname) { |
|
| 368 | + protected function getTransaliasSettings() { |
|
| 369 | + global $modx; |
|
| 370 | + |
|
| 371 | + // Cleaning uploaded filename? |
|
| 372 | + $setting = $modx->db->select('count(*)', $modx->getFullTableName('system_settings'), 'setting_name="clean_uploaded_filename" AND setting_value=1'); |
|
| 373 | + if ($modx->db->getValue($setting)>0) { |
|
| 374 | + // Transalias plugin active? |
|
| 375 | + $res = $modx->db->select('properties', $modx->getFullTableName('site_plugins'), 'name="TransAlias" AND disabled=0'); |
|
| 376 | + if ($properties = $modx->db->getValue($res)) { |
|
| 377 | + $properties = $modx->parseProperties($properties, 'TransAlias', 'plugin'); |
|
| 378 | + } else { |
|
| 379 | + $properties = NULL; |
|
| 380 | + } |
|
| 381 | + } else { |
|
| 382 | + $properties = NULL; |
|
| 383 | + } |
|
| 384 | + return $properties; |
|
| 385 | + } |
|
| 386 | + |
|
| 387 | + |
|
| 388 | + protected function normalizeFilename($filename) { |
|
| 389 | + if ($this->getTransaliasSettings()) { |
|
| 390 | + $format = strrchr($filename, "."); |
|
| 391 | + $filename = str_replace($format, "", $filename); |
|
| 392 | + $filename = $this->modx->stripAlias($filename).$format; |
|
| 393 | + } |
|
| 394 | + return $filename; |
|
| 395 | + } |
|
| 396 | + |
|
| 397 | + protected function normalizeDirname($dirname) { |
|
| 398 | 398 | return $this->modx->stripAlias($dirname); |
| 399 | 399 | } |
| 400 | 400 | |
@@ -472,10 +472,10 @@ discard block |
||
| 472 | 472 | return $this->label("The image is too big and/or cannot be resized."); |
| 473 | 473 | |
| 474 | 474 | |
| 475 | - // CHECK FOR MODX MAX FILE SIZE |
|
| 476 | - $actualfilesize=filesize($file['tmp_name']); |
|
| 477 | - if (isset($this->config['maxfilesize']) && $actualfilesize > $this->config['maxfilesize']) |
|
| 478 | - return $this->label("File is too big: ".$actualfilesize." Bytes. (max ".$this->config['maxfilesize']." Bytes)"); |
|
| 475 | + // CHECK FOR MODX MAX FILE SIZE |
|
| 476 | + $actualfilesize=filesize($file['tmp_name']); |
|
| 477 | + if (isset($this->config['maxfilesize']) && $actualfilesize > $this->config['maxfilesize']) |
|
| 478 | + return $this->label("File is too big: ".$actualfilesize." Bytes. (max ".$this->config['maxfilesize']." Bytes)"); |
|
| 479 | 479 | |
| 480 | 480 | return true; |
| 481 | 481 | } |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | $top = isset($this->config['watermark']['top']) |
| 628 | 628 | ? $this->config['watermark']['top'] : false; |
| 629 | 629 | $img->watermark($this->config['watermark']['file'], $left, $top); |
| 630 | - } |
|
| 630 | + } |
|
| 631 | 631 | |
| 632 | 632 | $options = array( 'file' => $file ); |
| 633 | 633 | |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** Portugues Brasil localization file for KCFinder |
| 4 | - * author: Alexandre Benegas Ferreira |
|
| 5 | - * country: Brasil |
|
| 6 | - * company website: www.hostcataratas.com.br |
|
| 7 | - * e-mail: [email protected] |
|
| 8 | - */ |
|
| 4 | + * author: Alexandre Benegas Ferreira |
|
| 5 | + * country: Brasil |
|
| 6 | + * company website: www.hostcataratas.com.br |
|
| 7 | + * e-mail: [email protected] |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | $lang = array( |
| 11 | 11 | |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** German localization file for KCFinder |
| 4 | - * author: Tim Wahrendorff <[email protected]> |
|
| 5 | - */ |
|
| 4 | + * author: Tim Wahrendorff <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | $lang = array( |
| 8 | 8 | |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** Ukrainian localization file for KCFinder |
| 4 | - * author: Myroslav Dobra |
|
| 5 | - * E-mail: [email protected] |
|
| 6 | - */ |
|
| 4 | + * author: Myroslav Dobra |
|
| 5 | + * E-mail: [email protected] |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | $lang = array( |
| 9 | 9 | |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** This file is part of KCFinder project |
| 4 | - * |
|
| 5 | - * @desc Japanese localization |
|
| 6 | - * @package KCFinder |
|
| 7 | - * @author yama [email protected] |
|
| 8 | - * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
| 9 | - * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
| 10 | - */ |
|
| 4 | + * |
|
| 5 | + * @desc Japanese localization |
|
| 6 | + * @package KCFinder |
|
| 7 | + * @author yama [email protected] |
|
| 8 | + * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
| 9 | + * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
| 10 | + */ |
|
| 11 | 11 | |
| 12 | 12 | $lang = array( |
| 13 | 13 | |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** French localization file for KCFinder |
| 4 | - * author: Damien Barrère |
|
| 5 | - * update: Samuel Jobard |
|
| 6 | - */ |
|
| 4 | + * author: Damien Barrère |
|
| 5 | + * update: Samuel Jobard |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | $lang = array( |
| 9 | 9 | |