Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Commit

Permalink
2.54
Browse files Browse the repository at this point in the history
Performance fix
sunhater committed Mar 11, 2014
1 parent 1d0ba97 commit 899ec8a
Showing 37 changed files with 295 additions and 46 deletions.
2 changes: 1 addition & 1 deletion browse.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Browser calling script
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Base configuration file
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion core/autoload.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc This file is included first, before each other
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
29 changes: 19 additions & 10 deletions core/browser.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Browser actions class
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
@@ -708,18 +708,27 @@ protected function getFiles($dir) {
return $return;

foreach ($files as $file) {
$size = @getimagesize($file);
if (is_array($size) && count($size)) {
$thumb_file = "$thumbDir/" . basename($file);
if (!is_file($thumb_file))
$this->makeThumb($file, false);
$smallThumb =
($size[0] <= $this->config['thumbWidth']) &&
($size[1] <= $this->config['thumbHeight']) &&
in_array($size[2], array(IMAGETYPE_GIF, IMAGETYPE_PNG, IMAGETYPE_JPEG));
$img = new fastImage($file);
$type = $img->getType();

if ($type !== false) {
$size = $img->getSize($file);

if (is_array($size) && count($size)) {
$thumb_file = "$thumbDir/" . basename($file);
if (!is_file($thumb_file))
$this->makeThumb($file, false);
$smallThumb =
($size[0] <= $this->config['thumbWidth']) &&
($size[1] <= $this->config['thumbHeight']) &&
in_array($type, array("gif", "jpeg", "png"));
} else
$smallThumb = false;
} else
$smallThumb = false;

$img->close();

$stat = stat($file);
if ($stat === false) continue;
$name = basename($file);
2 changes: 1 addition & 1 deletion core/types/type_img.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Image detection class
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion core/types/type_mime.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc MIME type detection class
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
4 changes: 2 additions & 2 deletions core/uploader.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Uploader class
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
@@ -15,7 +15,7 @@
class uploader {

/** Release version */
const VERSION = "2.53";
const VERSION = "2.54";

/** Config session-overrided settings
* @var array */
2 changes: 1 addition & 1 deletion css.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Base CSS definitions
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion doc/README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[===========================< KCFinder 2.53 >================================]
[===========================< KCFinder 2.54 >================================]
[ ]
[ Copyright 2010-2014 KCFinder Project ]
[ http://kcfinder.sunhater.com ]
2 changes: 1 addition & 1 deletion integration/drupal.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc CMS integration code: Drupal
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Dany Alejandro Cabrera <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion js/browser/0bject.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Base JavaScript object properties
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion js/browser/clipboard.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Clipboard functionality
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion js/browser/dropUpload.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Upload files using drag and drop
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Forum user (updated by Pavel Tzonkov)
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion js/browser/files.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc File related functionality
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion js/browser/folders.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Folder related functionality
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion js/browser/init.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Object initializations
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion js/browser/joiner.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Join all JavaScript files in current directory
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion js/browser/misc.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Miscellaneous functionality
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion js/browser/settings.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Settings panel functionality
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion js/browser/toolbar.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Toolbar functionality
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion js/helper.js
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
*
* @desc Helper object
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion js_localize.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Load language labels into JavaScript
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
2 changes: 1 addition & 1 deletion lang/en.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @desc Default English localization
* @package KCFinder
* @version 2.53
* @version 2.54
* @author Pavel Tzonkov <[email protected]>
* @copyright 2010-2014 KCFinder Project
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
Loading

0 comments on commit 899ec8a

Please sign in to comment.