看了下/include/dialog 下的涉及圖片上傳的兩個邏輯處理文件 select_images.php 和 select_images_post.php,其中對編輯器和文本框上傳的不同處理有一個判斷的BUG 。
這里給出修正方法:
在 /include/dialog/select_images.php 文件
第 257行
代碼如下:
<form action='select_images_post.php' method='POST' enctype="multipart/form-data" name='myform'>
后添加一行,內容如下:
代碼如下:
<?php $noeditor = !empty($noeditor)?"<input type='hidden' name='noeditor' value='yes'>":''; echo $noeditor;//(2011.08.25 根據用戶反饋修正圖片上傳回調 by:織夢的魚)?>
修改 /include/dialog/select_images_post.php 文件 中 第 115行
代碼如下:
ShowMsg("成功上傳一幅圖片!","select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."/$mdir&d=".time());
為:
代碼如下:
if(!empty($noeditor)){
//(2011.08.25 根據用戶反饋修正圖片上傳回調 by:織夢的魚)
ShowMsg("成功上傳一幅圖片!","select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&noeditor=yes&activepath=".urlencode($activepath)."/$mdir&d=".time());
}else{
ShowMsg("成功上傳一幅圖片!","select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."/$mdir&d=".time());
}
懶人覆蓋包(GBK版本,UTF手動轉一下編碼):
將附件中的文件上傳至 include/dialog/ 下即可