Hi,
had some time and investigated the code.
Truly the error is in the file serendipty_admin_images.inc.php.
Take a look at line 196-213:
- Code: Select all
case 'delete':
$path = $serendipity['serendipityPath'] . $new_dir;
if (is_dir($path)) {
if (!is_writable($serendipity['serendipityPath'])) {
printf(DIRECTORY_WRITE_ERROR, $new_dir);
} else {
// Directory exists and is writable. Now dive within subdirectories and kill 'em all.
serendipity_killPath(
$serendipity['serendipityPath'] . $serendipity['uploadPath'],
$serendipity['POST']['newDirectoryName'],
(isset($serendipity['POST']['forceDelete']) ? true : false)
);
}
} else {
printf(ERROR_NO_DIRECTORY, $new_dir);
}
echo '<br /><hr />';
break;
In line 198 you're testing if
$newdir is a directory. In line 199 you're testing if
$serendipity['serendipityPath'] is writeable. And if not you're generating an error saying that
$newdir is not writeable. This doesn't make sense actually.
$newdir is a combination of $serendipity['serendipityPath'] + $serendipity['uploadPath'] + $serendipity['POST']['newDirectoryName'];
I'd rather suggest to test $serendipity['serendipityPath'] + $serendipity['uploadPath'] if it is writeable since the upper directory should be writeable to the user as well if he wants to remove a subdirectory.
So the change could be (in line 199):
- Code: Select all
if (!is_writable($serendipity['serendipityPath'].$serendipity['uploadPath'])) {
For the media database is doesn't matter if the serendipityPath is writeable or not.
This are just my 5 Eurocents for this problem. I hope someone is watching that too.
Regards, Thomas
Edited 2 minutes afterwards
it is enough when changing $serendipity['serendipityPath'] to $serendipity['uploadPath'].
Tried that and it worked as well.
P.S.: You guys must have either a really huge practise writing the word 'serendipity' or you're all men of steel ...
