fckeditor module line 1038 replace
$private_dir = trim(isset($global_profile->settings['private_dir']) ? $global_profile->settings['private_dir'] : "", "/\\");
by
$private_dir = trim(isset($global_profile->settings['private_dir']) ? strtr($global_profile->settings['private_dir'], array("%u" => $user->uid)) : "", "/\\");

and line 2348 replace

$private_dir = isset($global_profile->settings['private_dir']) ? $global_profile->settings['private_dir'] : "/";
by
$private_dir = isset($global_profile->settings['private_dir']) ? strtr($global_profile->settings['private_dir'], array("%u" => $user->uid)) : "/";

Comments

kassissieh’s picture

Version: 6.x-1.3-rc7 » 6.x-2.0-beta1
Priority: Normal » Critical

I have made these changes, but private uploads still do not go to the correct location.

After making the above changes, I confirmed that $_SESSION['FCKeditor']['UserFilesPath'] and $_SESSION['FCKeditor']['UserFilesAbsolutePath'] are now being set to the paths I want that do respect the %u token. By the time FCKeditor saves the file, it has been set back to "%u" (not respecting the token).

Have you found other parts of the module that need to be changed in order for this to work?

I updated the version on this ticket to 6.x-2.0-beta1 (was 6.x-1.3rc7 when started).

Richard

Jorrit’s picture

Status: Active » Closed (duplicate)

This is a duplicate of #409038: %u wild card does not work in private folders, which has been fixed in all three branches. You could try to run 6.x-2.x-dev to see if the fix works for you. The fix is similar to the code you are proposing, but for me it worked fine.