diff --git a/plugin/editor/cheditor5/imageUpload/config.php b/plugin/editor/cheditor5/imageUpload/config.php index dc5f2ba8b..16787496a 100644 --- a/plugin/editor/cheditor5/imageUpload/config.php +++ b/plugin/editor/cheditor5/imageUpload/config.php @@ -30,8 +30,14 @@ define("SAVE_DIR", $data_dir); define("SAVE_URL", $data_url); function che_get_user_id() { - @session_start(); - return session_id(); + global $member; + + if(session_id() == '') { + @session_start(); + } + + $add_str = (isset($member['mb_id']) && $member['mb_id']) ? $member['mb_id'] : ''; + return session_id().$add_str; } function che_get_file_passname(){ diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php b/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php index 7e72ebafd..4f98bcfd1 100644 --- a/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php +++ b/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php @@ -215,14 +215,20 @@ class UploadHandler substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/')); } - protected function get_user_id() { - @session_start(); - return session_id(); + protected function get_user_id($is_add=true) { + global $member; + + if(session_id() == '') { + @session_start(); + } + + $add_str = ($is_add && isset($member['mb_id']) && $member['mb_id']) ? $member['mb_id'] : ''; + return session_id().$add_str; } protected function get_user_path() { if ($this->options['user_dirs']) { - return $this->get_user_id().'/'; + return $this->get_user_id(false).'/'; } return ''; }