Closed (duplicate)
Project:
FCKeditor - WYSIWYG HTML editor
Version:
6.x-2.0-beta1
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 May 2009 at 20:03 UTC
Updated:
26 Jul 2009 at 16:06 UTC
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
Comment #1
kassissieh commentedI 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
Comment #2
Jorrit commentedThis 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.