Fixed ML exclude path to not show/proceed ckeditor/kcfinders .thumbs dir

this also did some tab2whitespace cleanup
and also fixed serendipity_fetchImages() to skip .htaccess files for ckeditor/kcfinder usage
This commit is contained in:
Ian 2013-06-04 19:23:21 +02:00
parent 230175edd4
commit 1082a5c266
2 changed files with 52 additions and 50 deletions

@ -3,6 +3,8 @@
Version 1.7.1 () Version 1.7.1 ()
------------------------------------------------------------------------ ------------------------------------------------------------------------
* Fixed Media Library exclude path to not show/proceed ckeditor/kcfinders .thumbs dir
* Fixed bulletproof->colorset GET mismatch with categorytemplates plugin * Fixed bulletproof->colorset GET mismatch with categorytemplates plugin
config.inc.php [Line 29] config.inc.php [Line 29]

@ -386,8 +386,8 @@ function serendipity_fetchImages($group = false, $start = 0, $end = 20, $images
if ($dir = @opendir($basedir . $odir)) { if ($dir = @opendir($basedir . $odir)) {
$aTempArray = array(); $aTempArray = array();
while (($file = @readdir($dir)) !== false) { while (($file = @readdir($dir)) !== false) {
if ($file == '.svn' || $file == 'CVS' || $file == '.' || $file == '..') { if ($file == '.svn' || $file == 'CVS' || $file == '.htaccess' || $file == '.' || $file == '..') {
continue; continue; // 2013/06/05 added exclude .htaccess for ckeditor/kcfinder usage
} }
array_push($aTempArray, $file); array_push($aTempArray, $file);
} }
@ -1472,7 +1472,7 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa
if ($manage && $limit_path == NULL) { if ($manage && $limit_path == NULL) {
## SYNCH START ## ## SYNCH START ##
$aExclude = array("CVS" => true, ".svn" => true); $aExclude = array("CVS" => true, ".svn" => true, ".thumbs" => true); // last one dropped in by ckeditor/kcfinder image browser
serendipity_plugin_api::hook_event('backend_media_path_exclude_directories', $aExclude); serendipity_plugin_api::hook_event('backend_media_path_exclude_directories', $aExclude);
$paths = array(); $paths = array();
$aFilesOnDisk = array(); $aFilesOnDisk = array();
@ -3484,7 +3484,7 @@ function serendipity_moveMediaDirectory($oldDir, $newDir, $type = 'dir', $item_i
function &serendipity_getMediaPaths() { function &serendipity_getMediaPaths() {
global $serendipity; global $serendipity;
$aExclude = array("CVS" => true, ".svn" => true); $aExclude = array("CVS" => true, ".svn" => true, ".thumbs" => true); // last one dropped in by ckeditor/kcfinder image browser
serendipity_plugin_api::hook_event('backend_media_path_exclude_directories', $aExclude); serendipity_plugin_api::hook_event('backend_media_path_exclude_directories', $aExclude);
$paths = array(); $paths = array();